Skip to content

feat: Add Swagger UI with OpenAPI annotations#24

Open
ayshishannidhya wants to merge 1 commit intoOpenElements:mainfrom
ayshishannidhya:add-swagger-ui
Open

feat: Add Swagger UI with OpenAPI annotations#24
ayshishannidhya wants to merge 1 commit intoOpenElements:mainfrom
ayshishannidhya:add-swagger-ui

Conversation

@ayshishannidhya
Copy link
Copy Markdown

Summary

This PR adds Swagger UI support to the Good First Issue Provider application.

Changes

  • OpenApiConfig.java: New configuration class with API metadata (title, description, version, contact, license)
  • ApiEndpoint.java: Added OpenAPI annotations to all REST endpoints:
    • @Tag for grouping endpoints
    • @Operation with summary and description for each endpoint
    • @Parameter descriptions for all query parameters
    • @ApiResponse for documenting response codes
  • application.yml: Added springdoc configuration for Swagger UI and API docs paths

How to access

Once the application is running, Swagger UI is available at:

  • Swagger UI: /swagger-ui.html
  • OpenAPI JSON: /v3/api-docs

Notes

The springdoc-openapi-starter-webmvc-ui dependency was already present in pom.xml, so no dependency changes were needed.

Closes #4

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your first pull request! We're excited to review it. 🚀

- Add OpenApiConfig with API metadata (title, description, version, license)
- Add OpenAPI annotations (@operation, @parameter, @apiresponse, @tag) to all API endpoints in ApiEndpoint.java
- Configure springdoc Swagger UI and API docs paths in application.yml

The springdoc-openapi-starter-webmvc-ui dependency was already present in pom.xml.
Swagger UI will be available at /swagger-ui.html when the application is running.

Closes OpenElements#4

Signed-off-by: Ankit <asp45624@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add SwaggerUI frontend

1 participant