Skip to content

feat(api): add App Registry to the browsable API catalog [DEVEX-1173] - #325

Open
jpage-godaddy wants to merge 1 commit into
mainfrom
app-registry-schema
Open

jpage-godaddy wants to merge 1 commit into
mainfrom
app-registry-schema

Conversation

@jpage-godaddy

Copy link
Copy Markdown
Collaborator

Summary

  • Pins the App Registry GraphQL schema in the repo, vendored from gdcorp-commerce/app-registry-api (the service's own repo) rather than the stale gdcorp-platform specification repo, and refreshes it from generate-api-catalog.
  • App Registry now appears in gddy api (api domain list, api operation list --domain app-registry, api graphql get/call). It was previously absent.
  • Catalog sources can name their own GitHub org and an explicit spec path. GraphQL sources must declare baseUrl and endpointPath (a GraphQL schema carries no server URL); App Registry is served from https://api.godaddy.com/v1/apps/app-registry-subgraph. OpenAPI sources must not set them.
  • API_CATALOG_REPOS and API_CATALOG_REPO_REFS accept org/repository. A bare repository name shared by more than one source is rejected (repos) or ignored (refs) rather than silently picking one.
  • New tests: every committed catalog file must be embedded in the CLI, and a GraphQL catalog entry must match its declared endpoint.

About 4,250 of the added lines are the generated catalog entry (schemas/api/app-registry.json) and the vendored schema (schema.graphql); the hand-written change is roughly 400 lines under tools/generate-api-catalog/ and src/api/catalog.rs.

This is the first of three PRs for DEVEX-1173:

  1. This PR — pin the schema and expose it in gddy api.
  2. The generated platform-app-client crate (not used by the CLI yet).
  3. Migrating ApplicationClient and the platform app commands to the typed client (feat(platform-app): convert App Registry GraphQL client to a spec-generated client #282).

Test plan

  • cargo check --workspace
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • cargo fmt --check
  • ./rust/scripts/check-module-size.sh
  • gddy api domain list and gddy api operation list --domain app-registry show the domain at /v1/apps/app-registry-subgraph

🤖 Generated with Claude Code

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The schema refresh guard accepts connection-type names even when the root Query definition is missing.

1 open finding
What changed in this PR

Adds App Registry to gddy api, establishing the pinned schema for the later typed-client migration.

Changes:

  • Vendors the schema and embeds its generated catalog.
  • Supports per-source organizations, spec paths, and GraphQL endpoints.
  • Adds catalog completeness and endpoint consistency tests.
File Description
rust/​tools/​generate-api-catalog/​src/​manifest.rs Adds source configuration fields.
rust/​tools/​generate-api-catalog/​src/​main.rs Wires schema refresh and endpoint tests.
rust/​tools/​generate-api-catalog/​src/​graphql.rs Uses declared GraphQL endpoints.
rust/​tools/​generate-api-catalog/​src/​github.rs Supports organization-qualified sources and overrides.
rust/​tools/​generate-api-catalog/​src/​app_registry_spec.rs Validates and refreshes the vendored schema.
rust/​src/​api/​catalog.rs Embeds App Registry and tests catalog completeness.
rust/​schemas/​api/​manifest.json Registers the new domain.
rust/​schemas/​api/​app-registry.json Adds generated operation and type metadata.
rust/​platform-app-client/​graphql/​schema.graphql Pins the App Registry schema.
rust/​api-catalog-sources.json Declares the source repository and endpoint.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread rust/tools/generate-api-catalog/src/app_registry_spec.rs Outdated
`gddy api` now lists the App Registry GraphQL API: its operations, types
and schema are browsable and callable like the other catalog domains.

The schema is pinned in the repo, vendored from gdcorp-commerce/app-registry-api
(the service's own repo) rather than the stale gdcorp-platform specification
repo, and refreshed by generate-api-catalog.

Catalog sources can now name their own GitHub org and an explicit spec path.
A GraphQL schema carries no server URL, so GraphQL sources must declare
`baseUrl` and `endpointPath`; App Registry is served from
https://api.godaddy.com/v1/apps/app-registry-subgraph. `API_CATALOG_REPOS`
and `API_CATALOG_REPO_REFS` accept `org/repository`, and a bare repository
name that more than one source shares is rejected (repos) or ignored (refs)
instead of silently picking one.

A test now fails if a committed catalog file is not embedded in the CLI, and
another if a GraphQL catalog entry drifts from its declared endpoint.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

No blocking source issues were identified, but required workspace checks could not be independently verified.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants