-
Notifications
You must be signed in to change notification settings - Fork 182
chore: type generation fixes + improvements #1110
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
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.
Pull Request Overview
This PR focuses on fixing and improving type generation for multiple SDKs across different programming languages. The changes address formatting, indentation, typing, and code generation issues to align with official language standards and best practices.
- Fix type generation issues across Dart, Java, Swift, TypeScript, and other language SDKs
- Improve code formatting and indentation to match official language guidelines
- Remove unnecessary imports and hardcoded attributes from generated types
Reviewed Changes
Copilot reviewed 5 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
templates/dart/lib/src/models/model.dart.twig | Fix generic type parameter to use proper Map typing |
templates/cli/lib/type-generation/languages/typescript.js.twig | Fix collection iteration and template formatting |
templates/cli/lib/type-generation/languages/swift.js.twig | Add public visibility to init method and fix optional value decoding logic |
templates/cli/lib/type-generation/languages/java.js.twig | Fix enum casing, toString method formatting, and import specificity |
templates/cli/lib/type-generation/languages/dart.js.twig | Remove Document inheritance, fix import casing, and clean up hardcoded attributes |
What does this PR do?
extends Document
and hardcoded attributes, removed unnecessary importsjava.util.Objects
, fixed enum casing in strict mode as per Oracle official docs|null
to| null
decodeIfPresent
usage for optionals, added missingpublic
toinit
methodtoConvert()
method return type toMap<String, dynamic>
Test Plan
Related PRs and Issues
Have you read the Contributing Guidelines on issues?
yes