Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwaggerUIReact does not support defaultModelRendering #7219

Closed
alexrejto opened this issue Apr 27, 2021 · 0 comments · Fixed by #7705
Closed

SwaggerUIReact does not support defaultModelRendering #7219

alexrejto opened this issue Apr 27, 2021 · 0 comments · Fixed by #7705

Comments

@alexrejto
Copy link

Q&A (please complete the following information)

  • OS: macOS
  • Browser: chrome
  • Version: 89.0.4389.128
  • Method of installation: npm swagger-ui-react
  • Swagger-UI version: 3.43
  • Swagger/OpenAPI version: OpenAPI 3.0

Content & configuration

Example Swagger/OpenAPI definition:

Very large, This bug is unrelated to the definitoin

Swagger-UI configuration options:

        <SwaggerUI
          url={getSpecFilePath(version, showLA)}
          docExpansion={'none'}
          deepLinking={true}
          defaultModelRendering={'model'}
          defaultModelExpandDepth={3}
          // @ts-ignore: TS2769 Swagger-ui docs and .dts expect defaultModelExpandDepth (Model) but require
          // defaultModelsExpandDepth (Models) to hide model schemas from view.
          defaultModelsExpandDepth={-1}
        />

Describe the bug you're encountering

I expect defaultModelRendering={'model'} to show the schema UI by default when I expand an operation. However, I am always stuck on the example JSON view.

Additional context or thoughts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants