-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:OpenAPI: change org member ops to 200; add org API keys/invoices #110
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
WalkthroughUpdated OpenAPI spec to modify organization member operation responses from 204 to 200 with detailed result payloads, added two new public endpoints for organization API keys and invoices, introduced several new response and auxiliary schemas, and refreshed examples accordingly within src/libs/Ideogram/openapi.yaml. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Client
participant API as Manage API
participant Svc as Org Service
participant DB as Data Store
rect rgb(236,248,255)
note right of Client: Retrieve API keys
Client->>API: GET /manage/api/organization/api_keys
API->>Svc: getApiKeys(orgId)
Svc->>DB: query api_keys
DB-->>Svc: api_keys[]
Svc-->>API: GetApiKeysV2Response
API-->>Client: 200 GetApiKeysV2Response
end
rect rgb(245,240,255)
note right of Client: List invoices
Client->>API: GET /manage/api/organization/list_invoices
API->>Svc: listInvoices(orgId, range?)
Svc->>DB: query invoices + line_items
DB-->>Svc: invoices[]
Svc-->>API: ListOrganizationInvoicesResponse
API-->>Client: 200 ListOrganizationInvoicesResponse
end
sequenceDiagram
autonumber
actor Client
participant API as Manage API
participant Svc as Org Member Service
rect rgb(240,255,245)
note over Client,API: Batch member operation (promote/remove)
Client->>API: POST /.../members: Promote/Remove
API->>Svc: processMembers(members[])
loop per member
Svc-->>Svc: apply operation
alt success
Svc-->>API: record {success:true,message}
else failure
Svc-->>API: record {success:false,message}
end
end
API-->>Client: 200 OrganizationMemberOperationResponse(results[])
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 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 (23)
src/libs/Ideogram/Generated/Ideogram.IManageClient.AddOrganizationMembers.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.IManageClient.GetApiKeysV2.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.IManageClient.ListOrganizationInvoices.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.IManageClient.PromoteOrganizationMembers.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.IManageClient.RemoveOrganizationMembers.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.JsonSerializerContextTypes.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.ManageClient.AddOrganizationMembers.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiKeysV2.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.ManageClient.ListOrganizationInvoices.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.ManageClient.PromoteOrganizationMembers.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.ManageClient.RemoveOrganizationMembers.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.GetApiKeysV2Response.Json.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.GetApiKeysV2Response.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.Invoice.Json.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.Invoice.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.InvoiceLineItem.Json.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.InvoiceLineItem.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.ListOrganizationInvoicesResponse.Json.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.ListOrganizationInvoicesResponse.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.OrganizationMemberOperationResponse.Json.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.OrganizationMemberOperationResponse.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.OrganizationMemberOperationResult.Json.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.OrganizationMemberOperationResult.g.csis excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/Ideogram/openapi.yaml(7 hunks)
| - start_time: '2024-01-01' | ||
| end_time: '2024-01-31T23:59:59.0000000+00:00' | ||
| total_spend: | ||
| currency_code: USD | ||
| amount: 15000 | ||
| invoice_paid_date: '2024-02-05T10:30:00.0000000+00:00' | ||
| line_items: | ||
| - charge_name: Image Generation - V3 | ||
| quantity: 1000 | ||
| unit_price: | ||
| currency_code: USD | ||
| amount: 10 | ||
| total: | ||
| currency_code: USD | ||
| amount: 10000 | ||
| - charge_name: Upscale Image - V1 | ||
| quantity: 500 | ||
| unit_price: | ||
| currency_code: USD | ||
| amount: 10 | ||
| total: | ||
| currency_code: USD | ||
| amount: 5000 |
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.
Fix invoice example to match date-time format.
start_time is declared with format: date-time, but the example uses '2024-01-01' (missing time information). OpenAPI validators flag this as invalid. Please update the example to an RFC 3339 timestamp (e.g. include T00:00:00Z) so consumers don’t hit schema lint failures.
- - start_time: '2024-01-01'
+ - start_time: '2024-01-01T00:00:00.0000000+00:00'📝 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.
| - start_time: '2024-01-01' | |
| end_time: '2024-01-31T23:59:59.0000000+00:00' | |
| total_spend: | |
| currency_code: USD | |
| amount: 15000 | |
| invoice_paid_date: '2024-02-05T10:30:00.0000000+00:00' | |
| line_items: | |
| - charge_name: Image Generation - V3 | |
| quantity: 1000 | |
| unit_price: | |
| currency_code: USD | |
| amount: 10 | |
| total: | |
| currency_code: USD | |
| amount: 10000 | |
| - charge_name: Upscale Image - V1 | |
| quantity: 500 | |
| unit_price: | |
| currency_code: USD | |
| amount: 10 | |
| total: | |
| currency_code: USD | |
| amount: 5000 | |
| - start_time: '2024-01-01T00:00:00.0000000+00:00' | |
| end_time: '2024-01-31T23:59:59.0000000+00:00' | |
| total_spend: | |
| currency_code: USD | |
| amount: 15000 | |
| invoice_paid_date: '2024-02-05T10:30:00.0000000+00:00' | |
| line_items: | |
| - charge_name: Image Generation - V3 | |
| quantity: 1000 | |
| unit_price: | |
| currency_code: USD | |
| amount: 10 | |
| total: | |
| currency_code: USD | |
| amount: 10000 | |
| - charge_name: Upscale Image - V1 | |
| quantity: 500 | |
| unit_price: | |
| currency_code: USD | |
| amount: 10 | |
| total: | |
| currency_code: USD | |
| amount: 5000 |
🤖 Prompt for AI Agents
In src/libs/Ideogram/openapi.yaml around lines 557 to 579, the example's
start_time value uses '2024-01-01' but the schema declares format: date-time;
replace the example with a full RFC 3339 timestamp (matching the file's style),
e.g. '2024-01-01T00:00:00.0000000+00:00' (or '2024-01-01T00:00:00Z') so the
example validates against the date-time format.
Summary by CodeRabbit
New Features
API Changes
Documentation