(wip) docs(optimizer): @ApiResponses on controllers for OpenAPI spec#598
Merged
Merged
Conversation
Address review on PR #531 — each endpoint lists the HTTP response codes it actually returns, in the same "Resource ACTION: STATUS" style used by services/tables. Codes per endpoint: - POST /operations/{id}/update — 201, 400, 404 - GET /operations/{id} — 200, 404 - GET /operations — 200, 400 - POST /operations-history — 201 - GET /operations-history/{u} — 200, 400 - PUT /stats/{u} — 200 - GET /stats/{u} — 200, 404 - GET /stats — 200, 400 - GET /stats/{u}/history — 200, 400 Annotations only — no runtime behavior change, no new tests required. swagger-annotations 2.1.11 is already on the optimizer classpath via openhouse.springboot-conventions. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status
(WIP) — inspection branch on top of
mkuchenb/optimizer-2(PR #531). Addresses Abhishek's review comment: list error codes in the API response via@ApiResponsesper endpoint.Summary
Adds
@ApiResponsesannotations to every optimizer REST endpoint, following the same "Resource ACTION: STATUS" convention used byservices/tables.POST /v1/optimizer/operations/{id}/updateGET /v1/optimizer/operations/{id}GET /v1/optimizer/operationsPOST /v1/optimizer/operations-historyGET /v1/optimizer/operations-history/{tableUuid}PUT /v1/optimizer/stats/{tableUuid}GET /v1/optimizer/stats/{tableUuid}GET /v1/optimizer/statsGET /v1/optimizer/stats/{tableUuid}/historyEach endpoint lists only the codes it actually returns — no auth codes (no auth layer on this PR), no 500 (default catch-all behavior not user-facing contract).
Changes
@ApiResponsesblocks.io.swagger.v3.oas.annotations.responses.ApiResponse+ApiResponses).swagger-annotations:2.1.11already on the classpath viaopenhouse.springboot-conventions— no dep change.Testing Done
./gradlew :services:optimizer:test— all green (existing 24 tests, no behavior change).🤖 Generated with Claude Code