feat(api): the OpenAPI description covers the finding routes (#1006) #1013

Merged
sharang merged 1 commits from feat/openapi-findings into main 2026-11-16 15:14:53 +00:00
Owner

Part 2 of #1006, on top of #1012.

Change:

  • Eight routes described: the six finding routes and the two finding-group routes. They cover the list (repo, scan run, severity, scan type, status, text, scanner, variant, path, sort and paging as query parameters), variants, one finding, status, bulk status, feedback, groups, and a group decision, with their request bodies.
    • Core types in the bodies (finding status, group key) are given as string / object, as in part 1.
    • The status fields document the eight values.
  • The list shrinks: their lines leave undescribed_routes.txt (93 left).
  • Summaries: the handlers' doc comments now start with a one-line summary instead of PATCH /api/v1/… —. utoipa takes the first paragraph as the summary.
  • New test every_described_operation_is_complete: every described operation has a one-line summary without the route, and a path parameter for every {name} in its path. Later groups are held to the same standard.

Tests:

  • api::routes unit tests: 4 pass.
  • Against Mongo 7: e2e, group_findings, group_decisions, finding_variants, resolve_findings and api_key_access pass. The last one shows that API-key scopes on the finding routes still match, since the route templates are unchanged.
  • clippy with CI's flags.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9

Part 2 of #1006, on top of #1012. **Change:** - **Eight routes described:** the six finding routes and the two finding-group routes. They cover the list (repo, scan run, severity, scan type, status, text, scanner, variant, path, sort and paging as query parameters), variants, one finding, status, bulk status, feedback, groups, and a group decision, with their request bodies. - Core types in the bodies (finding status, group key) are given as string / object, as in part 1. - The status fields document the eight values. - **The list shrinks:** their lines leave `undescribed_routes.txt` (93 left). - **Summaries:** the handlers' doc comments now start with a one-line summary instead of `PATCH /api/v1/… —`. utoipa takes the first paragraph as the summary. - **New test** `every_described_operation_is_complete`: every described operation has a one-line summary without the route, and a path parameter for every `{name}` in its path. Later groups are held to the same standard. **Tests:** - `api::routes` unit tests: 4 pass. - Against Mongo 7: `e2e`, `group_findings`, `group_decisions`, `finding_variants`, `resolve_findings` and `api_key_access` pass. The last one shows that API-key scopes on the finding routes still match, since the route templates are unchanged. - clippy with CI's flags. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang added 1 commit 2026-11-16 13:12:03 +00:00
feat(api): the OpenAPI description covers the finding routes (#1006)
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 4m41s
CI / Check (pull_request) Successful in 20m27s
d3ddc3221f
- The six finding routes and the two finding-group routes are described:
  list (filters, sort and paging as query parameters), variants, one
  finding, status, bulk status, feedback, groups and a group decision,
  with their request bodies. Core types in the bodies (finding status,
  group key) are given as string / object.
- Their eight lines leave `undescribed_routes.txt` (93 left).
- The handlers' doc comments start with a one-line summary instead of
  the method and route, since the first paragraph becomes the summary.
- New test: every described operation has a one-line summary without
  the route, and a path parameter for every `{name}` in its path.

Part 2 of #1006.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang merged commit 141176df20 into main 2026-11-16 15:14:53 +00:00
sharang deleted branch feat/openapi-findings 2026-11-16 15:14:53 +00:00
Sign in to join this conversation.