Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update all examples and tests to use new configuration style.
- Loading branch information
marcinromaszewicz
committed
Jun 1, 2022
1 parent
112a59b
commit 7d930a4
Showing
27 changed files
with
98 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package: petstore | ||
generate: | ||
client: true | ||
models: true | ||
output: ../petstore-client.gen.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
output: | ||
v1/openapi.gen.go | ||
package: v1 | ||
generate: | ||
- types | ||
- skip-prune | ||
- spec | ||
models: true | ||
embedded-spec: true | ||
compatibility: | ||
old-merge-schemas: true | ||
output-options: | ||
skip-prune: true | ||
output: v1/openapi.gen.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
output: | ||
v2/openapi.gen.go | ||
package: v2 | ||
generate: | ||
- types | ||
- skip-prune | ||
- spec | ||
models: true | ||
embedded-spec: true | ||
output-options: | ||
skip-prune: true | ||
output: v2/openapi.gen.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package all_of | ||
|
||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --old-config-style --config=config1.yaml openapi.yaml | ||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --old-config-style --config=config2.yaml openapi.yaml | ||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --config=config1.yaml openapi.yaml | ||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --config=config2.yaml openapi.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
output: | ||
components.gen.go | ||
package: components | ||
generate: | ||
- types | ||
- skip-prune | ||
models: true | ||
output-options: | ||
skip-prune: true | ||
output: components.gen.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package components | ||
|
||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --old-config-style --config=config.yaml components.yaml | ||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --config=config.yaml components.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package: packageA | ||
generate: | ||
models: true | ||
embedded-spec: true | ||
output-options: | ||
skip-prune: true | ||
import-mapping: | ||
../packageB/spec.yaml: github.com/deepmap/oapi-codegen/internal/test/externalref/packageB | ||
output: externalref.gen.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package packageA | ||
|
||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --old-config-style -generate types,skip-prune,spec --package=packageA -o externalref.gen.go --import-mapping=../packageB/spec.yaml:github.com/deepmap/oapi-codegen/internal/test/externalref/packageB spec.yaml | ||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --config=config.yaml spec.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package: packageB | ||
generate: | ||
models: true | ||
embedded-spec: true | ||
output-options: | ||
skip-prune: true | ||
output: externalref.gen.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package packageB | ||
|
||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --old-config-style -generate types,skip-prune,spec --package=packageB -o externalref.gen.go spec.yaml | ||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --config=config.yaml spec.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package: issue_312 | ||
generate: | ||
echo-server: true | ||
client: true | ||
models: true | ||
embedded-spec: true | ||
output: issue.gen.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package issue_312 | ||
|
||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --old-config-style --package=issue_312 -o issue.gen.go spec.yaml | ||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --config=config.yaml spec.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package: issue_52 | ||
generate: | ||
echo-server: true | ||
client: true | ||
models: true | ||
embedded-spec: true | ||
output: issue.gen.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package issue_52 | ||
|
||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --old-config-style --package=issue_52 -o issue.gen.go spec.yaml | ||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --config=config.yaml spec.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package: grab_import_names | ||
generate: | ||
echo-server: true | ||
client: true | ||
models: true | ||
embedded-spec: true | ||
output: issue.gen.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package grab_import_names | ||
|
||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --old-config-style --package=grab_import_names -o issue.gen.go spec.yaml | ||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --config=config.yaml spec.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package: illegal_enum_names | ||
generate: | ||
echo-server: true | ||
client: true | ||
models: true | ||
embedded-spec: true | ||
output: issue.gen.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package illegal_enum_names | ||
|
||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --old-config-style --package=illegal_enum_names -o issue.gen.go spec.yaml | ||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --config=config.yaml spec.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package: parameters | ||
generate: | ||
echo-server: true | ||
client: true | ||
models: true | ||
embedded-spec: true | ||
output: parameters.gen.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package parameters | ||
|
||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --old-config-style --package=parameters -o parameters.gen.go parameters.yaml | ||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --config=config.yaml parameters.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package: schemas | ||
generate: | ||
echo-server: true | ||
client: true | ||
models: true | ||
embedded-spec: true | ||
output: schemas.gen.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package schemas | ||
|
||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --old-config-style --package=schemas -o schemas.gen.go schemas.yaml | ||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --config=config.yaml schemas.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package: server | ||
generate: | ||
chi-server: true | ||
models: true | ||
output: server.gen.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package server | ||
|
||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --old-config-style --generate=types,chi-server --package=server -o server.gen.go ../test-schema.yaml | ||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --config=config.yaml ../test-schema.yaml | ||
//go:generate go run github.com/matryer/moq -out server_moq.gen.go . ServerInterface |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters