Closed
Description
I think we started a discussion somewhere about this, but I could not find it.
Maybe at API level we could defines an interface to report OpenAPI validation issues.
Example of an invalid spec:
OASFactory.createSchema()
.ref("#/components/schemas/SomeObj")
.type(Schema.SchemaType.OBJECT) // Wrong value because "$ref" is present
.description("The hello type") // Wrong value because "$ref" is present
KaiZen:
KaiZen have a ValidationItem to report a severity, a message and a position.
The position is strongly coupled with the source file (JSON), which might be not ideal in our case because the model can be derived from the Annotations or built from scratch using the OASFactory
.
But if someone build a parser that uses the Eclipse-MP-OpenAPI model, then having the location in the source file (JSON or YAML) might also be interesting.