镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

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

Merged
jpage-godaddy merged 1 commit into
mainfrom
app-registry-schema
Oct 21, 2026
Merged

jpage-godaddy merged 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.

@jpage-godaddy
jpage-godaddy force-pushed the app-registry-schema branch 2 times, most recently from 3f4f51f to 694dbf6 Compare October 14, 2026 20:08
@jpage-godaddy
jpage-godaddy requested a balanced review from Copilot October 14, 2026 20:10

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

`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>
@jpage-godaddy
jpage-godaddy merged commit 9815ba1 into main Oct 21, 2026
4 checks passed
@jpage-godaddy
jpage-godaddy deleted the app-registry-schema branch October 21, 2026 16:38
jpage-godaddy added a commit that referenced this pull request Oct 21, 2026
…#325)

`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>
jpage-godaddy added a commit that referenced this pull request Oct 21, 2026
…ate [DEVEX-1173] (#326)

- Adds `platform-app-client`, a typed client for the App Registry subgraph generated at build time by `graphql_client` from the pinned schema (#325) and one `.graphql` document per operation (12 operations). It follows the generated-client pattern already used for domains/hosting/shopping/email, including the shared transport-observer bridge in `generated-client-support`.
- Unset optional mutation inputs are omitted from the request instead of being sent as explicit `null`: the service treats an omitted field as "leave unchanged" and `null` as "clear". Covered by a wire-shape test in the follow-up PR.
- Responses to credential-bearing operations (`CreateApplication`, which returns the client secret, webhook secret and public key, and `GenerateReleaseUploadUrl`, which returns a pre-signed URL) are never handed to the transport observer, so `--debug transport` cannot log them. A response that fails to decode, or an error status, is reported without its contents for those operations. Crate tests fail if any of these leak.
- Nothing in the CLI uses the crate yet, so there is no user-facing change.
jpage-godaddy added a commit that referenced this pull request Oct 21, 2026
…erated client (#282)

- Replaces the hand-written GraphQL client in `src/platform/app/client.rs` with the typed `platform-app-client` crate (#326), generated from the pinned App Registry schema (#325).
- Every `ApplicationClient` method and its callers across the platform app command tree (including `import`, native Android extensions, and `redirectUris`) now use typed request/response structs end to end. The one remaining untyped field is `presentation`/`metadata`, which the schema itself types as an opaque `JSONObject` scalar.
- Mutations that return no data (enable/disable/archive/update/create-release/activate-release) now fail with an error instead of reporting success.
- App Registry traffic is registered with `--debug transport`, including the `add native-extension` path.
- Unset optional inputs stay out of update/create requests (wire-shape test), so an omitted manifest key still leaves remote values unchanged.
- Closes DEVEX-1173.
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