Skip to content

Use swagger annotations instead of manual edits to swagger.json for OpenAPI documentation #78

@adamkorynta

Description

@adamkorynta

Component to be refactored
Refactor the manually edited OpenAPI swagger config https://github.com/opendcs/rest_api/blob/main/opendcs-rest-api/src/main/resources/swaggerui/swagger.json to use Java annotations instead.

Purpose of refactoring
Manual editing of JSON file decreases maintainability and is decoupled from the REST API Java classes where the endpoints and parameters are configured.

Proposed method
Use the swagger Java annotations: https://github.com/swagger-api/swagger-core/wiki/Annotations

Additional context
CWMS Data API uses Javalin's Swagger annotations: https://github.com/javalin/javalin-openapi

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions