docs icon indicating copy to clipboard operation
docs copied to clipboard

Missing support for 'prefixItems'

Open LightenedLimited opened this issue 8 months ago • 0 comments

OpenAPI 3.1.0 supports 'prefixItems,' as it is fully compatible with JSON Schema 2020-12. 'prefixItems' is helpful for us to validate tuples, and several existing solutions already support this keyword (e.g., Swagger).

One example property we'd like support for is

"span": {
    "type": "array",
    "minItems": 2, 
    "maxItems": 2,
    "prefixItems": [
      {
        "type": "number",
        "description": "Starting index of the claim's span"
      },
      {
        "type": "number",
        "description": "Ending index of the claim's span"
      }
    ],
    "additionalItems": false
  }

Currently, it renders as any[].

LightenedLimited avatar Feb 14 '25 10:02 LightenedLimited