-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:Update OpenAPI spec for /magic-prompt with multipart, new fields, and FICTION style #93
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 specification for the Ideogram API was updated to support Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches🧪 Generate unit tests
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
🧹 Nitpick comments (3)
src/libs/Ideogram/openapi.yaml (3)
188-195: Consider adding explicitencodingmetadata for the new multipart request.
/magic-promptnow acceptsmultipart/form-data, but themultipart/form-datablock does not declare anencoding:section forcharacter_reference_images(array of binary) or any other text fields. Several other endpoints (/edit,/reframe, etc.) already provide explicitencodingobjects to specifycontentTypeandstyle=form.While the default (
style=form,explode=true) usually works, being explicit:content: multipart/form-data: schema: $ref: '#/components/schemas/MagicPromptRequest' encoding: character_reference_images: contentType: image/* # or image/png,image/jpeg,image/webp style: form(a) documents intent unambiguously,
(b) prevents subtle client-generator differences,
(c) aligns with the other endpoints for consistency.
1018-1023: Add JSON–schema constraints for the newcharacter_reference_imagesarray.
character_reference_imagesis described as “maximum total size 10 MB”, but no structural limits are enforced. AddingmaxItems(e.g.,maxItems: 10) and/ormaxLengthper file name is cheap insurance and enables client generators to validate early.
1620-1629:MagicPromptRequest: mirror constraints & encoding hints for the new fields.
- Same size / item-count remarks as above.
system_promptis free-form; considermaxLength(the other string fields have none either, but adding limits prevents abuse).- When this schema is used under
application/json, properties withtype: string, format: binaryare technically non-conformant in OAS 3.0. If JSON clients are expected to omit those fields, note this in the docstring or split the schema.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (8)
src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostGenerateImageV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostGenerateImageV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.IPromptClient.PostMagicPrompt.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.GenerateImageRequestV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.MagicPromptRequest.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.StyleType.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.StyleTypeV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.PromptClient.PostMagicPrompt.g.csis excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/Ideogram/openapi.yaml(5 hunks)
🔇 Additional comments (2)
src/libs/Ideogram/openapi.yaml (2)
2041-2042: Enum extension looks good –FICTIONadded toStyleType.No conflicts detected; existing descriptions remain valid.
2281-2282: Enum extension looks good –FICTIONadded toStyleTypeV3.Keeps V3 parity with legacy enum; good.
Summary by CodeRabbit
New Features
Enhancements