Closed
Description
JSON Schema draft 4 has patternProperties
which is not supported by Swagger 2.0.
patternProperties allows to have loosely defined objects where the list of keys is not fixed in the spec (like additionalProperties
allows in Swagger 2.0), but the format of the keys is restricted with a regexp (contrary to additionalProperties
where keys are not at all limited).
Here is a use case from #380:
name: pop
description: population by country
type: object
patternProperties:
'^[A-Z]{2}$':
type: integer
description: the population of the country indicated by the property name.
Metadata
Metadata
Assignees
Labels
No labels