Skip to content

Commit 0b7c42d

Browse files
committed
Improve querystring examples, link to registry
Replace "no defined mapping" with "no registered mapping" and link to the section about the registry.
1 parent f35f66d commit 0b7c42d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/oas.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,6 +1112,16 @@ content:
11121112
# Allow an arbitrary JSON object to keep
11131113
# the example simple
11141114
type: object
1115+
example: {
1116+
"numbers": [1, 2],
1117+
"flag": null
1118+
}
1119+
```
1120+
1121+
Assuming a path of `/foo`, a server of `https://example.com`, the full URL incorporateing the value from the `example` field (with whitespace minimized) would be:
1122+
1123+
```uri
1124+
https://example.com/foo?%7B%22numbers%22%3A%5B1%2C2%5D%2C%22flag%22%3Anull%7D
11151125
```
11161126

11171127
A querystring parameter that uses JSONPath:
@@ -1126,7 +1136,7 @@ content:
11261136
example: $.a.b[1:1]
11271137
```
11281138

1129-
As there is not currently a defined 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.
1139+
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.
11301140

11311141
Assuming a path of `/foo` and a server of `https://example.com`, the full URL incorporateing the value from the `example` field would be:
11321142

0 commit comments

Comments
 (0)