Skip to content

Commit

Permalink
Don't skip non-object type allOf definitions that have yet another al…
Browse files Browse the repository at this point in the history
…lOf definition
  • Loading branch information
praneetloke committed Oct 7, 2023
1 parent 93c2316 commit a646857
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/openapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ func (o *OpenAPIContext) gatherResourceProperties(resourceName string, requestBo
var types []pschema.TypeSpec
newlyAddedTypes := codegen.NewStringSet()
for _, schemaRef := range requestBodySchema.AllOf {
if schemaRef == nil || schemaRef.Value == nil || schemaRef.Value.Type != "object" {
if schemaRef == nil || (schemaRef.Value.Type != "object" && len(schemaRef.Value.AllOf) == 0) {
continue
}

Expand Down

0 comments on commit a646857

Please sign in to comment.