Skip to content

Commit 2d0ec25

Browse files
Alex Botenomissis
Alex Boten
andcommitted
add check for .Not
Signed-off-by: Alex Boten <[email protected]> Co-authored-by: Alex Boten <[email protected]> Co-authored-by: Claudio Beatrice <[email protected]>
1 parent a97bf63 commit 2d0ec25

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/generator/schema_generator.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,8 @@ func (g *schemaGenerator) generateStructType(
531531
structType.AddField(structField)
532532
}
533533

534-
if t.AdditionalProperties != nil {
534+
if t.AdditionalProperties != nil && t.AdditionalProperties.Not == nil {
535+
// checking .Not here because `false` is unmarshalled to .Not = Type{}
535536
if valueType, err := g.generateType(t.AdditionalProperties, nil); err != nil {
536537
return nil, err
537538
} else {

0 commit comments

Comments
 (0)