-
-
Notifications
You must be signed in to change notification settings - Fork 523
How to document the oauth endpoints? #2094
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
Here is a minimal working sample application. Basically I'm using: I'm only able to see only one endpoint (/hello) in the generated doc. |
springdoc.show-oauth2-endpoints=true You can already do your tests with the latest SNAPSHOT and provide your feedback before the next release. |
Hi @bnasslahsen, thank you very much for addressing this concern. |
You could use |
@bnasslahsen The column of response body is camel case, but snake case is actually returned. example (/.well-known/oauth-authorization-server)actual response
api-docs schema "OAuth2AuthorizationServerMetadata": {
"type": "object",
"properties": {
"issuer": {
"type": "string",
"format": "url"
},
"authorizationEndpoint": {
"type": "string",
"format": "url"
},
"tokenEndpointAuthenticationMethods": {
"type": "array",
"items": {
"type": "string"
}
},
...
}
} The springdoc code uses OAuth2AuthorizationServerMetadata when creating a schema, but in AbstractOAuth2AuthorizationServerMetadata inherited by this class, OAuth2AuthorizationServerMetadataClaimNames is used for each column to determine the column name for response. example Therefore, it is difficult to obtain the value, so I think it is better to define the schema for each field. There are a lot of revisions, so if there is anything I can do, I will be happy to help. |
This is the kind of feedback i was expecting. |
@bnasslahsen is it possible to add support for |
First of all, thank you very much to all concerned for creating/maintaining this project.
I checked the project documentation on how to document the security endpoints (e.g outh2/token) but I couldn't find much information except the suggestion to include
springdoc-openapi-security
. It also has this point:This dependency helps ignoring @AuthenticationPrincipal in case its used on REST Controllers.
.It's not clear to me that whether including this dependency will help list the security endpoints in the generated docs. Also I couldn't find info on how to add custom documentation for these security endpoints.
Have I missed something? Can someone please help me?
Thanks
James
The text was updated successfully, but these errors were encountered: