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

Show a helpful message by default (instead of the Petstore) #5355

Open
shockey opened this issue May 16, 2019 · 0 comments
Open

Show a helpful message by default (instead of the Petstore) #5355

shockey opened this issue May 16, 2019 · 0 comments

Comments

@shockey
Copy link
Contributor

shockey commented May 16, 2019

Content & configuration

An unconfigured Swagger UI instance, i.e.:

SwaggerUI({})

Is your feature request related to a problem?

As a user trying to get started with Swagger UI, it's quite possible to hit a point where I get Swagger UI working but haven't successfully pointed it at my definition.

Consequentially, I'm going to see the Petstore served by default, which is a nice demo but doesn't get me any closer to showing my content in Swagger UI.

I've probably already seen and played around with the Petstore while shopping around for documentation tools, so showing it to me again doesn't provide me with any value.

Describe the solution you'd like

A helpful message similar, something like:

No API definition was provided to Swagger UI.

You should provide an API definition as a URL or as a string in 
Swagger UI's configuration.

[Click here] for documentation on how to get started with Swagger UI.

We do something similar today when a user feeds us an indeterminate-version document (i.e., one that is valid JSON/YAML but has no valid swagger/openapi field value):

image

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

No branches or pull requests

1 participant