Repository navigation
Conversation
The README only described the CLI and the library, but the project also publishes a Maven plugin and a Gradle plugin to Maven Central. Add usage sections for both plugins, verified against the mojo and task sources, and link the sbt plugin maintained outside this project. Fixes OpenAPITools#339 Signed-off-by: Inf1mum <vadimlazuk5@gmail.com>
There was a problem hiding this comment.
3 issues found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="README.md">
<violation number="1" location="README.md:202">
P2: `allowedModelProperties` is listed in the referenced table, but the Maven goal has no parameter for it and never forwards it to `ValidatorParameters`. Users cannot configure that documented exemption through this goal; limit the sentence to exposed options or wire the parameter.</violation>
<violation number="2" location="README.md:214">
P2: The `classpath` value is single-quoted, so `${validatorVersion}` is passed literally and the documented build cannot resolve the plugin. Use a double-quoted string and define or replace `validatorVersion`.</violation>
<violation number="3" location="README.md:234">
P2: `allowedModelProperties` is listed in the referenced table, but the Gradle task has no property or setter for it and never forwards it to validation. Limit this claim to options exposed by the task or add the missing task wiring.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
| mavenCentral() | ||
| } | ||
| dependencies { | ||
| classpath 'org.openapitools.openapistylevalidator:openapi-style-validator-gradle-plugin:${validatorVersion}' |
There was a problem hiding this comment.
P2: The classpath value is single-quoted, so ${validatorVersion} is passed literally and the documented build cannot resolve the plugin. Use a double-quoted string and define or replace validatorVersion.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At README.md, line 214:
<comment>The `classpath` value is single-quoted, so `${validatorVersion}` is passed literally and the documented build cannot resolve the plugin. Use a double-quoted string and define or replace `validatorVersion`.</comment>
<file context>
@@ -173,6 +173,70 @@ Example 2:
+ mavenCentral()
+ }
+ dependencies {
+ classpath 'org.openapitools.openapistylevalidator:openapi-style-validator-gradle-plugin:${validatorVersion}'
+ }
+}
</file context>
| classpath 'org.openapitools.openapistylevalidator:openapi-style-validator-gradle-plugin:${validatorVersion}' | |
| classpath "org.openapitools.openapistylevalidator:openapi-style-validator-gradle-plugin:${validatorVersion}" |
|
|
||
| `gradlew openAPIStyleValidator` | ||
|
|
||
| The validation options and naming conventions listed in the Options File table above can be set on the task the same way, using the same names. |
There was a problem hiding this comment.
P2: allowedModelProperties is listed in the referenced table, but the Gradle task has no property or setter for it and never forwards it to validation. Limit this claim to options exposed by the task or add the missing task wiring.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At README.md, line 234:
<comment>`allowedModelProperties` is listed in the referenced table, but the Gradle task has no property or setter for it and never forwards it to validation. Limit this claim to options exposed by the task or add the missing task wiring.</comment>
<file context>
@@ -173,6 +173,70 @@ Example 2:
+
+`gradlew openAPIStyleValidator`
+
+The validation options and naming conventions listed in the Options File table above can be set on the task the same way, using the same names.
+
+### Using sbt
</file context>
| The validation options and naming conventions listed in the Options File table above can be set on the task the same way, using the same names. | |
| The boolean validation options and naming conventions listed in the Options File table above can be set on the task the same way, using the same names. The `allowedModelProperties` option is not currently exposed by this task. |
|
|
||
| `mvn org.openapitools.openapistylevalidator:openapi-style-validator-maven-plugin:<version>:validate -DinputFile=path/to/spec.yaml` | ||
|
|
||
| The validation options and naming conventions listed in the Options File table above can be set in the same `<configuration>` element, using the same names (for example `<validateInfoLicense>false</validateInfoLicense>`). |
There was a problem hiding this comment.
P2: allowedModelProperties is listed in the referenced table, but the Maven goal has no parameter for it and never forwards it to ValidatorParameters. Users cannot configure that documented exemption through this goal; limit the sentence to exposed options or wire the parameter.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At README.md, line 202:
<comment>`allowedModelProperties` is listed in the referenced table, but the Maven goal has no parameter for it and never forwards it to `ValidatorParameters`. Users cannot configure that documented exemption through this goal; limit the sentence to exposed options or wire the parameter.</comment>
<file context>
@@ -173,6 +173,70 @@ Example 2:
+
+`mvn org.openapitools.openapistylevalidator:openapi-style-validator-maven-plugin:<version>:validate -DinputFile=path/to/spec.yaml`
+
+The validation options and naming conventions listed in the Options File table above can be set in the same `<configuration>` element, using the same names (for example `<validateInfoLicense>false</validateInfoLicense>`).
+
+### Using the Gradle plugin
</file context>
| The validation options and naming conventions listed in the Options File table above can be set in the same `<configuration>` element, using the same names (for example `<validateInfoLicense>false</validateInfoLicense>`). | |
| The boolean validation options and naming conventions listed in the Options File table above can be set in the same `<configuration>` element, using the same names (for example `<validateInfoLicense>false</validateInfoLicense>`). The `allowedModelProperties` option is not currently exposed by this plugin. |
Fixes #339
The README only described the CLI and the library, so the Maven and Gradle plugins that the project publishes to Maven Central were invisible to anyone landing on the repo page.
This adds:
validategoal (bound to thevalidatephase by default), direct invocation from the command line, and a pointer to the existing options tableopenAPIStyleValidatortask, and a buildscript-based setup — the plugin is on Maven Central but not the Gradle Plugin Portal, so the usualplugins {}block alone will not resolve itEvery snippet was checked against the current plugin sources: the mojo's
validategoal andinputFileparameter, and the task name/configuration used by the gradle plugin's own functional test.Summary by cubic
Documents the Maven and Gradle plugins in the README, which previously only described the CLI and the library. Fixes #339.
Written for commit 7651a85. Summary will update on new commits.