-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
[Dart] generate from complex schema, class and field name sanitation #7711
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
|
@noordawod the code generated in |
|
@agilob let me know if you need some help ;) |
|
circle ci doesnt use docker images? |
|
No idea... |
|
@agilob |
…t-more-complex-schema
|
I think you will need to move |
|
One more thing: please update pom.xml and replace the old dart petstore location with the new one. |
|
done |
…to dart-more-complex-schema
|
Looks like there are some issues with the dart2 petstore client as reported by the CirclecCI (partial result below): |
|
It required dart names to be sanitized as names cant start with number and contain special charts. Added code for that. Complex dart code still doesnt compile well as the spec contains classes that are dart-code classes like Map and List. I've handled List but run of time today to take care of Map<> |
…t-more-complex-schema
…to dart-more-complex-schema
…to dart-more-complex-schema
…to dart-more-complex-schema
|
@wing328 pls |
|
Sorry we were busy with the v5.0.0-beta3 release before. Can you please ping me via Slack to further discuss this when you've time as I still see some issues with the Dart clients in the CI? |
|
I just saw this PR, I have some similar work done here https://github.com/kuhnroyal/openapi-generator/tree/feature/dart/advanced, trying to reuse |
Can you open a PR from my branch targeting my branch? |
|
It currently seems unrealistic to generate the full fake-api for both dart and dart-dio, there are just way to many compile errors. I have solved most but the branch just gets way too big. |
…to dart-more-complex-schema
…generator into dart-more-complex-schema
|
Nice changes @agilob ! |
|
Hopefully all tests pass now and we can stop duplicating efforts on the same problems. |
|
I really doubt it, the whole dart package doesn't compile. Your integration tests fail with several compile errors. |
You doubt that this will prevent people duplicating efforts or tests will (eventually) pass? When the tests fail, it's a good place to start if you want to help pushing this forward. In this moment it's a positive sign when something new breaks, means previous problem has been fixed and we're heading toward another detail of specification to implement. I purposely chosen the most complex spec file so it can highlight all problems and instead caring about whitespaces or variable name in generated code, contributors can pick up the next failing thing. If you don't want to help, we can always make a few incompatible versions of this generator. Of course everybody wins in that case. |
I doubt that the branch will go green in the next few weeks and even if so that anybody can actually review it. It just too much. I have spent the better part of this and last week on getting this to work. I have a lot of it solved but the PR is gonna get so big that nobody can actually review it. I suggest to start small with the basic 3.0 petstore example. This already doesn't compile so its a good start to get that working and then iterate on. Afterwards we can iterate on the fake-api without adding the integration tests to the master POM, as long as no existing tests for the simple petstore break this should be fine. |
Why havent you committed any fixes? |
|
I linked you one of my branches here: https://github.com/kuhnroyal/openapi-generator/tree/feature/dart/advanced |
|
Cool, looks like you're ahead of this branch :) |
PR checklist
Current sample produces code that doesn't compile, but at least it gives us a target and exposes issues directly
Closes #7588
./bin/generate-samples.shto update all Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example./bin/generate-samples.sh bin/configs/java*. For Windows users, please run the script in Git BASH.master