Closed adzubla closed 1 year ago
You can also use SWAGGER (using swagger OpenAPI parser) or INTERNAL (for my own OpenAPI parser). With SWAGGER you can (currently) only use OpenAPI 3.0, no validation. With INTERNAL you can use OpenAPI 3.0 with validation or 3.1 without validation (working on validation for 3.1)
This information is "hidden" in the gradle docs, https://openapiprocessor.io/spring/2022.5/gradle.html. I will add this to maven docs.
it tries to validate the mapping.yaml
with its json schema (using draft 7) to warn about basic errors in the mapping.
It can't be disabled. It will not happen at runtime. At runtime there is only the generated code.
It should not try to connect json-schema.org. This looks like a missconfiguration of the json schema validator. I will check it.
here it is probably only invalid because of the json-schema.org error. Normally it will give more details where the error is.
I just copied from the example configuration and was not aware of the default implementation...
Removing <parser>
from the plugin configuration solved the issue!
Thanks for your quick answer.
Hello, Same as adzubla; the simpler is indeed to remove <parser> as sayed above, but sometime i can trigger the same bug even without; so i dig.
And i found that that code has been fixed with this commit, but it is not in 2023.3. we have to wait 2023.4. https://github.com/openapi-processor/openapi-processor-base/commit/974197c672e69205c7d4b8d00e47b2225c2f2778
For those like me that need a quick working version i just add a patch as a single jar containing only the fixed classe : "io\openapiprocessor\core\processor\MappingValidator.class" .
and then we can keep <parser> if we add an overrided patch in the openapi-processor-maven-plugin dependencies.
io.openapiprocessor openapi-processor-maven-plugin 2021.1 io.openapiprocessor openapi-processor-core-patch 2023.4 system ${project.basedir}/lib/io.openapiprocessor/openapi-processor-core-patch/2023.4/openapi-processor-core-patch-2023.4.jar io.openapiprocessor openapi-processor-spring 2023.3
Hope it help. patch.ZIP
the next release is on its way, probably next week.
fixed by openapi-processor-spring 2023.4
I’m running the following configuration:
pom.xml:
mapping.yaml:
Logs:
Despite this error message, the output files are being generated.
Questions:
1 - There is an alternative to the deprecated OPENAPI4J parser? I could not find any in the documentation. 2 - Why is it trying to access 'http://json-schema.org/draft-07/schema' ? Can it be disabled? Will it happen at runtime? 3 - Why the warning about mapping not valid?
Thanks,
Eduardo.