fix(api): resolve TypeSpec AIP compiler warnings#4079
Conversation
Fix 18 warnings from the AIP linter: - Use PascalCase for enum/model type names (FeatureLLM* → FeatureLlm*) - Use PascalCase for enum members (input → Input, etc.) - Add missing doc comments for type discriminator fields - Suppress repeated-prefix-grouping for established API fields Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughStandardized naming conventions across the unit-cost specification by renaming enum members and model types from mixed-case (llm, LLM) to consistent PascalCase (Llm, Llm). Updated all discriminator references and model field types accordingly, added suppress directives for linting warnings, and regenerated Go API code. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@api/v3/api.gen.go`:
- Around line 9164-9499: The embedded OpenAPI spec blob in api/v3/api.gen.go is
out of date and missing the BillingFeatureLLMUnitCostType enum (should contain
["llm"]); regenerate the embedded spec by updating the TypeSpec in api/spec/ if
needed and running the codegen target (make gen-api) so the embedded blob (the
large base64/string blob in api/v3/api.gen.go) includes the updated schema with
BillingFeatureLLMUnitCostType.
🪄 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: a913790b-9f79-4dd3-9a97-77321f857e73
⛔ Files ignored due to path filters (1)
api/v3/openapi.yamlis excluded by!**/openapi.yaml
📒 Files selected for processing (4)
api/spec/packages/aip/src/features/unitcost.tspapi/spec/packages/aip/src/productcatalog/addon.tspapi/spec/packages/aip/src/productcatalog/plan.tspapi/v3/api.gen.go
Summary
FeatureLLM*→FeatureLlm*) and enum members (input→Input, etc.) — API-facing names preserved via@friendlyNametypediscriminator fields onFeatureManualUnitCostandFeatureLlmUnitCostrepeated-prefix-groupingwarnings for established API fields (effective_from/effective_to,token_type/token_type_property,cache_read/cache_write) that would be breaking changes to restructureTest plan
pnpm compileinapi/spec/packages/aippasses with 0 warnings🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
FeatureLLMUnitCost,FeatureLLMTokenType, and related types have been renamed. Applications using these API types require updates.