Skip to content

feat(spec): update v3 spec - #4381

Merged
tothandras merged 2 commits into
mainfrom
feat/update-spec-visibility
May 19, 2026
Merged

tothandras merged 2 commits into
mainfrom
feat/update-spec-visibility

Conversation

@tothandras

@tothandras tothandras commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

Release Notes

  • Chores
    • Transitioned multiple API endpoints from internal to public unstable status, expanding API access.
    • Updated API service metadata and branding information.
    • Expanded server configuration with regional production endpoints (US, EU, AU, Middle East, India).
    • Streamlined API specification by removing redundant extension markers.

Review Change Stack

@tothandras
tothandras requested a review from a team as a code owner May 19, 2026 11:17
@tothandras tothandras added the release-note/feature Release note: Exciting New Features label May 19, 2026
@coderabbitai

coderabbitai Bot commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: dbff3e84-92e0-4544-bba0-a6cd8deecd3b

📥 Commits

Reviewing files that changed from the base of the PR and between 8175711 and c837cd6.

⛔ Files ignored due to path filters (1)
  • api/v3/openapi.yaml is excluded by !**/openapi.yaml
📒 Files selected for processing (8)
  • api/spec/packages/aip/src/events/operations.tsp
  • api/spec/packages/aip/src/features/operations.tsp
  • api/spec/packages/aip/src/llmcost/operations.tsp
  • api/spec/packages/aip/src/meters/operations.tsp
  • api/spec/packages/aip/src/openmeter.tsp
  • api/spec/packages/aip/src/productcatalog/operations.tsp
  • api/spec/packages/aip/src/subscriptions/operations.tsp
  • api/v3/api.gen.go
💤 Files with no reviewable changes (5)
  • api/spec/packages/aip/src/events/operations.tsp
  • api/spec/packages/aip/src/features/operations.tsp
  • api/spec/packages/aip/src/llmcost/operations.tsp
  • api/spec/packages/aip/src/meters/operations.tsp
  • api/spec/packages/aip/src/productcatalog/operations.tsp
🚧 Files skipped from review as they are similar to previous changes (2)
  • api/spec/packages/aip/src/subscriptions/operations.tsp
  • api/spec/packages/aip/src/openmeter.tsp

📝 Walkthrough

Walkthrough

This PR systematically normalizes API operation visibility across the OpenMeter TypeSpec definitions, updates the service branding and version information, adds regional server support, and regenerates the corresponding Go Swagger spec to match.

Changes

API Extension Visibility and Service Metadata Normalization

Layer / File(s) Summary
Service metadata and regional server configuration
api/spec/packages/aip/src/openmeter.tsp
Service title expanded to include Konnect branding, API version bumped down to 0.0.1, legacy license and terms fields removed, Cloud server relabeled, and a new templated regional server added with region parameter (us/eu/au/me/in defaulting to us).
Operation extension visibility updates across AIP services
api/spec/packages/aip/src/events/operations.tsp, api/spec/packages/aip/src/features/operations.tsp, api/spec/packages/aip/src/llmcost/operations.tsp, api/spec/packages/aip/src/meters/operations.tsp, api/spec/packages/aip/src/productcatalog/operations.tsp, api/spec/packages/aip/src/subscriptions/operations.tsp
Extension decorators changed from Shared.InternalExtension to Shared.UnstableExtension for events list, feature CRUD, LLM cost pricing, meter update/query, and subscription add-on operations; productcatalog operations have InternalExtension removed while keeping UnstableExtension.
Generated Swagger specification update
api/v3/api.gen.go
Embedded base64+gzipped Swagger spec regenerated to reflect updated extension visibility, service metadata, and server configuration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • openmeterio/openmeter#4281: Updates the same @extension(...) metadata across events, features, and meters operations with similar InternalExtension changes.
  • openmeterio/openmeter#4337: Introduces the subscription add-on list endpoint whose extension decorator is normalized in this PR.
  • openmeterio/openmeter#4205: Also modifies meter query operations in the same file with related extension updates.

Suggested reviewers

  • chrisgacsal
  • turip
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is vague and generic, using the non-descriptive term 'update v3 spec' without conveying what aspect of the spec was changed or why. Consider a more specific title like 'feat(spec): change internal endpoints to unstable extension' to clearly communicate the main change across multiple API operations.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/update-spec-visibility

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.

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (1)
openmeter/billing/worker/subscriptionsync/service/reconciler/patch_test.go (1)

42-48: ⚡ Quick win

Remove the duplicated table case to keep the test matrix clean.

Nice addition, but this scenario is now defined twice with the same name and outcome. Keeping one avoids redundant execution and makes failures easier to read.

♻️ Suggested cleanup
-		{
-			name:                    "credit then invoice disabled stays on invoice lines",
-			settlementMode:          productcatalog.CreditThenInvoiceSettlementMode,
-			enableCredits:           true,
-			enableCreditThenInvoice: false,
-			rateCard:                flatRateCard,
-			expectedCollection:      &lineInvoicePatchCollection{},
-		},

As per coding guidelines, "**/*.go: In general when reviewing the Golang code make readability and maintainability a priority, even potentially suggest restructuring the code to improve them."

Also applies to: 64-70

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@openmeter/billing/worker/subscriptionsync/service/reconciler/patch_test.go`
around lines 42 - 48, Remove the duplicate table test case that uses name
"credit then invoice disabled stays on invoice lines" (the entry with
settlementMode productcatalog.CreditThenInvoiceSettlementMode, enableCredits
true, rateCard flatRateCard, expectedCollection &lineInvoicePatchCollection{})
so only one instance remains in the test matrix; locate the duplicate entries in
patch_test.go and delete the redundant struct literal (either the earlier or
later copy) to avoid running the same scenario twice.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@openmeter/billing/worker/subscriptionsync/service/reconciler/patch_test.go`:
- Around line 42-48: Remove the duplicate table test case that uses name "credit
then invoice disabled stays on invoice lines" (the entry with settlementMode
productcatalog.CreditThenInvoiceSettlementMode, enableCredits true, rateCard
flatRateCard, expectedCollection &lineInvoicePatchCollection{}) so only one
instance remains in the test matrix; locate the duplicate entries in
patch_test.go and delete the redundant struct literal (either the earlier or
later copy) to avoid running the same scenario twice.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c529b3df-af87-4cd3-a948-17344ac48b9a

📥 Commits

Reviewing files that changed from the base of the PR and between 5a3d92d and c27352d.

⛔ Files ignored due to path filters (1)
  • api/v3/openapi.yaml is excluded by !**/openapi.yaml
📒 Files selected for processing (11)
  • api/spec/packages/aip/src/events/operations.tsp
  • api/spec/packages/aip/src/features/operations.tsp
  • api/spec/packages/aip/src/llmcost/operations.tsp
  • api/spec/packages/aip/src/meters/operations.tsp
  • api/spec/packages/aip/src/openmeter.tsp
  • api/spec/packages/aip/src/productcatalog/operations.tsp
  • api/spec/packages/aip/src/subscriptions/operations.tsp
  • api/v3/api.gen.go
  • openmeter/billing/charges/flatfee/adapter/realizationrun_test.go
  • openmeter/billing/charges/flatfee/service/lineengine.go
  • openmeter/billing/worker/subscriptionsync/service/reconciler/patch_test.go
💤 Files with no reviewable changes (5)
  • api/spec/packages/aip/src/events/operations.tsp
  • api/spec/packages/aip/src/meters/operations.tsp
  • api/spec/packages/aip/src/llmcost/operations.tsp
  • api/spec/packages/aip/src/features/operations.tsp
  • api/spec/packages/aip/src/productcatalog/operations.tsp
✅ Files skipped from review due to trivial changes (1)
  • api/spec/packages/aip/src/subscriptions/operations.tsp
🚧 Files skipped from review as they are similar to previous changes (1)
  • api/spec/packages/aip/src/openmeter.tsp

@tothandras
tothandras merged commit 7fc84c4 into main May 19, 2026
28 checks passed
@tothandras
tothandras deleted the feat/update-spec-visibility branch May 19, 2026 18:47

This branch was previously deployed

1 inactive deployment
dev — c837cd65 Deployed May 19, 2026 by tothandras via Migration Checks #14505
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/feature Release note: Exciting New Features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants