Skip to content

chore(api): remove x-internal tags from v2 entitlement endpoints - #3358

Merged
tothandras merged 1 commit into
mainfrom
chore/entitlements-v2-public
Sep 9, 2025
Merged

tothandras merged 1 commit into
mainfrom
chore/entitlements-v2-public

Conversation

@tothandras

@tothandras tothandras commented Sep 9, 2025 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Promoted multiple v2 endpoints to public: customer entitlements (list/get/create/delete), grants (list/create), history, override, reset usage, value, and events.
  • Documentation

    • Updated grants descriptions and examples to reference customers (not subjects) and v2 paths across OpenAPI and SDK docs.
  • Chores

    • Regenerated embedded API specifications in client SDKs (updated swagger/openapi payloads).
  • Style

    • Minor formatting cleanup in JavaScript client constructors.

@tothandras
tothandras requested a review from hekike September 9, 2025 17:05
@tothandras
tothandras requested a review from a team as a code owner September 9, 2025 17:05
@tothandras tothandras added the release-note/misc Miscellaneous changes label Sep 9, 2025
@coderabbitai

coderabbitai Bot commented Sep 9, 2025 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Removes x-internal annotations from multiple Entitlements V2 and events endpoints, updates documentation to reference customers (v2) instead of subjects (v1), and regenerates OpenAPI/Swagger artifacts and JS/Go client outputs; includes minor JS formatting tweaks and small TypeSpec cleanup.

Changes

Cohort / File(s) Summary of changes
Generated Go Swagger payloads
api/api.gen.go, api/client/go/client.gen.go
Replaced large embedded swaggerSpec data blocks (updated embedded OpenAPI/Swagger payloads). No changes to control flow, function signatures, or runtime logic.
JS client formatting (customers)
api/client/javascript/src/client/customers.ts
Minor formatting: normalized empty constructor bodies from }) { } to }) {}.
JS client schemas & docs
api/client/javascript/src/client/schemas.ts, api/client/javascript/src/zod/index.ts
Updated documentation text to reference customers/v2 instead of subjects/v1 for grants endpoints; adjusted docblock path parameter names. schemas.ts also had descriptive updates referenced (no exported signatures changed).
OpenAPI specs (visibility & docs)
api/openapi.yaml, api/openapi.cloud.yaml
Removed x-internal: true from multiple /api/v2 customer entitlement, grants, value, history, override, reset, events, and grants endpoints (promoting them to public in the spec); updated listGrantsV2 description/path to customers v2.
TypeSpec: customer entitlements V2
api/spec/src/entitlements/v2/customer.tsp
Removed @extension("x-internal", true) annotations from ~10 operations (create/list/get/delete/override/reset/history/value/grants).
TypeSpec: grants docs
api/spec/src/entitlements/v2/grants.tsp
Removed @extension("x-internal", true) from list method and updated docs to reference customers/v2 path for grants.
TypeSpec: entitlements module cleanup
api/spec/src/entitlements/v2/entitlements.tsp
Removed unused using directives for TypeSpec.Http and TypeSpec.OpenAPI.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e460fb9 and 4892ba3.

📒 Files selected for processing (10)
  • api/api.gen.go (2 hunks)
  • api/client/go/client.gen.go (1 hunks)
  • api/client/javascript/src/client/customers.ts (3 hunks)
  • api/client/javascript/src/client/schemas.ts (1 hunks)
  • api/client/javascript/src/zod/index.ts (1 hunks)
  • api/openapi.cloud.yaml (1 hunks)
  • api/openapi.yaml (1 hunks)
  • api/spec/src/entitlements/v2/customer.tsp (0 hunks)
  • api/spec/src/entitlements/v2/entitlements.tsp (0 hunks)
  • api/spec/src/entitlements/v2/grants.tsp (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/entitlements-v2-public

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@tothandras
tothandras requested a review from GAlexIHU September 9, 2025 17:05
GAlexIHU
GAlexIHU previously approved these changes Sep 9, 2025
hekike
hekike previously approved these changes Sep 9, 2025
@tothandras
tothandras dismissed stale reviews from hekike and GAlexIHU via 4892ba3 September 9, 2025 17:12
@tothandras
tothandras force-pushed the chore/entitlements-v2-public branch from e460fb9 to 4892ba3 Compare September 9, 2025 17:12
@tothandras
tothandras enabled auto-merge (squash) September 9, 2025 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/misc Miscellaneous changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants