You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Anywhere an `example` may be given, allow a $ref object. This does mean that `example` can be either a string primitive or an object, like `additionalProperties`:
1157
+
Anywhere an `example` may be given, allow a $ref object. This does mean that `example`, structurally, can be either a string primitive or an object, like `additionalProperties`.
1158
+
1159
+
In locations where the field being provided an `example` is a scalar value _or_ has it's content-type definition determined by a higher-level construct (a response payload, for example, uses the `produces` attribute to select the correct message format), the plural `examples` shall be used, and the payload format be specified as a key to the example.
1160
+
1161
+
In all cases, the payload is expected to be compatible with the type schema for the value that it is accompanying. Tooling vendors may choose to valide compatibility automatically, and reject the example value(s) if they are not compatible.
1158
1162
1159
1163
```yaml
1160
1164
# in a model
@@ -1163,35 +1167,35 @@ definitions:
1163
1167
name:
1164
1168
type: string
1165
1169
example:
1166
-
$ref: http://foo.bar#/examples/name-example.json
1170
+
$ref: http://foo.bar#/examples/name-example
1167
1171
1168
-
# in a parameter:
1172
+
# in a parameter, note the plural `examples` as the content-type is set by `consumes`:
0 commit comments