Skip to content

additionalProperties restriction on multiple types #490

@codeboten

Description

@codeboten

As far as I understand, the type for additionalProperties supports array (see https://www.learnjsonschema.com/2020-12/applicator/additionalproperties/ https://www.learnjsonschema.com/2020-12/validation/type/). The code in schema_generator currently returns an error if multiple types are set:

return nil, errTooManyTypesForAdditionalProperties

I would like to propose if multiple types are set, the code should set any as the type and continue on. Any thoughts?

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