Skip to content

Commit 13eea66

Browse files
Jamie Tannajamietanna
authored andcommitted
docs(additional-initialisms): add a usage example
1 parent 8e7938e commit 13eea66

4 files changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
openapi: "3.0.0"
2+
info:
3+
version: 1.0.0
4+
title: additional-initialisms
5+
components:
6+
schemas:
7+
Request:
8+
type: object
9+
required:
10+
- csp_name
11+
properties:
12+
csp_name:
13+
description: The Cloud Service Provider's name.
14+
type: string
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# yaml-language-server: $schema=../../../configuration-schema.json
2+
package: additionalinitialisms
3+
output: gen.go
4+
generate:
5+
models: true
6+
output-options:
7+
# to make sure that all types are generated, even if they're unreferenced
8+
skip-prune: true
9+
name-normalizer: ToCamelCaseWithInitialisms
10+
additional-initialisms:
11+
- CSP

examples/output-options/additionalinitialisms/gen.go

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package additionalinitialisms
2+
3+
//go:generate go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen -config cfg.yaml api.yaml

0 commit comments

Comments
 (0)