Skip to content

Are Schema's anyOf/allOf/oneOf incorrectly typed? #109

@c-wygoda

Description

@c-wygoda

These must be arrays according to the spec https://json-schema.org/draft/2020-12/json-schema-core#section-10.2.1.3, but aren't?

fizz/openapi/spec.go

Lines 156 to 158 in fe54d35

AllOf *SchemaOrRef `json:"allOf,omitempty" yaml:"allOf,omitempty"`
OneOf *SchemaOrRef `json:"oneOf,omitempty" yaml:"oneOf,omitempty"`
AnyOf *SchemaOrRef `json:"anyOf,omitempty" yaml:"anyOf,omitempty"`

I'm trying to inline the GeoJSON spec from an JSON file, but unmarshalling fails due to this.

Would be interested to hear about the reasons if this is deliberate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions