openapi-processor / openapi-processor-spring

an OpenAPI 3.0 & 3.1 interface & model java code generator for Spring Boot
https://docs.openapiprocessor.io
Apache License 2.0
36 stars 9 forks source link

2023.1.1 bean validation configuration incompatible with 2022.3 #156

Closed aburmeis closed 4 months ago

aburmeis commented 1 year ago

the values true and false for bean-validation no longer work as the yaml parser seems to convert them to boolean instead of an enum (using 'true' instead works): $.options.bean-validation: boolean wurde gefunden, aber string erwartet (sorry for the German message, but I think you can understand)

hauner commented 1 year ago

true/false still work. It is "just" a bug in the json schema but it doesn't stop the processor from running.

Thanks for reporting :-)

aburmeis commented 1 year ago

For me true and false in the configuration yaml file only work when they are forced as strings using single or double ticks.

hauner commented 1 year ago

confusing, I wonder what is causing this.

It works for me in the (simple) sample app https://github.com/openapi-processor/openapi-processor-samples/tree/master/samples/spring-mvc-boot-3

hauner commented 1 year ago

I have added a pom to the sample. I see no problem with using true/false apart from the validation warning.

So it doesn't seem to be a problem with the maven plugin.

hauner commented 1 year ago

when I run maven with -X I get the output below for the processor stuff. Can you see any difference in the dependencies? Maybe it is picking a wrong version of a dependency..

[INFO] --- openapi-processor-maven-plugin:2021.1:process (default-cli) @ samples ---
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=229834, ConflictMarker.markTime=137600, ConflictMarker.nodeCount=103, ConflictIdSorter.graphTime=75638, ConflictIdSorter.topsortTime=34961, ConflictIdSorter.conflictIdCount=54, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1700673, ConflictResolver.conflictItemCount=87, DefaultDependencyCollector.collectTime=151493212, DefaultDependencyCollector.transformTime=2283342}
[DEBUG] io.openapiprocessor:openapi-processor-maven-plugin:jar:2021.1
[DEBUG]    io.openapiprocessor:openapi-processor-spring:jar:2023.1.1:runtime
[DEBUG]       org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:1.7.21:runtime
[DEBUG]          org.jetbrains.kotlin:kotlin-stdlib:jar:1.7.21:runtime
[DEBUG]             org.jetbrains.kotlin:kotlin-stdlib-common:jar:1.7.21:runtime
[DEBUG]             org.jetbrains:annotations:jar:13.0:runtime
[DEBUG]          org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.7.21:runtime
[DEBUG]       io.openapiprocessor:openapi-processor-core:jar:2023.1.1:runtime
[DEBUG]          org.antlr:antlr4:jar:4.11.1:runtime
[DEBUG]             org.antlr:antlr4-runtime:jar:4.11.1:runtime
[DEBUG]             org.antlr:antlr-runtime:jar:3.5.3:runtime
[DEBUG]             org.antlr:ST4:jar:4.3.4:runtime
[DEBUG]             org.abego.treelayout:org.abego.treelayout.core:jar:1.0.3:runtime
[DEBUG]             org.glassfish:javax.json:jar:1.1.4:runtime
[DEBUG]             com.ibm.icu:icu4j:jar:71.1:runtime
[DEBUG]          org.openapi4j:openapi-parser:jar:1.0.7:runtime
[DEBUG]             org.openapi4j:openapi-core:jar:1.0.7:runtime
[DEBUG]          io.swagger.parser.v3:swagger-parser:jar:2.0.28:runtime
[DEBUG]             io.swagger.parser.v3:swagger-parser-v3:jar:2.0.28:runtime
[DEBUG]                io.swagger.core.v3:swagger-models:jar:2.1.11:runtime
[DEBUG]                io.swagger.core.v3:swagger-core:jar:2.1.11:runtime
[DEBUG]                   jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.2:runtime
[DEBUG]                      jakarta.activation:jakarta.activation-api:jar:1.2.1:runtime
[DEBUG]                   com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.12.1:runtime
[DEBUG]                   jakarta.validation:jakarta.validation-api:jar:2.0.2:runtime
[DEBUG]                io.swagger.parser.v3:swagger-parser-core:jar:2.0.28:runtime
[DEBUG]          io.openapiprocessor:openapi-parser:jar:2023.1:runtime
[DEBUG]             io.openapiprocessor:openapi-parser-validator:jar:2023.1:runtime
[DEBUG]             io.openapiprocessor:openapi-parser-interfaces:jar:2023.1:runtime
[DEBUG]          io.openapiprocessor:openapi-parser-jackson:jar:2023.1:runtime
[DEBUG]             com.fasterxml.jackson.core:jackson-databind:jar:2.14.1:runtime
[DEBUG]                com.fasterxml.jackson.core:jackson-core:jar:2.14.1:runtime
[DEBUG]             com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.14.1:runtime
[DEBUG]                org.yaml:snakeyaml:jar:1.33:runtime
[DEBUG]          com.fasterxml.jackson.module:jackson-module-kotlin:jar:2.14.1:runtime
[DEBUG]             com.fasterxml.jackson.core:jackson-annotations:jar:2.14.1:runtime
[DEBUG]             org.jetbrains.kotlin:kotlin-reflect:jar:1.5.32:runtime
[DEBUG]          org.apache.commons:commons-text:jar:1.10.0:runtime
[DEBUG]             org.apache.commons:commons-lang3:jar:3.12.0:runtime
[DEBUG]          org.commonmark:commonmark:jar:0.17.0:runtime
[DEBUG]          com.google.googlejavaformat:google-java-format:jar:1.15.0:runtime
[DEBUG]             com.google.guava:guava:jar:31.0.1-jre:runtime
[DEBUG]                com.google.guava:failureaccess:jar:1.0.1:runtime
[DEBUG]                com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:runtime
[DEBUG]                com.google.code.findbugs:jsr305:jar:3.0.2:runtime
[DEBUG]                org.checkerframework:checker-qual:jar:3.12.0:runtime
[DEBUG]                com.google.errorprone:error_prone_annotations:jar:2.7.1:runtime
[DEBUG]                com.google.j2objc:j2objc-annotations:jar:1.3:runtime
[DEBUG]          com.networknt:json-schema-validator:jar:1.0.76:runtime
[DEBUG]             com.ethlo.time:itu:jar:1.7.0:runtime
[DEBUG]       org.slf4j:slf4j-api:jar:2.0.6:runtime
[DEBUG]    org.apache.maven.shared:maven-shared-utils:jar:3.2.1:compile
[DEBUG]       commons-io:commons-io:jar:2.5:compile
[DEBUG]    io.openapiprocessor:openapi-processor-api:jar:2021.1:compile
[DEBUG]    org.codehaus.plexus:plexus-utils:jar:1.1:runtime
[DEBUG] Created new class realm plugin>io.openapiprocessor:openapi-processor-maven-plugin:2021.1
[DEBUG] Importing foreign packages into class realm plugin>io.openapiprocessor:openapi-processor-maven-plugin:2021.1
[DEBUG]   Imported:  < maven.api
[DEBUG] Populating class realm plugin>io.openapiprocessor:openapi-processor-maven-plugin:2021.1
[DEBUG]   Included: io.openapiprocessor:openapi-processor-maven-plugin:jar:2021.1
[DEBUG]   Included: io.openapiprocessor:openapi-processor-spring:jar:2023.1.1
[DEBUG]   Included: org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:1.7.21
[DEBUG]   Included: org.jetbrains.kotlin:kotlin-stdlib:jar:1.7.21
[DEBUG]   Included: org.jetbrains.kotlin:kotlin-stdlib-common:jar:1.7.21
[DEBUG]   Included: org.jetbrains:annotations:jar:13.0
[DEBUG]   Included: org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.7.21
[DEBUG]   Included: io.openapiprocessor:openapi-processor-core:jar:2023.1.1
[DEBUG]   Included: org.antlr:antlr4:jar:4.11.1
[DEBUG]   Included: org.antlr:antlr4-runtime:jar:4.11.1
[DEBUG]   Included: org.antlr:antlr-runtime:jar:3.5.3
[DEBUG]   Included: org.antlr:ST4:jar:4.3.4
[DEBUG]   Included: org.abego.treelayout:org.abego.treelayout.core:jar:1.0.3
[DEBUG]   Included: org.glassfish:javax.json:jar:1.1.4
[DEBUG]   Included: com.ibm.icu:icu4j:jar:71.1
[DEBUG]   Included: org.openapi4j:openapi-parser:jar:1.0.7
[DEBUG]   Included: org.openapi4j:openapi-core:jar:1.0.7
[DEBUG]   Included: io.swagger.parser.v3:swagger-parser:jar:2.0.28
[DEBUG]   Included: io.swagger.parser.v3:swagger-parser-v3:jar:2.0.28
[DEBUG]   Included: io.swagger.core.v3:swagger-models:jar:2.1.11
[DEBUG]   Included: io.swagger.core.v3:swagger-core:jar:2.1.11
[DEBUG]   Included: jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.2
[DEBUG]   Included: jakarta.activation:jakarta.activation-api:jar:1.2.1
[DEBUG]   Included: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.12.1
[DEBUG]   Included: jakarta.validation:jakarta.validation-api:jar:2.0.2
[DEBUG]   Included: io.swagger.parser.v3:swagger-parser-core:jar:2.0.28
[DEBUG]   Included: io.openapiprocessor:openapi-parser:jar:2023.1
[DEBUG]   Included: io.openapiprocessor:openapi-parser-validator:jar:2023.1
[DEBUG]   Included: io.openapiprocessor:openapi-parser-interfaces:jar:2023.1
[DEBUG]   Included: io.openapiprocessor:openapi-parser-jackson:jar:2023.1
[DEBUG]   Included: com.fasterxml.jackson.core:jackson-databind:jar:2.14.1
[DEBUG]   Included: com.fasterxml.jackson.core:jackson-core:jar:2.14.1
[DEBUG]   Included: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.14.1
[DEBUG]   Included: org.yaml:snakeyaml:jar:1.33
[DEBUG]   Included: com.fasterxml.jackson.module:jackson-module-kotlin:jar:2.14.1
[DEBUG]   Included: com.fasterxml.jackson.core:jackson-annotations:jar:2.14.1
[DEBUG]   Included: org.jetbrains.kotlin:kotlin-reflect:jar:1.5.32
[DEBUG]   Included: org.apache.commons:commons-text:jar:1.10.0
[DEBUG]   Included: org.apache.commons:commons-lang3:jar:3.12.0
[DEBUG]   Included: org.commonmark:commonmark:jar:0.17.0
[DEBUG]   Included: com.google.googlejavaformat:google-java-format:jar:1.15.0
[DEBUG]   Included: com.google.guava:guava:jar:31.0.1-jre
[DEBUG]   Included: com.google.guava:failureaccess:jar:1.0.1
[DEBUG]   Included: com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava
[DEBUG]   Included: com.google.code.findbugs:jsr305:jar:3.0.2
[DEBUG]   Included: org.checkerframework:checker-qual:jar:3.12.0
[DEBUG]   Included: com.google.errorprone:error_prone_annotations:jar:2.7.1
[DEBUG]   Included: com.google.j2objc:j2objc-annotations:jar:1.3
[DEBUG]   Included: com.networknt:json-schema-validator:jar:1.0.76
[DEBUG]   Included: com.ethlo.time:itu:jar:1.7.0
[DEBUG]   Included: org.apache.maven.shared:maven-shared-utils:jar:3.2.1
[DEBUG]   Included: commons-io:commons-io:jar:2.5
[DEBUG]   Included: io.openapiprocessor:openapi-processor-api:jar:2021.1
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:1.1