Clean up community schema docs after the community-ids contract change - #102
Open
johnworth wants to merge 4 commits into
Open
Clean up community schema docs after the community-ids contract change#102johnworth wants to merge 4 commits into
johnworth wants to merge 4 commits into
Conversation
PR #101 changed the app-communities request body to community_ids (with the legacy AVU list accepted during the transition), but the surrounding docs still described the old AVU envelope: - AppCommunityMetadataDeleteSummary/Docs are what the bulk DELETE /apps/{app-id}/communities routes in apps and terrain reference, yet their text still described removing AVUs. Rewrite them to describe the community_ids shape (legacy avus still accepted) so both consumers pick up accurate docs without any route changes. - AppCommunityMetadataAddSummary/Docs have no remaining references in apps, terrain, or this repo, so delete them. - AppCommunityGroupNameParam claimed the listing routes take a full group name; the services now resolve an ID, a plain name, or a legacy colon-delimited group path, so say that. - AppCommunityListRequest restated (-> AvuListRequest (->optional-param :avus)), which is exactly SetAvuRequest; derive from SetAvuRequest instead. Verified in a REPL that the resulting schema and its json-schema metadata are identical. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
# Conflicts: # project.clj
The delete docs described the AVU fallback as a temporary accommodation for clients still in circulation. That condition has no expiry, and the string is rendered into the published Swagger docs, so a later reader cannot tell whether `avus` was removed or is permanently supported. State the contract instead: the ID lives in `community_ids`, and `avus` is a deprecated alternative. The add route shares the same request schema but named neither field, so a client author had to read the delete route's docs to learn what to send. Give it the same sentence. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wjd21NTp4Ead7JYhx5sQUT
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.
Documentation/cleanup follow-up to #101. No wire-shape changes — request/response schemas are observably identical; only doc text and dead vars change.
Fixes
Bulk-DELETE docs drift. The bulk
DELETE /apps/{app-id}/communitiesroutes in apps and terrain bindAppCommunityListRequestbut still referencedAppCommunityMetadataDeleteSummary/Docs, whose prose described only the old AVU envelope. The text of those exact vars is rewritten to describe both accepted shapes (community_ids, with the legacyavuslist still accepted), so both consumers pick up accurate docs with zero route changes.Dead exports.
AppCommunityMetadataAddSummaryandAppCommunityMetadataAddDocsare deleted, superseded byAppCommunityAddSummary/Docsfrom Add a community-list request schema for app community tags #101. See Release ordering below — they are unreferenced on the epic branches, but not onmain.Stale param description.
AppCommunityGroupNameParamclaimed the community listing routes take "the full group name"; the services now resolve an ID, a plain name, or a legacy colon-delimited group path. Description corrected to match.Re-verified end to end against apps
groups-service:GET /apps/categories/communities/{id}/apps→listings/list-apps-in-community→filter-app-ids-by-community→groups/lookup-community, which branches exactly three ways and gates all of them ongroup_type = "community". Two details the description elides: the ID form must match^[0-9a-f]{32}$, and an arbitrary colon path does not resolve — only one whose second-to-last segment iscommunities.DRY.
AppCommunityListRequestrestated(-> AvuListRequest (->optional-param :avus)), which is exactlySetAvuRequest; it now derives fromSetAvuRequest. Verified in a REPL that the resulting schema and its:json-schemametadata are identical (the finaldescribeoverrides the intermediate description either way).Contract, not migration state, in the published docs.
AppCommunityMetadataDeleteDocsdescribed the AVU fallback as a temporary accommodation "while stale clients remain in circulation". That condition has no expiry and the string renders into the published Swagger, so a later reader cannot tell whetheravuswas removed or is permanently supported. Both docstrings now state the contract instead: the ID lives incommunity_ids, andavusis a deprecated alternative.AppCommunityAddDocspreviously named neither field, so a client author implementing the add route had to read the delete route's docs to learn what to send; it now carries the same sentence.Release ordering
The
AppCommunityMetadataAdd*deletion in item 2 was justified on the grounds that nothing references those vars. That holds for the epic branches — apps #303 and terrain #333 both useAppCommunityAddSummary/Docs— butmainon apps and terrain still:referthe deleted names, and a missing:referfails at namespace load, i.e. a hard startup break rather than a doc glitch.This is not a merge gate. apps and terrain both pin
3.4.23on every branch, and the deletion is in no released version, so merging this PR breaks nothing. It only breaks if a release containing this PR is cut and a mainline apps or terrain bumps to it before #303/#333 land. Cutting the release after those merge avoids the question entirely.Follow-up
The Add and Delete halves of the same route pair are now named asymmetrically:
AppCommunityAddSummary/Docscover the bulk add, while the bulk delete still usesAppCommunityMetadataDeleteSummary/Docs. That is deliberate here —AppCommunityDeleteSummary/Docsare singular ("Remove an App from a Community") and already belong to the path-param route, so there is no accurate plural name to move to, and inventing one is a second breaking change.Adding an
AppCommunityRemoveSummary/AppCommunityRemoveDocspair mirroring the Add ones is the follow-up that lets apps' bulkDELETE /apps/{app-id}/communitiesstop advertising AVUs.AppCommunityGroupNameParamis worth renaming in the same pass — after item 3 it no longer describes a group name.lein checkpasses;clj-kondo --lint src/reports 0 errors and the 3 pre-existing unused-:referwarnings incategories.clj, unchanged. This repo has no test suite, solein testproves nothing either way. Version is3.4.26-SNAPSHOT.🤖 Generated with Claude Code