swagger-api / swagger-api/swagger-codegen
Please support null-safety on Dart generator
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Dart 2.13 added null-safety to the language, and swagger-codegen generator is not compatible with it, generating a code that won't compile.
Reference:
https://dart.dev/null-safety
Swagger-codegen version
3.0.30
Command line used for generation
swagger-codegen generate -i https://$MY_API/api/swagger.json -l dart
Suggest a fix/enhancement
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the reported swagger-codegen generate -i https://$MY_API/api/swagger.json -l dart command and inspect the generated Dart client for constructs incompatible with Dart 2.13 null-safety. Read the Dart generator templates and compare their output with the null-safety requirements at https://dart.dev/null-safety; done means the generated client compiles with null-safety enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100