@@ -2183,68 +2183,6 @@ name: pet
21832183description: Pets operations
21842184` ` `
21852185
2186- # ### <a name="examplesObject"></a>Examples Object
2187-
2188- In an `example`, a JSON Reference MAY be used, with the
2189- explicit restriction that examples having a JSON format with object named
2190- ` $ref` are not allowed. Therefore, that `example`, structurally, can be
2191- either a string primitive or an object, similar to `additionalProperties`.
2192-
2193- In all cases, the payload is expected to be compatible with the type schema
2194- for the associated value. Tooling implementations MAY choose to
2195- validate compatibility automatically, and reject the example value(s) if they
2196- are incompatible.
2197-
2198- ` ` ` yaml
2199- # in a model
2200- schemas:
2201- properties:
2202- name:
2203- type: string
2204- example:
2205- $ref: http://foo.bar#/examples/name-example
2206-
2207- # in a request body, note the plural ` examples`
2208- requestBody :
2209- content :
2210- ' application/json ' :
2211- schema :
2212- $ref : ' #/components/schemas/Address'
2213- examples :
2214- foo :
2215- value : {"foo": "bar"}
2216- bar :
2217- value : {"bar": "baz"}
2218- ' application/xml ' :
2219- examples :
2220- xml :
2221- externalValue : ' http://foo.bar/examples/address-example.xml'
2222- ' text/plain ' :
2223- examples :
2224- text :
2225- externalValue : ' http://foo.bar/examples/address-example.txt'
2226-
2227- # in a parameter
2228- parameters :
2229- - name : ' zipCode'
2230- in : ' query'
2231- schema :
2232- type : ' string'
2233- format : ' zip-code'
2234- example :
2235- $ref : ' http://foo.bar#/examples/zip-example'
2236-
2237- # in a response, note the singular `example`:
2238- responses :
2239- ' 200 ' :
2240- description : your car appointment has been booked
2241- content :
2242- application/json :
2243- schema :
2244- $ref : ' #/components/schemas/SuccessResponse'
2245- example :
2246- $ref : http://foo.bar#/examples/address-example.json
2247- ` ` `
22482186
22492187# ### <a name="referenceObject"></a>Reference Object
22502188
0 commit comments