Skip to content

docs(api): add Swagger @ApiResponses for OAuthClientController#3759

Open
Shivamrut wants to merge 5 commits intoeclipse-sw360:mainfrom
Shivamrut:2565
Open

docs(api): add Swagger @ApiResponses for OAuthClientController#3759
Shivamrut wants to merge 5 commits intoeclipse-sw360:mainfrom
Shivamrut:2565

Conversation

@Shivamrut
Copy link
Copy Markdown
Contributor

@Shivamrut Shivamrut commented Feb 25, 2026

Works on: #2565

Summary

  • Added @Operation, @ApiResponses, @Tag, and @SecurityRequirement annotations to all 3 endpoints in OAuthClientController (GET, POST, DELETE)
  • Documented response codes: 200, 400, 401, 403, 500 based on actual return paths in the code
  • Added springdoc-openapi-starter-webmvc-ui dependency to the authorization-server module's pom.xml (same pattern as resource-server)

Files Changed

  • rest/authorization-server/pom.xml — added springdoc-openapi dependency
  • rest/authorization-server/src/.../OAuthClientController.java — added Swagger annotations

Test Plan

  • mvn clean install -pl rest/authorization-server -am -DskipTests — BUILD SUCCESS
  • mvn test -pl rest/authorization-server — 12 tests run, 0 failures, 0 errors

Issue: #2565

Signed-off-by: Shivamrut <gshivamrut@gmail.com>
@Shivamrut
Copy link
Copy Markdown
Contributor Author

@GMishx @amritkv @KoukiHama Please review this PR, I have tested the build and unit test case, everything pass. Any changes please let me know

@GMishx GMishx added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for labels Mar 2, 2026
@GMishx
Copy link
Copy Markdown
Member

GMishx commented Mar 10, 2026

The documentation for authorization-server does not appear in http://localhost:8080/resource/swagger-ui/index.html

Not sure this PR in current state would be helpful in any manner.

@Shivamrut
Copy link
Copy Markdown
Contributor Author

Thanks for the feedback, @GMishx.
You’re right this PR adds OpenAPI annotations in authorization-server, so they won’t show up in resource-server Swagger (/resource/swagger-ui/index.html).

Could you please confirm the expected direction so I can update this correctly?

  1. Should auth-server APIs be documented in a separate auth-server Swagger endpoint, or
  2. Should they be aggregated and shown inside resource-server Swagger UI?

Also, one clarification from my side: do we want auth-server Swagger to be publicly useful for users/integrators (e.g., OAuth client-management endpoints), or is documenting only resource-server APIs the intended scope?

If option 1, I’ll update this PR to make auth-server Swagger endpoints accessible and share the exact URL here.
If option 2, I can either extend this PR for aggregation or open a follow-up PR, based on your preference.

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

Labels

needs code review needs general test This is general testing, meaning that there is no org specific issue to check for

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants