Closed hauner closed 2 years ago
validating of single files with $ref
s does not work. It does not report errors
$ref
points to a non-existing definitionThe validator seems to ignore $ref
s.
internal openapi-processor/openapi-parser supports json schema validation with $refs.
find errors in the
openapi.yaml
before the processor fails by validating theopenapi.yaml
with the json schema.This is easy for a single file
openapi.yml
files.Using jackson and json-schema-validator it basically works like this:
Unfortunately it doesn't work with an
openapi.yaml
that$ref
s into other files. To validate it, all$ref
d files need to be merged into theopenapi.yaml
file.I didn't find any easily usable java code to do this :-(
What it should do:
components:
x-key
$ref
to other file with$ref
to `components/x-key/file-name#/typeExperimental code seems to work on simple
$ref
s.