prefixItems isn’t respected
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 25.9k
- Forks
- 2.4k
- Avg merge
- 13h 10m
- Merged PRs (30d)
- 4
Description
Describe the bug
Defining prefixItems within an array with items set to false displays a message saying: Schema not provided.
Expected behavior
Defining prefixItems as an array with items set to false should outline that this is an array containing only the items in prefixItems. Using anyOf/oneOf as the items array gets us a little closer, but doesn’t enforce the order of the items.
This makes it look like the swagger document itself is incorrect. If support of this is out of scope, could we at least change the text to something like “prefixItems is not yet supported”?
Minimal reproducible OpenAPI snippet(if possible)
type: array
minItems: 2
maxItems: 2
prefixItems:
- number
- string
items: false
Screenshots
items: false
This gives text that blames the author of the swagger document:

items:
anyOf:
- type: number
- type: string
Using anyOf or oneOf makes it look like the array can be 2 of either numbers or strings:

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the minimal OpenAPI YAML snippet and inspect how Redoc renders array schemas with prefixItems and items: false. Determine whether the intended outcome is ordered prefixItems support or only a clearer unsupported-feature message; done means the misleading “Schema not provided” text is replaced or the array is rendered with the documented ordered semantics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, typescript
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100