ogen icon indicating copy to clipboard operation
ogen copied to clipboard

gen: support `propertyNames`

Open modzilla99 opened this issue 3 months ago • 0 comments

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

modzilla99 avatar Oct 01 '25 13:10 modzilla99