Closed rv1971 closed 3 years ago
thanks for the suggestion, however external values should not be included like references, see:
http://spec.openapis.org/oas/v3.0.3#fixed-fields-15
[...] externalValue string A URL that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The value field and externalValue field are mutually exclusive.
I'm afraid you misunderstood the point.
Example: you have a path item p
which is a reference to an external file p.json
in a subdirectory s
. The file p.json
contains an externalValue
whose value is a relative URI pointing to an external example file, say example.xml
. When resolving the reference in p
, the URI in externalValue
must be adjusted to s/example.xml
. It is a bug not to adjust it.
Fortunately you have already solved exactly the same problem for references. Any reference in p.json
which is a relative URI is correctly adjusted. It is sufficient to do exactly the same for externalValue
properties.
Pls let me know if anything is unclear.
thanks for the explanation, will check it again.
FIxed, thanks for reporting!
When resolving references, relative URIs in
externalValue
properties are adjusted just the same way as in$ref
properties.