redoc icon indicating copy to clipboard operation
redoc copied to clipboard

Dependecy refs

Open hacan359 opened this issue 1 year ago • 2 comments

Describe the bug I am experiencing an issue with ReDoc where nested objects are rendered inconsistently at different levels of depth in my API documentation. Specifically, I have defined a set of objects in my OpenAPI specification, and while they render correctly at one level of nesting, they do not render correctly at deeper levels.

Details: I am using the same object definitions throughout my OpenAPI specification. At a certain level of nesting, the objects display their properties correctly, but at deeper levels, the objects are rendered incorrectly or not at all. This inconsistency makes it difficult for users to understand the API structure and the data being returned. Example: Correct Rendering: At level 1, the object displays all properties as expected. Incorrect Rendering: At level 2 or deeper, the object appears as an empty object {} or does not show its properties.

Screenshots Image

Additional context I use last version readoc https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js

hacan359 avatar Nov 20 '24 08:11 hacan359

Hi @hacan359, I experience the same issue times ago. I got it fixed by configuring Redoc's generatedSamplesMaxDepth. It seems in my experience, its caused by having it reaches the max depth of the samples. Set it to like 21 or higher value and see the results.

Reference: https://redocly.com/docs/realm/config/openapi/generated-samples-max-depth

It seems it's not in the config.md of the open-source code, I will add it soon.

Hope it helps.

audipasuatmadi avatar Nov 21 '24 07:11 audipasuatmadi

hi @hacan359. Please provide an example(OpenAPI description) to reproduce your case and we'll try to help you

AlexVarchuk avatar Dec 30 '24 15:12 AlexVarchuk