OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.29k stars 6.44k forks source link

Separate output destination of samples generated from OAS3 #156

Open ackintosh opened 6 years ago

ackintosh commented 6 years ago
Description

Related comment: https://github.com/OpenAPITools/openapi-generator/issues/80#issuecomment-389748804

I think that the scripts under bin/openapi3 should output its results into samples/openapi3.

Currently, only PHP is following the rule above:

The samples of same lang will have differences if those have generated from different OAS version. As supporting the OAS3 specific features progresses, differences between the samples from OAS2 and OAS3 becomes bigger.

Existing the difference between the samples from OAS2 and OAS3 is correct. so I think the samples should be put each appropriate location separately.

wing328 commented 6 years ago

I totally see your point. Originally I used the same folder for the sample output so that I can review more easily using git diff to ensure the output by OAS v2 and v3 spec are almost identical.

I agree moving forward there will be more difference as we support more features in OAS3.

Let's resume this discussion after the 1st stable release.

jmini commented 6 years ago

I agree to delay this discussion after our first release...

I am not sure if we need to generate and commit results for OAS2 and OAS3 inputs for each combination of generators. The result should be identical and when this is not the case, this might be an issue with the swagger-parser component that is doing the conversion for us.

jimschubert commented 4 years ago

I think this was an issue for a while, but we relied only on oas2 spec outputs. Now that oas3 support is more inline with oas2, I think it's less of a concern.

Should we close this?