Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Contributor
There was a problem hiding this comment.
Approving. Documents four already-live mirror endpoints by hand-modeling their wire shape — the right move for SDK codegen, and the schemas track the real handler instead of an aspirational one.
Things I checked
- Schemas match the unchanged handler.
CommunityMirrorGetResponse/PublishResponse/DeleteResponse/ListResponseline up field-for-field withcommunity-mirrors.ts:135-142,:234-241,:286, and thelist()DB projection. Nothing documented that the handler doesn't return. authorized_agents: []is load-bearing, not cosmetic.CommunityMirrorAdagentsJsonSchemaenforces.max(0)(registry.ts:292), matching the handler forcingauthorized_agents: []atcommunity-mirrors.ts:196so a mirror can never assert sales authorization.ad-tech-protocol-expertconfirmed an empty array is valid per canonicaladagents.json:227and the anyOf guard at718-727— the.max(0)tightening stays inside the published envelope.- The 5-way publish union is the right shape.
CommunityMirrorPublishRequestSchemarequires exactly one non-emptyformats|properties|placements|collections|signals(.min(1)per arm), correctly modeling the handler'shasCatalogContentcheck atcommunity-mirrors.ts:176-181and correctly excluding catalog_etag-only / tag-only bodies. - Coverage test mount prefixes are correct.
ROUTE_SOURCESmapsregistry-api.ts→/apiandcommunity-mirrors.ts→/api/registry, matching the actual mounts; all four mirror routes resolve after:param→{param}normalization. Test will pass. - adagents.json enum fidelity.
authorization_type,delegation_type, andpublisher_properties.selection_typeenums all match the canonical discriminator consts.superseded_byHTTPS-only matchesadagents.json:175-179. - Changeset present and
minor— correct for additive, non-breaking OpenAPI documentation. Not astatic/schemas/source/**change, so the oneOf audit and spec-drift gates don't apply.
Follow-ups (non-blocking — file as issues)
- DTO is over-permissive vs. the canonical oneOf.
AdagentsAuthorizedAgentSchemaflattens all six authorization arms into one optional-everything object and doesn't enforce the per-arm companion requireds (e.g.property_idsrequired whenauthorization_type: property_ids,adagents.json:308-311), and leavesauthorization_typeoptional where canonical requires it. Fine for a codegen DTO — just don't let any validator lean on this shape as authoritative. - Reference-variant coverage. The model omits
revoked_publisher_domains(adagents.json:99) and theauthoritative_locationURL-reference arm. Community mirrors are inline-only so this is almost certainly fine — worth a one-line note in the schema stating mirrors never emit the pointer variant.
Minor nits (non-blocking)
z.string().datetime()on timestamps.created_at/updated_at(registry.ts, Summary/Get/Publish) mandate strict ISO-8601. pg may surface a non-strict string; a generated client doing strict datetime parsing could reject a valid response. Harmless today (docs-only, never validates live), butz.string()mirrors reality more closely.- Changeset filename is
5384-community-mirror-openapi.mdon PR #5385. Off by one. The contents are right; the name just points at a different number.
code-reviewer: no Blocker/Major, schemas faithfully match runtime. ad-tech-protocol-expert: sound-with-caveats, no wire divergence.
LGTM. Follow-ups noted below.
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.
Adds the community-mirror lifecycle endpoints and schemas to the generated registry OpenAPI spec so SDKs can generate typed mirror DTOs.
This also tightens related registry metadata for
/api/adagents/create, captures mirror-specific invariants like HTTPSsuperseded_byURLs and emptyauthorized_agents, extends OpenAPI coverage to the mirror router, and adds a minor changeset.Checks run:
npm run build:openapi,npm run typecheck,npx vitest run server/tests/unit/openapi-coverage.test.ts --config server/vitest.config.ts,npx vitest run server/tests/integration/community-mirrors.test.ts --config server/vitest.config.ts,DATABASE_URL=postgresql://adcp:localdev@localhost:5432/adcp_test npx vitest run server/tests/integration/adagents-create-catalog-only.test.ts --config server/vitest.config.ts, plus the commit hook suite.