From f05ea89c91bddb6f573279a0106a4ff72857e00b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bresson?= Date: Mon, 30 Jul 2018 08:45:38 +0200 Subject: [PATCH 1/2] Add "Validate spec on generation by default" --- docs/migration-guide.adoc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/migration-guide.adoc b/docs/migration-guide.adoc index 3745556cc9f1..c6c22b6b73d0 100644 --- a/docs/migration-guide.adoc +++ b/docs/migration-guide.adoc @@ -17,6 +17,13 @@ Version `3.2.0` is a minor version of OpenAPI-Generator, in comparison to `3.1.x The default value of some options might change. Projects relying on generated code might need to be adapted. +==== Validate spec on generation by default + +The default is to validate the spec during generation. If the spec has errors, +we will output errors as well as warnings to the user. + +The option can be disabled by passing `false` to `validateSpec` (for the Maven or Gradle plugin) or with `--skip-validate-spec` (CLI). + ==== Model (all languages) In `CodegenModel` and in `CodegenOperation` we use now our own class `org.openapitools.codegen.CodegenDiscriminator` instead of `io.swagger.v3.oas.models.media.Discriminator`. From eae819564be59936ddae0bfe1c6ce4753a401043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bresson?= Date: Mon, 30 Jul 2018 16:46:13 +0200 Subject: [PATCH 2/2] Update migration-guide.adoc --- docs/migration-guide.adoc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/migration-guide.adoc b/docs/migration-guide.adoc index c6c22b6b73d0..c7315c1e8d60 100644 --- a/docs/migration-guide.adoc +++ b/docs/migration-guide.adoc @@ -20,9 +20,13 @@ Projects relying on generated code might need to be adapted. ==== Validate spec on generation by default The default is to validate the spec during generation. If the spec has errors, -we will output errors as well as warnings to the user. +they will appear as errors or warnings to the user. This prevent generation of the project. + +If you want to switch back to the `3.1.x` behavior you can use: + +* Set the `validateSpec` option to `false` if you are using the Maven or Gradle plugin +* Use the command line option `--skip-validate-spec` if you are using the CLI -The option can be disabled by passing `false` to `validateSpec` (for the Maven or Gradle plugin) or with `--skip-validate-spec` (CLI). ==== Model (all languages)