Supply custom "property name" for additionalProperties
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 25.9k
- Forks
- 2.4k
- Avg merge
- 13h 10m
- Merged PRs (30d)
- 4
Description
Would be nice to better describe/document the keys within additionalProperties where appropriate. I often have mappings where the key isn't completely free form (e.g. a named unique identifier or an integer with some meaning) and would be nice to have the docs relfect that, e.g:
- players (object)
- player-id* : object (Player)
rather than
- players (object)
- property name* : object (Player)
Will also suggest such a change in the OpenAPI specification but is it possible/desirable to add the ability to override the "property name*" value?
Would also be useful in the generated examples where the keys are "property1", "property2" but could be tied to the name in the docs, e.g. "player-id-1", "player-id-2"
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 tracing how OpenAPI additionalProperties is rendered in the documentation and how generated examples choose keys. Check whether the proposed override is supported by the OpenAPI specification, then define and verify the behavior for the players example in both the rendered property label and generated example keys.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, typescript
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100