feat: Wave API v1 consolidation (/w1/* via TypeSpec)#1048
Draft
pditommaso wants to merge 34 commits into
Draft
Conversation
Captures the brainstorm outcome: introduce /w1 prefix, TypeSpec source of truth in a new wave-api-v1 module, faithful rename of existing alpha endpoints, alpha responses tagged with Deprecation + Sunset headers, service layer reused as-is. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Step-by-step plan to land the v1 API: scaffold wave-api-v1 module, migrate existing typespec/ sources, switch routes to /w1/*, add the missing v1 endpoints, wire Micronaut OpenAPI codegen, implement *V1Controller adapters with mappers and Spock specs, and add the AlphaDeprecationFilter for backward-compat headers. 23 tasks, TDD where it makes sense, exact code blocks per step. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…w, useReactive=false)
…ock, scan submit, scan spdx, service-info) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…va interface per resource Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add cleanApiCode + generateApiCode Gradle tasks that copy the Micronaut OpenAPI plugin output into wave-api-v1/src/main/java so generated interfaces and models are version-controlled. Also remove the plugin-injected source dirs from the main project sourceSet to prevent duplicate compilation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…date Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…st and support authenticated inspections Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements GET /w1/builds/{id}, /status, /logs, /condalock endpoints
using BuildsApiSpec interface with BuildsV1Mapper for model translation.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… POST submit) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…troller Move all container request logic (submit, findRecord, findStatus, revoke) into a new ContainerRequestHandler base class so both the alpha controller and the upcoming ContainersV1Controller can share the same implementation. ContainerController now extends ContainerRequestHandler with no behaviour change. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements ContainersApiSpec with POST /w1/containers, GET /w1/containers/{id},
GET /w1/containers/{id}/status, and DELETE /w1/containers/{id}, delegating to
ContainerRequestHandler via ContainersV1Mapper for full v1/internal type mapping.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ty for builds/mirrors/scans) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add AlphaDeprecationFilter that stamps `Deprecation: true` and `Sunset: Sat, 31 May 2027 23:59:59 GMT` on all responses from pre-v1 (alpha or unversioned) paths, leaving /w1/* untouched. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
These were stale committed copies missed by Task 3's migration of the typespec/ directory into wave-api-v1/spec. The working tree no longer contains them; this commit makes the index agree. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ntion Renames the 9 newly added Spock tests (8 v1 controllers + AlphaDeprecationFilter) from `*Spec.groovy` to `*Test.groovy` to align with the existing project naming convention (176 `*Test.groovy` vs 9 `*Spec.groovy`). Also replaces a fully-qualified `ContainerRequestFormat` reference with an import. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.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.
Consolidates Wave's REST API into a stable v1 surface under the
/w1/*prefix, with TypeSpec as the source of truth. Newwave-api-v1Gradle module hosts the TypeSpec spec; Micronaut OpenAPI plugin generates Java server interfaces and DTOs. All existing service-layer logic is reused unchanged; existing/v1alpha*and unversioned endpoints stay functional and carryDeprecation: true+Sunsetheaders.What changed
wave-api-v1— TypeSpec source underwave-api-v1/spec/, generated OpenAPI YAML, and 7 server interfaces + 40+ generated DTOs committed undersrc/main/java/ServiceInfo,Credentials,Inspections,Builds,Mirrors,Scans,Containers) implementing the generated interfaces, delegating to existing services via thin mappersContainerRequestHandlerextracted from the 765-lineContainerControllerso both alpha and v1 controllers share the same logic (refactor only — zero behaviour change, all 42 existing tests still pass)AlphaDeprecationFilterstampsDeprecation: true+Sunset: Sat, 31 May 2027 23:59:59 GMTon responses from/v1alpha*,/container-token,/service-info,/validate-creds,/inspect,/scansPOST /w1/scansfor resource-shape symmetry (no alpha equivalent — scans previously only flowed through container provisioning)docs/superpowers/specs/2026-05-20-wave-api-v1-design.md), implementation plan (docs/superpowers/plans/2026-05-20-wave-api-v1.md), README +docs/api.mdupdatedv1 URL surface
/w1/containers,/w1/containers/{id},/w1/containers/{id}/status/w1/builds/{id},/w1/builds/{id}/status,/w1/builds/{id}/logs,/w1/builds/{id}/condalock/w1/mirrors/{id},/w1/mirrors/{id}/logs/w1/scans,/w1/scans/{id},/w1/scans/{id}/logs,/w1/scans/{id}/spdx/w1/inspections/w1/credentials/validate/w1/service-infoTest plan
Verified locally:
./gradlew clean :wave-api-v1:generateOpenApi :generateApiCode assemble— BUILD SUCCESSFULopenapi.yamlserved at/openapi/openapi.yamlexposes 16/w1/*paths; Swagger UI at/openapi/index.htmlReviewer checklist:
/w1URL prefix is acceptable (no Docker Registry collision concern)Sat, 31 May 2027sunset date placeholderWaveBuildRecordv1 missing 4 fields vs internal (compression,buildTemplate,buildChildIds,scanChildIds)ContainerMirrorResponsev1 missing 5 fields vs internal (offsetId,userName,userEmail,userId,scanId)POST /w1/scansreturns PENDING but the underlying scan job currently fails (workDir null at v1 layer) — needs follow-up to either require buildId/mirrorId or configure a standalone scan workspace before GAOut of scope
/v1alpha*/metrics/*(kept on alpha)/v2/*(Docker Registry protocol)Generated with Claude Code