-
Notifications
You must be signed in to change notification settings - Fork 418
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
NullPointerException with composed-schema containing oneOf in the components #15
Comments
The first step is to fix the NullPointerException. Should it be fixed in DefaultCodegenConfig (line 1210) by assuming the @HugoMario: have you an input for this question? |
I have tried the second solution (fixing Current JSON:
JSON after my "null-safe" modification in swagger-core:
This is why I have considered that it is better to fix the |
agree |
Issue #15: fix NullPointerException with ComposedSchema
Thank you! |
Hi, |
hey @srividhyak27 , i think this fix is available for 3.0.0-rc1, can you please check and let me know? |
Hi @HugoMario , thanks, But, in 3.0.0-rc1, below exception is thrown
Is it related to the issue mentioned here - swagger-api/swagger-codegen#8246 I am using windows and using swagger-codegen maven plugin to generate classes from the openapi 3.0 specification. Thanks, |
I have some trouble with a OpenAPI spec containing a
oneOf
switch. (from documentation Data Models (Schemas) > oneOf, anyOf, allOf, not)When I try to generate the java client, I get an error caused by a null pointer Exception (version
1.0.0-SNAPSHOT
).OpenAPI Spec:
Stacktrace:
Note:
When instead of having a
Pet
schema in the components, the composed-schema is inlined in the requestBody (as in the example from the docs), then the generator works.The text was updated successfully, but these errors were encountered: