Repository navigation
fix(schema_types): optional fields as X | None in shared types - #38
Draft
JulienChampagnol wants to merge 3 commits into
Draft
JulienChampagnol wants to merge 3 commits into
JulienChampagnol wants to merge 3 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Quicktype names a shared type used by several fields of a schema after each field (e.g. CornersColorClass for a ColorRGB): a nested dataclass with exactly the fields of one shared type is now replaced by it, as TypeScript interfaces already are. The params and response classes of a route are still matched by name only. Co-Authored-By: Claude Opus 5.5 <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.
Summary
X | Noneinstead ofOptional[X](ruff UP045), the same way it already rewritesList[tolist[.dataclassKeyapplies the same rewrite, so a shared type holding an optional field (e.g.MeshComponent.binary_light_viewable) is still recognized in route schemas instead of being copied into each module.Needed by OpenGeodeWeb-Back
feat/component_light_viewables(per mesh component light viewables).Test plan
schema_types.pyis ruff-clean and route schemas import the sharedMeshComponent🤖 Generated with Claude Code