Replies: 2 comments
-
Hi @laurawinck ! The Maven plugin was created by a contributor a while back and didn't get any love since then. I must admit I'm not familiar with it but I'll try to give it a look in the upcoming weeks. Can you try to validate the same thing but with the .jar directly in command line? If the error is the same, it will be easier to pinpoint because it means the core of the validator is the problem. If the error is not present, that means it's a problem with the maven plugin and that could be harder to find. If you have the time to try it with the jar I'd appreciate but if you don't, then I'll check on my free time in the upcoming weeks. |
Beta Was this translation helpful? Give feedback.
-
Hey @JFCote, When running the openapi-style-validator plugin, there was a dependency conflict between several swagger-models libraries, which could be fixed by explicitly specifying the swagger-models dependency which should be used by the plugin: <plugin>
<groupId>org.openapitools.openapistylevalidator</groupId>
<artifactId>openapi-style-validator-maven-plugin</artifactId>
<version>1.10</version>
<configuration>
<inputFile>${inputFile}</inputFile>
<validateInfoLicense>true</validateInfoLicense>
<validateInfoDescription>true</validateInfoDescription>
<validateInfoContact>true</validateInfoContact>
<validateOperationDescription>true</validateOperationDescription>
<validateOperationSummary>true</validateOperationSummary>
<validateOperationTag>true</validateOperationTag>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>validate</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-models</artifactId>
<version>2.2.2</version>
</dependency>
</dependencies>
</plugin> Thank you for your quick response and your support!! :) |
Beta Was this translation helpful? Give feedback.
-
Dear Community,
I have a problem with the openapi-style-validator plugin for Maven and I wanted to ask you for help.
Description of the problem
When I validate a yaml file this error shows up:
[ERROR] Failed to execute goal org.openapitools.openapistylevalidator:openapi-style-validator-maven-plugin:1.10:validate (default) on project [...]: Execution default of goal org.openapitools.openapistylevalidator:openapi-style-validator-maven-plugin:1.10:validate failed: An API incompatibility was encountered while executing org.openapitools.openapistylevalidator:openapi-style-validator-maven-plugin:1.10:validate: java.lang.NoSuchMethodError: 'io.swagger.v3.oas.models.media.Schema io.swagger.v3.oas.models.media.ComposedSchema.addAllOfItem(io.swagger.v3.oas.models.media.Schema)'
To Reproduce
I'm using v1.10 of the openapi-style-validator plugin for Maven and OpenAPI specification v3.0.1.
There are models references in this yaml file in which the keyword allOf is used:
ExampleModel:
allOf:
- $ref: "[...]"
- type: object
properties:
violations:
type: array
items:
$ref: "[...]"
Just to narrow down the problem, I've written the keyword allOf in lowercase.
Like this:
ExampleModel:
allof:
- $ref: "[...]"
- type: object
properties:
violations:
type: array
items:
$ref: "[...]"
After changing to lowercase the validation worked without the error.
Now I think there's a connection between the keywords and the error..
Question
Have any of you ever seen this error or could someone help me here?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions