@typespec/http-specs 0.1.0-alpha.3 → 0.1.0-alpha.30-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +234 -0
- package/README.md +11 -3
- package/dist/specs/documentation/mockapi.d.ts.map +1 -0
- package/dist/specs/documentation/mockapi.js +38 -0
- package/dist/specs/documentation/mockapi.js.map +1 -0
- package/dist/specs/encode/array/mockapi.d.ts +3 -0
- package/dist/specs/encode/array/mockapi.d.ts.map +1 -0
- package/dist/specs/encode/array/mockapi.js +25 -0
- package/dist/specs/encode/array/mockapi.js.map +1 -0
- package/dist/specs/encode/bytes/mockapi.js +16 -24
- package/dist/specs/encode/bytes/mockapi.js.map +1 -1
- package/dist/specs/encode/datetime/mockapi.js +2 -2
- package/dist/specs/encode/datetime/mockapi.js.map +1 -1
- package/dist/specs/encode/duration/mockapi.js +74 -2
- package/dist/specs/encode/duration/mockapi.js.map +1 -1
- package/dist/specs/encode/numeric/mockapi.js +2 -2
- package/dist/specs/encode/numeric/mockapi.js.map +1 -1
- package/dist/specs/helper.d.ts +2 -2
- package/dist/specs/helper.d.ts.map +1 -1
- package/dist/specs/parameters/basic/mockapi.d.ts.map +1 -1
- package/dist/specs/parameters/basic/mockapi.js +3 -3
- package/dist/specs/parameters/basic/mockapi.js.map +1 -1
- package/dist/specs/parameters/body-optionality/mockapi.d.ts.map +1 -1
- package/dist/specs/parameters/body-optionality/mockapi.js +14 -4
- package/dist/specs/parameters/body-optionality/mockapi.js.map +1 -1
- package/dist/specs/parameters/collection-format/mockapi.js +4 -15
- package/dist/specs/parameters/collection-format/mockapi.js.map +1 -1
- package/dist/specs/parameters/path/mockapi.d.ts +3 -0
- package/dist/specs/parameters/path/mockapi.d.ts.map +1 -0
- package/dist/specs/parameters/path/mockapi.js +29 -0
- package/dist/specs/parameters/path/mockapi.js.map +1 -0
- package/dist/specs/parameters/query/mockapi.d.ts +3 -0
- package/dist/specs/parameters/query/mockapi.d.ts.map +1 -0
- package/dist/specs/parameters/query/mockapi.js +14 -0
- package/dist/specs/parameters/query/mockapi.js.map +1 -0
- package/dist/specs/parameters/spread/mockapi.d.ts.map +1 -1
- package/dist/specs/parameters/spread/mockapi.js +19 -19
- package/dist/specs/parameters/spread/mockapi.js.map +1 -1
- package/dist/specs/payload/json-merge-patch/mockapi.js +4 -4
- package/dist/specs/payload/json-merge-patch/mockapi.js.map +1 -1
- package/dist/specs/payload/media-type/mockapi.js +2 -2
- package/dist/specs/payload/media-type/mockapi.js.map +1 -1
- package/dist/specs/payload/multipart/mockapi.d.ts.map +1 -1
- package/dist/specs/payload/multipart/mockapi.js +42 -60
- package/dist/specs/payload/multipart/mockapi.js.map +1 -1
- package/dist/specs/payload/pageable/mockapi.d.ts.map +1 -1
- package/dist/specs/payload/pageable/mockapi.js +425 -18
- package/dist/specs/payload/pageable/mockapi.js.map +1 -1
- package/dist/specs/payload/xml/mockapi.js +1 -4
- package/dist/specs/payload/xml/mockapi.js.map +1 -1
- package/dist/specs/response/status-code-range/mockapi.d.ts +3 -0
- package/dist/specs/response/status-code-range/mockapi.d.ts.map +1 -0
- package/dist/specs/response/status-code-range/mockapi.js +29 -0
- package/dist/specs/response/status-code-range/mockapi.js.map +1 -0
- package/dist/specs/routes/mockapi.js +25 -25
- package/dist/specs/routes/mockapi.js.map +1 -1
- package/dist/specs/serialization/encoded-name/json/mockapi.js +1 -1
- package/dist/specs/serialization/encoded-name/json/mockapi.js.map +1 -1
- package/dist/specs/server/versions/not-versioned/mockapi.js +1 -1
- package/dist/specs/server/versions/not-versioned/mockapi.js.map +1 -1
- package/dist/specs/server/versions/versioned/mockapi.js +8 -12
- package/dist/specs/server/versions/versioned/mockapi.js.map +1 -1
- package/dist/specs/special-words/mockapi.d.ts.map +1 -1
- package/dist/specs/special-words/mockapi.js +28 -6
- package/dist/specs/special-words/mockapi.js.map +1 -1
- package/dist/specs/streaming/jsonl/mockapi.d.ts +3 -0
- package/dist/specs/streaming/jsonl/mockapi.d.ts.map +1 -0
- package/dist/specs/streaming/jsonl/mockapi.js +30 -0
- package/dist/specs/streaming/jsonl/mockapi.js.map +1 -0
- package/dist/specs/type/array/mockapi.js +1 -1
- package/dist/specs/type/array/mockapi.js.map +1 -1
- package/dist/specs/type/dictionary/mockapi.js +1 -1
- package/dist/specs/type/dictionary/mockapi.js.map +1 -1
- package/dist/specs/type/enum/extensible/mockapi.js +1 -1
- package/dist/specs/type/enum/extensible/mockapi.js.map +1 -1
- package/dist/specs/type/enum/fixed/mockapi.js +2 -2
- package/dist/specs/type/enum/fixed/mockapi.js.map +1 -1
- package/dist/specs/type/model/empty/mockapi.js +2 -2
- package/dist/specs/type/model/empty/mockapi.js.map +1 -1
- package/dist/specs/type/model/inheritance/enum-discriminator/mockapi.js +1 -1
- package/dist/specs/type/model/inheritance/enum-discriminator/mockapi.js.map +1 -1
- package/dist/specs/type/model/inheritance/nested-discriminator/mockapi.js +2 -2
- package/dist/specs/type/model/inheritance/nested-discriminator/mockapi.js.map +1 -1
- package/dist/specs/type/model/inheritance/not-discriminated/mockapi.js +2 -2
- package/dist/specs/type/model/inheritance/not-discriminated/mockapi.js.map +1 -1
- package/dist/specs/type/model/inheritance/recursive/mockapi.js +1 -1
- package/dist/specs/type/model/inheritance/recursive/mockapi.js.map +1 -1
- package/dist/specs/type/model/inheritance/single-discriminator/mockapi.js +2 -2
- package/dist/specs/type/model/inheritance/single-discriminator/mockapi.js.map +1 -1
- package/dist/specs/type/model/usage/mockapi.js +4 -4
- package/dist/specs/type/model/usage/mockapi.js.map +1 -1
- package/dist/specs/type/model/visibility/mockapi.js +9 -10
- package/dist/specs/type/model/visibility/mockapi.js.map +1 -1
- package/dist/specs/type/property/additional-properties/mockapi.js +9 -6
- package/dist/specs/type/property/additional-properties/mockapi.js.map +1 -1
- package/dist/specs/type/property/nullable/mockapi.js +2 -6
- package/dist/specs/type/property/nullable/mockapi.js.map +1 -1
- package/dist/specs/type/property/optionality/mockapi.js +1 -1
- package/dist/specs/type/property/optionality/mockapi.js.map +1 -1
- package/dist/specs/type/property/value-types/mockapi.js +3 -3
- package/dist/specs/type/property/value-types/mockapi.js.map +1 -1
- package/dist/specs/type/scalar/mockapi.js +9 -9
- package/dist/specs/type/scalar/mockapi.js.map +1 -1
- package/dist/specs/type/union/discriminated/mockapi.d.ts +3 -0
- package/dist/specs/type/union/discriminated/mockapi.d.ts.map +1 -0
- package/dist/specs/type/union/discriminated/mockapi.js +212 -0
- package/dist/specs/type/union/discriminated/mockapi.js.map +1 -0
- package/dist/specs/type/union/mockapi.js +2 -2
- package/dist/specs/type/union/mockapi.js.map +1 -1
- package/dist/specs/versioning/added/mockapi.js +6 -6
- package/dist/specs/versioning/added/mockapi.js.map +1 -1
- package/dist/specs/versioning/madeOptional/mockapi.js +2 -2
- package/dist/specs/versioning/madeOptional/mockapi.js.map +1 -1
- package/dist/specs/versioning/removed/mockapi.js +46 -2
- package/dist/specs/versioning/removed/mockapi.js.map +1 -1
- package/dist/specs/versioning/renamedFrom/mockapi.js +5 -5
- package/dist/specs/versioning/renamedFrom/mockapi.js.map +1 -1
- package/dist/specs/versioning/returnTypeChangedFrom/mockapi.js +1 -1
- package/dist/specs/versioning/returnTypeChangedFrom/mockapi.js.map +1 -1
- package/dist/specs/versioning/typeChangedFrom/mockapi.js +3 -3
- package/dist/specs/versioning/typeChangedFrom/mockapi.js.map +1 -1
- package/package.json +31 -20
- package/smoke/petstore/main.tsp +96 -0
- package/smoke/todoapp/main.tsp +293 -0
- package/spec-summary.md +1295 -265
- package/specs/documentation/main.tsp +158 -0
- package/specs/documentation/mockapi.ts +57 -0
- package/specs/encode/array/main.tsp +112 -0
- package/specs/encode/array/mockapi.ts +43 -0
- package/specs/encode/bytes/main.tsp +29 -20
- package/specs/encode/bytes/mockapi.ts +13 -31
- package/specs/encode/datetime/main.tsp +2 -7
- package/specs/encode/datetime/mockapi.ts +2 -2
- package/specs/encode/duration/main.tsp +420 -7
- package/specs/encode/duration/mockapi.ts +174 -2
- package/specs/encode/numeric/mockapi.ts +2 -2
- package/specs/parameters/basic/mockapi.ts +3 -3
- package/specs/parameters/body-optionality/main.tsp +2 -0
- package/specs/parameters/body-optionality/mockapi.ts +24 -4
- package/specs/parameters/collection-format/main.tsp +5 -25
- package/specs/parameters/collection-format/mockapi.ts +4 -16
- package/specs/parameters/path/main.tsp +48 -0
- package/specs/parameters/path/mockapi.ts +34 -0
- package/specs/parameters/query/main.tsp +22 -0
- package/specs/parameters/query/mockapi.ts +15 -0
- package/specs/parameters/spread/mockapi.ts +19 -19
- package/specs/payload/json-merge-patch/main.tsp +2 -2
- package/specs/payload/json-merge-patch/mockapi.ts +4 -4
- package/specs/payload/media-type/mockapi.ts +2 -2
- package/specs/payload/multipart/main.tsp +34 -32
- package/specs/payload/multipart/mockapi.ts +42 -59
- package/specs/payload/pageable/main.tsp +462 -7
- package/specs/payload/pageable/mockapi.ts +478 -18
- package/specs/payload/xml/mockapi.ts +1 -4
- package/specs/response/status-code-range/main.tsp +82 -0
- package/specs/response/status-code-range/mockapi.ts +31 -0
- package/specs/routes/main.tsp +48 -48
- package/specs/routes/mockapi.ts +25 -25
- package/specs/serialization/encoded-name/json/main.tsp +1 -1
- package/specs/serialization/encoded-name/json/mockapi.ts +1 -1
- package/specs/server/endpoint/not-defined/main.tsp +1 -3
- package/specs/server/path/multiple/main.tsp +3 -5
- package/specs/server/versions/not-versioned/mockapi.ts +1 -1
- package/specs/server/versions/versioned/main.tsp +1 -1
- package/specs/server/versions/versioned/mockapi.ts +6 -12
- package/specs/special-headers/conditional-request/main.tsp +1 -1
- package/specs/special-headers/repeatability/main.tsp +2 -2
- package/specs/special-words/main.tsp +44 -6
- package/specs/special-words/mockapi.ts +29 -6
- package/specs/streaming/jsonl/main.tsp +33 -0
- package/specs/streaming/jsonl/mockapi.ts +32 -0
- package/specs/type/array/mockapi.ts +1 -1
- package/specs/type/dictionary/mockapi.ts +1 -1
- package/specs/type/enum/extensible/main.tsp +18 -2
- package/specs/type/enum/extensible/mockapi.ts +1 -1
- package/specs/type/enum/fixed/main.tsp +15 -3
- package/specs/type/enum/fixed/mockapi.ts +2 -2
- package/specs/type/model/empty/mockapi.ts +2 -2
- package/specs/type/model/inheritance/enum-discriminator/mockapi.ts +1 -1
- package/specs/type/model/inheritance/nested-discriminator/mockapi.ts +2 -2
- package/specs/type/model/inheritance/not-discriminated/mockapi.ts +2 -2
- package/specs/type/model/inheritance/recursive/mockapi.ts +1 -1
- package/specs/type/model/inheritance/single-discriminator/mockapi.ts +2 -2
- package/specs/type/model/usage/mockapi.ts +4 -4
- package/specs/type/model/visibility/main.tsp +15 -23
- package/specs/type/model/visibility/mockapi.ts +9 -10
- package/specs/type/property/additional-properties/main.tsp +17 -17
- package/specs/type/property/additional-properties/mockapi.ts +10 -10
- package/specs/type/property/nullable/mockapi.ts +7 -8
- package/specs/type/property/optionality/mockapi.ts +1 -1
- package/specs/type/property/value-types/mockapi.ts +3 -3
- package/specs/type/scalar/main.tsp +58 -9
- package/specs/type/scalar/mockapi.ts +9 -9
- package/specs/type/union/discriminated/main.tsp +251 -0
- package/specs/type/union/discriminated/mockapi.ts +230 -0
- package/specs/type/union/mockapi.ts +2 -2
- package/specs/versioning/added/mockapi.ts +6 -6
- package/specs/versioning/madeOptional/mockapi.ts +2 -2
- package/specs/versioning/removed/main.tsp +65 -3
- package/specs/versioning/removed/mockapi.ts +49 -2
- package/specs/versioning/renamedFrom/mockapi.ts +5 -5
- package/specs/versioning/returnTypeChangedFrom/main.tsp +17 -2
- package/specs/versioning/returnTypeChangedFrom/mockapi.ts +1 -1
- package/specs/versioning/typeChangedFrom/mockapi.ts +3 -3
- package/temp/.tsbuildinfo +1 -1
- package/tspconfig.yaml +0 -2
- package/dist/specs/type/model/templated/mockapi.d.ts.map +0 -1
- package/dist/specs/type/model/templated/mockapi.js +0 -63
- package/dist/specs/type/model/templated/mockapi.js.map +0 -1
- package/specs/type/model/templated/main.tsp +0 -130
- package/specs/type/model/templated/mockapi.ts +0 -66
- /package/dist/specs/{type/model/templated → documentation}/mockapi.d.ts +0 -0
package/spec-summary.md
CHANGED
|
@@ -71,6 +71,124 @@ Expects header 'x-ms-api-key': 'valid-key'
|
|
|
71
71
|
|
|
72
72
|
Expects header 'authorization': 'Bearer https://security.microsoft.com/.default'
|
|
73
73
|
|
|
74
|
+
### Documentation_Lists_bulletPointsOp
|
|
75
|
+
|
|
76
|
+
- Endpoint: `get /documentation/lists/bullet-points/op`
|
|
77
|
+
|
|
78
|
+
Test simple bullet points in documentation.
|
|
79
|
+
Expected behavior: Should render properly formatted bullet lists.
|
|
80
|
+
|
|
81
|
+
### Documentation_Lists_numbered
|
|
82
|
+
|
|
83
|
+
- Endpoint: `get /documentation/lists/numbered`
|
|
84
|
+
|
|
85
|
+
Test numbered lists.
|
|
86
|
+
Expected behavior: Should render numbered list properly.
|
|
87
|
+
|
|
88
|
+
### Documentation_TextFormatting_boldText
|
|
89
|
+
|
|
90
|
+
- Endpoint: `get /documentation/text-formatting/bold`
|
|
91
|
+
|
|
92
|
+
Expected behavior: Text between \*\* should render as bold.
|
|
93
|
+
|
|
94
|
+
### Documentation_TextFormatting_combinedFormatting
|
|
95
|
+
|
|
96
|
+
- Endpoint: `get /documentation/text-formatting/combined`
|
|
97
|
+
|
|
98
|
+
Test combined bold and italic formatting.
|
|
99
|
+
Expected behavior: Should handle nested and combined formatting.
|
|
100
|
+
|
|
101
|
+
### Documentation_TextFormatting_italicText
|
|
102
|
+
|
|
103
|
+
- Endpoint: `get /documentation/text-formatting/italic`
|
|
104
|
+
|
|
105
|
+
Test italic text formatting using _single asterisks_.
|
|
106
|
+
Expected behavior: Text between \* should render as italic.
|
|
107
|
+
|
|
108
|
+
### Encode_Array_Property_commaDelimited
|
|
109
|
+
|
|
110
|
+
- Endpoint: `post /encode/array/property/comma-delimited`
|
|
111
|
+
|
|
112
|
+
Test operation with request and response model contains a string array property with commaDelimited encode.
|
|
113
|
+
Expected request body:
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"value": "blue,red,green"
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Expected response body:
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"value": "blue,red,green"
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Encode_Array_Property_newlineDelimited
|
|
130
|
+
|
|
131
|
+
- Endpoint: `post /encode/array/property/newline-delimited`
|
|
132
|
+
|
|
133
|
+
Test operation with request and response model contains a string array property with newlineDelimited encode.
|
|
134
|
+
Expected request body:
|
|
135
|
+
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"value": "blue\nred\ngreen"
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Expected response body:
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"value": "blue\nred\ngreen"
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Encode_Array_Property_pipeDelimited
|
|
151
|
+
|
|
152
|
+
- Endpoint: `post /encode/array/property/pipe-delimited`
|
|
153
|
+
|
|
154
|
+
Test operation with request and response model contains a string array property with pipeDelimited encode.
|
|
155
|
+
Expected request body:
|
|
156
|
+
|
|
157
|
+
```json
|
|
158
|
+
{
|
|
159
|
+
"value": "blue|red|green"
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Expected response body:
|
|
164
|
+
|
|
165
|
+
```json
|
|
166
|
+
{
|
|
167
|
+
"value": "blue|red|green"
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Encode_Array_Property_spaceDelimited
|
|
172
|
+
|
|
173
|
+
- Endpoint: `post /encode/array/property/space-delimited`
|
|
174
|
+
|
|
175
|
+
Test operation with request and response model contains a string array property with spaceDelimited encode.
|
|
176
|
+
Expected request body:
|
|
177
|
+
|
|
178
|
+
```json
|
|
179
|
+
{
|
|
180
|
+
"value": "blue red green"
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Expected response body:
|
|
185
|
+
|
|
186
|
+
```json
|
|
187
|
+
{
|
|
188
|
+
"value": "blue red green"
|
|
189
|
+
}
|
|
190
|
+
```
|
|
191
|
+
|
|
74
192
|
### Encode_Bytes_Header_base64
|
|
75
193
|
|
|
76
194
|
- Endpoint: `get /encode/bytes/header/base64`
|
|
@@ -240,22 +358,21 @@ Expected body:
|
|
|
240
358
|
- Endpoint: `post /encode/bytes/body/request/custom-content-type`
|
|
241
359
|
|
|
242
360
|
When content type is a custom type(image/png here) and body is `bytes` the payload is a binary file.
|
|
243
|
-
File should match packages/
|
|
361
|
+
File should match packages/http-specs/assets/image.png.
|
|
244
362
|
|
|
245
363
|
### Encode_Bytes_RequestBody_default
|
|
246
364
|
|
|
247
365
|
- Endpoint: `post /encode/bytes/body/request/default`
|
|
248
366
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
"dGVzdA==" (base64 encode of test, in JSON string)
|
|
367
|
+
When content type is not defined and body is `bytes` the payload is a binary stream.
|
|
368
|
+
Stream should match packages/http-specs/assets/image.png file.
|
|
252
369
|
|
|
253
370
|
### Encode_Bytes_RequestBody_octetStream
|
|
254
371
|
|
|
255
372
|
- Endpoint: `post /encode/bytes/body/request/octet-stream`
|
|
256
373
|
|
|
257
|
-
When content type is application/octet-stream and body is `bytes` the payload is a binary
|
|
258
|
-
|
|
374
|
+
When content type is application/octet-stream and body is `bytes` the payload is a binary stream.
|
|
375
|
+
Stream should match packages/http-specs/assets/image.png file.
|
|
259
376
|
|
|
260
377
|
### Encode_Bytes_ResponseBody_base64
|
|
261
378
|
|
|
@@ -278,22 +395,21 @@ Expected body:
|
|
|
278
395
|
- Endpoint: `get /encode/bytes/body/response/custom-content-type`
|
|
279
396
|
|
|
280
397
|
When content type is a custom type(image/png here) and body is `bytes` the payload is a binary file.
|
|
281
|
-
File should match packages/
|
|
398
|
+
File should match packages/http-specs/assets/image.png
|
|
282
399
|
|
|
283
400
|
### Encode_Bytes_ResponseBody_default
|
|
284
401
|
|
|
285
402
|
- Endpoint: `get /encode/bytes/body/response/default`
|
|
286
403
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
"dGVzdA==" (base64 encode of test, in JSON string)
|
|
404
|
+
When content type is not defined and body is `bytes` the payload is a binary stream.
|
|
405
|
+
Stream should match packages/http-specs/assets/image.png file.
|
|
290
406
|
|
|
291
407
|
### Encode_Bytes_ResponseBody_octetStream
|
|
292
408
|
|
|
293
409
|
- Endpoint: `get /encode/bytes/body/response/octet-stream`
|
|
294
410
|
|
|
295
|
-
When content type is application/octet-stream and body is `bytes` the payload is a binary
|
|
296
|
-
|
|
411
|
+
When content type is application/octet-stream and body is `bytes` the payload is a binary stream.
|
|
412
|
+
Stream should match packages/http-specs/assets/image.png file.
|
|
297
413
|
|
|
298
414
|
### Encode_Datetime_Header_default
|
|
299
415
|
|
|
@@ -519,6 +635,13 @@ value=1686566864
|
|
|
519
635
|
Test default encode for a duration header.
|
|
520
636
|
Expected header `input=P40D`
|
|
521
637
|
|
|
638
|
+
### Encode_Duration_Header_float64Milliseconds
|
|
639
|
+
|
|
640
|
+
- Endpoint: `get /encode/duration/header/float64-milliseconds`
|
|
641
|
+
|
|
642
|
+
Test float64 milliseconds encode for a duration header.
|
|
643
|
+
Expected header `duration: 35625`
|
|
644
|
+
|
|
522
645
|
### Encode_Duration_Header_float64Seconds
|
|
523
646
|
|
|
524
647
|
- Endpoint: `get /encode/duration/header/float64-seconds`
|
|
@@ -526,6 +649,21 @@ Expected header `input=P40D`
|
|
|
526
649
|
Test float64 seconds encode for a duration header.
|
|
527
650
|
Expected header `duration: 35.625`
|
|
528
651
|
|
|
652
|
+
### Encode_Duration_Header_floatMilliseconds
|
|
653
|
+
|
|
654
|
+
- Endpoint: `get /encode/duration/header/float-milliseconds`
|
|
655
|
+
|
|
656
|
+
Test float milliseconds encode for a duration header.
|
|
657
|
+
Expected header `duration: 35625`
|
|
658
|
+
|
|
659
|
+
### Encode_Duration_Header_floatMillisecondsLargerUnit
|
|
660
|
+
|
|
661
|
+
- Endpoint: `get /encode/duration/header/float-milliseconds-larger-unit`
|
|
662
|
+
|
|
663
|
+
Test float milliseconds encode for a duration header where the duration is several minutes.
|
|
664
|
+
Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(3.5) in C#.
|
|
665
|
+
Expected header `duration: 210000.0`
|
|
666
|
+
|
|
529
667
|
### Encode_Duration_Header_floatSeconds
|
|
530
668
|
|
|
531
669
|
- Endpoint: `get /encode/duration/header/float-seconds`
|
|
@@ -533,6 +671,36 @@ Expected header `duration: 35.625`
|
|
|
533
671
|
Test float seconds encode for a duration header.
|
|
534
672
|
Expected header `duration: 35.625`
|
|
535
673
|
|
|
674
|
+
### Encode_Duration_Header_floatSecondsLargerUnit
|
|
675
|
+
|
|
676
|
+
- Endpoint: `get /encode/duration/header/float-seconds-larger-unit`
|
|
677
|
+
|
|
678
|
+
Test float seconds encode for a duration header where the duration is several minutes.
|
|
679
|
+
Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(2.5) in C#.
|
|
680
|
+
Expected header `duration: 150.0`
|
|
681
|
+
|
|
682
|
+
### Encode_Duration_Header_int32Milliseconds
|
|
683
|
+
|
|
684
|
+
- Endpoint: `get /encode/duration/header/int32-milliseconds`
|
|
685
|
+
|
|
686
|
+
Test int32 milliseconds encode for a duration header.
|
|
687
|
+
Expected header `duration: 36000`
|
|
688
|
+
|
|
689
|
+
### Encode_Duration_Header_int32MillisecondsArray
|
|
690
|
+
|
|
691
|
+
- Endpoint: `get /encode/duration/header/int32-milliseconds-array`
|
|
692
|
+
|
|
693
|
+
Test int32 milliseconds encode for a duration array header.
|
|
694
|
+
Expected header `duration: [36000,47000]`
|
|
695
|
+
|
|
696
|
+
### Encode_Duration_Header_int32MillisecondsLargerUnit
|
|
697
|
+
|
|
698
|
+
- Endpoint: `get /encode/duration/header/int32-milliseconds-larger-unit`
|
|
699
|
+
|
|
700
|
+
Test int32 milliseconds encode for a duration header where the duration is several minutes.
|
|
701
|
+
Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(3) in C#.
|
|
702
|
+
Expected header `duration: 180000`
|
|
703
|
+
|
|
536
704
|
### Encode_Duration_Header_int32Seconds
|
|
537
705
|
|
|
538
706
|
- Endpoint: `get /encode/duration/header/int32-seconds`
|
|
@@ -540,6 +708,14 @@ Expected header `duration: 35.625`
|
|
|
540
708
|
Test int32 seconds encode for a duration header.
|
|
541
709
|
Expected header `duration: 36`
|
|
542
710
|
|
|
711
|
+
### Encode_Duration_Header_int32SecondsLargerUnit
|
|
712
|
+
|
|
713
|
+
- Endpoint: `get /encode/duration/header/int32-seconds-larger-unit`
|
|
714
|
+
|
|
715
|
+
Test int32 seconds encode for a duration header where the duration is several minutes.
|
|
716
|
+
Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(2) in C#.
|
|
717
|
+
Expected header `duration: 120`
|
|
718
|
+
|
|
543
719
|
### Encode_Duration_Header_iso8601
|
|
544
720
|
|
|
545
721
|
- Endpoint: `get /encode/duration/header/iso8601`
|
|
@@ -575,16 +751,16 @@ Expected response body:
|
|
|
575
751
|
}
|
|
576
752
|
```
|
|
577
753
|
|
|
578
|
-
###
|
|
754
|
+
### Encode_Duration_Property_float64Milliseconds
|
|
579
755
|
|
|
580
|
-
- Endpoint: `get /encode/duration/property/float64-
|
|
756
|
+
- Endpoint: `get /encode/duration/property/float64-milliseconds`
|
|
581
757
|
|
|
582
|
-
Test operation with request and response model contains a duration property with float64
|
|
758
|
+
Test operation with request and response model contains a duration property with float64 milliseconds encode.
|
|
583
759
|
Expected request body:
|
|
584
760
|
|
|
585
761
|
```json
|
|
586
762
|
{
|
|
587
|
-
"value":
|
|
763
|
+
"value": 35625
|
|
588
764
|
}
|
|
589
765
|
```
|
|
590
766
|
|
|
@@ -592,15 +768,15 @@ Expected response body:
|
|
|
592
768
|
|
|
593
769
|
```json
|
|
594
770
|
{
|
|
595
|
-
"value":
|
|
771
|
+
"value": 35625
|
|
596
772
|
}
|
|
597
773
|
```
|
|
598
774
|
|
|
599
|
-
###
|
|
775
|
+
### Encode_Duration_Property_float64Seconds
|
|
600
776
|
|
|
601
|
-
- Endpoint: `get /encode/duration/property/
|
|
777
|
+
- Endpoint: `get /encode/duration/property/float64-seconds`
|
|
602
778
|
|
|
603
|
-
Test operation with request and response model contains a duration property with
|
|
779
|
+
Test operation with request and response model contains a duration property with float64 seconds encode.
|
|
604
780
|
Expected request body:
|
|
605
781
|
|
|
606
782
|
```json
|
|
@@ -617,16 +793,16 @@ Expected response body:
|
|
|
617
793
|
}
|
|
618
794
|
```
|
|
619
795
|
|
|
620
|
-
###
|
|
796
|
+
### Encode_Duration_Property_floatMilliseconds
|
|
621
797
|
|
|
622
|
-
- Endpoint: `get /encode/duration/property/float-
|
|
798
|
+
- Endpoint: `get /encode/duration/property/float-milliseconds`
|
|
623
799
|
|
|
624
|
-
Test operation with request and response model contains
|
|
800
|
+
Test operation with request and response model contains a duration property with float milliseconds encode.
|
|
625
801
|
Expected request body:
|
|
626
802
|
|
|
627
803
|
```json
|
|
628
804
|
{
|
|
629
|
-
"value":
|
|
805
|
+
"value": 35625
|
|
630
806
|
}
|
|
631
807
|
```
|
|
632
808
|
|
|
@@ -634,20 +810,20 @@ Expected response body:
|
|
|
634
810
|
|
|
635
811
|
```json
|
|
636
812
|
{
|
|
637
|
-
"value":
|
|
813
|
+
"value": 35625
|
|
638
814
|
}
|
|
639
815
|
```
|
|
640
816
|
|
|
641
|
-
###
|
|
817
|
+
### Encode_Duration_Property_floatMillisecondsArray
|
|
642
818
|
|
|
643
|
-
- Endpoint: `get /encode/duration/property/
|
|
819
|
+
- Endpoint: `get /encode/duration/property/float-milliseconds-array`
|
|
644
820
|
|
|
645
|
-
Test operation with request and response model contains
|
|
821
|
+
Test operation with request and response model contains an array property which elements are duration with float milliseconds encode.
|
|
646
822
|
Expected request body:
|
|
647
823
|
|
|
648
824
|
```json
|
|
649
825
|
{
|
|
650
|
-
"value":
|
|
826
|
+
"value": [35625, 46750]
|
|
651
827
|
}
|
|
652
828
|
```
|
|
653
829
|
|
|
@@ -655,20 +831,21 @@ Expected response body:
|
|
|
655
831
|
|
|
656
832
|
```json
|
|
657
833
|
{
|
|
658
|
-
"value":
|
|
834
|
+
"value": [35625, 46750]
|
|
659
835
|
}
|
|
660
836
|
```
|
|
661
837
|
|
|
662
|
-
###
|
|
838
|
+
### Encode_Duration_Property_floatMillisecondsLargerUnit
|
|
663
839
|
|
|
664
|
-
- Endpoint: `
|
|
840
|
+
- Endpoint: `get /encode/duration/property/float-milliseconds-larger-unit`
|
|
665
841
|
|
|
666
|
-
Test operation with request and response model contains a duration property with
|
|
842
|
+
Test operation with request and response model contains a duration property with float milliseconds encode where the duration is several minutes.
|
|
843
|
+
Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(3.5) in C#.
|
|
667
844
|
Expected request body:
|
|
668
845
|
|
|
669
846
|
```json
|
|
670
847
|
{
|
|
671
|
-
"value":
|
|
848
|
+
"value": 210000.0
|
|
672
849
|
}
|
|
673
850
|
```
|
|
674
851
|
|
|
@@ -676,62 +853,84 @@ Expected response body:
|
|
|
676
853
|
|
|
677
854
|
```json
|
|
678
855
|
{
|
|
679
|
-
"value":
|
|
856
|
+
"value": 210000.0
|
|
680
857
|
}
|
|
681
858
|
```
|
|
682
859
|
|
|
683
|
-
###
|
|
860
|
+
### Encode_Duration_Property_floatSeconds
|
|
684
861
|
|
|
685
|
-
- Endpoint: `get /encode/duration/
|
|
862
|
+
- Endpoint: `get /encode/duration/property/float-seconds`
|
|
686
863
|
|
|
687
|
-
Test
|
|
688
|
-
Expected
|
|
864
|
+
Test operation with request and response model contains a duration property with float seconds encode.
|
|
865
|
+
Expected request body:
|
|
689
866
|
|
|
690
|
-
|
|
867
|
+
```json
|
|
868
|
+
{
|
|
869
|
+
"value": 35.625
|
|
870
|
+
}
|
|
871
|
+
```
|
|
691
872
|
|
|
692
|
-
|
|
873
|
+
Expected response body:
|
|
693
874
|
|
|
694
|
-
|
|
695
|
-
|
|
875
|
+
```json
|
|
876
|
+
{
|
|
877
|
+
"value": 35.625
|
|
878
|
+
}
|
|
879
|
+
```
|
|
696
880
|
|
|
697
|
-
###
|
|
881
|
+
### Encode_Duration_Property_floatSecondsArray
|
|
698
882
|
|
|
699
|
-
- Endpoint: `get /encode/duration/
|
|
883
|
+
- Endpoint: `get /encode/duration/property/float-seconds-array`
|
|
700
884
|
|
|
701
|
-
Test
|
|
702
|
-
Expected
|
|
885
|
+
Test operation with request and response model contains an array property which elements are duration with float seconds encode.
|
|
886
|
+
Expected request body:
|
|
703
887
|
|
|
704
|
-
|
|
888
|
+
```json
|
|
889
|
+
{
|
|
890
|
+
"value": [35.625, 46.75]
|
|
891
|
+
}
|
|
892
|
+
```
|
|
705
893
|
|
|
706
|
-
|
|
894
|
+
Expected response body:
|
|
707
895
|
|
|
708
|
-
|
|
709
|
-
|
|
896
|
+
```json
|
|
897
|
+
{
|
|
898
|
+
"value": [35.625, 46.75]
|
|
899
|
+
}
|
|
900
|
+
```
|
|
710
901
|
|
|
711
|
-
###
|
|
902
|
+
### Encode_Duration_Property_floatSecondsLargerUnit
|
|
712
903
|
|
|
713
|
-
- Endpoint: `get /encode/duration/
|
|
904
|
+
- Endpoint: `get /encode/duration/property/float-seconds-larger-unit`
|
|
714
905
|
|
|
715
|
-
Test
|
|
716
|
-
|
|
906
|
+
Test operation with request and response model contains a duration property with float seconds encode where the duration is several minutes.
|
|
907
|
+
Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(2.5) in C#.
|
|
908
|
+
Expected request body:
|
|
717
909
|
|
|
718
|
-
|
|
910
|
+
```json
|
|
911
|
+
{
|
|
912
|
+
"value": 150.0
|
|
913
|
+
}
|
|
914
|
+
```
|
|
719
915
|
|
|
720
|
-
|
|
916
|
+
Expected response body:
|
|
721
917
|
|
|
722
|
-
|
|
723
|
-
|
|
918
|
+
```json
|
|
919
|
+
{
|
|
920
|
+
"value": 150.0
|
|
921
|
+
}
|
|
922
|
+
```
|
|
724
923
|
|
|
725
|
-
###
|
|
924
|
+
### Encode_Duration_Property_int32Milliseconds
|
|
726
925
|
|
|
727
|
-
- Endpoint: `
|
|
926
|
+
- Endpoint: `get /encode/duration/property/int32-milliseconds`
|
|
728
927
|
|
|
729
|
-
Test operation with request and response model contains
|
|
928
|
+
Test operation with request and response model contains a duration property with int32 milliseconds encode.
|
|
730
929
|
Expected request body:
|
|
731
930
|
|
|
732
931
|
```json
|
|
733
932
|
{
|
|
734
|
-
"value":
|
|
933
|
+
"value": 36000
|
|
735
934
|
}
|
|
736
935
|
```
|
|
737
936
|
|
|
@@ -739,20 +938,21 @@ Expected response body:
|
|
|
739
938
|
|
|
740
939
|
```json
|
|
741
940
|
{
|
|
742
|
-
"value":
|
|
941
|
+
"value": 36000
|
|
743
942
|
}
|
|
744
943
|
```
|
|
745
944
|
|
|
746
|
-
###
|
|
945
|
+
### Encode_Duration_Property_int32MillisecondsLargerUnit
|
|
747
946
|
|
|
748
|
-
- Endpoint: `
|
|
947
|
+
- Endpoint: `get /encode/duration/property/int32-milliseconds-larger-unit`
|
|
749
948
|
|
|
750
|
-
Test operation with request and response model contains property
|
|
949
|
+
Test operation with request and response model contains a duration property with int32 milliseconds encode where the duration is several minutes.
|
|
950
|
+
Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(3) in C#.
|
|
751
951
|
Expected request body:
|
|
752
952
|
|
|
753
953
|
```json
|
|
754
954
|
{
|
|
755
|
-
"value":
|
|
955
|
+
"value": 180000
|
|
756
956
|
}
|
|
757
957
|
```
|
|
758
958
|
|
|
@@ -760,20 +960,20 @@ Expected response body:
|
|
|
760
960
|
|
|
761
961
|
```json
|
|
762
962
|
{
|
|
763
|
-
"value":
|
|
963
|
+
"value": 180000
|
|
764
964
|
}
|
|
765
965
|
```
|
|
766
966
|
|
|
767
|
-
###
|
|
967
|
+
### Encode_Duration_Property_int32Seconds
|
|
768
968
|
|
|
769
|
-
- Endpoint: `
|
|
969
|
+
- Endpoint: `get /encode/duration/property/int32-seconds`
|
|
770
970
|
|
|
771
|
-
Test operation with request and response model contains
|
|
971
|
+
Test operation with request and response model contains a duration property with int32 seconds encode.
|
|
772
972
|
Expected request body:
|
|
773
973
|
|
|
774
974
|
```json
|
|
775
975
|
{
|
|
776
|
-
"value":
|
|
976
|
+
"value": 36
|
|
777
977
|
}
|
|
778
978
|
```
|
|
779
979
|
|
|
@@ -781,52 +981,260 @@ Expected response body:
|
|
|
781
981
|
|
|
782
982
|
```json
|
|
783
983
|
{
|
|
784
|
-
"value":
|
|
984
|
+
"value": 36
|
|
785
985
|
}
|
|
786
986
|
```
|
|
787
987
|
|
|
788
|
-
###
|
|
789
|
-
|
|
790
|
-
- Endpoint: `put /parameters/basic/explicit-body/simple`
|
|
791
|
-
|
|
792
|
-
Test case for simple explicit body.
|
|
793
|
-
|
|
794
|
-
Should generate request body model named `User`.
|
|
795
|
-
Should generate an operation like below:
|
|
796
|
-
|
|
797
|
-
```
|
|
798
|
-
spreadAsRequestBody(bodyParameter: BodyParameter)
|
|
799
|
-
```
|
|
988
|
+
### Encode_Duration_Property_int32SecondsLargerUnit
|
|
800
989
|
|
|
801
|
-
|
|
990
|
+
- Endpoint: `get /encode/duration/property/int32-seconds-larger-unit`
|
|
802
991
|
|
|
992
|
+
Test operation with request and response model contains a duration property with int32 seconds encode where the duration is several minutes.
|
|
993
|
+
Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(2) in C#.
|
|
803
994
|
Expected request body:
|
|
804
995
|
|
|
805
996
|
```json
|
|
806
|
-
{
|
|
997
|
+
{
|
|
998
|
+
"value": 120
|
|
999
|
+
}
|
|
807
1000
|
```
|
|
808
1001
|
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
- Endpoint: `put /parameters/basic/implicit-body/simple`
|
|
1002
|
+
Expected response body:
|
|
812
1003
|
|
|
813
|
-
|
|
1004
|
+
```json
|
|
1005
|
+
{
|
|
1006
|
+
"value": 120
|
|
1007
|
+
}
|
|
1008
|
+
```
|
|
814
1009
|
|
|
815
|
-
|
|
1010
|
+
### Encode_Duration_Property_iso8601
|
|
816
1011
|
|
|
817
|
-
|
|
818
|
-
simple(name: string)
|
|
819
|
-
```
|
|
1012
|
+
- Endpoint: `post /encode/duration/property/iso8601`
|
|
820
1013
|
|
|
1014
|
+
Test operation with request and response model contains a duration property with iso8601 encode.
|
|
821
1015
|
Expected request body:
|
|
822
1016
|
|
|
823
1017
|
```json
|
|
824
|
-
{
|
|
1018
|
+
{
|
|
1019
|
+
"value": "P40D"
|
|
1020
|
+
}
|
|
825
1021
|
```
|
|
826
1022
|
|
|
827
|
-
|
|
1023
|
+
Expected response body:
|
|
828
1024
|
|
|
829
|
-
|
|
1025
|
+
```json
|
|
1026
|
+
{
|
|
1027
|
+
"value": "P40D"
|
|
1028
|
+
}
|
|
1029
|
+
```
|
|
1030
|
+
|
|
1031
|
+
### Encode_Duration_Query_default
|
|
1032
|
+
|
|
1033
|
+
- Endpoint: `get /encode/duration/query/default`
|
|
1034
|
+
|
|
1035
|
+
Test default encode for a duration parameter.
|
|
1036
|
+
Expected query parameter `input=P40D`
|
|
1037
|
+
|
|
1038
|
+
### Encode_Duration_Query_float64Milliseconds
|
|
1039
|
+
|
|
1040
|
+
- Endpoint: `get /encode/duration/query/float64-milliseconds`
|
|
1041
|
+
|
|
1042
|
+
Test float64 milliseconds encode for a duration parameter.
|
|
1043
|
+
Expected query parameter `input=35625`
|
|
1044
|
+
|
|
1045
|
+
### Encode_Duration_Query_float64Seconds
|
|
1046
|
+
|
|
1047
|
+
- Endpoint: `get /encode/duration/query/float64-seconds`
|
|
1048
|
+
|
|
1049
|
+
Test float64 seconds encode for a duration parameter.
|
|
1050
|
+
Expected query parameter `input=35.625`
|
|
1051
|
+
|
|
1052
|
+
### Encode_Duration_Query_floatMilliseconds
|
|
1053
|
+
|
|
1054
|
+
- Endpoint: `get /encode/duration/query/float-milliseconds`
|
|
1055
|
+
|
|
1056
|
+
Test float milliseconds encode for a duration parameter.
|
|
1057
|
+
Expected query parameter `input=35625`
|
|
1058
|
+
|
|
1059
|
+
### Encode_Duration_Query_floatMillisecondsLargerUnit
|
|
1060
|
+
|
|
1061
|
+
- Endpoint: `get /encode/duration/query/float-milliseconds-larger-unit`
|
|
1062
|
+
|
|
1063
|
+
Test float milliseconds encode for a duration parameter where the duration is several minutes.
|
|
1064
|
+
Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(3.5) in C#.
|
|
1065
|
+
Expected query parameter `input=210000.0`
|
|
1066
|
+
|
|
1067
|
+
### Encode_Duration_Query_floatSeconds
|
|
1068
|
+
|
|
1069
|
+
- Endpoint: `get /encode/duration/query/float-seconds`
|
|
1070
|
+
|
|
1071
|
+
Test float seconds encode for a duration parameter.
|
|
1072
|
+
Expected query parameter `input=35.625`
|
|
1073
|
+
|
|
1074
|
+
### Encode_Duration_Query_floatSecondsLargerUnit
|
|
1075
|
+
|
|
1076
|
+
- Endpoint: `get /encode/duration/query/float-seconds-larger-unit`
|
|
1077
|
+
|
|
1078
|
+
Test float seconds encode for a duration parameter where the duration is several minutes.
|
|
1079
|
+
Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(2.5) in C#.
|
|
1080
|
+
Expected query parameter `input=150.0`
|
|
1081
|
+
|
|
1082
|
+
### Encode_Duration_Query_int32Milliseconds
|
|
1083
|
+
|
|
1084
|
+
- Endpoint: `get /encode/duration/query/int32-milliseconds`
|
|
1085
|
+
|
|
1086
|
+
Test int32 milliseconds encode for a duration parameter.
|
|
1087
|
+
Expected query parameter `input=36000`
|
|
1088
|
+
|
|
1089
|
+
### Encode_Duration_Query_int32MillisecondsArray
|
|
1090
|
+
|
|
1091
|
+
- Endpoint: `get /encode/duration/query/int32-milliseconds-array`
|
|
1092
|
+
|
|
1093
|
+
Test int32 milliseconds encode for a duration array parameter.
|
|
1094
|
+
Expected query parameter `input=36000,47000`
|
|
1095
|
+
|
|
1096
|
+
### Encode_Duration_Query_int32MillisecondsLargerUnit
|
|
1097
|
+
|
|
1098
|
+
- Endpoint: `get /encode/duration/query/int32-milliseconds-larger-unit`
|
|
1099
|
+
|
|
1100
|
+
Test int32 milliseconds encode for a duration parameter where the duration is several minutes.
|
|
1101
|
+
Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(3) in C#.
|
|
1102
|
+
Expected query parameter `input=180000`
|
|
1103
|
+
|
|
1104
|
+
### Encode_Duration_Query_int32Seconds
|
|
1105
|
+
|
|
1106
|
+
- Endpoint: `get /encode/duration/query/int32-seconds`
|
|
1107
|
+
|
|
1108
|
+
Test int32 seconds encode for a duration parameter.
|
|
1109
|
+
Expected query parameter `input=36`
|
|
1110
|
+
|
|
1111
|
+
### Encode_Duration_Query_int32SecondsArray
|
|
1112
|
+
|
|
1113
|
+
- Endpoint: `get /encode/duration/query/int32-seconds-array`
|
|
1114
|
+
|
|
1115
|
+
Test int32 seconds encode for a duration array parameter.
|
|
1116
|
+
Expected query parameter `input=36,47`
|
|
1117
|
+
|
|
1118
|
+
### Encode_Duration_Query_int32SecondsLargerUnit
|
|
1119
|
+
|
|
1120
|
+
- Endpoint: `get /encode/duration/query/int32-seconds-larger-unit`
|
|
1121
|
+
|
|
1122
|
+
Test int32 seconds encode for a duration parameter where the duration is several minutes.
|
|
1123
|
+
Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(2) in C#.
|
|
1124
|
+
Expected query parameter `input=120`
|
|
1125
|
+
|
|
1126
|
+
### Encode_Duration_Query_iso8601
|
|
1127
|
+
|
|
1128
|
+
- Endpoint: `get /encode/duration/query/iso8601`
|
|
1129
|
+
|
|
1130
|
+
Test iso8601 encode for a duration parameter.
|
|
1131
|
+
Expected query parameter `input=P40D`
|
|
1132
|
+
|
|
1133
|
+
### Encode_Numeric_Property_safeintAsString
|
|
1134
|
+
|
|
1135
|
+
- Endpoint: `post /encode/numeric/property/safeint`
|
|
1136
|
+
|
|
1137
|
+
Test operation with request and response model contains property of safeint type with string encode.
|
|
1138
|
+
Expected request body:
|
|
1139
|
+
|
|
1140
|
+
```json
|
|
1141
|
+
{
|
|
1142
|
+
"value": "10000000000"
|
|
1143
|
+
}
|
|
1144
|
+
```
|
|
1145
|
+
|
|
1146
|
+
Expected response body:
|
|
1147
|
+
|
|
1148
|
+
```json
|
|
1149
|
+
{
|
|
1150
|
+
"value": "10000000000"
|
|
1151
|
+
}
|
|
1152
|
+
```
|
|
1153
|
+
|
|
1154
|
+
### Encode_Numeric_Property_uint32AsStringOptional
|
|
1155
|
+
|
|
1156
|
+
- Endpoint: `post /encode/numeric/property/uint32`
|
|
1157
|
+
|
|
1158
|
+
Test operation with request and response model contains property of uint32 type with string encode.
|
|
1159
|
+
Expected request body:
|
|
1160
|
+
|
|
1161
|
+
```json
|
|
1162
|
+
{
|
|
1163
|
+
"value": "1"
|
|
1164
|
+
}
|
|
1165
|
+
```
|
|
1166
|
+
|
|
1167
|
+
Expected response body:
|
|
1168
|
+
|
|
1169
|
+
```json
|
|
1170
|
+
{
|
|
1171
|
+
"value": "1"
|
|
1172
|
+
}
|
|
1173
|
+
```
|
|
1174
|
+
|
|
1175
|
+
### Encode_Numeric_Property_uint8AsString
|
|
1176
|
+
|
|
1177
|
+
- Endpoint: `post /encode/numeric/property/uint8`
|
|
1178
|
+
|
|
1179
|
+
Test operation with request and response model contains property of uint8 type with string encode.
|
|
1180
|
+
Expected request body:
|
|
1181
|
+
|
|
1182
|
+
```json
|
|
1183
|
+
{
|
|
1184
|
+
"value": "255"
|
|
1185
|
+
}
|
|
1186
|
+
```
|
|
1187
|
+
|
|
1188
|
+
Expected response body:
|
|
1189
|
+
|
|
1190
|
+
```json
|
|
1191
|
+
{
|
|
1192
|
+
"value": "255"
|
|
1193
|
+
}
|
|
1194
|
+
```
|
|
1195
|
+
|
|
1196
|
+
### Parameters_Basic_ExplicitBody_simple
|
|
1197
|
+
|
|
1198
|
+
- Endpoint: `put /parameters/basic/explicit-body/simple`
|
|
1199
|
+
|
|
1200
|
+
Test case for simple explicit body.
|
|
1201
|
+
|
|
1202
|
+
Should generate request body model named `User`.
|
|
1203
|
+
Should generate an operation like below:
|
|
1204
|
+
|
|
1205
|
+
```
|
|
1206
|
+
spreadAsRequestBody(bodyParameter: BodyParameter)
|
|
1207
|
+
```
|
|
1208
|
+
|
|
1209
|
+
Note the parameter name is guessed from the model name and it may vary by language.
|
|
1210
|
+
|
|
1211
|
+
Expected request body:
|
|
1212
|
+
|
|
1213
|
+
```json
|
|
1214
|
+
{ "name": "foo" }
|
|
1215
|
+
```
|
|
1216
|
+
|
|
1217
|
+
### Parameters_Basic_ImplicitBody_simple
|
|
1218
|
+
|
|
1219
|
+
- Endpoint: `put /parameters/basic/implicit-body/simple`
|
|
1220
|
+
|
|
1221
|
+
Test case for simple implicit body.
|
|
1222
|
+
|
|
1223
|
+
Should generate an operation like below:
|
|
1224
|
+
|
|
1225
|
+
```
|
|
1226
|
+
simple(name: string)
|
|
1227
|
+
```
|
|
1228
|
+
|
|
1229
|
+
Expected request body:
|
|
1230
|
+
|
|
1231
|
+
```json
|
|
1232
|
+
{ "name": "foo" }
|
|
1233
|
+
```
|
|
1234
|
+
|
|
1235
|
+
### Parameters_BodyOptionality_OptionalExplicit
|
|
1236
|
+
|
|
1237
|
+
- Endpoints:
|
|
830
1238
|
- `post /parameters/body-optionality/optional-explicit/set`
|
|
831
1239
|
- `post /parameters/body-optionality/optional-explicit/omit`
|
|
832
1240
|
|
|
@@ -838,7 +1246,10 @@ Expected request body for `set`
|
|
|
838
1246
|
{ "name": "foo" }
|
|
839
1247
|
```
|
|
840
1248
|
|
|
1249
|
+
Expected Content-Type header: application/json
|
|
1250
|
+
|
|
841
1251
|
Expected no request body for `omit`
|
|
1252
|
+
Expected Content-Type header: must NOT be present
|
|
842
1253
|
|
|
843
1254
|
### Parameters_BodyOptionality_requiredExplicit
|
|
844
1255
|
|
|
@@ -894,11 +1305,54 @@ This test is testing sending a pipes collection format array query parameters
|
|
|
894
1305
|
|
|
895
1306
|
This test is testing sending a ssv collection format array query parameters
|
|
896
1307
|
|
|
897
|
-
###
|
|
1308
|
+
### Parameters_Path_normal
|
|
1309
|
+
|
|
1310
|
+
- Endpoint: `get /parameters/path/normal/{name}`
|
|
1311
|
+
|
|
1312
|
+
Test case for normal path parameter.
|
|
1313
|
+
|
|
1314
|
+
Should generate an operation like below:
|
|
1315
|
+
|
|
1316
|
+
```
|
|
1317
|
+
normal(name: string)
|
|
1318
|
+
```
|
|
1319
|
+
|
|
1320
|
+
Expected request path:
|
|
1321
|
+
|
|
1322
|
+
```
|
|
1323
|
+
/normal/foo
|
|
1324
|
+
```
|
|
898
1325
|
|
|
899
|
-
|
|
1326
|
+
### Parameters_Path_optional
|
|
900
1327
|
|
|
901
|
-
|
|
1328
|
+
- Endpoint: `get /parameters/path/optional{/name}`
|
|
1329
|
+
|
|
1330
|
+
Test case for optional path parameter.
|
|
1331
|
+
|
|
1332
|
+
Should generate an operation like below:
|
|
1333
|
+
|
|
1334
|
+
```
|
|
1335
|
+
optional(name?: string)
|
|
1336
|
+
```
|
|
1337
|
+
|
|
1338
|
+
Expected two request:
|
|
1339
|
+
First request path:
|
|
1340
|
+
|
|
1341
|
+
```
|
|
1342
|
+
/optional
|
|
1343
|
+
```
|
|
1344
|
+
|
|
1345
|
+
Second request path:
|
|
1346
|
+
|
|
1347
|
+
```
|
|
1348
|
+
/optional/foo
|
|
1349
|
+
```
|
|
1350
|
+
|
|
1351
|
+
### Parameters_Query_Constant_post
|
|
1352
|
+
|
|
1353
|
+
- Endpoint: `post /parameters/query/constant`
|
|
1354
|
+
|
|
1355
|
+
Expect to handle a constant value for query and mock api returns nothing
|
|
902
1356
|
|
|
903
1357
|
### Parameters_Spread_Alias_spreadAsRequestBody
|
|
904
1358
|
|
|
@@ -1165,7 +1619,7 @@ Expected input body:
|
|
|
1165
1619
|
}
|
|
1166
1620
|
],
|
|
1167
1621
|
"intValue": 1,
|
|
1168
|
-
"floatValue": 1.
|
|
1622
|
+
"floatValue": 1.25,
|
|
1169
1623
|
"innerModel": {
|
|
1170
1624
|
"name": "InnerMadge",
|
|
1171
1625
|
"description": "innerDesc"
|
|
@@ -1193,7 +1647,7 @@ Expected response body:
|
|
|
1193
1647
|
}
|
|
1194
1648
|
],
|
|
1195
1649
|
"intValue": 1,
|
|
1196
|
-
"floatValue": 1.
|
|
1650
|
+
"floatValue": 1.25,
|
|
1197
1651
|
"innerModel": {
|
|
1198
1652
|
"name": "InnerMadge",
|
|
1199
1653
|
"description": "innerDesc"
|
|
@@ -1309,9 +1763,9 @@ Expected request body is a string '{cat}'.
|
|
|
1309
1763
|
Expect request (
|
|
1310
1764
|
|
|
1311
1765
|
- according to https://datatracker.ietf.org/doc/html/rfc7578#section-4.4, content-type of file part shall be labeled with
|
|
1312
|
-
appropriate media type,
|
|
1766
|
+
appropriate media type, server will check it; content-type of other parts is optional, server will ignore it.
|
|
1313
1767
|
- according to https://datatracker.ietf.org/doc/html/rfc7578#section-4.2, filename of file part SHOULD be supplied.
|
|
1314
|
-
If there are duplicated filename in same filedName,
|
|
1768
|
+
If there are duplicated filename in same filedName, server can't parse them all.
|
|
1315
1769
|
):
|
|
1316
1770
|
|
|
1317
1771
|
```
|
|
@@ -1334,9 +1788,9 @@ Content-Type: application/octet-stream;
|
|
|
1334
1788
|
Expect request (
|
|
1335
1789
|
|
|
1336
1790
|
- according to https://datatracker.ietf.org/doc/html/rfc7578#section-4.4, content-type of file part shall be labeled with
|
|
1337
|
-
appropriate media type,
|
|
1791
|
+
appropriate media type, server will check it; content-type of other parts is optional, server will ignore it.
|
|
1338
1792
|
- according to https://datatracker.ietf.org/doc/html/rfc7578#section-4.2, filename of file part SHOULD be supplied.
|
|
1339
|
-
If there are duplicated filename in same fieldName,
|
|
1793
|
+
If there are duplicated filename in same fieldName, server can't parse them all.
|
|
1340
1794
|
):
|
|
1341
1795
|
|
|
1342
1796
|
```
|
|
@@ -1364,9 +1818,9 @@ Content-Type: application/octet-stream;
|
|
|
1364
1818
|
Expect request (
|
|
1365
1819
|
|
|
1366
1820
|
- according to https://datatracker.ietf.org/doc/html/rfc7578#section-4.4, content-type of file part shall be labeled with
|
|
1367
|
-
appropriate media type,
|
|
1821
|
+
appropriate media type, server will check it; content-type of other parts is optional, server will ignore it.
|
|
1368
1822
|
- according to https://datatracker.ietf.org/doc/html/rfc7578#section-4.2, filename of file part SHOULD be supplied.
|
|
1369
|
-
If there are duplicated filename in same fieldName,
|
|
1823
|
+
If there are duplicated filename in same fieldName, server can't parse them all.
|
|
1370
1824
|
):
|
|
1371
1825
|
|
|
1372
1826
|
```
|
|
@@ -1423,9 +1877,9 @@ Content-Type: image/jpg
|
|
|
1423
1877
|
Expect request (
|
|
1424
1878
|
|
|
1425
1879
|
- according to https://datatracker.ietf.org/doc/html/rfc7578#section-4.4, content-type of file part shall be labeled with
|
|
1426
|
-
appropriate media type,
|
|
1880
|
+
appropriate media type, server will check it; content-type of other parts is optional, server will ignore it.
|
|
1427
1881
|
- according to https://datatracker.ietf.org/doc/html/rfc7578#section-4.2, filename of file part SHOULD be supplied.
|
|
1428
|
-
If there are duplicated filename in same fieldName,
|
|
1882
|
+
If there are duplicated filename in same fieldName, server can't parse them all.
|
|
1429
1883
|
):
|
|
1430
1884
|
|
|
1431
1885
|
```
|
|
@@ -1533,7 +1987,7 @@ Content-Type: application/octet-stream
|
|
|
1533
1987
|
|
|
1534
1988
|
- Endpoint: `post /multipart/form-data/complex-parts-with-httppart`
|
|
1535
1989
|
|
|
1536
|
-
For File part, filename will not be checked but it is necessary otherwise
|
|
1990
|
+
For File part, filename will not be checked but it is necessary otherwise server can't parse it;
|
|
1537
1991
|
content-type will be checked with value "application/octet-stream". Expect request:
|
|
1538
1992
|
|
|
1539
1993
|
```
|
|
@@ -1606,9 +2060,9 @@ Content-Type: text/plain
|
|
|
1606
2060
|
Expect request (
|
|
1607
2061
|
|
|
1608
2062
|
- according to https://datatracker.ietf.org/doc/html/rfc7578#section-4.4, content-type of file part shall be labeled with
|
|
1609
|
-
appropriate media type,
|
|
2063
|
+
appropriate media type, server will check it; content-type of other parts is optional, server will ignore it.
|
|
1610
2064
|
- according to https://datatracker.ietf.org/doc/html/rfc7578#section-4.2, filename of file part SHOULD be supplied.
|
|
1611
|
-
If there are duplicated filename in same fieldName,
|
|
2065
|
+
If there are duplicated filename in same fieldName, server can't parse them all.
|
|
1612
2066
|
):
|
|
1613
2067
|
|
|
1614
2068
|
```
|
|
@@ -1638,9 +2092,9 @@ Content-Type: application/octet-stream
|
|
|
1638
2092
|
Please send request twice, first time with only profileImage, second time with both profileImage and picture(
|
|
1639
2093
|
|
|
1640
2094
|
- according to https://datatracker.ietf.org/doc/html/rfc7578#section-4.4, content-type of file part shall be labeled with
|
|
1641
|
-
appropriate media type,
|
|
2095
|
+
appropriate media type, server will check it; content-type of other parts is optional, server will ignore it.
|
|
1642
2096
|
- according to https://datatracker.ietf.org/doc/html/rfc7578#section-4.2, filename of file part SHOULD be supplied.
|
|
1643
|
-
If there are duplicated filename in same fieldName,
|
|
2097
|
+
If there are duplicated filename in same fieldName, server can't parse them all.
|
|
1644
2098
|
):
|
|
1645
2099
|
|
|
1646
2100
|
```
|
|
@@ -1661,6 +2115,343 @@ Content-Type: application/octet-stream
|
|
|
1661
2115
|
--abcde12345--
|
|
1662
2116
|
```
|
|
1663
2117
|
|
|
2118
|
+
### Payload_Pageable_PageSize_listWithoutContinuation
|
|
2119
|
+
|
|
2120
|
+
- Endpoint: `get /payload/pageable/pagesize/without-continuation`
|
|
2121
|
+
|
|
2122
|
+
Test case for simple pagination without nextlink or continuationToken.
|
|
2123
|
+
|
|
2124
|
+
Single request:
|
|
2125
|
+
Expected route: /payload/pageable/pagesize/without-continuation
|
|
2126
|
+
|
|
2127
|
+
Expected response body:
|
|
2128
|
+
|
|
2129
|
+
```json
|
|
2130
|
+
{
|
|
2131
|
+
"pets": [
|
|
2132
|
+
{ "id": "1", "name": "dog" },
|
|
2133
|
+
{ "id": "2", "name": "cat" },
|
|
2134
|
+
{ "id": "3", "name": "bird" },
|
|
2135
|
+
{ "id": "4", "name": "fish" }
|
|
2136
|
+
]
|
|
2137
|
+
}
|
|
2138
|
+
```
|
|
2139
|
+
|
|
2140
|
+
### Payload_Pageable_PageSize_listWithPageSize
|
|
2141
|
+
|
|
2142
|
+
- Endpoint: `get /payload/pageable/pagesize/list`
|
|
2143
|
+
|
|
2144
|
+
Test case for pagination with a regular @pageSize parameter.
|
|
2145
|
+
|
|
2146
|
+
Two requests need to be tested:
|
|
2147
|
+
|
|
2148
|
+
1. Request with pageSize=2:
|
|
2149
|
+
Expected route: /payload/pageable/pagesize/list?pageSize=2
|
|
2150
|
+
|
|
2151
|
+
Expected response body:
|
|
2152
|
+
|
|
2153
|
+
```json
|
|
2154
|
+
{
|
|
2155
|
+
"pets": [
|
|
2156
|
+
{ "id": "1", "name": "dog" },
|
|
2157
|
+
{ "id": "2", "name": "cat" }
|
|
2158
|
+
]
|
|
2159
|
+
}
|
|
2160
|
+
```
|
|
2161
|
+
|
|
2162
|
+
2. Request with pageSize=4:
|
|
2163
|
+
Expected route: /payload/pageable/pagesize/list?pageSize=4
|
|
2164
|
+
|
|
2165
|
+
Expected response body:
|
|
2166
|
+
|
|
2167
|
+
```json
|
|
2168
|
+
{
|
|
2169
|
+
"pets": [
|
|
2170
|
+
{ "id": "1", "name": "dog" },
|
|
2171
|
+
{ "id": "2", "name": "cat" },
|
|
2172
|
+
{ "id": "3", "name": "bird" },
|
|
2173
|
+
{ "id": "4", "name": "fish" }
|
|
2174
|
+
]
|
|
2175
|
+
}
|
|
2176
|
+
```
|
|
2177
|
+
|
|
2178
|
+
### Payload_Pageable_ServerDrivenPagination_ContinuationToken_requestHeaderNestedResponseBody
|
|
2179
|
+
|
|
2180
|
+
- Endpoint: `get /payload/pageable/server-driven-pagination/continuationtoken/request-header-nested-response-body`
|
|
2181
|
+
|
|
2182
|
+
Test case for using continuation token as pagination with nested response structure. Continuation token is passed in the request header and nested within response body.
|
|
2183
|
+
|
|
2184
|
+
Two requests need to be tested.
|
|
2185
|
+
|
|
2186
|
+
1. Initial request:
|
|
2187
|
+
Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-header-nested-response-body?bar=bar
|
|
2188
|
+
|
|
2189
|
+
Expected request header:
|
|
2190
|
+
foo=foo
|
|
2191
|
+
|
|
2192
|
+
Expected response body:
|
|
2193
|
+
|
|
2194
|
+
```json
|
|
2195
|
+
{
|
|
2196
|
+
"nestedItems": {
|
|
2197
|
+
"pets": [
|
|
2198
|
+
{ "id": "1", "name": "dog" },
|
|
2199
|
+
{ "id": "2", "name": "cat" }
|
|
2200
|
+
]
|
|
2201
|
+
},
|
|
2202
|
+
"next": {
|
|
2203
|
+
"nextToken": "page2"
|
|
2204
|
+
}
|
|
2205
|
+
}
|
|
2206
|
+
```
|
|
2207
|
+
|
|
2208
|
+
2. Next page request:
|
|
2209
|
+
Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-header-nested-response-body?bar=bar
|
|
2210
|
+
|
|
2211
|
+
Expected request header:
|
|
2212
|
+
token=page2
|
|
2213
|
+
foo=foo
|
|
2214
|
+
|
|
2215
|
+
Expected response body:
|
|
2216
|
+
|
|
2217
|
+
```json
|
|
2218
|
+
{
|
|
2219
|
+
"nestedItems": {
|
|
2220
|
+
"pets": [
|
|
2221
|
+
{ "id": "3", "name": "bird" },
|
|
2222
|
+
{ "id": "4", "name": "fish" }
|
|
2223
|
+
]
|
|
2224
|
+
}
|
|
2225
|
+
}
|
|
2226
|
+
```
|
|
2227
|
+
|
|
2228
|
+
### Payload_Pageable_ServerDrivenPagination_ContinuationToken_requestHeaderResponseBody
|
|
2229
|
+
|
|
2230
|
+
- Endpoint: `get /payload/pageable/server-driven-pagination/continuationtoken/request-header-response-body`
|
|
2231
|
+
|
|
2232
|
+
Test case for using continuation token as pagination. Continuation token is passed in the request header and response body.
|
|
2233
|
+
|
|
2234
|
+
Two requests need to be tested.
|
|
2235
|
+
|
|
2236
|
+
1. Initial request:
|
|
2237
|
+
Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-header-response-body?bar=bar
|
|
2238
|
+
|
|
2239
|
+
Expected request header:
|
|
2240
|
+
foo=foo
|
|
2241
|
+
|
|
2242
|
+
Expected response body:
|
|
2243
|
+
|
|
2244
|
+
```json
|
|
2245
|
+
{
|
|
2246
|
+
"pets": [
|
|
2247
|
+
{ "id": "1", "name": "dog" },
|
|
2248
|
+
{ "id": "2", "name": "cat" }
|
|
2249
|
+
],
|
|
2250
|
+
"nextToken": "page2"
|
|
2251
|
+
}
|
|
2252
|
+
```
|
|
2253
|
+
|
|
2254
|
+
2. Next page request:
|
|
2255
|
+
Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-header-response-body?bar=bar
|
|
2256
|
+
|
|
2257
|
+
Expected request header:
|
|
2258
|
+
token=page2
|
|
2259
|
+
foo=foo
|
|
2260
|
+
|
|
2261
|
+
Expected response body:
|
|
2262
|
+
|
|
2263
|
+
```json
|
|
2264
|
+
{
|
|
2265
|
+
"pets": [
|
|
2266
|
+
{ "id": "3", "name": "bird" },
|
|
2267
|
+
{ "id": "4", "name": "fish" }
|
|
2268
|
+
]
|
|
2269
|
+
}
|
|
2270
|
+
```
|
|
2271
|
+
|
|
2272
|
+
### Payload_Pageable_ServerDrivenPagination_ContinuationToken_requestHeaderResponseHeader
|
|
2273
|
+
|
|
2274
|
+
- Endpoint: `get /payload/pageable/server-driven-pagination/continuationtoken/request-header-response-header`
|
|
2275
|
+
|
|
2276
|
+
Test case for using continuation token as pagination. Continuation token is passed in the request header and response header.
|
|
2277
|
+
|
|
2278
|
+
Two requests need to be tested.
|
|
2279
|
+
|
|
2280
|
+
1. Initial request:
|
|
2281
|
+
Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-header-response-header?bar=bar
|
|
2282
|
+
|
|
2283
|
+
Expected request header:
|
|
2284
|
+
foo=foo
|
|
2285
|
+
|
|
2286
|
+
Expected response body:
|
|
2287
|
+
|
|
2288
|
+
```json
|
|
2289
|
+
{
|
|
2290
|
+
"pets": [
|
|
2291
|
+
{ "id": "1", "name": "dog" },
|
|
2292
|
+
{ "id": "2", "name": "cat" }
|
|
2293
|
+
]
|
|
2294
|
+
}
|
|
2295
|
+
```
|
|
2296
|
+
|
|
2297
|
+
Expected response header:
|
|
2298
|
+
next-token=page2
|
|
2299
|
+
|
|
2300
|
+
2. Next page request:
|
|
2301
|
+
Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-header-response-header?bar=bar
|
|
2302
|
+
|
|
2303
|
+
Expected request header:
|
|
2304
|
+
token=page2
|
|
2305
|
+
foo=foo
|
|
2306
|
+
|
|
2307
|
+
Expected response body:
|
|
2308
|
+
|
|
2309
|
+
```json
|
|
2310
|
+
{
|
|
2311
|
+
"pets": [
|
|
2312
|
+
{ "id": "3", "name": "bird" },
|
|
2313
|
+
{ "id": "4", "name": "fish" }
|
|
2314
|
+
]
|
|
2315
|
+
}
|
|
2316
|
+
```
|
|
2317
|
+
|
|
2318
|
+
### Payload_Pageable_ServerDrivenPagination_ContinuationToken_requestQueryNestedResponseBody
|
|
2319
|
+
|
|
2320
|
+
- Endpoint: `get /payload/pageable/server-driven-pagination/continuationtoken/request-query-nested-response-body`
|
|
2321
|
+
|
|
2322
|
+
Test case for using continuation token as pagination with nested response structure. Continuation token is passed in the request query and nested within response body.
|
|
2323
|
+
|
|
2324
|
+
Two requests need to be tested.
|
|
2325
|
+
|
|
2326
|
+
1. Initial request:
|
|
2327
|
+
Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-query-nested-response-body?bar=bar
|
|
2328
|
+
|
|
2329
|
+
Expected request header:
|
|
2330
|
+
foo=foo
|
|
2331
|
+
|
|
2332
|
+
Expected response body:
|
|
2333
|
+
|
|
2334
|
+
```json
|
|
2335
|
+
{
|
|
2336
|
+
"nestedItems": {
|
|
2337
|
+
"pets": [
|
|
2338
|
+
{ "id": "1", "name": "dog" },
|
|
2339
|
+
{ "id": "2", "name": "cat" }
|
|
2340
|
+
]
|
|
2341
|
+
},
|
|
2342
|
+
"nestedNext": {
|
|
2343
|
+
"nextToken": "page2"
|
|
2344
|
+
}
|
|
2345
|
+
}
|
|
2346
|
+
```
|
|
2347
|
+
|
|
2348
|
+
2. Next page request:
|
|
2349
|
+
Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-query-nested-response-body?bar=bar&token=page2
|
|
2350
|
+
|
|
2351
|
+
Expected request header:
|
|
2352
|
+
foo=foo
|
|
2353
|
+
|
|
2354
|
+
Expected response body:
|
|
2355
|
+
|
|
2356
|
+
```json
|
|
2357
|
+
{
|
|
2358
|
+
"nestedItems": {
|
|
2359
|
+
"pets": [
|
|
2360
|
+
{ "id": "3", "name": "bird" },
|
|
2361
|
+
{ "id": "4", "name": "fish" }
|
|
2362
|
+
]
|
|
2363
|
+
}
|
|
2364
|
+
}
|
|
2365
|
+
```
|
|
2366
|
+
|
|
2367
|
+
### Payload_Pageable_ServerDrivenPagination_ContinuationToken_requestQueryResponseBody
|
|
2368
|
+
|
|
2369
|
+
- Endpoint: `get /payload/pageable/server-driven-pagination/continuationtoken/request-query-response-body`
|
|
2370
|
+
|
|
2371
|
+
Test case for using continuation token as pagination. Continuation token is passed in the request query and response body.
|
|
2372
|
+
|
|
2373
|
+
Two requests need to be tested.
|
|
2374
|
+
|
|
2375
|
+
1. Initial request:
|
|
2376
|
+
Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-query-response-body?bar=bar
|
|
2377
|
+
|
|
2378
|
+
Expected request header:
|
|
2379
|
+
foo=foo
|
|
2380
|
+
|
|
2381
|
+
Expected response body:
|
|
2382
|
+
|
|
2383
|
+
```json
|
|
2384
|
+
{
|
|
2385
|
+
"pets": [
|
|
2386
|
+
{ "id": "1", "name": "dog" },
|
|
2387
|
+
{ "id": "2", "name": "cat" }
|
|
2388
|
+
],
|
|
2389
|
+
"nextToken": "page2"
|
|
2390
|
+
}
|
|
2391
|
+
```
|
|
2392
|
+
|
|
2393
|
+
2. Next page request:
|
|
2394
|
+
Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-query-response-body?bar=bar&token=page2
|
|
2395
|
+
|
|
2396
|
+
Expected request header:
|
|
2397
|
+
foo=foo
|
|
2398
|
+
|
|
2399
|
+
Expected response body:
|
|
2400
|
+
|
|
2401
|
+
```json
|
|
2402
|
+
{
|
|
2403
|
+
"pets": [
|
|
2404
|
+
{ "id": "3", "name": "bird" },
|
|
2405
|
+
{ "id": "4", "name": "fish" }
|
|
2406
|
+
]
|
|
2407
|
+
}
|
|
2408
|
+
```
|
|
2409
|
+
|
|
2410
|
+
### Payload_Pageable_ServerDrivenPagination_ContinuationToken_requestQueryResponseHeader
|
|
2411
|
+
|
|
2412
|
+
- Endpoint: `get /payload/pageable/server-driven-pagination/continuationtoken/request-query-response-header`
|
|
2413
|
+
|
|
2414
|
+
Test case for using continuation token as pagination. Continuation token is passed in the request query and response header.
|
|
2415
|
+
|
|
2416
|
+
Two requests need to be tested.
|
|
2417
|
+
|
|
2418
|
+
1. Initial request:
|
|
2419
|
+
Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-query-response-header?bar=bar
|
|
2420
|
+
|
|
2421
|
+
Expected request header:
|
|
2422
|
+
foo=foo
|
|
2423
|
+
|
|
2424
|
+
Expected response body:
|
|
2425
|
+
|
|
2426
|
+
```json
|
|
2427
|
+
{
|
|
2428
|
+
"pets": [
|
|
2429
|
+
{ "id": "1", "name": "dog" },
|
|
2430
|
+
{ "id": "2", "name": "cat" }
|
|
2431
|
+
]
|
|
2432
|
+
}
|
|
2433
|
+
```
|
|
2434
|
+
|
|
2435
|
+
Expected response header:
|
|
2436
|
+
next-token=page2
|
|
2437
|
+
|
|
2438
|
+
2. Next page request:
|
|
2439
|
+
Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-query-response-header?bar=bar&token=page2
|
|
2440
|
+
|
|
2441
|
+
Expected request header:
|
|
2442
|
+
foo=foo
|
|
2443
|
+
|
|
2444
|
+
Expected response body:
|
|
2445
|
+
|
|
2446
|
+
```json
|
|
2447
|
+
{
|
|
2448
|
+
"pets": [
|
|
2449
|
+
{ "id": "3", "name": "bird" },
|
|
2450
|
+
{ "id": "4", "name": "fish" }
|
|
2451
|
+
]
|
|
2452
|
+
}
|
|
2453
|
+
```
|
|
2454
|
+
|
|
1664
2455
|
### Payload_Pageable_ServerDrivenPagination_link
|
|
1665
2456
|
|
|
1666
2457
|
- Endpoint: `get /payload/pageable/server-driven-pagination/link`
|
|
@@ -1679,9 +2470,7 @@ Two requests need to be tested.
|
|
|
1679
2470
|
{ "id": "1", "name": "dog" },
|
|
1680
2471
|
{ "id": "2", "name": "cat" }
|
|
1681
2472
|
],
|
|
1682
|
-
"
|
|
1683
|
-
"next": "http://[host]:[port]/payload/pageable/server-driven-pagination/link/nextPage"
|
|
1684
|
-
}
|
|
2473
|
+
"next": "http://[host]:[port]/payload/pageable/server-driven-pagination/link/nextPage"
|
|
1685
2474
|
}
|
|
1686
2475
|
```
|
|
1687
2476
|
|
|
@@ -1698,6 +2487,82 @@ Two requests need to be tested.
|
|
|
1698
2487
|
}
|
|
1699
2488
|
```
|
|
1700
2489
|
|
|
2490
|
+
### Payload_Pageable_ServerDrivenPagination_linkString
|
|
2491
|
+
|
|
2492
|
+
- Endpoint: `get /payload/pageable/server-driven-pagination/link-string`
|
|
2493
|
+
|
|
2494
|
+
Test case for using link as pagination with string nextLink.
|
|
2495
|
+
|
|
2496
|
+
Two requests need to be tested.
|
|
2497
|
+
|
|
2498
|
+
1. Initial request:
|
|
2499
|
+
Expected route: /payload/pageable/server-driven-pagination/link-string
|
|
2500
|
+
Expected response body:
|
|
2501
|
+
|
|
2502
|
+
```json
|
|
2503
|
+
{
|
|
2504
|
+
"pets": [
|
|
2505
|
+
{ "id": "1", "name": "dog" },
|
|
2506
|
+
{ "id": "2", "name": "cat" }
|
|
2507
|
+
],
|
|
2508
|
+
"next": "http://[host]:[port]/payload/pageable/server-driven-pagination/link-string/nextPage"
|
|
2509
|
+
}
|
|
2510
|
+
```
|
|
2511
|
+
|
|
2512
|
+
2. Next page request:
|
|
2513
|
+
Expected route: /payload/pageable/server-driven-pagination/link-string/nextPage
|
|
2514
|
+
Expected response body:
|
|
2515
|
+
|
|
2516
|
+
```json
|
|
2517
|
+
{
|
|
2518
|
+
"pets": [
|
|
2519
|
+
{ "id": "3", "name": "bird" },
|
|
2520
|
+
{ "id": "4", "name": "fish" }
|
|
2521
|
+
]
|
|
2522
|
+
}
|
|
2523
|
+
```
|
|
2524
|
+
|
|
2525
|
+
### Payload_Pageable_ServerDrivenPagination_nestedLink
|
|
2526
|
+
|
|
2527
|
+
- Endpoint: `get /payload/pageable/server-driven-pagination/nested-link`
|
|
2528
|
+
|
|
2529
|
+
Test case for using link as pagination with nested structure.
|
|
2530
|
+
|
|
2531
|
+
Two requests need to be tested.
|
|
2532
|
+
|
|
2533
|
+
1. Initial request:
|
|
2534
|
+
Expected route: /payload/pageable/server-driven-pagination/nested-link
|
|
2535
|
+
Expected response body:
|
|
2536
|
+
|
|
2537
|
+
```json
|
|
2538
|
+
{
|
|
2539
|
+
"nestedItems": {
|
|
2540
|
+
"pets": [
|
|
2541
|
+
{ "id": "1", "name": "dog" },
|
|
2542
|
+
{ "id": "2", "name": "cat" }
|
|
2543
|
+
]
|
|
2544
|
+
},
|
|
2545
|
+
"nestedNext": {
|
|
2546
|
+
"next": "http://[host]:[port]/payload/pageable/server-driven-pagination/nested-link/nextPage"
|
|
2547
|
+
}
|
|
2548
|
+
}
|
|
2549
|
+
```
|
|
2550
|
+
|
|
2551
|
+
2. Next page request:
|
|
2552
|
+
Expected route: /payload/pageable/server-driven-pagination/nested-link/nextPage
|
|
2553
|
+
Expected response body:
|
|
2554
|
+
|
|
2555
|
+
```json
|
|
2556
|
+
{
|
|
2557
|
+
"nestedItems": {
|
|
2558
|
+
"pets": [
|
|
2559
|
+
{ "id": "3", "name": "bird" },
|
|
2560
|
+
{ "id": "4", "name": "fish" }
|
|
2561
|
+
]
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2564
|
+
```
|
|
2565
|
+
|
|
1701
2566
|
### Payload_Xml_ModelWithArrayOfModelValue_get
|
|
1702
2567
|
|
|
1703
2568
|
- Endpoint: `get /payload/xml/modelWithArrayOfModel`
|
|
@@ -2084,6 +2949,40 @@ Expected request body:
|
|
|
2084
2949
|
</SimpleModel>
|
|
2085
2950
|
```
|
|
2086
2951
|
|
|
2952
|
+
### Response_StatusCodeRange_errorResponseStatusCode404
|
|
2953
|
+
|
|
2954
|
+
- Endpoint: `get /response/status-code-range/error-response-status-code-404`
|
|
2955
|
+
|
|
2956
|
+
Test case for range of status code in error response.
|
|
2957
|
+
|
|
2958
|
+
Verify that the result of the API is an error/exception in client, and the error response can be de-serialized to NotFoundError model (instead of Standard4XXError model).
|
|
2959
|
+
|
|
2960
|
+
Expected status code 404 and response body:
|
|
2961
|
+
|
|
2962
|
+
```json
|
|
2963
|
+
{
|
|
2964
|
+
"code": "not-found",
|
|
2965
|
+
"resourceId": "resource1"
|
|
2966
|
+
}
|
|
2967
|
+
```
|
|
2968
|
+
|
|
2969
|
+
### Response_StatusCodeRange_errorResponseStatusCodeInRange
|
|
2970
|
+
|
|
2971
|
+
- Endpoint: `get /response/status-code-range/error-response-status-code-in-range`
|
|
2972
|
+
|
|
2973
|
+
Test case for range of status code in error response.
|
|
2974
|
+
|
|
2975
|
+
Verify that the result of the API is an error/exception in client, and the error response can be de-serialized to ErrorInRange model (instead of DefaultError model).
|
|
2976
|
+
|
|
2977
|
+
Expected status code 494 and response body:
|
|
2978
|
+
|
|
2979
|
+
```json
|
|
2980
|
+
{
|
|
2981
|
+
"code": "request-header-too-large",
|
|
2982
|
+
"message": "Request header too large"
|
|
2983
|
+
}
|
|
2984
|
+
```
|
|
2985
|
+
|
|
2087
2986
|
### Routes_fixed
|
|
2088
2987
|
|
|
2089
2988
|
- Endpoint: `get /routes/fixed`
|
|
@@ -2120,7 +3019,7 @@ Expected path: /routes/path/explicit/a
|
|
|
2120
3019
|
|
|
2121
3020
|
Test label expansion with explode: true when passed an array value.
|
|
2122
3021
|
Param value: ["a","b"]
|
|
2123
|
-
Expected path: /routes/label/explode/array.a.b
|
|
3022
|
+
Expected path: /routes/path/label/explode/array.a.b
|
|
2124
3023
|
|
|
2125
3024
|
### Routes_PathParameters_LabelExpansion_Explode_primitive
|
|
2126
3025
|
|
|
@@ -2128,7 +3027,7 @@ Expected path: /routes/label/explode/array.a.b
|
|
|
2128
3027
|
|
|
2129
3028
|
Test label expansion with explode: true when passed a primitive value.
|
|
2130
3029
|
Param value: "a"
|
|
2131
|
-
Expected path: /routes/label/explode/primitive.a
|
|
3030
|
+
Expected path: /routes/path/label/explode/primitive.a
|
|
2132
3031
|
|
|
2133
3032
|
### Routes_PathParameters_LabelExpansion_Explode_record
|
|
2134
3033
|
|
|
@@ -2136,7 +3035,7 @@ Expected path: /routes/label/explode/primitive.a
|
|
|
2136
3035
|
|
|
2137
3036
|
Test label expansion with explode: true when passed a record value.
|
|
2138
3037
|
Param value: {a: 1, b: 2}
|
|
2139
|
-
Expected path: /routes/label/explode/record.a=1.b=2
|
|
3038
|
+
Expected path: /routes/path/label/explode/record.a=1.b=2
|
|
2140
3039
|
|
|
2141
3040
|
### Routes_PathParameters_LabelExpansion_Standard_array
|
|
2142
3041
|
|
|
@@ -2144,7 +3043,7 @@ Expected path: /routes/label/explode/record.a=1.b=2
|
|
|
2144
3043
|
|
|
2145
3044
|
Test label expansion with explode: false when passed an array value.
|
|
2146
3045
|
Param value: ["a","b"]
|
|
2147
|
-
Expected path: /routes/label/standard/array.a,b
|
|
3046
|
+
Expected path: /routes/path/label/standard/array.a,b
|
|
2148
3047
|
|
|
2149
3048
|
### Routes_PathParameters_LabelExpansion_Standard_primitive
|
|
2150
3049
|
|
|
@@ -2152,7 +3051,7 @@ Expected path: /routes/label/standard/array.a,b
|
|
|
2152
3051
|
|
|
2153
3052
|
Test label expansion with explode: false when passed a primitive value.
|
|
2154
3053
|
Param value: "a"
|
|
2155
|
-
Expected path: /routes/label/standard/primitive.a
|
|
3054
|
+
Expected path: /routes/path/label/standard/primitive.a
|
|
2156
3055
|
|
|
2157
3056
|
### Routes_PathParameters_LabelExpansion_Standard_record
|
|
2158
3057
|
|
|
@@ -2160,7 +3059,7 @@ Expected path: /routes/label/standard/primitive.a
|
|
|
2160
3059
|
|
|
2161
3060
|
Test label expansion with explode: false when passed a record value.
|
|
2162
3061
|
Param value: {a: 1, b: 2}
|
|
2163
|
-
Expected path: /routes/label/standard/record.a,1,b,2
|
|
3062
|
+
Expected path: /routes/path/label/standard/record.a,1,b,2
|
|
2164
3063
|
|
|
2165
3064
|
### Routes_PathParameters_MatrixExpansion_Explode_array
|
|
2166
3065
|
|
|
@@ -2168,7 +3067,7 @@ Expected path: /routes/label/standard/record.a,1,b,2
|
|
|
2168
3067
|
|
|
2169
3068
|
Test matrix expansion with explode: true when passed an array value.
|
|
2170
3069
|
Param value: ["a","b"]
|
|
2171
|
-
Expected path: /routes/matrix/explode/array;a
|
|
3070
|
+
Expected path: /routes/path/matrix/explode/array;param=a;param=b
|
|
2172
3071
|
|
|
2173
3072
|
### Routes_PathParameters_MatrixExpansion_Explode_primitive
|
|
2174
3073
|
|
|
@@ -2176,7 +3075,7 @@ Expected path: /routes/matrix/explode/array;a.b
|
|
|
2176
3075
|
|
|
2177
3076
|
Test matrix expansion with explode: true when passed a primitive value.
|
|
2178
3077
|
Param value: "a"
|
|
2179
|
-
Expected path: /routes/matrix/explode/primitive;a
|
|
3078
|
+
Expected path: /routes/path/matrix/explode/primitive;param=a
|
|
2180
3079
|
|
|
2181
3080
|
### Routes_PathParameters_MatrixExpansion_Explode_record
|
|
2182
3081
|
|
|
@@ -2184,7 +3083,7 @@ Expected path: /routes/matrix/explode/primitive;a
|
|
|
2184
3083
|
|
|
2185
3084
|
Test matrix expansion with explode: true when passed a record value.
|
|
2186
3085
|
Param value: {a: 1, b: 2}
|
|
2187
|
-
Expected path: /routes/matrix/explode/record;a=1;b=2
|
|
3086
|
+
Expected path: /routes/path/matrix/explode/record;a=1;b=2
|
|
2188
3087
|
|
|
2189
3088
|
### Routes_PathParameters_MatrixExpansion_Standard_array
|
|
2190
3089
|
|
|
@@ -2192,7 +3091,7 @@ Expected path: /routes/matrix/explode/record;a=1;b=2
|
|
|
2192
3091
|
|
|
2193
3092
|
Test matrix expansion with explode: false when passed an array value.
|
|
2194
3093
|
Param value: ["a","b"]
|
|
2195
|
-
Expected path: /routes/matrix/standard/array;a
|
|
3094
|
+
Expected path: /routes/path/matrix/standard/array;param=a;param=b
|
|
2196
3095
|
|
|
2197
3096
|
### Routes_PathParameters_MatrixExpansion_Standard_primitive
|
|
2198
3097
|
|
|
@@ -2200,7 +3099,7 @@ Expected path: /routes/matrix/standard/array;a,b
|
|
|
2200
3099
|
|
|
2201
3100
|
Test matrix expansion with explode: false when passed a primitive value.
|
|
2202
3101
|
Param value: "a"
|
|
2203
|
-
Expected path: /routes/matrix/standard/primitive;a
|
|
3102
|
+
Expected path: /routes/path/matrix/standard/primitive;param=a
|
|
2204
3103
|
|
|
2205
3104
|
### Routes_PathParameters_MatrixExpansion_Standard_record
|
|
2206
3105
|
|
|
@@ -2208,7 +3107,7 @@ Expected path: /routes/matrix/standard/primitive;a
|
|
|
2208
3107
|
|
|
2209
3108
|
Test matrix expansion with explode: false when passed a record value.
|
|
2210
3109
|
Param value: {a: 1, b: 2}
|
|
2211
|
-
Expected path: /routes/matrix/standard/record;a
|
|
3110
|
+
Expected path: /routes/path/matrix/standard/record;a=1;b=2
|
|
2212
3111
|
|
|
2213
3112
|
### Routes_PathParameters_PathExpansion_Explode_array
|
|
2214
3113
|
|
|
@@ -2216,7 +3115,7 @@ Expected path: /routes/matrix/standard/record;a,1,b,2
|
|
|
2216
3115
|
|
|
2217
3116
|
Test path expansion with explode: true when passed an array value.
|
|
2218
3117
|
Param value: ["a","b"]
|
|
2219
|
-
Expected path: /routes/path/explode/array/a/b
|
|
3118
|
+
Expected path: /routes/path/path/explode/array/a/b
|
|
2220
3119
|
|
|
2221
3120
|
### Routes_PathParameters_PathExpansion_Explode_primitive
|
|
2222
3121
|
|
|
@@ -2224,7 +3123,7 @@ Expected path: /routes/path/explode/array/a/b
|
|
|
2224
3123
|
|
|
2225
3124
|
Test path expansion with explode: true when passed a primitive value.
|
|
2226
3125
|
Param value: "a"
|
|
2227
|
-
Expected path: /routes/path/explode/primitive/a
|
|
3126
|
+
Expected path: /routes/path/path/explode/primitive/a
|
|
2228
3127
|
|
|
2229
3128
|
### Routes_PathParameters_PathExpansion_Explode_record
|
|
2230
3129
|
|
|
@@ -2232,7 +3131,7 @@ Expected path: /routes/path/explode/primitive/a
|
|
|
2232
3131
|
|
|
2233
3132
|
Test path expansion with explode: true when passed a record value.
|
|
2234
3133
|
Param value: {a: 1, b: 2}
|
|
2235
|
-
Expected path: /routes/path/explode/record/a=1/b=2
|
|
3134
|
+
Expected path: /routes/path/path/explode/record/a=1/b=2
|
|
2236
3135
|
|
|
2237
3136
|
### Routes_PathParameters_PathExpansion_Standard_array
|
|
2238
3137
|
|
|
@@ -2240,7 +3139,7 @@ Expected path: /routes/path/explode/record/a=1/b=2
|
|
|
2240
3139
|
|
|
2241
3140
|
Test path expansion with explode: false when passed an array value.
|
|
2242
3141
|
Param value: ["a","b"]
|
|
2243
|
-
Expected path: /routes/path/standard/array/a,b
|
|
3142
|
+
Expected path: /routes/path/path/standard/array/a,b
|
|
2244
3143
|
|
|
2245
3144
|
### Routes_PathParameters_PathExpansion_Standard_primitive
|
|
2246
3145
|
|
|
@@ -2248,7 +3147,7 @@ Expected path: /routes/path/standard/array/a,b
|
|
|
2248
3147
|
|
|
2249
3148
|
Test path expansion with explode: false when passed a primitive value.
|
|
2250
3149
|
Param value: "a"
|
|
2251
|
-
Expected path: /routes/path/standard/primitive/a
|
|
3150
|
+
Expected path: /routes/path/path/standard/primitive/a
|
|
2252
3151
|
|
|
2253
3152
|
### Routes_PathParameters_PathExpansion_Standard_record
|
|
2254
3153
|
|
|
@@ -2256,7 +3155,7 @@ Expected path: /routes/path/standard/primitive/a
|
|
|
2256
3155
|
|
|
2257
3156
|
Test path expansion with explode: false when passed a record value.
|
|
2258
3157
|
Param value: {a: 1, b: 2}
|
|
2259
|
-
Expected path: /routes/path/standard/record/a,1,b,2
|
|
3158
|
+
Expected path: /routes/path/path/standard/record/a,1,b,2
|
|
2260
3159
|
|
|
2261
3160
|
### Routes_PathParameters_ReservedExpansion_annotation
|
|
2262
3161
|
|
|
@@ -2280,7 +3179,7 @@ Expected path: "/routes/path/reserved-expansion/template/foo/bar%20baz"
|
|
|
2280
3179
|
|
|
2281
3180
|
Test simple expansion with explode: true when passed an array value.
|
|
2282
3181
|
Param value: ["a","b"]
|
|
2283
|
-
Expected path: /routes/simple/explode/arraya.b
|
|
3182
|
+
Expected path: /routes/path/simple/explode/arraya.b
|
|
2284
3183
|
|
|
2285
3184
|
### Routes_PathParameters_SimpleExpansion_Explode_primitive
|
|
2286
3185
|
|
|
@@ -2288,7 +3187,7 @@ Expected path: /routes/simple/explode/arraya.b
|
|
|
2288
3187
|
|
|
2289
3188
|
Test simple expansion with explode: true when passed a primitive value.
|
|
2290
3189
|
Param value: "a"
|
|
2291
|
-
Expected path: /routes/simple/explode/primitivea
|
|
3190
|
+
Expected path: /routes/path/simple/explode/primitivea
|
|
2292
3191
|
|
|
2293
3192
|
### Routes_PathParameters_SimpleExpansion_Explode_record
|
|
2294
3193
|
|
|
@@ -2296,7 +3195,7 @@ Expected path: /routes/simple/explode/primitivea
|
|
|
2296
3195
|
|
|
2297
3196
|
Test simple expansion with explode: true when passed a record value.
|
|
2298
3197
|
Param value: {a: 1, b: 2}
|
|
2299
|
-
Expected path: /routes/simple/explode/recorda=1,b=2
|
|
3198
|
+
Expected path: /routes/path/simple/explode/recorda=1,b=2
|
|
2300
3199
|
|
|
2301
3200
|
### Routes_PathParameters_SimpleExpansion_Standard_array
|
|
2302
3201
|
|
|
@@ -2304,7 +3203,7 @@ Expected path: /routes/simple/explode/recorda=1,b=2
|
|
|
2304
3203
|
|
|
2305
3204
|
Test simple expansion with explode: false when passed an array value.
|
|
2306
3205
|
Param value: ["a","b"]
|
|
2307
|
-
Expected path: /routes/simple/standard/arraya,b
|
|
3206
|
+
Expected path: /routes/path/simple/standard/arraya,b
|
|
2308
3207
|
|
|
2309
3208
|
### Routes_PathParameters_SimpleExpansion_Standard_primitive
|
|
2310
3209
|
|
|
@@ -2312,7 +3211,7 @@ Expected path: /routes/simple/standard/arraya,b
|
|
|
2312
3211
|
|
|
2313
3212
|
Test simple expansion with explode: false when passed a primitive value.
|
|
2314
3213
|
Param value: "a"
|
|
2315
|
-
Expected path: /routes/simple/standard/primitivea
|
|
3214
|
+
Expected path: /routes/path/simple/standard/primitivea
|
|
2316
3215
|
|
|
2317
3216
|
### Routes_PathParameters_SimpleExpansion_Standard_record
|
|
2318
3217
|
|
|
@@ -2320,7 +3219,7 @@ Expected path: /routes/simple/standard/primitivea
|
|
|
2320
3219
|
|
|
2321
3220
|
Test simple expansion with explode: false when passed a record value.
|
|
2322
3221
|
Param value: {a: 1, b: 2}
|
|
2323
|
-
Expected path: /routes/simple/standard/recorda,1,b,2
|
|
3222
|
+
Expected path: /routes/path/simple/standard/recorda,1,b,2
|
|
2324
3223
|
|
|
2325
3224
|
### Routes_PathParameters_templateOnly
|
|
2326
3225
|
|
|
@@ -2583,6 +3482,29 @@ Expected header parameters:
|
|
|
2583
3482
|
|
|
2584
3483
|
Check we recognize Repeatability-Request-ID and Repeatability-First-Sent.
|
|
2585
3484
|
|
|
3485
|
+
### SpecialWords_ModelProperties_dictMethods
|
|
3486
|
+
|
|
3487
|
+
- Endpoint: `get /special-words/model-properties/dict-methods`
|
|
3488
|
+
|
|
3489
|
+
Verify that model properties can use names that are Python dict methods. These names (keys, items, values, etc.) may conflict with Python's dict class methods.
|
|
3490
|
+
|
|
3491
|
+
Send
|
|
3492
|
+
|
|
3493
|
+
```json
|
|
3494
|
+
{
|
|
3495
|
+
"keys": "ok",
|
|
3496
|
+
"items": "ok",
|
|
3497
|
+
"values": "ok",
|
|
3498
|
+
"popitem": "ok",
|
|
3499
|
+
"clear": "ok",
|
|
3500
|
+
"update": "ok",
|
|
3501
|
+
"setdefault": "ok",
|
|
3502
|
+
"pop": "ok",
|
|
3503
|
+
"get": "ok",
|
|
3504
|
+
"copy": "ok"
|
|
3505
|
+
}
|
|
3506
|
+
```
|
|
3507
|
+
|
|
2586
3508
|
### SpecialWords_ModelProperties_sameAsModel
|
|
2587
3509
|
|
|
2588
3510
|
- Endpoint: `get /special-words/model-properties/same-as-model`
|
|
@@ -3327,6 +4249,18 @@ Verify that the name "with" works. Send this parameter to pass with value `ok`.
|
|
|
3327
4249
|
|
|
3328
4250
|
Verify that the name "yield" works. Send this parameter to pass with value `ok`.
|
|
3329
4251
|
|
|
4252
|
+
### Streaming_Jsonl_Basic_receive
|
|
4253
|
+
|
|
4254
|
+
- Endpoint: `get /streaming/jsonl/basic/receive`
|
|
4255
|
+
|
|
4256
|
+
Basic jsonl streaming for response.
|
|
4257
|
+
|
|
4258
|
+
### Streaming_Jsonl_Basic_send
|
|
4259
|
+
|
|
4260
|
+
- Endpoint: `post /streaming/jsonl/basic/send`
|
|
4261
|
+
|
|
4262
|
+
Basic jsonl streaming for request.
|
|
4263
|
+
|
|
3330
4264
|
### Type_Array_BooleanValue_get
|
|
3331
4265
|
|
|
3332
4266
|
- Endpoint: `get /type/array/boolean`
|
|
@@ -4360,77 +5294,6 @@ Expected input body:
|
|
|
4360
5294
|
}
|
|
4361
5295
|
```
|
|
4362
5296
|
|
|
4363
|
-
### Type_Model_Templated_float32Type
|
|
4364
|
-
|
|
4365
|
-
- Endpoint: `put /type/model/templated/float32ValuesType`
|
|
4366
|
-
|
|
4367
|
-
Expected input body:
|
|
4368
|
-
|
|
4369
|
-
```json
|
|
4370
|
-
{
|
|
4371
|
-
"kind": "Float32Values",
|
|
4372
|
-
"values": [0.5],
|
|
4373
|
-
"value": 0.5
|
|
4374
|
-
}
|
|
4375
|
-
```
|
|
4376
|
-
|
|
4377
|
-
Expected response body:
|
|
4378
|
-
|
|
4379
|
-
```json
|
|
4380
|
-
{
|
|
4381
|
-
"kind": "Float32Values",
|
|
4382
|
-
"values": [0.5],
|
|
4383
|
-
"value": 0.5
|
|
4384
|
-
}
|
|
4385
|
-
```
|
|
4386
|
-
|
|
4387
|
-
### Type_Model_Templated_int32Type
|
|
4388
|
-
|
|
4389
|
-
- Endpoint: `put /type/model/templated/int32ValuesType`
|
|
4390
|
-
|
|
4391
|
-
Expected input body:
|
|
4392
|
-
|
|
4393
|
-
```json
|
|
4394
|
-
{
|
|
4395
|
-
"kind": "Int32Values",
|
|
4396
|
-
"values": [1234],
|
|
4397
|
-
"value": 1234
|
|
4398
|
-
}
|
|
4399
|
-
```
|
|
4400
|
-
|
|
4401
|
-
Expected response body:
|
|
4402
|
-
|
|
4403
|
-
```json
|
|
4404
|
-
{
|
|
4405
|
-
"kind": "Int32Values",
|
|
4406
|
-
"values": [1234],
|
|
4407
|
-
"value": 1234
|
|
4408
|
-
}
|
|
4409
|
-
```
|
|
4410
|
-
|
|
4411
|
-
### Type_Model_Templated_numericType
|
|
4412
|
-
|
|
4413
|
-
- Endpoint: `put /type/model/templated/numericType`
|
|
4414
|
-
|
|
4415
|
-
Expected input body:
|
|
4416
|
-
|
|
4417
|
-
```json
|
|
4418
|
-
{
|
|
4419
|
-
"kind": "Int32Values",
|
|
4420
|
-
"values": [1234],
|
|
4421
|
-
"value": 1234
|
|
4422
|
-
}
|
|
4423
|
-
```
|
|
4424
|
-
|
|
4425
|
-
Expected response body:
|
|
4426
|
-
|
|
4427
|
-
```json
|
|
4428
|
-
{
|
|
4429
|
-
"values": [1234],
|
|
4430
|
-
"value": 1234
|
|
4431
|
-
}
|
|
4432
|
-
```
|
|
4433
|
-
|
|
4434
5297
|
### Type_Model_Usage_input
|
|
4435
5298
|
|
|
4436
5299
|
- Endpoint: `get /type/model/usage/input`
|
|
@@ -4467,13 +5330,7 @@ Expected input body:
|
|
|
4467
5330
|
- Endpoint: `get /type/model/visibility`
|
|
4468
5331
|
|
|
4469
5332
|
Generate and receive output model with readonly properties.
|
|
4470
|
-
Expected
|
|
4471
|
-
|
|
4472
|
-
```json
|
|
4473
|
-
{
|
|
4474
|
-
"queryProp": 123
|
|
4475
|
-
}
|
|
4476
|
-
```
|
|
5333
|
+
Expected no body with `?queryProp=123`.
|
|
4477
5334
|
|
|
4478
5335
|
Expected response body:
|
|
4479
5336
|
|
|
@@ -4488,13 +5345,7 @@ Expected response body:
|
|
|
4488
5345
|
- Endpoint: `head /type/model/visibility`
|
|
4489
5346
|
|
|
4490
5347
|
Generate abd send put model with write/create properties.
|
|
4491
|
-
Expected
|
|
4492
|
-
|
|
4493
|
-
```json
|
|
4494
|
-
{
|
|
4495
|
-
"queryProp": 123
|
|
4496
|
-
}
|
|
4497
|
-
```
|
|
5348
|
+
Expected no body with `?queryProp=123`.
|
|
4498
5349
|
|
|
4499
5350
|
### Type_Model_Visibility_patchModel
|
|
4500
5351
|
|
|
@@ -5191,42 +6042,6 @@ Expected input body:
|
|
|
5191
6042
|
}
|
|
5192
6043
|
```
|
|
5193
6044
|
|
|
5194
|
-
### Type_Property_AdditionalProperties_SpreadRecordDiscriminatedUnion_get
|
|
5195
|
-
|
|
5196
|
-
- Endpoint: `get /type/property/additionalProperties/spreadRecordDiscriminatedUnion`
|
|
5197
|
-
|
|
5198
|
-
Expected response body:
|
|
5199
|
-
|
|
5200
|
-
```json
|
|
5201
|
-
{
|
|
5202
|
-
"name": "abc",
|
|
5203
|
-
"prop1": { "kind": "kind0", "fooProp": "abc" },
|
|
5204
|
-
"prop2": {
|
|
5205
|
-
"kind": "kind1",
|
|
5206
|
-
"start": "2021-01-01T00:00:00Z",
|
|
5207
|
-
"end": "2021-01-02T00:00:00Z"
|
|
5208
|
-
}
|
|
5209
|
-
}
|
|
5210
|
-
```
|
|
5211
|
-
|
|
5212
|
-
### Type_Property_AdditionalProperties_SpreadRecordDiscriminatedUnion_put
|
|
5213
|
-
|
|
5214
|
-
- Endpoint: `put /type/property/additionalProperties/spreadRecordDiscriminatedUnion`
|
|
5215
|
-
|
|
5216
|
-
Expected input body:
|
|
5217
|
-
|
|
5218
|
-
```json
|
|
5219
|
-
{
|
|
5220
|
-
"name": "abc",
|
|
5221
|
-
"prop1": { "kind": "kind0", "fooProp": "abc" },
|
|
5222
|
-
"prop2": {
|
|
5223
|
-
"kind": "kind1",
|
|
5224
|
-
"start": "2021-01-01T00:00:00Z",
|
|
5225
|
-
"end": "2021-01-02T00:00:00Z"
|
|
5226
|
-
}
|
|
5227
|
-
}
|
|
5228
|
-
```
|
|
5229
|
-
|
|
5230
6045
|
### Type_Property_AdditionalProperties_SpreadRecordNonDiscriminatedUnion_get
|
|
5231
6046
|
|
|
5232
6047
|
- Endpoint: `get /type/property/additionalProperties/spreadRecordNonDiscriminatedUnion`
|
|
@@ -6989,6 +7804,178 @@ Expect to handle a unknown type value. Mock api will return 'test'
|
|
|
6989
7804
|
|
|
6990
7805
|
Expect to send a string value. Mock api expect to receive 'test'
|
|
6991
7806
|
|
|
7807
|
+
### Type_Union_Discriminated_Envelope_Object_CustomProperties_get
|
|
7808
|
+
|
|
7809
|
+
- Endpoint: `get /type/union/discriminated/envelope/object/custom-properties`
|
|
7810
|
+
|
|
7811
|
+
Test discriminated union with custom property names.
|
|
7812
|
+
When value of query parameter "petType" is "cat" or no query parameter input, the expected response is:
|
|
7813
|
+
|
|
7814
|
+
```json
|
|
7815
|
+
{
|
|
7816
|
+
"petType": "cat",
|
|
7817
|
+
"petData": {
|
|
7818
|
+
"name": "Whiskers",
|
|
7819
|
+
"meow": true
|
|
7820
|
+
}
|
|
7821
|
+
}
|
|
7822
|
+
```
|
|
7823
|
+
|
|
7824
|
+
When it is "dog", expected response is:
|
|
7825
|
+
|
|
7826
|
+
```json
|
|
7827
|
+
{
|
|
7828
|
+
"petType": "dog",
|
|
7829
|
+
"petData": {
|
|
7830
|
+
"name": "Rex",
|
|
7831
|
+
"bark": false
|
|
7832
|
+
}
|
|
7833
|
+
}
|
|
7834
|
+
```
|
|
7835
|
+
|
|
7836
|
+
### Type_Union_Discriminated_Envelope_Object_CustomProperties_put
|
|
7837
|
+
|
|
7838
|
+
- Endpoint: `put /type/union/discriminated/envelope/object/custom-properties`
|
|
7839
|
+
|
|
7840
|
+
Test discriminated union with custom property names.
|
|
7841
|
+
Send the union as:
|
|
7842
|
+
|
|
7843
|
+
```json
|
|
7844
|
+
{
|
|
7845
|
+
"petType": "cat",
|
|
7846
|
+
"petData": {
|
|
7847
|
+
"name": "Whiskers",
|
|
7848
|
+
"meow": true
|
|
7849
|
+
}
|
|
7850
|
+
}
|
|
7851
|
+
```
|
|
7852
|
+
|
|
7853
|
+
### Type_Union_Discriminated_Envelope_Object_Default_get
|
|
7854
|
+
|
|
7855
|
+
- Endpoint: `get /type/union/discriminated/envelope/object/default`
|
|
7856
|
+
|
|
7857
|
+
Test discriminated union with envelope serialization.
|
|
7858
|
+
When value of query parameter "kind" is "cat" or no query parameter input, the expected response is:
|
|
7859
|
+
|
|
7860
|
+
```json
|
|
7861
|
+
{
|
|
7862
|
+
"kind": "cat",
|
|
7863
|
+
"value": {
|
|
7864
|
+
"name": "Whiskers",
|
|
7865
|
+
"meow": true
|
|
7866
|
+
}
|
|
7867
|
+
}
|
|
7868
|
+
```
|
|
7869
|
+
|
|
7870
|
+
When it is "dog", expected response is:
|
|
7871
|
+
|
|
7872
|
+
```json
|
|
7873
|
+
{
|
|
7874
|
+
"kind": "dog",
|
|
7875
|
+
"value": {
|
|
7876
|
+
"name": "Rex",
|
|
7877
|
+
"bark": false
|
|
7878
|
+
}
|
|
7879
|
+
}
|
|
7880
|
+
```
|
|
7881
|
+
|
|
7882
|
+
### Type_Union_Discriminated_Envelope_Object_Default_put
|
|
7883
|
+
|
|
7884
|
+
- Endpoint: `put /type/union/discriminated/envelope/object/default`
|
|
7885
|
+
|
|
7886
|
+
Test discriminated union with envelope serialization.
|
|
7887
|
+
Send the union as:
|
|
7888
|
+
|
|
7889
|
+
```json
|
|
7890
|
+
{
|
|
7891
|
+
"kind": "cat",
|
|
7892
|
+
"value": {
|
|
7893
|
+
"name": "Whiskers",
|
|
7894
|
+
"meow": true
|
|
7895
|
+
}
|
|
7896
|
+
}
|
|
7897
|
+
```
|
|
7898
|
+
|
|
7899
|
+
### Type_Union_Discriminated_NoEnvelope_CustomDiscriminator_get
|
|
7900
|
+
|
|
7901
|
+
- Endpoint: `get /type/union/discriminated/no-envelope/custom-discriminator`
|
|
7902
|
+
|
|
7903
|
+
Test discriminated union with inline discriminator and custom discriminator property name.
|
|
7904
|
+
When value of query parameter "type" is "cat" or no query parameter input, the expected response is:
|
|
7905
|
+
|
|
7906
|
+
```json
|
|
7907
|
+
{
|
|
7908
|
+
"type": "cat",
|
|
7909
|
+
"name": "Whiskers",
|
|
7910
|
+
"meow": true
|
|
7911
|
+
}
|
|
7912
|
+
```
|
|
7913
|
+
|
|
7914
|
+
When it is "dog", expected response is:
|
|
7915
|
+
|
|
7916
|
+
```json
|
|
7917
|
+
{
|
|
7918
|
+
"type": "dog",
|
|
7919
|
+
"name": "Rex",
|
|
7920
|
+
"bark": false
|
|
7921
|
+
}
|
|
7922
|
+
```
|
|
7923
|
+
|
|
7924
|
+
### Type_Union_Discriminated_NoEnvelope_CustomDiscriminator_put
|
|
7925
|
+
|
|
7926
|
+
- Endpoint: `put /type/union/discriminated/no-envelope/custom-discriminator`
|
|
7927
|
+
|
|
7928
|
+
Test discriminated union with inline discriminator and custom discriminator property name.
|
|
7929
|
+
Send the union as:
|
|
7930
|
+
|
|
7931
|
+
```json
|
|
7932
|
+
{
|
|
7933
|
+
"type": "cat",
|
|
7934
|
+
"name": "Whiskers",
|
|
7935
|
+
"meow": true
|
|
7936
|
+
}
|
|
7937
|
+
```
|
|
7938
|
+
|
|
7939
|
+
### Type_Union_Discriminated_NoEnvelope_Default_get
|
|
7940
|
+
|
|
7941
|
+
- Endpoint: `get /type/union/discriminated/no-envelope/default`
|
|
7942
|
+
|
|
7943
|
+
Test discriminated union with inline discriminator.
|
|
7944
|
+
When value of query parameter "kind" is "cat" or no query parameter input, the expected response is:
|
|
7945
|
+
|
|
7946
|
+
```json
|
|
7947
|
+
{
|
|
7948
|
+
"kind": "cat",
|
|
7949
|
+
"name": "Whiskers",
|
|
7950
|
+
"meow": true
|
|
7951
|
+
}
|
|
7952
|
+
```
|
|
7953
|
+
|
|
7954
|
+
When it is "dog", expected response is:
|
|
7955
|
+
|
|
7956
|
+
```json
|
|
7957
|
+
{
|
|
7958
|
+
"kind": "dog",
|
|
7959
|
+
"name": "Rex",
|
|
7960
|
+
"bark": false
|
|
7961
|
+
}
|
|
7962
|
+
```
|
|
7963
|
+
|
|
7964
|
+
### Type_Union_Discriminated_NoEnvelope_Default_put
|
|
7965
|
+
|
|
7966
|
+
- Endpoint: `put /type/union/discriminated/no-envelope/default`
|
|
7967
|
+
|
|
7968
|
+
Test discriminated union with inline discriminator.
|
|
7969
|
+
Send the union as:
|
|
7970
|
+
|
|
7971
|
+
```json
|
|
7972
|
+
{
|
|
7973
|
+
"kind": "cat",
|
|
7974
|
+
"name": "Whiskers",
|
|
7975
|
+
"meow": true
|
|
7976
|
+
}
|
|
7977
|
+
```
|
|
7978
|
+
|
|
6992
7979
|
### Type_Union_EnumsOnly_get
|
|
6993
7980
|
|
|
6994
7981
|
- Endpoint: `get /type/union/enums-only`
|
|
@@ -7436,6 +8423,49 @@ Expected request body:
|
|
|
7436
8423
|
{ "prop": "foo" }
|
|
7437
8424
|
```
|
|
7438
8425
|
|
|
8426
|
+
### Versioning_Removed_modelV3
|
|
8427
|
+
|
|
8428
|
+
- Endpoint: `post /versioning/removed/api-version:{version}/v3`
|
|
8429
|
+
|
|
8430
|
+
path: "/versioning/removed/api-version:v1/v3"
|
|
8431
|
+
Expected request body:
|
|
8432
|
+
|
|
8433
|
+
```json
|
|
8434
|
+
{ "id": "123", "enumProp": "enumMemberV1" }
|
|
8435
|
+
```
|
|
8436
|
+
|
|
8437
|
+
Expected response body:
|
|
8438
|
+
|
|
8439
|
+
```json
|
|
8440
|
+
{ "id": "123", "enumProp": "enumMemberV1" }
|
|
8441
|
+
```
|
|
8442
|
+
|
|
8443
|
+
path: "/versioning/removed/api-version:v2preview/v3"
|
|
8444
|
+
Expected request body:
|
|
8445
|
+
|
|
8446
|
+
```json
|
|
8447
|
+
{ "id": "123" }
|
|
8448
|
+
```
|
|
8449
|
+
|
|
8450
|
+
Expected response body:
|
|
8451
|
+
|
|
8452
|
+
```json
|
|
8453
|
+
{ "id": "123" }
|
|
8454
|
+
```
|
|
8455
|
+
|
|
8456
|
+
path: "/versioning/removed/api-version:v2/v3"
|
|
8457
|
+
Expected request body:
|
|
8458
|
+
|
|
8459
|
+
```json
|
|
8460
|
+
{ "id": "123", "enumProp": "enumMemberV1" }
|
|
8461
|
+
```
|
|
8462
|
+
|
|
8463
|
+
Expected response body:
|
|
8464
|
+
|
|
8465
|
+
```json
|
|
8466
|
+
{ "id": "123", "enumProp": "enumMemberV1" }
|
|
8467
|
+
```
|
|
8468
|
+
|
|
7439
8469
|
### Versioning_Removed_v2
|
|
7440
8470
|
|
|
7441
8471
|
- Endpoint: `post /versioning/removed/api-version:{version}/v2`
|