You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a model where one field has a oneOf Schema annotation.
I created an interface to handle this.
As there are no properties in the schema object (only oneOf "references"), ExampleJsonGenerator throws a NPE.
Happens with "anyOf" too. Didn't check, but I guess it will crash with "allOf" too.
I saw the other bug reports regarding the NPE in this class, but I'm not sure that the cases I mentioned are covered in the fixed version.
As a workaround, I activated the old behavior as written in the release doc.
I still get errors, but at least the application is starting and I can see example data.
Dependencies and versions used springwolf-amqp version 0.13.0.
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Map.entrySet()" because "properties" is null
at io.github.stavshamir.springwolf.schemas.example.ExampleJsonGenerator.handleObject(ExampleJsonGenerator.java:134)
The text was updated successfully, but these errors were encountered:
The NPE should be fixed as part of latest -SNAPSHOT builds.
We will add the oneOf Schema property to your JsonExampleGenerator as part of #326
Thank you for this code example, it helps a lot!
To support allOf we probably need to build the json via a library instead of by hand, which will make things simplier. Right now, also for allOf only the first schema is used.
You mention that you get other errors as well. Feel free to report them as well.
Describe the bug
I have a model where one field has a oneOf Schema annotation.
I created an interface to handle this.
As there are no properties in the schema object (only oneOf "references"), ExampleJsonGenerator throws a NPE.
Happens with "anyOf" too. Didn't check, but I guess it will crash with "allOf" too.
I saw the other bug reports regarding the NPE in this class, but I'm not sure that the cases I mentioned are covered in the fixed version.
As a workaround, I activated the old behavior as written in the release doc.
I still get errors, but at least the application is starting and I can see example data.
Dependencies and versions used
springwolf-amqp
version0.13.0
.Code example
Stack trace and error logs
The text was updated successfully, but these errors were encountered: