Skip to content

refactor: move currencies endpoints under Currencies section in docs - #4533

Merged
tothandras merged 3 commits into
mainfrom
refactor/change-currencies-tag
Jun 18, 2026
Merged

refactor: move currencies endpoints under Currencies section in docs#4533
tothandras merged 3 commits into
mainfrom
refactor/change-currencies-tag

Conversation

@borosr

@borosr borosr commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Overview

Fixes #(issue)

Notes for reviewer

Summary by CodeRabbit

  • Documentation
    • Updated the OpenAPI documentation to group currencies and related cost-bases endpoints under a dedicated “OpenMeter Currencies” category instead of “OpenMeter Billing Settings.”
    • Updated tagging for customer charges to use the “Customers” category.
    • Added tag metadata and descriptions for currencies, and adjusted the billing tag label/description accordingly.
    • Regenerated the embedded Swagger/OpenAPI specification to reflect these documentation and tagging changes.

@borosr
borosr requested review from rolosp and tothandras June 16, 2026 18:49
@borosr borosr self-assigned this Jun 16, 2026
@borosr
borosr requested a review from a team as a code owner June 16, 2026 18:49
@borosr borosr added the release-note/misc Miscellaneous changes label Jun 16, 2026
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: e611a4e3-646e-4ac8-b897-19c7fca91301

📥 Commits

Reviewing files that changed from the base of the PR and between 1919830 and 952a98d.

⛔ Files ignored due to path filters (1)
  • api/v3/openapi.yaml is excluded by !**/openapi.yaml
📒 Files selected for processing (4)
  • api/spec/packages/aip/src/konnect.tsp
  • api/spec/packages/aip/src/openmeter.tsp
  • api/spec/packages/aip/src/shared/consts.tsp
  • api/v3/api.gen.go
✅ Files skipped from review due to trivial changes (1)
  • api/v3/api.gen.go
🚧 Files skipped from review as they are similar to previous changes (3)
  • api/spec/packages/aip/src/shared/consts.tsp
  • api/spec/packages/aip/src/konnect.tsp
  • api/spec/packages/aip/src/openmeter.tsp

📝 Walkthrough

Walkthrough

Adds CurrenciesTag and CurrenciesDescription constants to the Shared namespace and updates the BillingTag label to "OpenMeter Billing Settings" with a narrowed description. All currencies-related endpoint interfaces (CurrenciesEndpoints, CurrenciesCustomEndpoints, CurrenciesCustomCostBasesEndpoints) move from Shared.BillingTag to Shared.CurrenciesTag in both konnect.tsp and openmeter.tsp. The /openmeter/customers/{customerId}/charges endpoint switches to Shared.CustomersTag. The Go swagger spec in api.gen.go is regenerated to match.

Changes

Currencies Tag Split

Layer / File(s) Summary
Tag constant definitions and updates
api/spec/packages/aip/src/shared/consts.tsp
Adds CurrenciesTag = "OpenMeter Currencies" and CurrenciesDescription = "Currencies and cost bases for customers." constants. Updates BillingTag label to "OpenMeter Billing Settings" and narrows BillingDescription to reference only billing profiles and invoices.
TypeSpec metadata and endpoint retagging
api/spec/packages/aip/src/konnect.tsp, api/spec/packages/aip/src/openmeter.tsp
Registers @tagMetadata for CurrenciesTag in both service definitions. Swaps all three currencies endpoint interface decorators from @tag(Shared.BillingTag) to @tag(Shared.CurrenciesTag). Also moves CustomerChargesEndpoints from @tag(Shared.BillingTag) to @tag(Shared.CustomersTag).
Regenerated Go swagger spec
api/v3/api.gen.go
Replaces the embedded base64-encoded Swagger payload chunks to match the updated tag assignments; all Go models, server interfaces, and routing logic remain unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested reviewers

  • chrisgacsal
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change—reorganizing API documentation by moving currency endpoints to a dedicated Currencies section instead of the Billing section.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 refactor/change-currencies-tag

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.

@greptile-apps

greptile-apps Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR reorganizes API documentation tags so that currency and cost-base endpoints are grouped under a new dedicated "Currencies" section instead of "Billing," and customer charges endpoints move to the "Customers" section. The old "OpenMeter Billing" tag is renamed to "OpenMeter Billing Settings" with an updated description that no longer mentions currencies or cost bases.

  • New CurrenciesTag constant and description added in consts.tsp; @tagMetadata decorators added in both openmeter.tsp and konnect.tsp.
  • CurrenciesEndpoints, CurrenciesCustomEndpoints, and CurrenciesCustomCostBasesEndpoints interfaces re-tagged from BillingTagCurrenciesTag; CustomerChargesEndpoints re-tagged from BillingTagCustomersTag.
  • api/v3/openapi.yaml and api/v3/api.gen.go regenerated to reflect all tag changes.

Confidence Score: 5/5

Safe to merge — purely a documentation tag reorganization with no logic, schema, or runtime behavior changes.

All changes are limited to TypeSpec tag decorators and the corresponding regenerated OpenAPI/Go spec payloads. The TypeSpec source and generated outputs are fully consistent with each other. The previously flagged stale BillingDescription has been corrected. No endpoint paths, operationIds, models, or runtime code are modified.

No files require special attention.

Important Files Changed

Filename Overview
api/spec/packages/aip/src/shared/consts.tsp Adds CurrenciesTag/CurrenciesDescription constants and updates BillingTag/BillingDescription to no longer mention currencies or cost bases — all changes correct and consistent.
api/spec/packages/aip/src/openmeter.tsp Adds CurrenciesTag tagMetadata and re-tags currency/cost-base and customer-charges interfaces correctly; mirrors konnect.tsp changes.
api/spec/packages/aip/src/konnect.tsp Parallel changes to openmeter.tsp — CurrenciesTag tagMetadata added, currency and customer-charges endpoints re-tagged correctly.
api/v3/openapi.yaml Regenerated spec reflects new 'OpenMeter Currencies' tag, renamed 'OpenMeter Billing Settings' tag, and all updated path-level tags; consistent with TypeSpec source.
api/v3/api.gen.go Auto-generated Go file updated with the re-encoded Swagger payload reflecting the same tag changes; no manual logic involved.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[TypeSpec Source\nconsts.tsp] -->|defines tags| B[BillingTag\n'OpenMeter Billing Settings']
    A -->|defines tags| C[CurrenciesTag\n'OpenMeter Currencies']
    A -->|defines tags| D[CustomersTag\n'OpenMeter Customers']

    B -->|tagged| E[BillingProfilesEndpoints\ninvoices, profiles]
    C -->|tagged| F[CurrenciesEndpoints\n/currencies]
    C -->|tagged| G[CurrenciesCustomEndpoints\n/currencies/custom]
    C -->|tagged| H[CurrenciesCustomCostBasesEndpoints\n/currencies/custom/cost-bases]
    D -->|tagged| I[CustomerChargesEndpoints\n/customers/charges]

    E --> J[openapi.yaml\nOpenMeter Billing Settings]
    F --> K[openapi.yaml\nOpenMeter Currencies]
    G --> K
    H --> K
    I --> L[openapi.yaml\nOpenMeter Customers]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[TypeSpec Source\nconsts.tsp] -->|defines tags| B[BillingTag\n'OpenMeter Billing Settings']
    A -->|defines tags| C[CurrenciesTag\n'OpenMeter Currencies']
    A -->|defines tags| D[CustomersTag\n'OpenMeter Customers']

    B -->|tagged| E[BillingProfilesEndpoints\ninvoices, profiles]
    C -->|tagged| F[CurrenciesEndpoints\n/currencies]
    C -->|tagged| G[CurrenciesCustomEndpoints\n/currencies/custom]
    C -->|tagged| H[CurrenciesCustomCostBasesEndpoints\n/currencies/custom/cost-bases]
    D -->|tagged| I[CustomerChargesEndpoints\n/customers/charges]

    E --> J[openapi.yaml\nOpenMeter Billing Settings]
    F --> K[openapi.yaml\nOpenMeter Currencies]
    G --> K
    H --> K
    I --> L[openapi.yaml\nOpenMeter Customers]
Loading

Reviews (5): Last reviewed commit: "fix: move customers/charges endpoint und..." | Re-trigger Greptile

Comment thread api/spec/packages/aip/src/shared/consts.tsp Outdated

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

Actionable comments posted: 1

🤖 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.

Inline comments:
In `@api/spec/packages/aip/src/shared/consts.tsp`:
- Around line 25-29: The BillingDescription constant is inaccurate because it
claims billing manages currencies and cost bases, which are now grouped under
the separate CurrenciesTag. Update the BillingDescription to remove references
to currencies and cost bases, keeping only the responsibilities that actually
belong to the billing tag (such as billing profiles and invoices). This ensures
the tag documentation accurately reflects the current API structure after the
split.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 42d47982-2f64-43b8-aafa-6eeb0fce4048

📥 Commits

Reviewing files that changed from the base of the PR and between 097ee63 and 5de9fd7.

⛔ Files ignored due to path filters (1)
  • api/v3/openapi.yaml is excluded by !**/openapi.yaml
📒 Files selected for processing (4)
  • api/spec/packages/aip/src/konnect.tsp
  • api/spec/packages/aip/src/openmeter.tsp
  • api/spec/packages/aip/src/shared/consts.tsp
  • api/v3/api.gen.go

Comment thread api/spec/packages/aip/src/shared/consts.tsp Outdated
@tothandras

Copy link
Copy Markdown
Contributor

Please regenerate the aip typescript client and rebase on main

@borosr
borosr force-pushed the refactor/change-currencies-tag branch from 75347b6 to 1919830 Compare June 17, 2026 14:17
@borosr
borosr force-pushed the refactor/change-currencies-tag branch from 1919830 to 952a98d Compare June 18, 2026 07:18
@greptile-apps

greptile-apps Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

@tothandras
tothandras merged commit 5176487 into main Jun 18, 2026
27 of 28 checks passed
@tothandras
tothandras deleted the refactor/change-currencies-tag branch June 18, 2026 22:51
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