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
Hi team,
when we use the openapi-generator (wrapped by our openapi-client subgenerator) the generated classes import the following class import org.openapitools.jackson.nullable.JsonNullable;.
The problem is that we don't have the org.openapitools.jackson dependency in our pom.
After some research it's appeard that this bug is known by the openapi community, but no fix has been done yet. OpenAPITools/openapi-generator#2901
Motivation for or Use Case
Reproduce the error
run the subgenerator openapi-client with an openapi spec api.yml
Related issues
Suggest a Fix
I suggest to add the dependency when using our openapi-client. It's not really smart, but at least the generated code can be compiled and run. We can also add a comment in the code to link the openapi-generator issues and remember why we did the hack.
I know this a hack and I don't have a fully satisfying solution.
Otherwise the solutions suggested by the community are :
use a workaround with a templateDirectory config in maven
@avdev4j I agree with you that the dependency need to be added dynamically to the existing app. Maybe we can use the existing jhipster hooks that are used by blueprints to add a dependency.
Overview of the issue
Hi team,
when we use the openapi-generator (wrapped by our openapi-client subgenerator) the generated classes import the following class
import org.openapitools.jackson.nullable.JsonNullable;
.The problem is that we don't have the
org.openapitools.jackson
dependency in our pom.After some research it's appeard that this bug is known by the openapi community, but no fix has been done yet. OpenAPITools/openapi-generator#2901
Motivation for or Use Case
Reproduce the error
run the subgenerator openapi-client with an openapi spec api.yml
Related issues
Suggest a Fix
I suggest to add the dependency when using our openapi-client. It's not really smart, but at least the generated code can be compiled and run. We can also add a comment in the code to link the openapi-generator issues and remember why we did the hack.
I know this a hack and I don't have a fully satisfying solution.
Otherwise the solutions suggested by the community are :
templateDirectory
config in mavenJHipster Version(s)
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryJDL entity definitions
Environment and Tools
openjdk version "1.8.0_202"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_202-b08)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.202-b08, mixed mode)
git version 2.19.0
node: v10.13.0
npm: 6.5.0
yeoman: 2.0.5
yarn: 1.13.0
Docker version 19.03.4, build 9013bf5
docker-compose version 1.24.1, build 4667896b
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryN/A
Browsers and Operating System
The text was updated successfully, but these errors were encountered: