Skip to content

fix(api-catalog): resync specs and keep constraints that sit beside a $ref - #357

Merged
jpage-godaddy merged 4 commits into
mainfrom
spec-drift
Nov 3, 2026
Merged

jpage-godaddy merged 4 commits into
mainfrom
spec-drift

Conversation

@jpage-godaddy

@jpage-godaddy jpage-godaddy commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Resyncs the embedded API catalog and the Domains, Hosting and platform app codegen specs with the latest upstream definitions, fixes a catalog generator bug that dropped schema constraints, and documents how to resolve a failing API catalog drift check.

What changed

Spec resync

  • App Registry: new operations to list, create and revoke OAuth client secrets.
  • Customer Profiles: deleteMetafields is replaced by removeMetafieldsFromCustomer and upsertCustomerMetafields.
  • Domains 3.7.0 and Hosting 1.1.0: documentation updates only; no new commands or endpoints.
  • Orders 1.12.0: money fields use the new positive-money type (non-negative amounts).

Generator fix (refined during review)

  • The catalog generator replaced every $ref with a bare pointer and discarded the keywords beside it. That lost constraints such as the minimum: 0 that positive-money adds to simple-money.
  • Sibling keywords are now kept next to the lifted $ref, with regression tests. The catalog and the codegen specs for Domains, Email, Hosting and Shopping are regenerated, so they now carry annotations such as readOnly, description, nullable and example.
  • A misplaced boolean required beside a $ref (one Bulk Operations request body) is dropped, since a schema-level required must be an array.
  • This fixes the catalog data only. gddy api schema get does not display numeric constraints such as minimum yet; that is a separate CLI change.

Docs

  • New "Updating embedded API specs" section in docs/maintainers.md, linked from CONTRIBUTING.md.

No CLI command changes are included; the existing commands build and pass against the regenerated specs.

Testing

Generated with cargo run -p generate-api-catalog. cargo check, cargo clippy --workspace -- -D warnings, cargo test --workspace, cargo fmt --check and check-module-size.sh all pass.

🤖 Generated with Claude Code

…tomer Profiles, Domains, Hosting and Orders APIs

Refreshes the embedded API catalog and the Domains, Hosting and platform app
codegen specs so `gddy api` reflects the current upstream definitions:

- App Registry: new operations to list, create and revoke OAuth client secrets
- Customer Profiles: `deleteMetafields` is replaced by
  `removeMetafieldsFromCustomer` and `upsertCustomerMetafields`
- Domains 3.7.0 and Hosting 1.1.0: documentation updates only; no new
  commands or endpoints
- Orders 1.12.0: money fields use the new positive-money type

Also documents how to resolve a failing API catalog drift check in the
maintainers guide, with a pointer from CONTRIBUTING.md.

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

The schema change removes the nonnegative constraint from positive-money, allowing negative amounts in fields such as Discount.amount and LineItem.unitAmount; the constraint must be preserved through generation.

1 open issue
What changed in this PR

Refreshes the embedded API catalog used by gddy api and related client-generation schemas, and documents how maintainers can resolve catalog drift.

Changes:

  • Adds App Registry OAuth secret operations and updates Customer Profiles metafield operations.
  • Refreshes Domains and Hosting definitions and migrates Orders money fields to positive-money.
  • Adds spec-refresh instructions and links them from the contributor guide.
File Description
rust/​schemas/​api/​orders.json Updates money definitions and return totals for Orders 1.12.0.
rust/​schemas/​api/​manifest.json Updates the generation timestamp.
rust/​schemas/​api/​hosting.json Updates Hosting descriptions, examples, and preview URL nullability.
rust/​schemas/​api/​domains.json Updates Domains documentation and version metadata.
rust/​schemas/​api/​customer-profiles.json Replaces metafield deletion and adds metafield upsert definitions.
rust/​schemas/​api/​app-registry.json Adds OAuth secret operations and associated types.
rust/​platform-app-client/​graphql/​schema.graphql Synchronizes the App Registry client schema.
rust/​hosting-client/​openapi/​hosting.oas3.json Updates the Hosting client spec version.
rust/​domains-client/​openapi/​domains.oas3.json Adds forwarding parameter and scope definitions; updates documentation.
docs/​maintainers.md Documents spec refreshes and drift-check recovery.
CONTRIBUTING.md Clarifies refresh access requirements and links the maintainer guide.

Review effort: Balanced

Comment thread rust/schemas/api/orders.json Resolved
…$ref

The catalog generator replaced every `$ref` with a bare pointer, discarding
sibling keywords. That dropped constraints such as the `minimum: 0` that
Orders' `positive-money` adds to `simple-money`, and per-field annotations
such as `description`, `readOnly`, `nullable` and `example`.

Sibling keywords are now kept beside the lifted `$ref`, and the embedded
catalog and codegen specs are regenerated so `gddy api schema get` shows the
constraints the upstream specs declare.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@jpage-godaddy jpage-godaddy changed the title fix(api-catalog): resync spec drift with the latest App Registry, Customer Profiles, Domains, Hosting and Orders APIs fix(api-catalog): resync specs and keep constraints that sit beside a $ref Nov 3, 2026
@jpage-godaddy
jpage-godaddy requested a balanced review from Copilot November 3, 2026 22:27

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 catalog retains an invalid schema-level required: true, and CLI schema output still omits the claimed positive-money minimum constraint.

2 open issues
1 resolved since last review

Review effort: Balanced

Comment thread rust/schemas/api/bulk-operations.json Resolved
Comment thread rust/schemas/api/orders.json Resolved
Keeping keywords that sit beside a `$ref` also kept a misplaced
`required: true` on one Bulk Operations request body. A schema-level
`required` must be an array of property names, so the generator now omits a
non-array `required` there; the request body's own `required` flag is
unchanged.

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

Human assessment is needed to evaluate inconsistent order-total formulas and mismatches between generated outputs, maintainer guidance, and CI drift-check coverage.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

The maintainers guide said the drift workflow compares every path the
generator rewrites. It checks only the catalog and the Domains and Hosting
specs; the Email, Shopping and platform app specs are also regenerated and
must be committed with them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@jpage-godaddy
jpage-godaddy merged commit e58f966 into main Nov 3, 2026
5 checks passed
@jpage-godaddy
jpage-godaddy deleted the spec-drift branch November 3, 2026 23:04
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