-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Optional header parameter: Javascript error when not filling the header #9550
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
Hi everybody, @glowcloud as discussed please test this also for OpenAPI 2.0, so that we know how SwaggerUI behaves. |
Looking at OpenAPI 2.0, if we somehow get an undefined value for For
It's because we don't check if we have We might also want to change the check in ![]() we'll send an empty value anyway:
|
Fixes to OpenAPI 3 definitions addressed upstream in [email protected]. |
This is going to be available in next SwaggerUI release. Please reopen if it's still manifesting in new release. |
Q&A (please complete the following information)
org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0
5.10.3
(at least that's what I infer from springdoc giving meorg.webjars:swagger-ui:5.10.3
)Content & configuration
Example Swagger/OpenAPI definition:
Swagger-UI configuration options:
None that I did myself - maybe Springdoc does something.
Describe the bug you're encountering
To reproduce...
Given an endpoint definition with an optional header parameter (example is above)
When I click on "Try out" and "Execute" of that endpoint without filling the header parameter:
The "Loading" spinner keeps spinning infinitely and there is a JS error in the browser console.
The error from the console as text:
Expected behavior
The request should be sent.
Screenshots
Additional context or thoughts
The text was updated successfully, but these errors were encountered: