Skip to content

Commit

Permalink
fix(extensions): generate all sub-types that define x-go-type-names (
Browse files Browse the repository at this point in the history
…#1397)

In the case that a child type/enum defines `x-go-type-name`s, we don't
currently generate these correctly, therefore we should look at all
`AdditionalTypes` that need adding.

Co-authored-by: Jamie Tanna <jamie.tanna@elastic.co>
  • Loading branch information
jamesphillpotts-fr and jamietanna committed May 18, 2024
1 parent bf8962d commit 311b23b
Show file tree
Hide file tree
Showing 7 changed files with 511 additions and 10 deletions.
8 changes: 8 additions & 0 deletions internal/test/issues/issue-1397/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# yaml-language-server: $schema=../../../../configuration-schema.json
package: issue1397
generate:
echo-server: true
client: true
models: true
embedded-spec: true
output: issue1397.gen.go
3 changes: 3 additions & 0 deletions internal/test/issues/issue-1397/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package issue1397

//go:generate go run github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen --config=config.yaml spec.yaml

0 comments on commit 311b23b

Please sign in to comment.