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
Security Definitions- SwaggerUI #1108
Comments
Not sure what you mean by that. What are you trying to do exactly, what do you expect to see and what do you actually see? |
That's because swagger-ui doesn't represent the security definitions that way, and is not intended to. |
what needs to be done to represent security definitions in SwaggerUI ? |
Currently, there's no way to display that. |
we needed that urgently for documentation. Any help will be appreciated ! |
My question is when the swagger editor can display, why swagger UI is not doing ? This needs to be fixed, else how can we share the security information with the consumers? What I feel is whatever the features are there in swaggereditor should be same in swaggerUI, whereas the later one is restricted to only for documentation/view. Thanks, |
The editor and ui are two completely separate projects (for now). The UI does not show the security information right now, and there's no 'add-on' to add the display (though you can probably write one on your own). Basic authentication and OAuth2 can be easily integrated into the UI with no special display of the security specifically. |
+1 |
+1 |
2 similar comments
👍 |
+1 |
I agree, most useful to know. |
+1 I am hard coding the auth headers at the moment, would love to have this in |
+1 😃 |
+1 |
+1 |
See pull #2014 and please give feedback on that. There are a couple todos left |
#2014 is merged |
+1 |
4 similar comments
+1 |
+1 |
+1 |
+1 |
+ 1 |
+1 |
1 similar comment
+1 |
This is in the 2.1.5 release. |
When will it be released? |
8 days ago. |
With the latest release I cannot see anything different (with a Basic Auth documented), where is it supposed to display? Do you have any screenshot or link to the pull request? |
I don't understand why displaying the security information for an API is out of scope. http://swagger.io/swagger-ui/ says that Swagger UI is to "dynamically generate beautiful documentation" - why would the API's security mechanism be excluded from the visible documentation? You need that information to write an API client, you might not be using the auto-generated code. Does anyone have a fork or a PR that renders the security infomation? Otherwise, if I work on a PR would someone on the project team consider that feature? |
@doooks - in general, we love getting PRs that push the project forward, but right now we're focused on a major update to the project and it's probably not the best time to submit such a PR specifically. |
+1 |
+1 |
@vladkras amen! |
+1 |
@leonluocheng hmm? the security definitions are displayed in the current version. |
@webron I am using swashbuckle.core 5.5.3, maybe that causes this issue. but the swagger generated UI did not display the basic authentication that I specified in app configuration. Example: |
That's a very old version of the UI. Use the latest one and you should be good. |
Hi, I went through the complete thread. I also require to display the basic auth security field for setting client id and secret. And with the new swagger it looks really cool. Kindly let me know if any module available which can render my json file to similar swagger ui format. I already used swagger ui formatter but it is not displaying me the security field. Thanks. |
+1 |
Hi Team,
Iam unable to load the security definitions through swagger UI documentations.
Please let me know if i need to include any js file/ div classes.
Thanks,
Rajesh
The text was updated successfully, but these errors were encountered: