ogen
ogen copied to clipboard
gen: support `propertyNames`
Description
I'd like propertyNames to be supported in order for the keys in a map to be validated with a regex.
Example
components:
schemas:
Labels:
type: object
propertyNames:
type: string
pattern: '^[a-z0-9A-Z][\/a-z0-9A-Z-._]{0,61}[a-z0-9A-Z]$|^[a-z0-9A-Z]*$'
additionalProperties:
type: string
maxLength: 63
pattern: '^[a-z0-9A-Z][a-z0-9A-Z-._]{0,61}[a-z0-9A-Z]$|^[a-z0-9A-Z]*$'
example:
key: value
References
https://json-schema.org/draft/2020-12/json-schema-core#section-10.3.2.4