From 369bd84c9da1e770fedcf1119e51631e2a352056 Mon Sep 17 00:00:00 2001 From: Jeremie Bresson Date: Wed, 5 Jun 2019 10:52:24 +0200 Subject: [PATCH 1/2] Revert "[maven-plugin] fix strictSpec parameter (#3071)" This reverts commit 8c9a1512ae824d35866375eb69ddd085309d0251. --- .../main/java/org/openapitools/codegen/plugin/CodeGenMojo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java index 91d76333b10a..7ac66dc4da46 100644 --- a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java +++ b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java @@ -244,7 +244,7 @@ public class CodeGenMojo extends AbstractMojo { /** * To treat a document strictly against the spec. */ - @Parameter(name = "strictSpecBehavior", alias = "strictSpec", property = "openapi.generator.maven.plugin.strictSpec", required = false) + @Parameter(name = "strictSpec", property = "openapi.generator.maven.plugin.strictSpec", required = false) private Boolean strictSpecBehavior; /** From da8955909e45a311f85c7cd58f2d0eb079a7fdec Mon Sep 17 00:00:00 2001 From: Jeremie Bresson Date: Wed, 5 Jun 2019 10:54:02 +0200 Subject: [PATCH 2/2] [maven-plugin] fix strictSpec parameter without alias --- .../java/org/openapitools/codegen/plugin/CodeGenMojo.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java index 7ac66dc4da46..0414bb1dc878 100644 --- a/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java +++ b/modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java @@ -245,7 +245,7 @@ public class CodeGenMojo extends AbstractMojo { * To treat a document strictly against the spec. */ @Parameter(name = "strictSpec", property = "openapi.generator.maven.plugin.strictSpec", required = false) - private Boolean strictSpecBehavior; + private Boolean strictSpec; /** * To generate alias (array, map) as model @@ -471,8 +471,8 @@ public void execute() throws MojoExecutionException { configurator.setValidateSpec(!skipValidateSpec); } - if (strictSpecBehavior != null) { - configurator.setStrictSpecBehavior(strictSpecBehavior); + if (strictSpec != null) { + configurator.setStrictSpecBehavior(strictSpec); } if (logToStderr != null) {