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

Swagger UI "Try it out" appears to be polling a test database #189

Closed
KairuByte opened this issue Sep 9, 2023 · 4 comments
Closed

Swagger UI "Try it out" appears to be polling a test database #189

KairuByte opened this issue Sep 9, 2023 · 4 comments
Labels
🪲 bug Something isn't working 🎛️ server There are things to do on the server

Comments

@KairuByte
Copy link

Describe the bug
When you run a "try it out" API call in Swagger UI, you get what appears to be test data. In the example below, I am getting Grand Theft Auto, which is not a game in my library.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Swagger UI /api/docs
  2. Log in
  3. Pick an API call (I chose /api/v1/games
  4. Run the call

Expected behavior
Proper data, from the "production" database.

@KairuByte KairuByte added 🎛️ server There are things to do on the server 🪲 bug Something isn't working labels Sep 9, 2023
@KairuByte KairuByte changed the title Swagger UI "Try it out" appears to be polling a test database? Swagger UI "Try it out" appears to be polling a test database Sep 9, 2023
@Alfagun74
Copy link
Contributor

There is no test database.
It works perfectly fine.

Image

Make sure to set the server and authentication correctly at the top and actually execute the request instead of just checking the example data in the YAML.

@Alfagun74 Alfagun74 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 9, 2023
@Alfagun74 Alfagun74 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 9, 2023
@Alfagun74
Copy link
Contributor

GTA V is indeed my example data, i dont think your request works at all:

Image

@KairuByte
Copy link
Author

Hrm, I suppose I was missing the error between the two in this image, so the title should be "Try it now does not work" as no matter my inputs, this is the result:

image

@Alfagun74
Copy link
Contributor

Honestly, this could be a bug to report on https://github.com/swagger-api/swagger-ui. I can't control this interface a lot, so I'm not sure why it wouldn't work on an iPhone. It might be related to this browser or CORS issue. Unfortunately, I don't have the option to configure enableCors in https://github.com/nestjs/swagger either. I don't think disabling "Try it Out" is necessary, but I can do that as well if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working 🎛️ server There are things to do on the server
Projects
Archived in project
Development

No branches or pull requests

2 participants