Skip to content

Conversation

@kuhnroyal
Copy link
Contributor

@kuhnroyal kuhnroyal commented Dec 3, 2020

  • cleanup old docs across all dart generators
  • regenerate all tests
  • cleanup .gitignore
  • minor formatting improvements in dart-dio
  • unified integration-test layout for dart/dart-dio generators
  • add generation and integration-tests for OAS3 petstore to dart/dart-dio
  • add generation and integration-tests for OAS3 petstore-with-fake-api to dart/dart-dio

Explicitly not adding the new integration tests for petstore-with-fake-api to the master POM. They do not work but having them allows for quickly iterating on open issues without breaking existing basic OAS2/OAS3 petstore examples. Instead they should be run manually until everything is fixed.

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • If contributing template-only or documentation-only changes which will change sample output, build the project beforehand.
  • Run the shell script ./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.
  • File the PR against the correct branch: master
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

TODO:

  • Verify new inline objects are correct, they seem to be unused
  • Fix compile errors in dart regarding File/MultipartFile
  • Fix tests for POST/PUT operations that now return 200 with content

@auto-labeler
Copy link

auto-labeler bot commented Dec 3, 2020

👍 Thanks for opening this issue!
🏷 I have applied any labels matching special text in your issue.

The team will review the labels and make any necessary changes.

@kuhnroyal
Copy link
Contributor Author

kuhnroyal commented Dec 3, 2020

The new inline objects in OAS3 are caused by the PetAPI update with FormData operations. The same models are generated for java/kotlin etc. and are also unused. Why?

@kuhnroyal
Copy link
Contributor Author

Don't think we can generate a useful fromJson function for these inline objects that contain a MultipartFile property.
Best would be to somehow skip these inline request body models from being generated in the first place.

@kuhnroyal kuhnroyal marked this pull request as draft December 3, 2020 14:31
@kuhnroyal kuhnroyal marked this pull request as ready for review December 3, 2020 23:25
@kuhnroyal
Copy link
Contributor Author

CC @ircecho (2017/07) @swipesight (2018/09) @jaumard (2018/09) @athornz (2019/12) @amondnet (2019/12)

@kuhnroyal
Copy link
Contributor Author

@wing328 This should be ready, CircleCI seems to have failed with some sort of timeout, maybe you can restart the step.

* docs path seems to be doc now in all dart generators
* generated tests are very old and use wrong classes
* remove duplicate/old openapi sample for which there is no generation config
* generate to `petstore_client_lib` for both generators
* run generated tests as integration tests for dart2 even if empty - this makes it easier to find compile errors
* globally ignore all dart related files that should not be commited
* remove old ignores that are no longer valid
Not sure if that case is ever relevant but for now there doesn't seem to be a better option.
Some POST operations now return 200 with content.
@kuhnroyal kuhnroyal force-pushed the dart/cleanup-and-oas3 branch from f93fc9b to 8272de5 Compare December 4, 2020 11:05
Explicitly not adding the new integration tests to the master POM. They do not work but having them allows for quickly iterating on open issues without breaking existing basic OAS2/OAS3 petstore examples. Instead they should be run manually until everything is fixed.
@kuhnroyal
Copy link
Contributor Author

Not clear whats happening in CircleCI, seems to be related to some scala artifacts.

@wing328
Copy link
Member

wing328 commented Dec 7, 2020

The new inline objects in OAS3 are caused by the PetAPI update with FormData operations. The same models are generated for java/kotlin etc. and are also unused. Why?

These models are generated due to how form parameters are defined in OAS3. Usually these are not used.

We'll revise accordingly given that it causes confusion to users.

[main] INFO  o.o.codegen.DefaultGenerator - Model inline_object (marked as unused due to form parameters) is generated due to the system property skipFormModel=false (default)

One way to prevent these from being generate is to set the skipFormModel option.

@wing328 wing328 merged commit 751ffad into OpenAPITools:master Dec 7, 2020
@kuhnroyal kuhnroyal deleted the dart/cleanup-and-oas3 branch December 15, 2020 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants