Repository navigation
docs: use image_file_paths in ai_image_editor generate examples - #172
Merged
Merged
Conversation
The sync and async generate examples in the custom docs block still used the deprecated image_file_path. #165 removed deprecated-field examples from the generated docs, but this hand-written block is preserved on regeneration, so it kept the old field. web-app pulls these snippets into its API code samples. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The
generateexamples in the custom docs block ofmagic_hour/resources/v1/ai_image_editor/README.mdstill pass the deprecatedimage_file_path. #165 removed examples from deprecated fields in the generated docs, but the SDK generator preserves this hand-written block, so it kept the old field.web-app's
scripts/sync-code-samples.tspulls these README snippets intocode-samples.json, which feeds the API docs and the /api playground. So the Python sample forv1.ai_image_editor.createshowed the deprecated field, while the Node, Go, Rust and cURL samples already useimage_file_paths. Fixing it here means the next sync picks up the right field instead of a web-app fix getting overwritten.What
Both the sync and async
generateexamples now passassets={"image_file_paths": ["/path/to/1234.png"]}.generate()already uploads each local path inimage_file_paths(client.pyL105-109).🤖 Generated with Claude Code