Skip to content

docs: add @APIResponse annotations to config REST interfaces #550

Description

@ginccc

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

  • All listed methods have @APIResponse annotations
  • Status codes match actual behavior
  • ./mvnw compile passes

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationJavadoc, markdown docs, OpenAPI annotations, code commentsgood first issueClear scope, low risk, pattern to follow - ideal for newcomershelp wantedsize: SSmall: about 1 hour, 2-8 files, mechanical pattern-following

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions