diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java index 96492e5251c7..2e2c7da0b569 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java @@ -535,7 +535,10 @@ public class CodegenConfigurator implements Serializable { } if (this.isValidateSpec()) { - SpecValidationException ex = new SpecValidationException("Specification has failed validation."); + StringBuilder sb = new StringBuilder(); + sb.append("There were issues with the specification. The option can be disabled by passing false to skipValidateSpec (Maven/Gradle) or --skip-validate-spec (CLI)."); + sb.append(System.lineSeparator()); + SpecValidationException ex = new SpecValidationException(sb.toString()); ex.setErrors(validationMessages); ex.setWarnings(warnings); throw ex; diff --git a/modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml index c7205a8e0ea7..2bc345dab4ed 100644 --- a/modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml @@ -556,7 +556,7 @@ paths: tags: - "fake_classname_tags 123#$%^" summary: To test class name in snake case - descriptions: To test class name in snake case + description: To test class name in snake case operationId: testClassname consumes: - application/json