Closed MosheElisha closed 2 years ago
Hi,
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i "/tmp/swagger.yaml" -l jaxrs-cxf -o /tmp/project
endpoint.setFeatures(Collections.singletonList(new Swagger2Feature()));
You get a java.lang.NullPointerException: null at io.swagger.models.refs.GenericRef.<init>(GenericRef.java:44) attached npe.log
java.lang.NullPointerException: null at io.swagger.models.refs.GenericRef.<init>(GenericRef.java:44)
The cause is probably the generated model class Object.java.txt which is generated without properties according to the definition in https://github.com/openservicebrokerapi/servicebroker/blob/e953ad2b478264900f6376ec886bb5921073aac2/swagger.yaml#L799
The workaround is to delete the generated Object.java file and let all the classes that uses it (for example, ServiceBindingVolumeMountDevice.mountConfig) to use java.lang.Object instead.
ServiceBindingVolumeMountDevice.mountConfig
java.lang.Object
Thanks for raising this @MosheElisha - we will see if we can find someone to look into this next week.
/dibs
see PR #696
Thanks!
Closing as this was fixed with PR already merged
Hi,
java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i "/tmp/swagger.yaml" -l jaxrs-cxf -o /tmp/project
endpoint.setFeatures(Collections.singletonList(new Swagger2Feature()));
You get a
java.lang.NullPointerException: null at io.swagger.models.refs.GenericRef.<init>(GenericRef.java:44)
attached npe.logThe cause is probably the generated model class Object.java.txt which is generated without properties according to the definition in https://github.com/openservicebrokerapi/servicebroker/blob/e953ad2b478264900f6376ec886bb5921073aac2/swagger.yaml#L799
The workaround is to delete the generated Object.java file and let all the classes that uses it (for example,
ServiceBindingVolumeMountDevice.mountConfig
) to usejava.lang.Object
instead.