-
Notifications
You must be signed in to change notification settings - Fork 44
For SpringDoc OpenAPI 1.6, Swagger UI unable to render definition #52
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
Comments
It looks like swagger ui doesn't support 3.1.0 version yet. |
@uc4w6c OpenAPI 3.1 is not the problem, I have updated the issue description with a 3.0 reference that still produces the same problem: springdoc:
api-docs:
version: "openapi_3_0" |
@alan-czajkowski |
@uc4w6c according to that issue you posted springdoc/springdoc-openapi#2143 the fix ends up being adding the
but this is hardly a proper fix, this is just a work-around, I hope the issue I described gets properly resolved |
You are overriding the default spring registered HttpMessageConverter, you should have ByteArrayHttpMessageConverter registered as well to have proper This is the required setting for your use case. Are you having any other fix in mind, that we didn't integrate in the library ? |
@bnasslahsen this is becoming a notorious use-case, and the SpringDoc documentation does not properly describe this use-case, that is becoming very popular and frustrating to users (who read the documentation) |
This section is added in the FAQ, for this use-case: |
Describe the bug
Swagger UI page complains about rendering the definition, shows error on page saying:
http://localhost:8080/swagger-ui/index.html
when running the Spring Boot Maven plugin:
To Reproduce
Steps to reproduce the behavior:
Using Spring Boot 2.6:
Using SpringDoc 1.6:
Run using the Spring Boot Maven plugin:
Expected behavior
Swagger UI does not throw error
Additional context
Config:
Using custom HTTP message converters:
Unable to see JSON spec at:
http://localhost:8080/v3/api-docs
only shows some kind of Base64 output (not JSON)
The text was updated successfully, but these errors were encountered: