In JSON, I have an object for which the possible values of the keys are constrained to an enum:
{
"res1" : { ... },
"res2" : { ... },
"res3" : { ... }
}
How do I represent in OAS3 that the key itself must be a member of the following enum?
restriction-types:
enum:
- res1
- res2
- res3
I get the impression that this should be propertyNames
from the json schema core definition: https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-10.3.2.4
The swagger 3.0 documentation says propertyNames is an unsupported keyword. Is this true for the OAS 3.0 specification? https://swagger.io/docs/specification/data-models/keywords