Skip to content

additionalProperties - don't allow booleans as value, emulate 'true' behaviour using anyOf or $ref #133

Closed
@jschnaitmann

Description

@jschnaitmann

It would make the definition, in my opinion, more readable and robust if the additionalProperty attribute would only allow object values.

The former additionalProperties = false would be represented by the default empty object value {}. The former additionalProperties = true could be achieved with something like this (or possibly using anyOf?):

additionalProperties: {
    "$ref": "#/definitions/simpleTypes"
}

This would also disallow additionalProperties by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clarificationItems that need to be clarified in the specification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions