feat(api): the OpenAPI description covers the target routes (#1006) #1014

Merged
sharang merged 1 commits from feat/openapi-targets into main 2026-11-16 15:45:28 +00:00
Owner

Part of #1006: the next group of the OpenAPI description, the target routes.

What changes

  • The 11 target paths (15 operations) are registered through routes! and described by #[utoipa::path] on their handlers, tag "Targets":
    • list (with page, limit, project) and create
    • get, change and delete one target
    • list and run the demo seed; its body is optional
    • attach an artifact by reference, or upload one as multipart/form-data (file as binary, kind, plc_format)
    • set an archive's password
    • applicable scans, detection, starting a scan (reason) and the billing swap
  • Request schemas: CreateTargetRequest, UpdateTargetRequest, ArtifactInput, ScanConfigUpdate, ArchivePasswordRequest, SwapRequest and SeedRequest. Core types stay opaque strings or objects, so compliance-core needs no derive.
  • The upload route keeps its own body limit, now set through UtoipaMethodRouterExt::layer.
  • Each summary is a one-line first doc paragraph.
  • undescribed_routes.txt goes from 93 to 82 paths.

Checks

  • cargo fmt --check and clippy with the CI flags pass.
  • The agent's API unit tests pass (128).
  • Every agent integration test binary passes against Mongo 7.
  • I dumped the generated spec and checked each target operation: summary, path and query parameters, and body content type.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9

Part of #1006: the next group of the OpenAPI description, the target routes. ## What changes - The 11 target paths (15 operations) are registered through `routes!` and described by `#[utoipa::path]` on their handlers, tag "Targets": - list (with `page`, `limit`, `project`) and create - get, change and delete one target - list and run the demo seed; its body is optional - attach an artifact by reference, or upload one as `multipart/form-data` (`file` as binary, `kind`, `plc_format`) - set an archive's password - applicable scans, detection, starting a scan (`reason`) and the billing swap - Request schemas: `CreateTargetRequest`, `UpdateTargetRequest`, `ArtifactInput`, `ScanConfigUpdate`, `ArchivePasswordRequest`, `SwapRequest` and `SeedRequest`. Core types stay opaque strings or objects, so compliance-core needs no derive. - The upload route keeps its own body limit, now set through `UtoipaMethodRouterExt::layer`. - Each summary is a one-line first doc paragraph. - `undescribed_routes.txt` goes from 93 to 82 paths. ## Checks - `cargo fmt --check` and clippy with the CI flags pass. - The agent's API unit tests pass (128). - Every agent integration test binary passes against Mongo 7. - I dumped the generated spec and checked each target operation: summary, path and query parameters, and body content type. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang added 1 commit 2026-11-16 15:22:47 +00:00
feat(api): the OpenAPI description covers the target 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 4m44s
CI / Check (pull_request) Successful in 21m26s
c1b7a2f322
The 11 target paths (15 operations) are described from their handlers:
listing, creating, changing and deleting targets, demo seeding, artifacts
by reference and by multipart upload, the archive password, applicable
scans, detection, scan start and the billing swap. The request bodies
are schemas; core types stay opaque strings or objects. The upload keeps
its own body limit. undescribed_routes.txt drops to 82 paths.

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