Repository navigation
fix(api/spec): typespec dependency update - #4798
Conversation
📝 WalkthroughWalkthroughRefreshes API specification tooling and TypeSpec declarations, updates generated client formatting and test compilation setup, and replaces embedded Swagger payloads in generated Go API files. ChangesAPI specification refresh
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
api/v3/client/models_customers.go (1)
1038-1041: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueTiny nit: the
per_unit_cost_basisdoc wrap reads a little choppy.All these sites flow from the same TypeSpec doc string, so the stubby
$100.00, the total chargeline shows up everywhere it's emitted. Content is correct and unchanged — purely a readability polish if you're touching the source text anyway.
api/v3/client/models_customers.go#L1038-L1041: comes from the shared doc string; also applies to the duplicate block at L1294-L1297.api/v3/api.gen.go#L3042-L3045: same generated text; also at L5364-L5367.api/spec/packages/aip-client-javascript/src/models/types.ts#L1701-L1704: same generated text; also at L1755-L1758, L5801-L5804, and L5847-L5850.Fix once in the TypeSpec doc comment and regenerate rather than editing any of the generated files.
🤖 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 `@api/v3/client/models_customers.go` around lines 1038 - 1041, Rewrap the shared TypeSpec documentation for per_unit_cost_basis to improve readability without changing its content, then regenerate all outputs. This updates api/v3/client/models_customers.go ranges 1038-1041 and 1294-1297, api/v3/api.gen.go ranges 3042-3045 and 5364-5367, and api/spec/packages/aip-client-javascript/src/models/types.ts ranges 1701-1704, 1755-1758, 5801-5804, and 5847-5850; do not edit generated files directly.Source: Coding guidelines
🤖 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 `@api/v3/client/models_customers.go`:
- Around line 1038-1041: Rewrap the shared TypeSpec documentation for
per_unit_cost_basis to improve readability without changing its content, then
regenerate all outputs. This updates api/v3/client/models_customers.go ranges
1038-1041 and 1294-1297, api/v3/api.gen.go ranges 3042-3045 and 5364-5367, and
api/spec/packages/aip-client-javascript/src/models/types.ts ranges 1701-1704,
1755-1758, 5801-5804, and 5847-5850; do not edit generated files directly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 8428f7a0-6b9b-4da2-9282-d0a514e05301
⛔ Files ignored due to path filters (24)
api/client/go/client.gen.gois excluded by!api/client/**api/client/python/openmeter/__init__.pyis excluded by!api/client/**api/client/python/openmeter/_generated/_client.pyis excluded by!**/_generated/**,!api/client/**api/client/python/openmeter/_generated/_unions.pyis excluded by!**/_generated/**,!api/client/**api/client/python/openmeter/_generated/_utils/model_base.pyis excluded by!**/_generated/**,!api/client/**api/client/python/openmeter/_generated/_utils/serialization.pyis excluded by!**/_generated/**,!api/client/**api/client/python/openmeter/_generated/aio/_client.pyis excluded by!**/_generated/**,!api/client/**api/client/python/openmeter/_generated/aio/operations/_operations.pyis excluded by!**/_generated/**,!api/client/**api/client/python/openmeter/_generated/models/_models.pyis excluded by!**/_generated/**,!api/client/**api/client/python/openmeter/_generated/operations/_operations.pyis excluded by!**/_generated/**,!api/client/**api/client/python/openmeter/_generated/types.pyis excluded by!**/_generated/**,!api/client/**api/openapi.cloud.yamlis excluded by!**/openapi.cloud.yamlapi/openapi.yamlis excluded by!**/openapi.yamlapi/spec/patches/@typespec__compiler.patchis excluded by!api/spec/patches/**api/spec/patches/@typespec__emitter-framework.patchis excluded by!api/spec/patches/**api/spec/patches/@[email protected]is excluded by!api/spec/patches/**api/spec/patches/@typespec__http-client-python.patchis excluded by!api/spec/patches/**api/spec/patches/@typespec__http-client.patchis excluded by!api/spec/patches/**api/spec/patches/@typespec__http.patchis excluded by!api/spec/patches/**api/spec/patches/@typespec__openapi.patchis excluded by!api/spec/patches/**api/spec/patches/@typespec__openapi3.patchis excluded by!api/spec/patches/**api/spec/patches/@[email protected]is excluded by!api/spec/patches/**api/spec/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlapi/v3/openapi.yamlis excluded by!**/openapi.yaml
📒 Files selected for processing (26)
api/api.gen.goapi/spec/AGENTS.mdapi/spec/package.jsonapi/spec/packages/aip-client-javascript/package.jsonapi/spec/packages/aip-client-javascript/src/lib/types.tsapi/spec/packages/aip-client-javascript/src/models/errors.tsapi/spec/packages/aip-client-javascript/src/models/types.tsapi/spec/packages/aip-client-javascript/tsconfig.jsonapi/spec/packages/aip/package.jsonapi/spec/packages/aip/src/customers/charges/charges.tspapi/spec/packages/aip/src/customers/credits/grant.tspapi/spec/packages/aip/src/shared/request.tspapi/spec/packages/legacy/package.jsonapi/spec/packages/legacy/src/entitlements/entitlements.tspapi/spec/packages/legacy/src/entitlements/v2/entitlements.tspapi/spec/packages/legacy/src/productcatalog/ratecards.tspapi/spec/packages/legacy/src/productcatalog/subscription.tspapi/spec/packages/typespec-go/package.jsonapi/spec/packages/typespec-go/src/go-types.tsxapi/spec/packages/typespec-go/src/projections.tsapi/spec/packages/typespec-typescript/package.jsonapi/spec/packages/typespec-typescript/templates/runtime/errors.tsapi/spec/packages/typespec-typescript/templates/runtime/types.tsapi/spec/pnpm-workspace.yamlapi/v3/api.gen.goapi/v3/client/models_customers.go
093569e to
0756e0e
Compare
…grant doc TypeSpec 1.14 warns on duplicate imports; createTestRunner already auto-imports the host libraries, so the explicit imports in the typespec-go and aip lint-rule test fixtures now fail expectDiagnosticEmpty. Also reflows the per_unit_cost_basis doc comment at its TypeSpec source so the generated docs stop wrapping mid-sentence.
Fixes #4530
Summary by CodeRabbit
Greptile Summary
Updates the TypeSpec toolchain and regenerates the corresponding API artifacts.
Confidence Score: 4/5
The PR appears safe to merge, although the previously reported regeneration-preservation concern remains unresolved.
The checked-in Python initializer currently exports Client correctly, but the refreshed emitter patch does not explicitly ensure that this handwritten wrapper survives a future SDK regeneration.
Files Needing Attention: api/spec/patches/@typespec__http-client-python.patch
Important Files Changed
Reviews (3): Last reviewed commit: "fix(api/spec): drop duplicate test fixtu..." | Re-trigger Greptile
Context used: