Skip to content

Default schema expansion level #1222

@protyposis

Description

@protyposis

Is your feature request related to a problem?

Our API responses are wrapped in a generic container with metadata (status, paging, etc.), so the actual payload is always nested under a data property. In the API docs, this means users must manually expand the data property every time to view the useful part of the response.

Describe the solution you'd like

A global configuration option to set a schema expansion level (e.g., expand automatically up to depth 1), similar to https://redocly.com/docs/redoc/config#schemaexpansionlevel. This would let us auto-expand the data node so developers see relevant fields immediately.

For a use case like ours, this would significantly improve the user experience of the documentation. Since using an envelope/wrapper is a common pattern, I believe that other users would benefit from this as well.

Describe alternatives you've considered

An alternative might be swizzling and customizing the component. I am unclear on the implications, though, e.g., whether this introduces maintenance risks and complicates upgrades. Having a built-in option would certainly be more stable and user-friendly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions