swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

Add additional test cases and split fake-endpoint spec

Open antihax opened this issue 8 years ago • 7 comments

PR checklist

  • [X] Read the contribution guidelines.
  • [X] Ran the shell/batch script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)
  • [X] Filed the PR against the correct branch: master for non-breaking changes and 2.3.0 branch for breaking (non-backward compatible) changes.

Description of the PR

Add additional test cases and move into versioned specs for clients that do not pass new tests.

Test cases include:

  • Recursive models
  • Models embedded by other models
  • []int in params
  • []int in returns
  • map of maps
  • arrays of arrays
  • etc

antihax avatar Apr 28 '17 03:04 antihax

I had thought these errors were completely resolved when testing with Travis locally. Evidently there are some I missed.

antihax avatar Apr 28 '17 21:04 antihax

Fixed.

antihax avatar Apr 28 '17 23:04 antihax

@antihax thanks for updating all the shell scripts and batch files.

What about adding a CHANGELOG.md file under modules/swagger-codegen/src/test/resources/2_0/ so that users can more easily understand those additional test cases?

wing328 avatar May 01 '17 07:05 wing328

If you could, hold on this for a few days. It looks like I may have missed a few cases I had used locally.

antihax avatar May 01 '17 12:05 antihax

@antihax Ok. Let me know once it's ready for merge.

wing328 avatar May 01 '17 13:05 wing328

I'm going to see if i can debug the rest off this offline and get rid of these remaining issues. May be able to stick travis somewhere..

antihax avatar May 02 '17 02:05 antihax

This should be good to go. I had missed array parameters and a few copy overs from the original.

It appears that running all the build scripts produced a few landmines. Some of the jersey clients and the resttemplate appeared to produce bad code, comparing the original repo, it appears some files were deleted to make it pass the tests after the script is run.

I will see if I have time tonight to dig into those.

antihax avatar May 02 '17 11:05 antihax