-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:Add org user suggestions GET and schemas; update invoice models #112
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
Conversation
WalkthroughThe OpenAPI spec adds a new manage-scope GET endpoint for organization user suggestions, introduces response and entity schemas for suggestions, and updates invoice models by adding InvoiceStatus and issued_time, removing invoice_paid_date, and refreshing examples to align with the new fields. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Client
participant API as Manage API
participant Auth as AuthZ
participant Org as Org Service
participant DB as Data Store
C->>API: GET /manage/api/organization/user_suggestions<br/>?organization_id&user_handle_prefix&maxItems
API->>Auth: Validate scope (manage) and permissions
alt Authorized
Auth-->>API: OK
API->>Org: Fetch user suggestions (org_id, prefix, limit)
Org->>DB: Query users by prefix and org
DB-->>Org: Matching users
Org-->>API: Suggestions list
API-->>C: 200 GetApiOrganizationUserSuggestionsResponse
else Unauthorized/Forbidden/Not Found
Auth-->>API: 401/403
API-->>C: 401/403/404
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (12)
src/libs/Ideogram/Generated/Ideogram..JsonSerializerContext.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.IManageClient.GetApiOrganizationUserSuggestions.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.JsonConverters.InvoiceStatus.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.JsonConverters.InvoiceStatusNullable.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.JsonSerializerContextTypes.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiOrganizationUserSuggestions.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.ApiOrganizationUserSuggestion.Json.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.ApiOrganizationUserSuggestion.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.GetApiOrganizationUserSuggestionsResponse.Json.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.GetApiOrganizationUserSuggestionsResponse.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.Invoice.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.InvoiceStatus.g.csis excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/Ideogram/openapi.yaml(7 hunks)
| status: PAID | ||
| issued_time: '2024-02-01' | ||
| invoice_paid_date: '2024-02-05T10:30:00.0000000+00:00' | ||
| line_items: |
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.
Invoice example still references removed fields
Line 562 keeps status: PAID, and Line 564 retains invoice_paid_date, but the Invoice schema now requires invoice_status and dropped invoice_paid_date. The example should be updated to match the schema; otherwise SDKs generated from examples or readers following them will use the wrong properties.
- status: PAID
- issued_time: '2024-02-01'
- invoice_paid_date: '2024-02-05T10:30:00.0000000+00:00'
+ invoice_status: PAID
+ issued_time: '2024-02-01T00:00:00.0000000+00:00'And similarly adjust the second invoice entry. This keeps the documentation consistent with the actual API contract.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| status: PAID | |
| issued_time: '2024-02-01' | |
| invoice_paid_date: '2024-02-05T10:30:00.0000000+00:00' | |
| line_items: | |
| invoice_status: PAID | |
| issued_time: '2024-02-01T00:00:00.0000000+00:00' | |
| line_items: |
🤖 Prompt for AI Agents
In src/libs/Ideogram/openapi.yaml around lines 562 to 565, the invoice example
uses removed fields (status and invoice_paid_date) and must match the Invoice
schema which requires invoice_status and no longer includes invoice_paid_date;
update the example by replacing status: PAID with invoice_status: PAID, remove
invoice_paid_date entirely, and make the same change for the second invoice
entry so both examples use invoice_status and omit invoice_paid_date to stay
consistent with the schema.
Summary by CodeRabbit
New Features
Documentation