OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
cd samples/server/petstore/java-helidon-server/mp
# Use Java 17
mvn clean package
java -jar target/petstore-helidon-server-mp.jar
The server start-up fails with
Exception in thread "main" org.glassfish.jersey.server.model.ModelValidationException: Validation of the application resource model has failed during application initialization.
[[FATAL] No injection source found for a parameter of type public org.openapitools.server.model.ModelApiResponse org.openapitools.server.api.PetServiceImpl.uploadFile(java.lang.Long,java.lang.String,java.io.InputStream) at index 2.; source=
followed by a long string.
cd samples/server/petstore/java-helidon-server/se
# Use Java 17
mvn clean package
java -jar target/petstore-helidon-server-se.jar
The server start-up fails with several errors, among them this:
Exception in thread "main" Cannot create property=servers for JavaBean=io.smallrye.openapi.api.models.OpenAPIImpl@f99f5e0
in 'reader', line 1, column 1:
openapi: 3.0.0
^
Cannot create property=variables for JavaBean=io.smallrye.openapi.api.models.servers.ServerImpl@c7045b9
in 'reader', line 12, column 3:
- description: petstore server
^
Cannot create property=default for JavaBean=io.smallrye.openapi.api.models.servers.ServerVariableImpl@6cb6decd
in 'reader', line 16, column 7:
default: petstore
^
No writable property 'default' on class: org.eclipse.microprofile.openapi.models.servers.ServerVariable
in 'reader', line 16, column 16:
default: petstore
Bug Report Checklist
Description
The generated samples for
java-helidon-server
(both these
andmp
libraries) fail during start-up.openapi-generator version
Current
master
branch.OpenAPI declaration file content or url
In this repo, at
modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
Generation Details
./bin/generate-samples.sh bin/configs/java-helidon-server-*
Steps to reproduce
The server start-up fails with
followed by a long string.
The server start-up fails with several errors, among them this:
Related issues/PRs
I found no related issues or PRs, open or closed.
Suggest a fix
No idea yet. Looking.