Skip to content

feat(api): add update meter api spec#4168

Merged
mark-vass-konghq merged 1 commit into
mainfrom
feat/add-update-meter-api-spec
Apr 17, 2026
Merged

feat(api): add update meter api spec#4168
mark-vass-konghq merged 1 commit into
mainfrom
feat/add-update-meter-api-spec

Conversation

@mark-vass-konghq
Copy link
Copy Markdown
Contributor

@mark-vass-konghq mark-vass-konghq commented Apr 17, 2026

@coderabbitai
Add update meter api spec

Summary by CodeRabbit

  • New Features
    • Added a PUT endpoint to update an existing meter by ID, allowing users to modify name, description, labels, and dimensions in a single request. The endpoint accepts partial updates and returns the updated meter or an error if not found.

@mark-vass-konghq mark-vass-konghq self-assigned this Apr 17, 2026
@mark-vass-konghq mark-vass-konghq requested a review from a team as a code owner April 17, 2026 13:28
@mark-vass-konghq mark-vass-konghq added the release-note/feature Release note: Exciting New Features label Apr 17, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 17, 2026

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: 0ef3b7fb-0867-41c8-a829-10eeffaae62c

📥 Commits

Reviewing files that changed from the base of the PR and between a3e03d2 and 8fb1bda.

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

📝 Walkthrough

Walkthrough

Adds a new PUT-based "update meter" operation to the API spec, generates corresponding Go request types and server interface changes, and wires a new Server route that delegates to the unimplemented handler.

Changes

Cohort / File(s) Summary
API Specification
api/spec/packages/aip/src/meters/operations.tsp
Added update operation exposed via @put (operationId("update-meter")), with @path meterId: Shared.ULID and @body meter: Shared.UpdateRequest<Meter>. Returns Shared.UpdateResponse<Meter> or Common.NotFound / Common.ErrorResponses. Marked private/unstable/internal.
Generated API Code
api/v3/api.gen.go
Generated UpdateMeterRequest (Description *string, Dimensions *map[string]string, Labels *Labels, Name *string) and alias UpdateMeterJSONRequestBody. Extended ServerInterface with UpdateMeter(w, r, meterId ULID), added Unimplemented.UpdateMeter stub, ServerInterfaceWrapper.UpdateMeter to bind meterId, and updated routing metadata/swagger spec.
Server Implementation
api/v3/server/routes.go
Added func (s *Server) UpdateMeter(w http.ResponseWriter, r *http.Request, meterId api.ULID) route handler that delegates to unimplemented.UpdateMeter.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(api): add update meter api spec' directly describes the main change—adding a new update meter API specification across the codebase.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ 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/add-update-meter-api-spec

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.

@mark-vass-konghq mark-vass-konghq enabled auto-merge (squash) April 17, 2026 13:37
@mark-vass-konghq mark-vass-konghq merged commit 1f567fc into main Apr 17, 2026
25 of 26 checks passed
@mark-vass-konghq mark-vass-konghq deleted the feat/add-update-meter-api-spec branch April 17, 2026 13:41
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.

2 participants