Skip to content

doc(api-spec): update aigc-spritecontent-settings api#2806

Merged
nighca merged 4 commits intogoplus:devfrom
cn0809:apidoc
Feb 5, 2026
Merged

doc(api-spec): update aigc-spritecontent-settings api#2806
nighca merged 4 commits intogoplus:devfrom
cn0809:apidoc

Conversation

@cn0809
Copy link
Collaborator

@cn0809 cn0809 commented Feb 4, 2026

updates #2791

@gemini-code-assist
Copy link

Summary of Changes

Hello @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

  • API Specification Update: The OpenAPI specification for AIGC sprite content settings has been updated to include new animation binding configurations.
  • New animationBindings Property: A new animationBindings object has been added within the AIGCAnimationSettings schema. This object provides a recommended mapping from sprite state enum values (like default, die, step, turn, glide) to animation name strings, allowing for null values.

🧠 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
  • docs/openapi.yaml
    • Added the animationBindings property to the AIGCAnimationSettings schema.
    • The animationBindings property is an object with keys representing sprite states (default, die, step, turn, glide) and values as strings or null for animation names.
    • Included an example demonstrating the usage of the new animationBindings property.
Activity
  • The pull request updates the API specification as indicated by the title and body.
  • No specific review comments or other activities have been recorded yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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.

@cn0809 cn0809 marked this pull request as ready for review February 4, 2026 12:01
Copilot AI review requested due to automatic review settings February 4, 2026 12:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 animationBindings field to the response schema of /aigc/sprite/content-settings endpoint

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@xgopilot
Copy link
Contributor

xgopilot bot commented Feb 4, 2026

Review Summary

This PR adds an animationBindings field to the OpenAPI spec for sprite content settings. The addition is well-structured and serves a clear purpose. Three formatting/documentation improvements noted in inline comments.

Critical: The TypeScript type SpriteContentSettings in spx-gui/src/apis/aigc.ts:277-280 needs updating to include this new field to maintain type safety.

default:
oneOf:
- type: string
- type: 'null'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- type: 'null'
default:
type:
- string
- 'null'

应该可以这样写

一般 oneOf 可以用在那种包含类似 $ref 引用的复杂类型场景,比如:

remixedFrom:
  oneOf:
    - $ref: "#/components/schemas/ProjectReleaseFullName"
    - type: "null

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK,是想改成这个形式来着,让 ai 改完没注意看..

@nighca nighca merged commit 497473d into goplus:dev Feb 5, 2026
5 checks passed
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.

3 participants