Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Oct 5, 2025

Summary by CodeRabbit

  • New Features

    • Added public endpoints to retrieve an organization’s API keys and to list invoices with detailed line items and totals.
  • API Changes

    • Organization member operations now return 200 responses with structured per-member results instead of 204, providing success status and messages.
  • Documentation

    • Updated examples to reflect new response formats for API keys, member operations, and invoices.

@github-actions github-actions bot enabled auto-merge October 5, 2025 01:48
@coderabbitai
Copy link

coderabbitai bot commented Oct 5, 2025

Walkthrough

Updated 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

Cohort / File(s) Summary of changes
Organization member responses
src/libs/Ideogram/openapi.yaml
Replaced 204 responses with 200 responses returning OrganizationMemberOperationResponse (results: OrganizationMemberOperationResult[]).
New endpoints: API keys and invoices
src/libs/Ideogram/openapi.yaml
Added GET /manage/api/organization/api_keys (GetApiKeysV2Response) and GET /manage/api/organization/list_invoices (ListOrganizationInvoicesResponse).
New public schemas
src/libs/Ideogram/openapi.yaml
Added GetApiKeysV2Response, OrganizationMemberOperationResponse, OrganizationMemberOperationResult, ListOrganizationInvoicesResponse, Invoice, InvoiceLineItem.
Supporting lite/auxiliary schemas
src/libs/Ideogram/openapi.yaml
Added LiteOrganizationMember, RemoveOrganizationMembersRequest, PromoteOrganizationMembersRequest and related structures.
Examples and embedded data
src/libs/Ideogram/openapi.yaml
Updated examples to reflect new response shapes for API keys, member operations, and invoices.

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
Loading
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
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

I thump with joy, little paws on keys,
New routes hop in like autumn breeze.
Keys and invoices, neatly aligned,
Member results—no more blind!
In YAML fields I burrow deep,
Carrots of schemas I gladly keep.
Ship it swift—then bunny sleep. 🥕🐇

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title "feat:@coderabbitai" fails to describe any of the changes introduced in this pull request and does not reference the addition of new API endpoints, schema updates, or response modifications in the OpenAPI specification. It appears to be a placeholder or AI signature rather than a summary of the functional updates. As a result, the title is neither clear nor specific and does not meet the criteria for effectively conveying the main change to reviewers. Please update the pull request title to clearly summarize the primary change, for example, “feat(openapi): add organization API keys and invoices endpoints with updated member operation responses.” A descriptive title should mention the affected components and the nature of the new functionality to help reviewers quickly grasp the PR’s intent.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bot/update-openapi_202510050147

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot merged commit 7c274a7 into main Oct 5, 2025
3 of 4 checks passed
@github-actions github-actions bot deleted the bot/update-openapi_202510050147 branch October 5, 2025 01:49
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:OpenAPI: change org member ops to 200; add org API keys/invoices Oct 5, 2025
Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between ab494a1 and fdda5f9.

⛔ Files ignored due to path filters (23)
  • src/libs/Ideogram/Generated/Ideogram.IManageClient.AddOrganizationMembers.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.IManageClient.GetApiKeysV2.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.IManageClient.ListOrganizationInvoices.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.IManageClient.PromoteOrganizationMembers.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.IManageClient.RemoveOrganizationMembers.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.JsonSerializerContextTypes.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.ManageClient.AddOrganizationMembers.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.ManageClient.GetApiKeysV2.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.ManageClient.ListOrganizationInvoices.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.ManageClient.PromoteOrganizationMembers.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.ManageClient.RemoveOrganizationMembers.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.Models.GetApiKeysV2Response.Json.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.Models.GetApiKeysV2Response.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.Models.Invoice.Json.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.Models.Invoice.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.Models.InvoiceLineItem.Json.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.Models.InvoiceLineItem.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.Models.ListOrganizationInvoicesResponse.Json.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.Models.ListOrganizationInvoicesResponse.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.Models.OrganizationMemberOperationResponse.Json.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.Models.OrganizationMemberOperationResponse.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.Models.OrganizationMemberOperationResult.Json.g.cs is excluded by !**/generated/**
  • src/libs/Ideogram/Generated/Ideogram.Models.OrganizationMemberOperationResult.g.cs is excluded by !**/generated/**
📒 Files selected for processing (1)
  • src/libs/Ideogram/openapi.yaml (7 hunks)

Comment on lines +557 to +579
- 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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
- 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants