doc(api-spec): update aigc-spritecontent-settings api#2806
doc(api-spec): update aigc-spritecontent-settings api#2806nighca merged 4 commits intogoplus:devfrom
Conversation
Summary of ChangesHello @cn0809, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the API specification by introducing a new mechanism for defining animation bindings within AIGC sprite content settings. The change provides a structured way to associate various sprite states with specific animation names, improving the clarity and configurability of sprite animations through the API. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the OpenAPI specification for the /aigc/sprite/content-settings endpoint by adding the animationBindings field to the response. This change correctly reflects the recommended mapping from sprite states to animation names and is consistent with the State enum defined in the frontend code. The documentation update is clear and includes a helpful example.
While the change in the OpenAPI spec is correct, I noticed that the corresponding TypeScript type SpriteContentSettings in spx-gui/src/apis/aigc.ts has not been updated to include the new animationBindings field. To ensure type safety and allow the frontend to correctly handle the updated API response, this type definition should be updated in a subsequent change.
There was a problem hiding this comment.
Pull request overview
This PR updates the AIGC sprite content settings API to include animation bindings, addressing issue #2791. The new field enables automatic binding of animations to sprite states, such as binding an "idle" animation to the "default" state.
Changes:
- Added
animationBindingsfield to the response schema of/aigc/sprite/content-settingsendpoint
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Review SummaryThis PR adds an Critical: The TypeScript type |
docs/openapi.yaml
Outdated
| default: | ||
| oneOf: | ||
| - type: string | ||
| - type: 'null' |
There was a problem hiding this comment.
| - type: 'null' | |
| default: | |
| type: | |
| - string | |
| - 'null' |
应该可以这样写
一般 oneOf 可以用在那种包含类似 $ref 引用的复杂类型场景,比如:
remixedFrom:
oneOf:
- $ref: "#/components/schemas/ProjectReleaseFullName"
- type: "null
There was a problem hiding this comment.
OK,是想改成这个形式来着,让 ai 改完没注意看..
updates #2791