Neterium
8 years agoNew Contributor
(OpenAPI v3) Can't add an external JSON example
Hi,
I'm trying to add an example in my OpenAPI spec. I checked the specification and docs, it should look like this if I'm right:
(I've hidden the IP intentionally)
The spec sample:
content:
application/json:
schema:
$ref: "#components/schemas/object"
examples:
jsonObject:
summary: A sample object
externalValue: http://example.com/examples/object-example.json
My spec:
content:
application/json:
schema:
$ref: 'http://xxx.xxx.xxx.xxx/schemas/1.0/screen.request.json'
examples:
jsonObject:
summary: A simple example
externalValue: http://xxx.xxx.xxx.xxx/schemas/1.0/screen.request.example1.json
The JSON sample is accessible (the URL is checked and working) and is valid.
I've tried with or without quotes around the URL without success. It keeps generating a sample from the schema :(.
Did I miss anything ?
Many thanks!