Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions pkg/generator/schema_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ import (
"github.com/atombender/go-jsonschema/pkg/schemas"
)

var (
errEmptyInAnyOf = errors.New("cannot have empty anyOf array")
errTooManyTypesForAdditionalProperties = errors.New("cannot support multiple types for additional properties")
)
var errEmptyInAnyOf = errors.New("cannot have empty anyOf array")

const float64Type = "float64"

Expand Down Expand Up @@ -700,10 +697,6 @@ func (g *schemaGenerator) generateStructType(t *schemas.Type, scope nameScope) (

// Checking .Not here because `false` is unmarshalled to .Not = Type{}.
if t.AdditionalProperties != nil && t.AdditionalProperties.Not == nil {
if len(t.AdditionalProperties.Type) > 1 {
return nil, errTooManyTypesForAdditionalProperties
}

var (
defaultValue any = nil
fieldType codegen.Type = codegen.EmptyInterfaceType{}
Expand Down