forked from deepmap/oapi-codegen
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ft/handle external pkg name in response (deepmap#752)
* feat: add test case issue-removed-external-ref * chore: go generate * feat: fix broken pkg name * fix: broken generated code of strict-interface.tmpl for external schema * fix: broken strict-interface.tmpl * Update generated code generate ./... And update user code * ./internal/test/strict-server/chi/server.go * ./internal/test/strict-server/gin/server.go * ./internal/test/strict-server/echo/server.go Co-authored-by: Marcin Romaszewicz <47459980+deepmap-marcinr@users.noreply.github.com>
- Loading branch information
1 parent
f19608b
commit 535b9ea
Showing
18 changed files
with
643 additions
and
11 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
internal/test/issues/issue-removed-external-ref/config.base.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,12 @@ | ||
--- | ||
package: spec_base | ||
generate: | ||
chi-server: true | ||
strict-server: true | ||
models: true | ||
import-mapping: | ||
spec-ext.yaml: "github.com/deepmap/oapi-codegen/internal/test/issues/issue-removed-external-ref/gen/spec_ext" | ||
output: gen/spec_base/issue.gen.go | ||
output-options: | ||
skip-prune: true | ||
# skip-fmt: true |
10 changes: 10 additions & 0 deletions
10
internal/test/issues/issue-removed-external-ref/config.ext.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,10 @@ | ||
--- | ||
package: spec_ext | ||
generate: | ||
chi-server: true | ||
strict-server: true | ||
models: true | ||
output: gen/spec_ext/issue.gen.go | ||
output-options: | ||
skip-prune: true | ||
# skip-fmt: true |
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,4 @@ | ||
package head_digit_of_httpheader | ||
|
||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --config=config.ext.yaml spec-ext.yaml | ||
//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --config=config.base.yaml spec-base.yaml |
Empty file.
323 changes: 323 additions & 0 deletions
323
internal/test/issues/issue-removed-external-ref/gen/spec_base/issue.gen.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Empty file.
Oops, something went wrong.