Skip to content

fix(api-catalog): resync spec drift with the latest Domains, Customers and Bulk Operations APIs - #321

Merged
jpage-godaddy merged 2 commits into
mainfrom
api-drift
Oct 13, 2026
Merged

jpage-godaddy merged 2 commits into
mainfrom
api-drift

Conversation

@jpage-godaddy

@jpage-godaddy jpage-godaddy commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Resyncs the embedded API catalog and the generated clients with the latest upstream specs, which the weekly catalog drift run reported as out of date (https://github.com/godaddy/cli/actions/runs/38304412764). The drift run was failing outright because the Shopping spec now uses dated, absolute schema URLs that the generator could not resolve; that is fixed here too.

What changes for users

  • gddy api catalog: the Customers REST API (9 operations) is replaced by the Customer GraphQL API (POST /stores/{storeId}/customer-subgraph). Scripts calling the removed customer endpoints with gddy api call must move to the GraphQL endpoint.
  • Bulk operations: cancelling is now POST …/bulk-operations/{id}/cancelations; the DELETE route is listed as deprecated.
  • Domains: the catalog lists the new batch registration operations and getProfileSchema (which replaces getRegistrationSchema). gddy domain does not use them yet.
  • domain quote: always reports period and periodLabel.
  • Other catalog changes: orders PaymentStatus gains UNPAID; the catalog GraphQL API gains list, price and SKU group filters; hosting's title is now "Hosted Application Lifecycle Management API".

Notes for reviewers

Generator (rust/tools/generate-api-catalog)

  • Resolves absolute-URL $refs by the $id of the file that declares them (new ref_paths.rs; also moves path helpers out of dereference.rs, which was over the 1000-line limit). $defs keys still follow file names.
  • Shopping opts into qualifying $defs keys with the parent directory when two schema files share a name but declare different $ids. Without it product-metadata/base and variant-metadata/base (and hosting, and the two fulfillment.json files) silently shared one definition. Other specs keep their existing keys.
  • The recursion depth cap was raised from 64 to 256; real UCP chains reach ~94 and the old cap left refs unresolved. The Shopping refresh now fails with a clear error on any unresolved schema reference (previously unresolved relative references were silently cleared).
  • relax no longer deletes a property that is named required/format/pattern, and drops anyOf/oneOf combinators that only expressed "one of these fields is required". This gives upstream's agreement type its required flag and a plain struct shape.
  • Checkout responses now use the contract's checkout_with_agreement_input. The CLI's own shopping_required_agreement/shopping_consent_acceptance schemas and the add_completion_consent patch are removed in favour of upstream's native required_agreements and consent.

CLI

  • Shopping commands use one Checkout alias (shopping/client.rs) for the upstream response struct. The agreement gate and completion consent behave as before; tests cover decoding a response with the required flag and the serialized consent.
  • Domains: InlineRegistrationProfile → Profile (same JSON shape, so cached quotes still read), empty Contact.metadata, and period handling for its new non-optional type. The quote cache stores the requested period.

Verification

cargo check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace, cargo fmt --check and check-module-size.sh pass. Re-running generate-api-catalog against the live spec repos reproduces the committed files (only the manifest timestamp differs). I also compared raw and typed catalog responses against production for the Shopping search.

Not verified

  • The new Domains routes (profile-schemas, registration-batches, registration-quote-batches) returned a bare 404 in dev, test and prod, so the spec appears to be ahead of the deployment. Nothing in the CLI depends on them.
  • The upstream checkout response types have not been decoded from a live checkout session (needs the checkout scope); decoding is covered by unit tests with a representative payload. Worth one manual shopping checkout get before release.

Follow-ups filed

DEVEX-1268 (batch domain registration), DEVEX-1269 (profile schema and contacts.toml), DEVEX-1270 (product agreements required flag; resolved by this PR), DEVEX-1271 (show product agreements), DEVEX-1272 (shopping guide wording), DEVEX-1274 (JSON output drops open-object properties), DEVEX-1275 (render product metadata), DEVEX-1276 (default purchase option marker), DEVEX-1277 (checkout get next action).

🤖 Generated with Claude Code

…s and Bulk Operations APIs

- The `api` catalog now lists the Customer GraphQL endpoint
  (`POST /stores/{storeId}/customer-subgraph`) in place of the REST customer
  operations. Scripts that call the removed customer endpoints with
  `gddy api call` need to move to the GraphQL endpoint.
- Bulk operations: cancelling is now
  `POST /stores/{storeId}/bulk-operations/{id}/cancelations`; the DELETE route is
  listed as deprecated.
- Domains: the catalog lists the new batch registration operations and the
  profile-schema lookup, which replaces the registration-schema lookup. The CLI
  does not use these yet.
- `domain quote` now always reports the registration `period` and `periodLabel`.
- Orders payment status includes `UNPAID`, and the catalog GraphQL API lists new
  list, price and SKU group filters.

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.

🟡 Changes recommended

Unresolved relative Shopping references can still be silently discarded, and omitted domain quote periods can be misreported and cached as one year.

2 open findings
What changed in this PR

Resynchronizes API catalogs and generated clients with current upstream contracts while adapting domain and shopping CLI flows.

Changes:

  • Adds $id-based reference resolution and collision-safe schema generation.
  • Refreshes Domains, Customers, Shopping, Bulk Operations, Orders, Catalog, and Hosting specifications.
  • Updates checkout agreements and domain quote/purchase models.
File Description
rust/​tools/​generate-api-catalog/​src/​shopping_spec.rs Updates Shopping normalization and validation.
rust/​tools/​generate-api-catalog/​src/​ref_paths.rs Adds schema path and $id resolution.
rust/​tools/​generate-api-catalog/​src/​main.rs Registers the new path module.
rust/​tools/​generate-api-catalog/​src/​dereference.rs Handles namesakes, absolute references, and deeper chains.
rust/​src/​shopping/​product_actions.rs Uses the shared checkout alias.
rust/​src/​shopping/​common.rs Adopts the updated checkout type.
rust/​src/​shopping/​client.rs Maps new checkout response variants.
rust/​src/​shopping/​checkout/​update.rs Uses the shared checkout model.
rust/​src/​shopping/​checkout/​get.rs Uses the shared checkout model.
rust/​src/​shopping/​checkout/​complete.rs Uses upstream agreement and consent types.
rust/​src/​domain/​quote.rs Adapts profile and period handling.
rust/​src/​domain/​quote_cache.rs Updates profile terminology.
rust/​src/​domain/​purchase.rs Deserializes the renamed profile type.
rust/​src/​domain/​contacts_file.rs Initializes contact metadata.
rust/​shopping-client/​openapi/​shopping.oas3.json Refreshes the Shopping client contract.
rust/​schemas/​api/​orders.json Adds the UNPAID payment status.
rust/​schemas/​api/​manifest.json Updates catalog metadata and counts.
rust/​schemas/​api/​hosting.json Updates the Hosting API title.
rust/​schemas/​api/​bulk-operations.json Adds the replacement cancellation route and response models.
rust/​hosting-client/​openapi/​hosting.oas3.json Updates the generated Hosting title.
rust/​domains-client/​openapi/​domains.oas3.json Adds profile schemas and batch registration contracts.

🧠 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/src/domain/quote.rs
Comment thread rust/tools/generate-api-catalog/src/shopping_spec.rs Outdated
…hema reference

The Shopping refresh now checks for unresolved `$ref`s before relative references
are normalized, so a missing or moved upstream schema file stops the refresh
instead of silently weakening a generated type.

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

The large generated-contract update affects purchasing flows and includes endpoints and checkout behavior that were not validated against live services.

0 open findings

2 resolved since last review

🧠 Review effort: Balanced

@jhenderson1-godaddy jhenderson1-godaddy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks fine from a hosting perspective.

@jpage-godaddy
jpage-godaddy merged commit d890a78 into main Oct 13, 2026
7 checks passed
@jpage-godaddy
jpage-godaddy deleted the api-drift branch October 13, 2026 20:14
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.

3 participants