Skip to content

Commit

Permalink
fix: rework solution to avoid backward incompatible changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddenmarten committed Dec 1, 2024
1 parent 261bbbf commit b232df0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/test/issues/issue-1476/issue1476.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pkg/codegen/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,12 @@ func GenerateGoSchema(sref *openapi3.SchemaRef, path []string) (Schema, error) {
for _, pName := range SortedSchemaKeys(schema.Properties) {
p := schema.Properties[pName]

// Merge allOf in property
if p.Value.AllOf != nil {
val, err := mergeAllOf(p.Value.AllOf)
if err != nil {
return Schema{}, fmt.Errorf("error generating Go schema from allOf for property '%s': %w", pName, err)
}
p.Value = &val
p.Value.Extensions = val.Extensions
}

propertyPath := append(path, pName)
Expand Down

0 comments on commit b232df0

Please sign in to comment.