Schema depth should be configurable
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 problem to be solved
Depth of JSON request/response schema appears limited to 8, after which no more details are possible to get and instead Recursive is displayed. The sample view does have a configurable max depth; generatedSamplesMaxDepth, which is somewhat helpful but no documentation is provided in this view.
Describe the solution you'd like
An additional configuration option, e.g. generatedSchemaMaxDepth that would enable parity between the schema and sample view in terms of possible depth.
Describe alternatives you've considered
- Change hard-coded defaults from 8 to something higher, like 10 or 12. It would likely suffice in my scenario but may have other side-effects, plus it's not consistent with how other max depths are controlled.
- Control max depth in schema using the same property as controls sample depth. I think that would be misleading as the existing property has
Samplesin its name and should be limited to the samples view only.
Additional context
An example of such a deep (response) structure is here (The response to /v2alpha/data/model/concepts)
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 locating the existing generatedSamplesMaxDepth configuration and the code that limits JSON request and response schema depth. Add an independent schema-depth option without changing the sample setting, and verify that deeper schemas no longer collapse to Recursive while the configured limit is respected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100