-
Notifications
You must be signed in to change notification settings - Fork 9k
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
OpenAPI 3.1.0 support: Path servers is getting incorrectly rendered even though there's no "servers" prop defined for that path #9221
Comments
Still reproducible with v5.9.1 |
@acelaya I couldn't reproduce on v5.9.4. Can you please confirm? Context: how the |
Yes, I'm afraid I can still reproduce this in v5.9.4 |
@acelaya unfortunately you're Steps Of Reproduction don't work for me. Can you delete all swagger-ui containers and images and recreate your setup using your steps of reproduction with v5.9.4? |
You are right, I cannot reproduce it using those steps, but I can still reproduce it with my real swagger. Let me try to find the difference and I will come back to you. I also updated the steps to use v5.9.4, and fixed a typo in the port referenced in step 3 |
I think the problem is that it is not consistent. I thought the problem was the swagger.json sample I originally provided, so I ended up uploading the full swagger spec from my project, where I was able to reproduce it. It is attached to the issue because it's too big to embed in the issue body. However, while trying to reproduce it again, I realized it doesn't always happen. You can see a screen recording here where, using the instructions above, I couldn't reproduce it on the first attempt, but then I refreshed the page, repeated the steps, and then I was able to reproduce it. I believe the same would have happened with the originally provided swagger sample. swagger-ui-servers.webm |
hello @char0n, i encounter the same issue after the cache fix in swagger-js (for parameters defined at path level) |
Q&A (please complete the following information)
swaggerapi/swagger-ui
docker imageContent & configuration
Example Swagger/OpenAPI definition: https://drive.google.com/file/d/1ysjjWAy-1_Xxhf4LBN4nLasMZSCm0EUa/view?usp=drive_link
Swagger-UI configuration options: Whatever is set in
swaggerapi/swagger-ui
docker imageDescribe the bug you're encountering
After updating my OAS spec from v3.0 to v3.1 I have noticed swagger-ui renders a "servers" block for every endpoint, when clicking "Try it out", but only if an Authorization has been set before.
This wouldn't bother me if it wasn't because it does not inherit the value set on the global "Servers", meaning you have to set the value for every endpoint you want to test, instead of just once globally.
I could not reproduce this in https://editor-next.swagger.io/ though.
To reproduce...
Steps to reproduce the behavior:
swaggerapi/swagger-ui
and mounting the swagger.json filedocker run --rm -p 8888:8080 -v ${PWD}/swagger.json:/app/swagger.json swaggerapi/swagger-ui:v5.9.4
servers
is defined for the endpoints in the spec.Expected behavior
Servers block is not rendered, and the endpoint uses the value set in the global servers.
The text was updated successfully, but these errors were encountered: