[General] fix InlineModelResolver's logic and use openapi-generator's InlineModelResolver, so that nested "required" works correctly#1200
Conversation
There was a problem hiding this comment.
don't forget copy "required" to the separated object
There was a problem hiding this comment.
this option makes swagger-parser to disassemble inline models into separated models.
but we don't won't to use swagger-parser's InlindeModelResolver, because we use openapi-generator's one.
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java#L818
9f94cd6 to
64d3654
Compare
There was a problem hiding this comment.
add nested required pattern to test case
There was a problem hiding this comment.
add nested required pattern to test case
bf7db5c to
940f0d2
Compare
8244f17 to
cdf5cb1
Compare
cdf5cb1 to
7ff34c9
Compare
|
@wing328 @jimschubert @cbornet @jaz-ah @ackintosh @JFCote @jmini |
01cbf7e to
0ef509a
Compare
There was a problem hiding this comment.
sometimes, vendorExtensions is still null...
add null check.
There was a problem hiding this comment.
|
@fujigon thanks for the PR. Sure, I'll review and let you know if I've any question. |
812b2dc to
973e398
Compare
|
@fujigon thanks again for the PR. For the additional test cases, please add to https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml instead of petstore.yaml (as we want to keep petstore.yaml in sync with the one used by the Petstore server) |
7423381 to
c255c7f
Compare
…elResolver, so that nested "required" works correctly
…-with-fake-endpoints-models-for-testing.yaml
74b69cc to
4cbf907
Compare
4cbf907 to
7af2cd7
Compare
|
@wing328 Hi! I reflected your review point, thanks :) |
|
I've reviewed it twice (today and over the weekend) and the change looks good to me. It's a high-quality PR 👍 |
|
@fujigon thanks for the PR, which is included in the v3.3.2 release: https://twitter.com/oas_generator/status/1057649626101112832 |
… InlineModelResolver, so that nested "required" works correctly (OpenAPITools#1200) * fix InlineModelResolver's logis and use openapi-generator's InlineModelResolver, so that nested "required" works correctly * add "required" to nested model schema * update ensure-up-to-date to include openapi v3's jaxrs * change test required field * fix sample shell script, hide timestamp * fix NPE * move test case to petstore-with-fake-endpoints-models-for-testing.yaml * fix jaxrs-jersey (oas3) example generate shell script to use petstore-with-fake-endpoints-models-for-testing.yaml * add default value * re-generate samples
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.shand./bin/security/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\.master,3.4.x,4.0.x. Default:master.Description of the PR
This patch fixes #1201