Skip to content

Conversation

@GAlexIHU
Copy link
Contributor

@GAlexIHU GAlexIHU commented Jan 13, 2026

Overview

Fixes #(issue)

Notes for reviewer

Summary by CodeRabbit

  • New Features
    • Feature meters now support UNIQUE_COUNT and LATEST aggregation types in addition to existing SUM and COUNT options.

✏️ Tip: You can customize this high-level summary in your review settings.

@GAlexIHU GAlexIHU requested a review from a team as a code owner January 13, 2026 17:04
@GAlexIHU GAlexIHU added kind/documentation Improvements or additions to documentation release-note/misc Miscellaneous changes labels Jan 13, 2026
@GAlexIHU GAlexIHU enabled auto-merge (squash) January 13, 2026 17:04
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 13, 2026

📝 Walkthrough

Walkthrough

This PR regenerates the OpenAPI server implementation with updated parameter binding infrastructure, and expands the feature meter aggregation documentation to include UNIQUE_COUNT and LATEST types alongside the existing SUM and COUNT options.

Changes

Cohort / File(s) Summary
Generated API Implementation
api/api.gen.go
Regenerated handler infrastructure with ServerInterfaceWrapper, route parameter binding via runtime utilities, middleware chain support, embedded gzipped Swagger spec, and decoding functions (decodeSpec, decodeSpecCached, GetSwagger). All endpoint methods stubbed with StatusNotImplemented.
API Specification Documentation
api/spec/src/productcatalog/features.tsp, api/spec/src/productcatalog/routes.tsp
Updated documentation comments to reflect expanded meter aggregation support: SUM, COUNT, UNIQUE_COUNT, and LATEST.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

area/api

Suggested reviewers

  • tothandras
  • chrisgacsal
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'chore(docs): update api docs' is vague and overly generic, using non-descriptive language that doesn't convey the specific nature of the documentation updates. Consider using a more specific title that mentions the actual change, such as 'chore(docs): update meter aggregation types in API docs' to better reflect what was updated.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/featuremetertype

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
api/spec/src/productcatalog/features.tsp (1)

39-49: Doc update is inside commented-out code – meterSlug field lacks this info

The aggregation documentation you've updated is within the commented-out meterKey block (lines 39-45), so API consumers won't actually see it. The active meterSlug field (lines 47-49) doesn't mention which aggregations are supported.

Consider moving this documentation to the meterSlug field so users know they need meters with SUM, COUNT, UNIQUE_COUNT, or LATEST aggregations.

📝 Suggested documentation placement
-  @summary("Meter slug")
+  /**
+   * The meter that the feature is associated with and based on which usage is calculated.
+   * The meter selected must have one of the following aggregations: SUM, COUNT, UNIQUE_COUNT, LATEST
+   */
+  @summary("Meter slug")
   @example("tokens_total")
   meterSlug?: Key;
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d73dcff and 996a577.

⛔ Files ignored due to path filters (7)
  • api/client/go/client.gen.go is excluded by !api/client/**
  • api/client/javascript/src/client/schemas.ts is excluded by !api/client/**
  • api/client/javascript/src/zod/index.ts is excluded by !api/client/**
  • api/client/python/openmeter/_generated/aio/operations/_operations.py is excluded by !**/_generated/**, !api/client/**
  • api/client/python/openmeter/_generated/operations/_operations.py is excluded by !**/_generated/**, !api/client/**
  • api/openapi.cloud.yaml is excluded by !**/openapi.cloud.yaml
  • api/openapi.yaml is excluded by !**/openapi.yaml
📒 Files selected for processing (3)
  • api/api.gen.go
  • api/spec/src/productcatalog/features.tsp
  • api/spec/src/productcatalog/routes.tsp
🧰 Additional context used
📓 Path-based instructions (2)
**/*.go

⚙️ CodeRabbit configuration file

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

Performance should be a priority in critical code paths. Anything related to event ingestion, message processing, database operations (regardless of database) should be vetted for potential performance bottlenecks.

Files:

  • api/api.gen.go
**/*.tsp

⚙️ CodeRabbit configuration file

**/*.tsp: Review the TypeSpec code for conformity with TypeSpec best practices. When recommending changes also consider the fact that multiple codegeneration toolchains depend on the TypeSpec code, each of which have their idiosyncrasies and bugs.

The declared API should be accurate, in parity with the actual implementation, and easy to understand for the user.

Files:

  • api/spec/src/productcatalog/routes.tsp
  • api/spec/src/productcatalog/features.tsp
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Migration Checks
  • GitHub Check: Artifacts / Container image
  • GitHub Check: Test
  • GitHub Check: Artifacts / Benthos Collector Container image
  • GitHub Check: Build
  • GitHub Check: Lint
  • GitHub Check: Code Generators
  • GitHub Check: Analyze (go)
🔇 Additional comments (2)
api/spec/src/productcatalog/routes.tsp (1)

41-46: Looks good!

The documentation update is clear and properly placed in the create operation docstring. This will be visible to API consumers in the generated OpenAPI spec. Nice work expanding the supported aggregation types!

api/api.gen.go (1)

21548-21901: Generated code changes look good!

This is auto-generated swagger specification data (base64-encoded, gzipped JSON) that gets served by the GetSwagger() function. The changes align with the PR's stated goal of updating API documentation to expand the feature meter aggregation types.

Since this is generated code, just make sure the source specification files (.tsp files mentioned in the summary) are the actual source of truth and that this file was regenerated from them using your standard tooling.

@GAlexIHU GAlexIHU merged commit 2f2d08d into main Jan 13, 2026
29 of 30 checks passed
@GAlexIHU GAlexIHU deleted the docs/featuremetertype branch January 13, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/documentation Improvements or additions to documentation release-note/misc Miscellaneous changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants