Closed wwang2016 closed 3 years ago
Can you run this with -X
to get the entire stacktrace? I am a bit uncertain where in the process you get the exception. It might be a variation of #25
Hi,
The following is the error:
[ERROR] Failed to execute goal io.openapitools.swagger:swagger-maven-plugin:2.0.3:generate (default) on project: Execution default of goal io.openapitools.swagger:swagger-maven-plugin:2.0.3:generate failed: A required class was missing while executing io.openapitools.swagger:swagger-maven-plugin:2.0.3:generate: org/apache/deltaspike/data/api/EntityRepository [ERROR] ----------------------------------------------------- [ERROR] realm = plugin>io.openapitools.swagger:swagger-maven-plugin:2.0.3 [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy [ERROR] urls[0] = file:/C:/Users/wayne.wang/.m2/repository/io/openapitools/swagger/swagger-maven-plugin/2.0.3/swagger-maven-plugin-2.0.3.jar
Thanks,
Wayne
Can you test whether release 2.1.0 solves your problem. My guess is that #25 will solve this issue also.
Hi, This time, it ran to completion and generated source codes. The following are some issues that requireds attention
(1) The generated api definition file does not conform to OpenAPI v3 for supporting inheritance. For example, the allOf should include all elements, and not just the reference to parent class. This issue is the same as the one from another project. It would be a plus if it can be corrected g : io.swagger.core.v3 a : swagger-maven-plugin
TextMessage:
type: object
properties:
text:
type: string
allOf:
- $ref: '#/components/schemas/Message'
should be:
TextMessage:
allOf:
- $ref: '#/components/schemas/Message'
- type: object
properties:
text:
type: string
(2) It would be better to have a configuration parameter to specify the resource class(es) so that I do not need to generate api document for all classes in the same package (resourcePackage). Note, the other solution support the sourceClasses parameter
I will continue investigate if there is any other issue
Thx!
Hey, could you backport this (or, well, the fix to #25) to version 1.X? Getting the same error with 1.0.3 but working fine with 2.1.0+
Hi,
I got the following error while trying to build the project and generate the api document. The api document was not generated.
Execution default of goal io.openapitools.swagger:swagger-maven-plugin:2.0.3:generate failed: A required class was missing while executing io.openapitools.swagger:swagger-maven-plugin:2.0.3:generate: org/apache/deltaspike/data/api/EntityRepository
However, the class file EntityRepository exists
Do you see any reason?
Thanks,
Wayne