Repository navigation
feat!: remove the /v2/api-docs alias - #206
Conversation
/v2/api-docs forwarded to /v3/api-docs for one release (2.0.0) and was deprecated. Remove ApiDocsAliasController and its entry in the public paths of ResourceServerConfiguration; the path of the API description moves to ApiDocsConfiguration. Drop the smoke checks of the alias and the deprecation notes, and say in the upgrade notes for 2.1.0 that the path is gone. ApiDocsAliasIT gives way to tests that /v2/api-docs gives 404 without the auth profile, and 401 without a token with it. BREAKING CHANGE: /v2/api-docs is no longer served; read the API description at /v3/api-docs (or /v3/api-docs.yaml). Closes #188 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The smoke test checks that the former path of the API description gives 404 without the auth profile and 401 without a token with it, so that the built image, not only the integration tests, shows the removal. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideAPIRemove the
ConfigurationStop treating the former API-docs path as public under authentication, and update application and image checks to reflect its removal.
DocumentationDocument that
TestsReplace alias-specific coverage with checks for the former path's unauthenticated 404 and authenticated 401 behavior, updating the shared test URL constant.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #206 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 54 53 -1
Lines 2342 2340 -2
Branches 274 274
=========================================
- Hits 2342 2340 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Linked issuesChecked at commit 36776d1 #188 build: remove the /v2/api-docs alias · 3 of 3 met
|
Bring in #201 (google-java-format update), #202 and #206 (removal of the /v2/api-docs alias). Conflicts: - docs/upgrading.md: both PRs add items to "To 2.1.0"; the removal of /v2/api-docs goes first in the list of changes for all deployments. - KubernetesClientWrapper: #201 only reformatted the creator filter that this branch moved into listAllTaskmasterJobsForUser; kept the moved version. Files of this branch reformatted with spotless:apply for #201. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closes #188
Summary
Removes the
/v2/api-docsalias, which forwarded to/v3/api-docsin 2.0.0 and was deprecated there.ApiDocsAliasControlleris removed; the path of the API description (API_DOCS) moves toApiDocsConfiguration./v2/api-docsis no longer inResourceServerConfiguration.ALLOWED_URLS: without theauthprofile it gives404; with it,401without a token, like any other path that isn't public.ApiDocsAliasITis replaced bySwaggerUiDisabledIT.formerApiDocs_isNotFoundandSwaggerUiAuthIT.formerApiDocsWithoutToken_isUnauthorized.application.properties,docs/api.md) are removed./v2/api-docschecks now expect the path to be gone:404by default,401with theauthprofile and no token.docs/upgrading.mdgets a "To 2.1.0" section saying that/v2/api-docsis gone. Its 2.0.0 item now points there. The 2.0.0 notes promised removal "in the next minor or major release".Verification
./mvnw -B spotless:check checkstyle:check(Temurin 21.0.13): BUILD SUCCESS.expected:<404> but was:<200>,expected:<401> but was:<200>)../mvnw -B clean verify(Temurin 21.0.13): 18608 unit and 143 integration tests passed, all coverage checks met.mkdocs build --strictwithdocs/requirements.txt: OK./v2/api-docs404/401 checks, Scan image, CodeQL, codecov).Notes
docs/upgrading.md. Whichever PR merges second has to mergedevand combine the two sections under one heading. The code doesn't overlap: feat: ask an external AuthZEN decision service #200 changes other hunks ofResourceServerConfiguration.v2.0.0(closed), so none is set.Review (
adversarial-reviewer,quality-reviewer): no high findings./v2/api-docs.feat!:, following #773 (feat(auth)!:), so that the removal is grouped as breaking. The branch's commits keepbuild!:andci:.No second round: the medium finding was about the commit type only, and the fix touches only three lines of smoke checks, not the app's logic.
Declined review findings
#to-210anchors.docs/upgrading.mdlines 348 and 449 still name/v2/api-docs(quality, low): declined. These lines belong to older upgrade sections (1.x), where that path was right. The "To 2.0.0" and "To 2.1.0" sections say where the description lives now.🤖 Generated with Claude Code
Summary by Sourcery
Remove the deprecated
/v2/api-docsalias and direct clients to the supported OpenAPI endpoints.Enhancements:
/v2/api-docsalias so the API description is served only from the/v3/api-docsendpoints.CI:
/v2/api-docsreturns 404 without authentication and 401 with the auth profile.Documentation:
/v2/api-docsand direct clients to the/v3/api-docsJSON or YAML endpoints.Tests: