-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fixed unexpected model generation bug. #204
Conversation
- Added schema type check - Added properties number check
light-rest-4j/src/main/java/com/networknt/codegen/rest/OpenApiGenerator.java
Show resolved
Hide resolved
Is this change backwards compatible with the classes generated by the light-codegen at this time? |
It looks like this fix introduces another bug where the name where the model generation for the types is suppressed but the types are not replaced with their corresponding primitive boxed types or array types. It results in non compiling code. e.g. I had schemas
I would get the following model for
but will not get the model for |
@243826 Thank you for pointing this out. All property's types start with |
@jiachen1120 @243826 There is a utility @ddobrin built to bundle multiple specification files and resolve the references in the components. I am wondering if we should try it out see what is the final spec before feeding it to the light-codegen. |
I can give it a shot. I was thinking probably I would need something like
that soon.
Could you help with more pointers?
…On Sat, Feb 23, 2019, 9:39 AM Steve Hu ***@***.***> wrote:
@jiachen1120 <https://github.com/jiachen1120> @243826
<https://github.com/243826> There is a utility @ddobrin
<https://github.com/ddobrin> built to bundle multiple specification files
and resolve the references in the components. I am wondering if we should
try it out see what is the final spec before feeding it to the
light-codegen.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#204 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACk9w2GSnHATLb0ohKYUDAXJgw8Q-k6zks5vQXzbgaJpZM4aK_Pf>
.
|
https://github.com/networknt/openapi-bundler is the repository and document is in the readme. In addition, this document might help. https://doc.networknt.com/development/best-practices/openapi3/#guidelines |
@NicholasAzar @stevehu
This PR is related to API-46 issue. Look forward to your review.
RFC for this issue: https://github.com/networknt/light-rfcs/blob/master/light-codegen/0003-model-generation-bug.md