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
Copy file name to clipboardExpand all lines: src/oas.md
+34-9Lines changed: 34 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1100,6 +1100,10 @@ schema:
1100
1100
type: integer
1101
1101
format: int64
1102
1102
style: simple
1103
+
examples:
1104
+
number:
1105
+
dataValue: [12345678, 90099]
1106
+
serializedValue: "12345678,90099"
1103
1107
```
1104
1108
1105
1109
A path parameter of a string value:
@@ -1111,6 +1115,13 @@ description: username to fetch
1111
1115
required: true
1112
1116
schema:
1113
1117
type: string
1118
+
examples:
1119
+
"Edsger Dijkstra":
1120
+
dataValue: edijkstra
1121
+
serializedValue: edijkstra
1122
+
Diṅnāga:
1123
+
dataValue: diṅnāga
1124
+
serializedValue: di%E1%B9%85n%C4%81ga
1114
1125
```
1115
1126
1116
1127
An optional query parameter of a string value, allowing multiple values by repeating the query parameter:
@@ -1126,18 +1137,26 @@ schema:
1126
1137
type: string
1127
1138
style: form
1128
1139
explode: true
1140
+
examples:
1141
+
stuff:
1142
+
dataValue: [this, that, theother]
1143
+
serializedValue: id=this&id=that&id=theother
1129
1144
```
1130
1145
1131
-
A free-form query parameter, allowing undefined parameters of a specific type:
1146
+
A free-form query parameter, allowing undefined parameters of a `type: "string"`:
1132
1147
1133
1148
```yaml
1134
1149
in: query
1135
1150
name: freeForm
1136
1151
schema:
1137
1152
type: object
1138
1153
additionalProperties:
1139
-
type: integer
1154
+
type: string
1140
1155
style: form
1156
+
examples:
1157
+
freeForm:
1158
+
dataValue: {"yeah": "I'm", "free": "forming"}
1159
+
serializedValue: yeah=I%27m&free=forming
1141
1160
```
1142
1161
1143
1162
A complex parameter using `content` to define serialization:
@@ -1170,13 +1189,17 @@ content:
1170
1189
# Allow an arbitrary JSON object to keep
1171
1190
# the example simple
1172
1191
type: object
1173
-
example: {
1174
-
"numbers": [1, 2],
1175
-
"flag": null
1176
-
}
1192
+
examples:
1193
+
minimized:
1194
+
summary: JSON should be serialized with minimal whitespace
1195
+
dataValue: {
1196
+
"numbers": [1, 2],
1197
+
"flag": null
1198
+
}
1199
+
serializedValue: '{"numbers":[1,2],"flag":null}'
1177
1200
```
1178
1201
1179
-
Assuming a path of `/foo`, a server of `https://example.com`, the full URL incorporating the value from the `example` field (with whitespace minimized) would be:
1202
+
Assuming a path of `/foo`, a server of `https://example.com`, the full URL incorporating the value from the `serializedValue` field would be:
As there is not, as of this writing, a [registered](#media-type-registry) mapping between the JSON Schema data model and JSONPath, the details of the string's allowed structure would need to be conveyed either in a human-readable `description` field, or through a mechanism outside of the OpenAPI Description, such as a JSON Schema for the data structure to be queried.
1198
1223
1199
-
Assuming a path of `/foo` and a server of `https://example.com`, the full URL incorporating the value from the `example` field would be:
1224
+
Assuming a path of `/foo` and a server of `https://example.com`, the full URL incorporating the value from the `dataValue` field would be:
0 commit comments