Summary
Several REST interfaces have @Operation annotations but are missing @APIResponse annotations for HTTP status codes. Adding these improves the generated OpenAPI spec and Swagger UI documentation.
Interfaces to update
| Interface |
Methods needing @APIResponse |
configs/IRestVersionInfo.java |
2 |
configs/properties/IRestPropertiesStore.java |
3 |
configs/deployment/IRestDeploymentStore.java |
1 |
configs/descriptors/IRestDocumentDescriptorStore.java |
4 |
configs/channels/IRestChannelIntegrationStore.java |
6 |
configs/agents/IRestCapabilityRegistry.java |
2 |
Pattern to follow
See IRestAgentStore.java for the established pattern:
@GET
@APIResponse(responseCode = "200", description = "The agent configuration")
@APIResponse(responseCode = "404", description = "Agent not found")
@Operation(description = "Read agent.")
Response readAgent(...);
Common status codes by HTTP method:
- GET by ID → 200, 404
- GET list → 200
- POST create → 201, 400
- PUT update → 200, 400, 404
- DELETE → 204, 404
Check the implementation class when in doubt about which status codes are actually returned.
Acceptance criteria
Summary
Several REST interfaces have
@Operationannotations but are missing@APIResponseannotations for HTTP status codes. Adding these improves the generated OpenAPI spec and Swagger UI documentation.Interfaces to update
@APIResponseconfigs/IRestVersionInfo.javaconfigs/properties/IRestPropertiesStore.javaconfigs/deployment/IRestDeploymentStore.javaconfigs/descriptors/IRestDocumentDescriptorStore.javaconfigs/channels/IRestChannelIntegrationStore.javaconfigs/agents/IRestCapabilityRegistry.javaPattern to follow
See
IRestAgentStore.javafor the established pattern:Common status codes by HTTP method:
Acceptance criteria
@APIResponseannotations./mvnw compilepasses