Closed rubensa closed 1 year ago
my guess is that it falls inside the pitfall describe here https://json-schema.org/understanding-json-schema/reference/string.html#resource-identifiers " If the values in the schema have the ability to be relative to a particular source path (such as a link from a webpage), it is generally better practice to use "uri-reference" (or "iri-reference") rather than "uri" (or "iri"). "uri" should only be used when the path must be absolute.
Draft-specific info: Draft 4 Draft 4 only includes "uri", not "uri-reference". Therefore, there is some ambiguity around whether "uri" should accept relative paths. "
so here there is not 100% clarity , only advise would be to set uri-reference (tested and validated with your code )
Thanks for the info @LasneF, didn't know about that.
I close the issue as it works using uri-reference
instead of uri
as format.
Describe the bug
The uri format for the string type in OpenAPI is not validated correctly. Looks like only absolute URIs (vs relative) are supported.
The URI specification says:
To Reproduce
"instance" property must match format "uri"
Expected behavior
No errors are shown as the provided instance URI value is correct according to the URI specification.
Screenshots
Environment (remove any that are not applicable):
Additional context
If I replace:
with:
format validation success.