-
Notifications
You must be signed in to change notification settings - Fork 152
fix: api grouping #2760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: api grouping #2760
Conversation
📝 WalkthroughWalkthroughThis change introduces two new API tags, "App: Custom Invoicing" and "App: Stripe," to the OpenAPI specifications and related TypeSpec source files. Several existing API endpoints previously tagged as "Apps" are re-categorized under these more specific tags. Correspondingly, the embedded Swagger specification strings in both server and client Go code are updated to reflect these tagging changes. No API endpoint parameters, request/response schemas, or logic are altered; the updates affect only metadata used for API documentation and categorization. Changes
Possibly related PRs
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (1.64.8)Error: you are using a configuration file for golangci-lint v2 with golangci-lint v1: please use golangci-lint v2 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (8)
✅ Files skipped from review due to trivial changes (6)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (9)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
🔭 Outside diff range comments (1)
api/spec/src/app/custominvoicing.tsp (1)
53-56:⚠️ Potential issueTypo in method name: missing 'h'. The method
draftSyncronizedshould be spelleddraftSynchronizedto match the path (/synchronized) and@operationId("appCustomInvoicingDraftSynchronized"). Please update:- draftSyncronized( + draftSynchronized(
🧹 Nitpick comments (2)
api/spec/src/app/custominvoicing.tsp (1)
71-74: Optional rename for consistency: Consider renamingpaymentStatustoupdatePaymentStatusto align with@operationId("appCustomInvoicingUpdatePaymentStatus")and the summary. This enhances clarity in generated clients:- paymentStatus( + updatePaymentStatus(api/openapi.yaml (1)
11-13: Add description to the new global tag for consistencyOther tags in the global list (e.g.,
Subscriptions) include adescriptionfield. Please add a concise description to theApp: Custom Invoicingtag so it renders uniformly in the API docs:- name: 'App: Custom Invoicing' description: 'APIs to manage invoice drafts, issuance, and payment status for the Custom Invoicing app'
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
api/api.gen.go(1 hunks)api/openapi.yaml(4 hunks)api/spec/src/app/custominvoicing.tsp(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (9)
- GitHub Check: Quickstart
- GitHub Check: E2E
- GitHub Check: CI
- GitHub Check: Lint
- GitHub Check: Developer environment
- GitHub Check: Commit hooks
- GitHub Check: Test
- GitHub Check: Build
- GitHub Check: Analyze (go)
🔇 Additional comments (6)
api/spec/src/app/custominvoicing.tsp (2)
47-47: Tag grouping applied correctly: The new@tag("App: Custom Invoicing")properly categorizes these endpoints under the Custom Invoicing group, improving the API reference structure as intended by the PR.
62-65: Method name misalignment: The methodfinalizeddoesn’t reflect its action (issuing/synchronized) and mismatches the@operationId. Rename it to something likeissuingSynchronized:- finalized( + issuingSynchronized(This keeps method names, routes, and operationIds in sync.
api/api.gen.go (1)
18865-18868: Confirm the embedded Swagger spec was properly regenerated
This file is auto-generated and contains the gzipped/base64 OpenAPI spec. After updatingapi/openapi.yamland TypeSpec sources (to add the"App: Custom Invoicing"tag), you must rerun the standard generator (e.g.,go generate ./apiormake gen) rather than manually patching this blob.
Please verify:
- The new tag appears in the decoded spec.
- No manual edits remain—only machine-generated diffs.
api/openapi.yaml (3)
726-728: Custom tag correctly applied to the draft/synchronized endpointThe
tagsblock for thePOST /api/v1/apps/custom-invoicing/{invoiceId}/draft/synchronizedoperation now referencesApp: Custom Invoicing. Indentation and YAML syntax look correct.
791-793: Custom tag correctly applied to the issuing/synchronized endpointThe
tagslist forPOST /api/v1/apps/custom-invoicing/{invoiceId}/issuing/synchronizedhas been updated to useApp: Custom Invoicingwith proper indentation.
856-858: Custom tag correctly applied to the payment status endpointThe
tagssection forPOST /api/v1/apps/custom-invoicing/{invoiceId}/payment/statusis now taggedApp: Custom Invoicingas intended.
The API reference is hard to use given that generics Apps management and the APIs provided by different apps are merged together. This patch improves the situation.
76c5661 to
6b72a3f
Compare
Overview
The API reference is hard to use given that generics Apps management and the APIs provided by different apps are merged together.
This patch improves the situation.
Summary by CodeRabbit