@typespec/http-specs 0.1.0-alpha.9 → 0.1.0-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.
Files changed (224) hide show
  1. package/CHANGELOG.md +260 -3
  2. package/README.md +11 -3
  3. package/dist/specs/authentication/noauth/union/mockapi.d.ts +3 -0
  4. package/dist/specs/authentication/noauth/union/mockapi.d.ts.map +1 -0
  5. package/dist/specs/authentication/noauth/union/mockapi.js +25 -0
  6. package/dist/specs/authentication/noauth/union/mockapi.js.map +1 -0
  7. package/dist/specs/documentation/mockapi.d.ts +3 -0
  8. package/dist/specs/documentation/mockapi.d.ts.map +1 -0
  9. package/dist/specs/documentation/mockapi.js +40 -0
  10. package/dist/specs/documentation/mockapi.js.map +1 -0
  11. package/dist/specs/encode/array/mockapi.d.ts +3 -0
  12. package/dist/specs/encode/array/mockapi.d.ts.map +1 -0
  13. package/dist/specs/encode/array/mockapi.js +33 -0
  14. package/dist/specs/encode/array/mockapi.js.map +1 -0
  15. package/dist/specs/encode/bytes/mockapi.js +16 -24
  16. package/dist/specs/encode/bytes/mockapi.js.map +1 -1
  17. package/dist/specs/encode/datetime/mockapi.js +2 -2
  18. package/dist/specs/encode/datetime/mockapi.js.map +1 -1
  19. package/dist/specs/encode/duration/mockapi.d.ts.map +1 -1
  20. package/dist/specs/encode/duration/mockapi.js +115 -3
  21. package/dist/specs/encode/duration/mockapi.js.map +1 -1
  22. package/dist/specs/encode/numeric/mockapi.js +2 -2
  23. package/dist/specs/encode/numeric/mockapi.js.map +1 -1
  24. package/dist/specs/helper.d.ts +2 -2
  25. package/dist/specs/helper.d.ts.map +1 -1
  26. package/dist/specs/parameters/basic/mockapi.d.ts.map +1 -1
  27. package/dist/specs/parameters/basic/mockapi.js +3 -3
  28. package/dist/specs/parameters/basic/mockapi.js.map +1 -1
  29. package/dist/specs/parameters/body-optionality/mockapi.d.ts.map +1 -1
  30. package/dist/specs/parameters/body-optionality/mockapi.js +14 -4
  31. package/dist/specs/parameters/body-optionality/mockapi.js.map +1 -1
  32. package/dist/specs/parameters/collection-format/mockapi.js +4 -15
  33. package/dist/specs/parameters/collection-format/mockapi.js.map +1 -1
  34. package/dist/specs/parameters/path/mockapi.d.ts +3 -0
  35. package/dist/specs/parameters/path/mockapi.d.ts.map +1 -0
  36. package/dist/specs/parameters/path/mockapi.js +29 -0
  37. package/dist/specs/parameters/path/mockapi.js.map +1 -0
  38. package/dist/specs/parameters/query/mockapi.d.ts +3 -0
  39. package/dist/specs/parameters/query/mockapi.d.ts.map +1 -0
  40. package/dist/specs/parameters/query/mockapi.js +14 -0
  41. package/dist/specs/parameters/query/mockapi.js.map +1 -0
  42. package/dist/specs/parameters/spread/mockapi.d.ts.map +1 -1
  43. package/dist/specs/parameters/spread/mockapi.js +19 -19
  44. package/dist/specs/parameters/spread/mockapi.js.map +1 -1
  45. package/dist/specs/payload/json-merge-patch/mockapi.js +4 -4
  46. package/dist/specs/payload/json-merge-patch/mockapi.js.map +1 -1
  47. package/dist/specs/payload/media-type/mockapi.js +2 -2
  48. package/dist/specs/payload/media-type/mockapi.js.map +1 -1
  49. package/dist/specs/payload/multipart/mockapi.d.ts.map +1 -1
  50. package/dist/specs/payload/multipart/mockapi.js +196 -60
  51. package/dist/specs/payload/multipart/mockapi.js.map +1 -1
  52. package/dist/specs/payload/pageable/mockapi.d.ts.map +1 -1
  53. package/dist/specs/payload/pageable/mockapi.js +626 -14
  54. package/dist/specs/payload/pageable/mockapi.js.map +1 -1
  55. package/dist/specs/payload/xml/mockapi.d.ts +19 -5
  56. package/dist/specs/payload/xml/mockapi.d.ts.map +1 -1
  57. package/dist/specs/payload/xml/mockapi.js +311 -55
  58. package/dist/specs/payload/xml/mockapi.js.map +1 -1
  59. package/dist/specs/response/status-code-range/mockapi.d.ts.map +1 -1
  60. package/dist/specs/response/status-code-range/mockapi.js +5 -9
  61. package/dist/specs/response/status-code-range/mockapi.js.map +1 -1
  62. package/dist/specs/routes/mockapi.js +16 -16
  63. package/dist/specs/routes/mockapi.js.map +1 -1
  64. package/dist/specs/serialization/encoded-name/json/mockapi.js +1 -1
  65. package/dist/specs/serialization/encoded-name/json/mockapi.js.map +1 -1
  66. package/dist/specs/server/versions/not-versioned/mockapi.js +1 -1
  67. package/dist/specs/server/versions/not-versioned/mockapi.js.map +1 -1
  68. package/dist/specs/server/versions/versioned/mockapi.js +8 -12
  69. package/dist/specs/server/versions/versioned/mockapi.js.map +1 -1
  70. package/dist/specs/special-words/mockapi.d.ts.map +1 -1
  71. package/dist/specs/special-words/mockapi.js +59 -6
  72. package/dist/specs/special-words/mockapi.js.map +1 -1
  73. package/dist/specs/streaming/jsonl/mockapi.d.ts +3 -0
  74. package/dist/specs/streaming/jsonl/mockapi.d.ts.map +1 -0
  75. package/dist/specs/streaming/jsonl/mockapi.js +30 -0
  76. package/dist/specs/streaming/jsonl/mockapi.js.map +1 -0
  77. package/dist/specs/type/array/mockapi.js +1 -1
  78. package/dist/specs/type/array/mockapi.js.map +1 -1
  79. package/dist/specs/type/dictionary/mockapi.js +1 -1
  80. package/dist/specs/type/dictionary/mockapi.js.map +1 -1
  81. package/dist/specs/type/enum/extensible/mockapi.js +1 -1
  82. package/dist/specs/type/enum/extensible/mockapi.js.map +1 -1
  83. package/dist/specs/type/enum/fixed/mockapi.js +2 -2
  84. package/dist/specs/type/enum/fixed/mockapi.js.map +1 -1
  85. package/dist/specs/type/file/mockapi.d.ts +3 -0
  86. package/dist/specs/type/file/mockapi.d.ts.map +1 -0
  87. package/dist/specs/type/file/mockapi.js +187 -0
  88. package/dist/specs/type/file/mockapi.js.map +1 -0
  89. package/dist/specs/type/model/empty/mockapi.js +2 -2
  90. package/dist/specs/type/model/empty/mockapi.js.map +1 -1
  91. package/dist/specs/type/model/inheritance/enum-discriminator/mockapi.js +1 -1
  92. package/dist/specs/type/model/inheritance/enum-discriminator/mockapi.js.map +1 -1
  93. package/dist/specs/type/model/inheritance/nested-discriminator/mockapi.js +2 -2
  94. package/dist/specs/type/model/inheritance/nested-discriminator/mockapi.js.map +1 -1
  95. package/dist/specs/type/model/inheritance/not-discriminated/mockapi.js +2 -2
  96. package/dist/specs/type/model/inheritance/not-discriminated/mockapi.js.map +1 -1
  97. package/dist/specs/type/model/inheritance/recursive/mockapi.js +1 -1
  98. package/dist/specs/type/model/inheritance/recursive/mockapi.js.map +1 -1
  99. package/dist/specs/type/model/inheritance/single-discriminator/mockapi.js +2 -2
  100. package/dist/specs/type/model/inheritance/single-discriminator/mockapi.js.map +1 -1
  101. package/dist/specs/type/model/usage/mockapi.js +4 -4
  102. package/dist/specs/type/model/usage/mockapi.js.map +1 -1
  103. package/dist/specs/type/model/visibility/mockapi.js +9 -10
  104. package/dist/specs/type/model/visibility/mockapi.js.map +1 -1
  105. package/dist/specs/type/property/additional-properties/mockapi.js +9 -6
  106. package/dist/specs/type/property/additional-properties/mockapi.js.map +1 -1
  107. package/dist/specs/type/property/nullable/mockapi.js +2 -6
  108. package/dist/specs/type/property/nullable/mockapi.js.map +1 -1
  109. package/dist/specs/type/property/optionality/mockapi.js +1 -1
  110. package/dist/specs/type/property/optionality/mockapi.js.map +1 -1
  111. package/dist/specs/type/property/value-types/mockapi.js +3 -3
  112. package/dist/specs/type/property/value-types/mockapi.js.map +1 -1
  113. package/dist/specs/type/scalar/mockapi.js +9 -9
  114. package/dist/specs/type/scalar/mockapi.js.map +1 -1
  115. package/dist/specs/type/union/discriminated/mockapi.d.ts +3 -0
  116. package/dist/specs/type/union/discriminated/mockapi.d.ts.map +1 -0
  117. package/dist/specs/type/union/discriminated/mockapi.js +212 -0
  118. package/dist/specs/type/union/discriminated/mockapi.js.map +1 -0
  119. package/dist/specs/type/union/mockapi.js +2 -2
  120. package/dist/specs/type/union/mockapi.js.map +1 -1
  121. package/dist/specs/versioning/added/mockapi.js +6 -6
  122. package/dist/specs/versioning/added/mockapi.js.map +1 -1
  123. package/dist/specs/versioning/madeOptional/mockapi.js +2 -2
  124. package/dist/specs/versioning/madeOptional/mockapi.js.map +1 -1
  125. package/dist/specs/versioning/removed/mockapi.js +11 -11
  126. package/dist/specs/versioning/removed/mockapi.js.map +1 -1
  127. package/dist/specs/versioning/renamedFrom/mockapi.js +5 -5
  128. package/dist/specs/versioning/renamedFrom/mockapi.js.map +1 -1
  129. package/dist/specs/versioning/returnTypeChangedFrom/mockapi.js +1 -1
  130. package/dist/specs/versioning/returnTypeChangedFrom/mockapi.js.map +1 -1
  131. package/dist/specs/versioning/typeChangedFrom/mockapi.js +3 -3
  132. package/dist/specs/versioning/typeChangedFrom/mockapi.js.map +1 -1
  133. package/manifest.json +11545 -0
  134. package/package.json +31 -20
  135. package/smoke/petstore/main.tsp +96 -0
  136. package/smoke/todoapp/main.tsp +293 -0
  137. package/spec-summary.md +2137 -121
  138. package/specs/authentication/noauth/union/main.tsp +30 -0
  139. package/specs/authentication/noauth/union/mockapi.ts +27 -0
  140. package/specs/documentation/main.tsp +158 -0
  141. package/specs/documentation/mockapi.ts +59 -0
  142. package/specs/encode/array/main.tsp +339 -0
  143. package/specs/encode/array/mockapi.ts +83 -0
  144. package/specs/encode/bytes/main.tsp +29 -20
  145. package/specs/encode/bytes/mockapi.ts +13 -31
  146. package/specs/encode/datetime/main.tsp +2 -7
  147. package/specs/encode/datetime/mockapi.ts +2 -2
  148. package/specs/encode/duration/main.tsp +420 -7
  149. package/specs/encode/duration/mockapi.ts +221 -2
  150. package/specs/encode/numeric/mockapi.ts +2 -2
  151. package/specs/parameters/basic/mockapi.ts +3 -3
  152. package/specs/parameters/body-optionality/main.tsp +2 -0
  153. package/specs/parameters/body-optionality/mockapi.ts +24 -4
  154. package/specs/parameters/collection-format/main.tsp +5 -25
  155. package/specs/parameters/collection-format/mockapi.ts +4 -16
  156. package/specs/parameters/path/main.tsp +48 -0
  157. package/specs/parameters/path/mockapi.ts +34 -0
  158. package/specs/parameters/query/main.tsp +22 -0
  159. package/specs/parameters/query/mockapi.ts +15 -0
  160. package/specs/parameters/spread/mockapi.ts +19 -19
  161. package/specs/payload/json-merge-patch/main.tsp +2 -2
  162. package/specs/payload/json-merge-patch/mockapi.ts +4 -4
  163. package/specs/payload/media-type/mockapi.ts +2 -2
  164. package/specs/payload/multipart/main.tsp +230 -32
  165. package/specs/payload/multipart/mockapi.ts +207 -59
  166. package/specs/payload/pageable/main.tsp +648 -0
  167. package/specs/payload/pageable/mockapi.ts +691 -14
  168. package/specs/payload/xml/main.tsp +532 -132
  169. package/specs/payload/xml/mockapi.ts +402 -67
  170. package/specs/response/status-code-range/main.tsp +2 -2
  171. package/specs/response/status-code-range/mockapi.ts +5 -9
  172. package/specs/routes/main.tsp +29 -29
  173. package/specs/routes/mockapi.ts +16 -16
  174. package/specs/serialization/encoded-name/json/main.tsp +1 -1
  175. package/specs/serialization/encoded-name/json/mockapi.ts +1 -1
  176. package/specs/server/endpoint/not-defined/main.tsp +1 -3
  177. package/specs/server/path/multiple/main.tsp +3 -5
  178. package/specs/server/versions/not-versioned/mockapi.ts +1 -1
  179. package/specs/server/versions/versioned/main.tsp +1 -1
  180. package/specs/server/versions/versioned/mockapi.ts +6 -12
  181. package/specs/special-headers/conditional-request/main.tsp +1 -1
  182. package/specs/special-headers/repeatability/main.tsp +2 -2
  183. package/specs/special-words/main.tsp +124 -6
  184. package/specs/special-words/mockapi.ts +62 -6
  185. package/specs/streaming/jsonl/main.tsp +33 -0
  186. package/specs/streaming/jsonl/mockapi.ts +32 -0
  187. package/specs/type/array/mockapi.ts +1 -1
  188. package/specs/type/dictionary/mockapi.ts +1 -1
  189. package/specs/type/enum/extensible/main.tsp +18 -2
  190. package/specs/type/enum/extensible/mockapi.ts +1 -1
  191. package/specs/type/enum/fixed/main.tsp +15 -3
  192. package/specs/type/enum/fixed/mockapi.ts +2 -2
  193. package/specs/type/file/main.tsp +109 -0
  194. package/specs/type/file/mockapi.ts +200 -0
  195. package/specs/type/model/empty/mockapi.ts +2 -2
  196. package/specs/type/model/inheritance/enum-discriminator/mockapi.ts +1 -1
  197. package/specs/type/model/inheritance/nested-discriminator/mockapi.ts +2 -2
  198. package/specs/type/model/inheritance/not-discriminated/mockapi.ts +2 -2
  199. package/specs/type/model/inheritance/recursive/mockapi.ts +1 -1
  200. package/specs/type/model/inheritance/single-discriminator/mockapi.ts +2 -2
  201. package/specs/type/model/usage/mockapi.ts +4 -4
  202. package/specs/type/model/visibility/main.tsp +9 -17
  203. package/specs/type/model/visibility/mockapi.ts +9 -10
  204. package/specs/type/property/additional-properties/main.tsp +17 -17
  205. package/specs/type/property/additional-properties/mockapi.ts +10 -10
  206. package/specs/type/property/nullable/mockapi.ts +7 -8
  207. package/specs/type/property/optionality/mockapi.ts +1 -1
  208. package/specs/type/property/value-types/mockapi.ts +3 -3
  209. package/specs/type/scalar/main.tsp +58 -9
  210. package/specs/type/scalar/mockapi.ts +9 -9
  211. package/specs/type/union/discriminated/main.tsp +251 -0
  212. package/specs/type/union/discriminated/mockapi.ts +230 -0
  213. package/specs/type/union/mockapi.ts +2 -2
  214. package/specs/versioning/added/mockapi.ts +6 -6
  215. package/specs/versioning/madeOptional/mockapi.ts +2 -2
  216. package/specs/versioning/removed/main.tsp +5 -5
  217. package/specs/versioning/removed/mockapi.ts +11 -11
  218. package/specs/versioning/renamedFrom/mockapi.ts +5 -5
  219. package/specs/versioning/returnTypeChangedFrom/main.tsp +17 -2
  220. package/specs/versioning/returnTypeChangedFrom/mockapi.ts +1 -1
  221. package/specs/versioning/typeChangedFrom/mockapi.ts +3 -3
  222. package/temp/.tsbuildinfo +1 -1
  223. package/tsconfig.build.json +0 -4
  224. package/tspconfig.yaml +0 -2
package/spec-summary.md CHANGED
@@ -39,6 +39,18 @@ Expect error code 403 and error body:
39
39
 
40
40
  Expects header 'Authorization': 'SharedAccessKey valid-key'
41
41
 
42
+ ### Authentication_Noauth_Union_validNoAuth
43
+
44
+ - Endpoint: `get /authentication/noauth/union/valid`
45
+
46
+ Expects no authentication. The server accepts requests without any authentication header.
47
+
48
+ ### Authentication_Noauth_Union_validToken
49
+
50
+ - Endpoint: `get /authentication/noauth/union/validtoken`
51
+
52
+ Expects header 'authorization': 'Bearer https://security.microsoft.com/.default'
53
+
42
54
  ### Authentication_OAuth2_invalid
43
55
 
44
56
  - Endpoint: `get /authentication/oauth2/invalid`
@@ -71,6 +83,292 @@ Expects header 'x-ms-api-key': 'valid-key'
71
83
 
72
84
  Expects header 'authorization': 'Bearer https://security.microsoft.com/.default'
73
85
 
86
+ ### Documentation_Lists_bulletPointsOp
87
+
88
+ - Endpoint: `get /documentation/lists/bullet-points/op`
89
+
90
+ Test simple bullet points in documentation.
91
+ Expected behavior: Should render properly formatted bullet lists.
92
+
93
+ ### Documentation_Lists_numbered
94
+
95
+ - Endpoint: `get /documentation/lists/numbered`
96
+
97
+ Test numbered lists.
98
+ Expected behavior: Should render numbered list properly.
99
+
100
+ ### Documentation_TextFormatting_boldText
101
+
102
+ - Endpoint: `get /documentation/text-formatting/bold`
103
+
104
+ Expected behavior: Text between \*\* should render as bold.
105
+
106
+ ### Documentation_TextFormatting_combinedFormatting
107
+
108
+ - Endpoint: `get /documentation/text-formatting/combined`
109
+
110
+ Test combined bold and italic formatting.
111
+ Expected behavior: Should handle nested and combined formatting.
112
+
113
+ ### Documentation_TextFormatting_italicText
114
+
115
+ - Endpoint: `get /documentation/text-formatting/italic`
116
+
117
+ Test italic text formatting using _single asterisks_.
118
+ Expected behavior: Text between \* should render as italic.
119
+
120
+ ### Encode_Array_Property_commaDelimited
121
+
122
+ - Endpoint: `post /encode/array/property/comma-delimited`
123
+
124
+ Test operation with request and response model contains a string array property with commaDelimited encode.
125
+ Expected request body:
126
+
127
+ ```json
128
+ {
129
+ "value": "blue,red,green"
130
+ }
131
+ ```
132
+
133
+ Expected response body:
134
+
135
+ ```json
136
+ {
137
+ "value": "blue,red,green"
138
+ }
139
+ ```
140
+
141
+ ### Encode_Array_Property_enumCommaDelimited
142
+
143
+ - Endpoint: `post /encode/array/property/enum/comma-delimited`
144
+
145
+ Test operation with request and response model contains an enum array property with commaDelimited encode.
146
+ Expected request body:
147
+
148
+ ```json
149
+ {
150
+ "value": "blue,red,green"
151
+ }
152
+ ```
153
+
154
+ Expected response body:
155
+
156
+ ```json
157
+ {
158
+ "value": "blue,red,green"
159
+ }
160
+ ```
161
+
162
+ ### Encode_Array_Property_enumNewlineDelimited
163
+
164
+ - Endpoint: `post /encode/array/property/enum/newline-delimited`
165
+
166
+ Test operation with request and response model contains an enum array property with newlineDelimited encode.
167
+ Expected request body:
168
+
169
+ ```json
170
+ {
171
+ "value": "blue\nred\ngreen"
172
+ }
173
+ ```
174
+
175
+ Expected response body:
176
+
177
+ ```json
178
+ {
179
+ "value": "blue\nred\ngreen"
180
+ }
181
+ ```
182
+
183
+ ### Encode_Array_Property_enumPipeDelimited
184
+
185
+ - Endpoint: `post /encode/array/property/enum/pipe-delimited`
186
+
187
+ Test operation with request and response model contains an enum array property with pipeDelimited encode.
188
+ Expected request body:
189
+
190
+ ```json
191
+ {
192
+ "value": "blue|red|green"
193
+ }
194
+ ```
195
+
196
+ Expected response body:
197
+
198
+ ```json
199
+ {
200
+ "value": "blue|red|green"
201
+ }
202
+ ```
203
+
204
+ ### Encode_Array_Property_enumSpaceDelimited
205
+
206
+ - Endpoint: `post /encode/array/property/enum/space-delimited`
207
+
208
+ Test operation with request and response model contains an enum array property with spaceDelimited encode.
209
+ Expected request body:
210
+
211
+ ```json
212
+ {
213
+ "value": "blue red green"
214
+ }
215
+ ```
216
+
217
+ Expected response body:
218
+
219
+ ```json
220
+ {
221
+ "value": "blue red green"
222
+ }
223
+ ```
224
+
225
+ ### Encode_Array_Property_extensibleEnumCommaDelimited
226
+
227
+ - Endpoint: `post /encode/array/property/extensible-enum/comma-delimited`
228
+
229
+ Test operation with request and response model contains an extensible enum (union) array property with commaDelimited encode.
230
+ Expected request body:
231
+
232
+ ```json
233
+ {
234
+ "value": "blue,red,green"
235
+ }
236
+ ```
237
+
238
+ Expected response body:
239
+
240
+ ```json
241
+ {
242
+ "value": "blue,red,green"
243
+ }
244
+ ```
245
+
246
+ ### Encode_Array_Property_extensibleEnumNewlineDelimited
247
+
248
+ - Endpoint: `post /encode/array/property/extensible-enum/newline-delimited`
249
+
250
+ Test operation with request and response model contains an extensible enum (union) array property with newlineDelimited encode.
251
+ Expected request body:
252
+
253
+ ```json
254
+ {
255
+ "value": "blue\nred\ngreen"
256
+ }
257
+ ```
258
+
259
+ Expected response body:
260
+
261
+ ```json
262
+ {
263
+ "value": "blue\nred\ngreen"
264
+ }
265
+ ```
266
+
267
+ ### Encode_Array_Property_extensibleEnumPipeDelimited
268
+
269
+ - Endpoint: `post /encode/array/property/extensible-enum/pipe-delimited`
270
+
271
+ Test operation with request and response model contains an extensible enum (union) array property with pipeDelimited encode.
272
+ Expected request body:
273
+
274
+ ```json
275
+ {
276
+ "value": "blue|red|green"
277
+ }
278
+ ```
279
+
280
+ Expected response body:
281
+
282
+ ```json
283
+ {
284
+ "value": "blue|red|green"
285
+ }
286
+ ```
287
+
288
+ ### Encode_Array_Property_extensibleEnumSpaceDelimited
289
+
290
+ - Endpoint: `post /encode/array/property/extensible-enum/space-delimited`
291
+
292
+ Test operation with request and response model contains an extensible enum (union) array property with spaceDelimited encode.
293
+ Expected request body:
294
+
295
+ ```json
296
+ {
297
+ "value": "blue red green"
298
+ }
299
+ ```
300
+
301
+ Expected response body:
302
+
303
+ ```json
304
+ {
305
+ "value": "blue red green"
306
+ }
307
+ ```
308
+
309
+ ### Encode_Array_Property_newlineDelimited
310
+
311
+ - Endpoint: `post /encode/array/property/newline-delimited`
312
+
313
+ Test operation with request and response model contains a string array property with newlineDelimited encode.
314
+ Expected request body:
315
+
316
+ ```json
317
+ {
318
+ "value": "blue\nred\ngreen"
319
+ }
320
+ ```
321
+
322
+ Expected response body:
323
+
324
+ ```json
325
+ {
326
+ "value": "blue\nred\ngreen"
327
+ }
328
+ ```
329
+
330
+ ### Encode_Array_Property_pipeDelimited
331
+
332
+ - Endpoint: `post /encode/array/property/pipe-delimited`
333
+
334
+ Test operation with request and response model contains a string array property with pipeDelimited encode.
335
+ Expected request body:
336
+
337
+ ```json
338
+ {
339
+ "value": "blue|red|green"
340
+ }
341
+ ```
342
+
343
+ Expected response body:
344
+
345
+ ```json
346
+ {
347
+ "value": "blue|red|green"
348
+ }
349
+ ```
350
+
351
+ ### Encode_Array_Property_spaceDelimited
352
+
353
+ - Endpoint: `post /encode/array/property/space-delimited`
354
+
355
+ Test operation with request and response model contains a string array property with spaceDelimited encode.
356
+ Expected request body:
357
+
358
+ ```json
359
+ {
360
+ "value": "blue red green"
361
+ }
362
+ ```
363
+
364
+ Expected response body:
365
+
366
+ ```json
367
+ {
368
+ "value": "blue red green"
369
+ }
370
+ ```
371
+
74
372
  ### Encode_Bytes_Header_base64
75
373
 
76
374
  - Endpoint: `get /encode/bytes/header/base64`
@@ -240,22 +538,21 @@ Expected body:
240
538
  - Endpoint: `post /encode/bytes/body/request/custom-content-type`
241
539
 
242
540
  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/cadl-ranch-specs/assets/image.png
541
+ File should match packages/http-specs/assets/image.png.
244
542
 
245
543
  ### Encode_Bytes_RequestBody_default
246
544
 
247
545
  - Endpoint: `post /encode/bytes/body/request/default`
248
546
 
249
- Test default encode (base64) for bytes in a json body.
250
- Expected body:
251
- "dGVzdA==" (base64 encode of test, in JSON string)
547
+ When content type is not defined and body is `bytes` the payload is a binary stream.
548
+ Stream should match packages/http-specs/assets/image.png file.
252
549
 
253
550
  ### Encode_Bytes_RequestBody_octetStream
254
551
 
255
552
  - Endpoint: `post /encode/bytes/body/request/octet-stream`
256
553
 
257
- When content type is application/octet-stream and body is `bytes` the payload is a binary file.
258
- File should match packages/cadl-ranch-specs/assets/image.png
554
+ When content type is application/octet-stream and body is `bytes` the payload is a binary stream.
555
+ Stream should match packages/http-specs/assets/image.png file.
259
556
 
260
557
  ### Encode_Bytes_ResponseBody_base64
261
558
 
@@ -278,22 +575,21 @@ Expected body:
278
575
  - Endpoint: `get /encode/bytes/body/response/custom-content-type`
279
576
 
280
577
  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/cadl-ranch-specs/assets/image.png
578
+ File should match packages/http-specs/assets/image.png
282
579
 
283
580
  ### Encode_Bytes_ResponseBody_default
284
581
 
285
582
  - Endpoint: `get /encode/bytes/body/response/default`
286
583
 
287
- Test default encode (base64) for bytes in a json body.
288
- Expected body:
289
- "dGVzdA==" (base64 encode of test, in JSON string)
584
+ When content type is not defined and body is `bytes` the payload is a binary stream.
585
+ Stream should match packages/http-specs/assets/image.png file.
290
586
 
291
587
  ### Encode_Bytes_ResponseBody_octetStream
292
588
 
293
589
  - Endpoint: `get /encode/bytes/body/response/octet-stream`
294
590
 
295
- When content type is application/octet-stream and body is `bytes` the payload is a binary file.
296
- File should match packages/cadl-ranch-specs/assets/image.png
591
+ When content type is application/octet-stream and body is `bytes` the payload is a binary stream.
592
+ Stream should match packages/http-specs/assets/image.png file.
297
593
 
298
594
  ### Encode_Datetime_Header_default
299
595
 
@@ -519,6 +815,13 @@ value=1686566864
519
815
  Test default encode for a duration header.
520
816
  Expected header `input=P40D`
521
817
 
818
+ ### Encode_Duration_Header_float64Milliseconds
819
+
820
+ - Endpoint: `get /encode/duration/header/float64-milliseconds`
821
+
822
+ Test float64 milliseconds encode for a duration header.
823
+ Expected header `duration: 35625`
824
+
522
825
  ### Encode_Duration_Header_float64Seconds
523
826
 
524
827
  - Endpoint: `get /encode/duration/header/float64-seconds`
@@ -526,6 +829,21 @@ Expected header `input=P40D`
526
829
  Test float64 seconds encode for a duration header.
527
830
  Expected header `duration: 35.625`
528
831
 
832
+ ### Encode_Duration_Header_floatMilliseconds
833
+
834
+ - Endpoint: `get /encode/duration/header/float-milliseconds`
835
+
836
+ Test float milliseconds encode for a duration header.
837
+ Expected header `duration: 35625`
838
+
839
+ ### Encode_Duration_Header_floatMillisecondsLargerUnit
840
+
841
+ - Endpoint: `get /encode/duration/header/float-milliseconds-larger-unit`
842
+
843
+ Test float milliseconds encode for a duration header where the duration is several minutes.
844
+ Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(3.5) in C#.
845
+ Expected header `duration: 210000.0`
846
+
529
847
  ### Encode_Duration_Header_floatSeconds
530
848
 
531
849
  - Endpoint: `get /encode/duration/header/float-seconds`
@@ -533,6 +851,36 @@ Expected header `duration: 35.625`
533
851
  Test float seconds encode for a duration header.
534
852
  Expected header `duration: 35.625`
535
853
 
854
+ ### Encode_Duration_Header_floatSecondsLargerUnit
855
+
856
+ - Endpoint: `get /encode/duration/header/float-seconds-larger-unit`
857
+
858
+ Test float seconds encode for a duration header where the duration is several minutes.
859
+ Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(2.5) in C#.
860
+ Expected header `duration: 150.0`
861
+
862
+ ### Encode_Duration_Header_int32Milliseconds
863
+
864
+ - Endpoint: `get /encode/duration/header/int32-milliseconds`
865
+
866
+ Test int32 milliseconds encode for a duration header.
867
+ Expected header `duration: 36000`
868
+
869
+ ### Encode_Duration_Header_int32MillisecondsArray
870
+
871
+ - Endpoint: `get /encode/duration/header/int32-milliseconds-array`
872
+
873
+ Test int32 milliseconds encode for a duration array header.
874
+ Expected header `duration: [36000,47000]`
875
+
876
+ ### Encode_Duration_Header_int32MillisecondsLargerUnit
877
+
878
+ - Endpoint: `get /encode/duration/header/int32-milliseconds-larger-unit`
879
+
880
+ Test int32 milliseconds encode for a duration header where the duration is several minutes.
881
+ Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(3) in C#.
882
+ Expected header `duration: 180000`
883
+
536
884
  ### Encode_Duration_Header_int32Seconds
537
885
 
538
886
  - Endpoint: `get /encode/duration/header/int32-seconds`
@@ -540,6 +888,14 @@ Expected header `duration: 35.625`
540
888
  Test int32 seconds encode for a duration header.
541
889
  Expected header `duration: 36`
542
890
 
891
+ ### Encode_Duration_Header_int32SecondsLargerUnit
892
+
893
+ - Endpoint: `get /encode/duration/header/int32-seconds-larger-unit`
894
+
895
+ Test int32 seconds encode for a duration header where the duration is several minutes.
896
+ Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(2) in C#.
897
+ Expected header `duration: 120`
898
+
543
899
  ### Encode_Duration_Header_iso8601
544
900
 
545
901
  - Endpoint: `get /encode/duration/header/iso8601`
@@ -575,16 +931,16 @@ Expected response body:
575
931
  }
576
932
  ```
577
933
 
578
- ### Encode_Duration_Property_float64Seconds
934
+ ### Encode_Duration_Property_float64Milliseconds
579
935
 
580
- - Endpoint: `get /encode/duration/property/float64-seconds`
936
+ - Endpoint: `get /encode/duration/property/float64-milliseconds`
581
937
 
582
- Test operation with request and response model contains a duration property with float64 seconds encode.
938
+ Test operation with request and response model contains a duration property with float64 milliseconds encode.
583
939
  Expected request body:
584
940
 
585
941
  ```json
586
942
  {
587
- "value": 35.625
943
+ "value": 35625
588
944
  }
589
945
  ```
590
946
 
@@ -592,15 +948,15 @@ Expected response body:
592
948
 
593
949
  ```json
594
950
  {
595
- "value": 35.625
951
+ "value": 35625
596
952
  }
597
953
  ```
598
954
 
599
- ### Encode_Duration_Property_floatSeconds
955
+ ### Encode_Duration_Property_float64Seconds
600
956
 
601
- - Endpoint: `get /encode/duration/property/float-seconds`
957
+ - Endpoint: `get /encode/duration/property/float64-seconds`
602
958
 
603
- Test operation with request and response model contains a duration property with float seconds encode.
959
+ Test operation with request and response model contains a duration property with float64 seconds encode.
604
960
  Expected request body:
605
961
 
606
962
  ```json
@@ -617,11 +973,96 @@ Expected response body:
617
973
  }
618
974
  ```
619
975
 
620
- ### Encode_Duration_Property_floatSecondsArray
976
+ ### Encode_Duration_Property_floatMilliseconds
621
977
 
622
- - Endpoint: `get /encode/duration/property/float-seconds-array`
978
+ - Endpoint: `get /encode/duration/property/float-milliseconds`
623
979
 
624
- Test operation with request and response model contains an array property which elements are duration with float seconds encode.
980
+ Test operation with request and response model contains a duration property with float milliseconds encode.
981
+ Expected request body:
982
+
983
+ ```json
984
+ {
985
+ "value": 35625
986
+ }
987
+ ```
988
+
989
+ Expected response body:
990
+
991
+ ```json
992
+ {
993
+ "value": 35625
994
+ }
995
+ ```
996
+
997
+ ### Encode_Duration_Property_floatMillisecondsArray
998
+
999
+ - Endpoint: `get /encode/duration/property/float-milliseconds-array`
1000
+
1001
+ Test operation with request and response model contains an array property which elements are duration with float milliseconds encode.
1002
+ Expected request body:
1003
+
1004
+ ```json
1005
+ {
1006
+ "value": [35625, 46750]
1007
+ }
1008
+ ```
1009
+
1010
+ Expected response body:
1011
+
1012
+ ```json
1013
+ {
1014
+ "value": [35625, 46750]
1015
+ }
1016
+ ```
1017
+
1018
+ ### Encode_Duration_Property_floatMillisecondsLargerUnit
1019
+
1020
+ - Endpoint: `get /encode/duration/property/float-milliseconds-larger-unit`
1021
+
1022
+ Test operation with request and response model contains a duration property with float milliseconds encode where the duration is several minutes.
1023
+ Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(3.5) in C#.
1024
+ Expected request body:
1025
+
1026
+ ```json
1027
+ {
1028
+ "value": 210000.0
1029
+ }
1030
+ ```
1031
+
1032
+ Expected response body:
1033
+
1034
+ ```json
1035
+ {
1036
+ "value": 210000.0
1037
+ }
1038
+ ```
1039
+
1040
+ ### Encode_Duration_Property_floatSeconds
1041
+
1042
+ - Endpoint: `get /encode/duration/property/float-seconds`
1043
+
1044
+ Test operation with request and response model contains a duration property with float seconds encode.
1045
+ Expected request body:
1046
+
1047
+ ```json
1048
+ {
1049
+ "value": 35.625
1050
+ }
1051
+ ```
1052
+
1053
+ Expected response body:
1054
+
1055
+ ```json
1056
+ {
1057
+ "value": 35.625
1058
+ }
1059
+ ```
1060
+
1061
+ ### Encode_Duration_Property_floatSecondsArray
1062
+
1063
+ - Endpoint: `get /encode/duration/property/float-seconds-array`
1064
+
1065
+ Test operation with request and response model contains an array property which elements are duration with float seconds encode.
625
1066
  Expected request body:
626
1067
 
627
1068
  ```json
@@ -638,6 +1079,71 @@ Expected response body:
638
1079
  }
639
1080
  ```
640
1081
 
1082
+ ### Encode_Duration_Property_floatSecondsLargerUnit
1083
+
1084
+ - Endpoint: `get /encode/duration/property/float-seconds-larger-unit`
1085
+
1086
+ Test operation with request and response model contains a duration property with float seconds encode where the duration is several minutes.
1087
+ Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(2.5) in C#.
1088
+ Expected request body:
1089
+
1090
+ ```json
1091
+ {
1092
+ "value": 150.0
1093
+ }
1094
+ ```
1095
+
1096
+ Expected response body:
1097
+
1098
+ ```json
1099
+ {
1100
+ "value": 150.0
1101
+ }
1102
+ ```
1103
+
1104
+ ### Encode_Duration_Property_int32Milliseconds
1105
+
1106
+ - Endpoint: `get /encode/duration/property/int32-milliseconds`
1107
+
1108
+ Test operation with request and response model contains a duration property with int32 milliseconds encode.
1109
+ Expected request body:
1110
+
1111
+ ```json
1112
+ {
1113
+ "value": 36000
1114
+ }
1115
+ ```
1116
+
1117
+ Expected response body:
1118
+
1119
+ ```json
1120
+ {
1121
+ "value": 36000
1122
+ }
1123
+ ```
1124
+
1125
+ ### Encode_Duration_Property_int32MillisecondsLargerUnit
1126
+
1127
+ - Endpoint: `get /encode/duration/property/int32-milliseconds-larger-unit`
1128
+
1129
+ Test operation with request and response model contains a duration property with int32 milliseconds encode where the duration is several minutes.
1130
+ Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(3) in C#.
1131
+ Expected request body:
1132
+
1133
+ ```json
1134
+ {
1135
+ "value": 180000
1136
+ }
1137
+ ```
1138
+
1139
+ Expected response body:
1140
+
1141
+ ```json
1142
+ {
1143
+ "value": 180000
1144
+ }
1145
+ ```
1146
+
641
1147
  ### Encode_Duration_Property_int32Seconds
642
1148
 
643
1149
  - Endpoint: `get /encode/duration/property/int32-seconds`
@@ -659,6 +1165,28 @@ Expected response body:
659
1165
  }
660
1166
  ```
661
1167
 
1168
+ ### Encode_Duration_Property_int32SecondsLargerUnit
1169
+
1170
+ - Endpoint: `get /encode/duration/property/int32-seconds-larger-unit`
1171
+
1172
+ Test operation with request and response model contains a duration property with int32 seconds encode where the duration is several minutes.
1173
+ Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(2) in C#.
1174
+ Expected request body:
1175
+
1176
+ ```json
1177
+ {
1178
+ "value": 120
1179
+ }
1180
+ ```
1181
+
1182
+ Expected response body:
1183
+
1184
+ ```json
1185
+ {
1186
+ "value": 120
1187
+ }
1188
+ ```
1189
+
662
1190
  ### Encode_Duration_Property_iso8601
663
1191
 
664
1192
  - Endpoint: `post /encode/duration/property/iso8601`
@@ -687,6 +1215,13 @@ Expected response body:
687
1215
  Test default encode for a duration parameter.
688
1216
  Expected query parameter `input=P40D`
689
1217
 
1218
+ ### Encode_Duration_Query_float64Milliseconds
1219
+
1220
+ - Endpoint: `get /encode/duration/query/float64-milliseconds`
1221
+
1222
+ Test float64 milliseconds encode for a duration parameter.
1223
+ Expected query parameter `input=35625`
1224
+
690
1225
  ### Encode_Duration_Query_float64Seconds
691
1226
 
692
1227
  - Endpoint: `get /encode/duration/query/float64-seconds`
@@ -694,6 +1229,21 @@ Expected query parameter `input=P40D`
694
1229
  Test float64 seconds encode for a duration parameter.
695
1230
  Expected query parameter `input=35.625`
696
1231
 
1232
+ ### Encode_Duration_Query_floatMilliseconds
1233
+
1234
+ - Endpoint: `get /encode/duration/query/float-milliseconds`
1235
+
1236
+ Test float milliseconds encode for a duration parameter.
1237
+ Expected query parameter `input=35625`
1238
+
1239
+ ### Encode_Duration_Query_floatMillisecondsLargerUnit
1240
+
1241
+ - Endpoint: `get /encode/duration/query/float-milliseconds-larger-unit`
1242
+
1243
+ Test float milliseconds encode for a duration parameter where the duration is several minutes.
1244
+ Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(3.5) in C#.
1245
+ Expected query parameter `input=210000.0`
1246
+
697
1247
  ### Encode_Duration_Query_floatSeconds
698
1248
 
699
1249
  - Endpoint: `get /encode/duration/query/float-seconds`
@@ -701,6 +1251,36 @@ Expected query parameter `input=35.625`
701
1251
  Test float seconds encode for a duration parameter.
702
1252
  Expected query parameter `input=35.625`
703
1253
 
1254
+ ### Encode_Duration_Query_floatSecondsLargerUnit
1255
+
1256
+ - Endpoint: `get /encode/duration/query/float-seconds-larger-unit`
1257
+
1258
+ Test float seconds encode for a duration parameter where the duration is several minutes.
1259
+ Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(2.5) in C#.
1260
+ Expected query parameter `input=150.0`
1261
+
1262
+ ### Encode_Duration_Query_int32Milliseconds
1263
+
1264
+ - Endpoint: `get /encode/duration/query/int32-milliseconds`
1265
+
1266
+ Test int32 milliseconds encode for a duration parameter.
1267
+ Expected query parameter `input=36000`
1268
+
1269
+ ### Encode_Duration_Query_int32MillisecondsArray
1270
+
1271
+ - Endpoint: `get /encode/duration/query/int32-milliseconds-array`
1272
+
1273
+ Test int32 milliseconds encode for a duration array parameter.
1274
+ Expected query parameter `input=36000,47000`
1275
+
1276
+ ### Encode_Duration_Query_int32MillisecondsLargerUnit
1277
+
1278
+ - Endpoint: `get /encode/duration/query/int32-milliseconds-larger-unit`
1279
+
1280
+ Test int32 milliseconds encode for a duration parameter where the duration is several minutes.
1281
+ Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(3) in C#.
1282
+ Expected query parameter `input=180000`
1283
+
704
1284
  ### Encode_Duration_Query_int32Seconds
705
1285
 
706
1286
  - Endpoint: `get /encode/duration/query/int32-seconds`
@@ -715,6 +1295,14 @@ Expected query parameter `input=36`
715
1295
  Test int32 seconds encode for a duration array parameter.
716
1296
  Expected query parameter `input=36,47`
717
1297
 
1298
+ ### Encode_Duration_Query_int32SecondsLargerUnit
1299
+
1300
+ - Endpoint: `get /encode/duration/query/int32-seconds-larger-unit`
1301
+
1302
+ Test int32 seconds encode for a duration parameter where the duration is several minutes.
1303
+ Languages that support duration primitives should use the largest possible unit, e.g. TimeSpan.FromMinutes(2) in C#.
1304
+ Expected query parameter `input=120`
1305
+
718
1306
  ### Encode_Duration_Query_iso8601
719
1307
 
720
1308
  - Endpoint: `get /encode/duration/query/iso8601`
@@ -838,7 +1426,10 @@ Expected request body for `set`
838
1426
  { "name": "foo" }
839
1427
  ```
840
1428
 
1429
+ Expected Content-Type header: application/json
1430
+
841
1431
  Expected no request body for `omit`
1432
+ Expected Content-Type header: must NOT be present
842
1433
 
843
1434
  ### Parameters_BodyOptionality_requiredExplicit
844
1435
 
@@ -894,11 +1485,54 @@ This test is testing sending a pipes collection format array query parameters
894
1485
 
895
1486
  This test is testing sending a ssv collection format array query parameters
896
1487
 
897
- ### Parameters_CollectionFormat_Query_tsv
1488
+ ### Parameters_Path_normal
1489
+
1490
+ - Endpoint: `get /parameters/path/normal/{name}`
1491
+
1492
+ Test case for normal path parameter.
1493
+
1494
+ Should generate an operation like below:
1495
+
1496
+ ```
1497
+ normal(name: string)
1498
+ ```
1499
+
1500
+ Expected request path:
1501
+
1502
+ ```
1503
+ /normal/foo
1504
+ ```
1505
+
1506
+ ### Parameters_Path_optional
1507
+
1508
+ - Endpoint: `get /parameters/path/optional{/name}`
1509
+
1510
+ Test case for optional path parameter.
1511
+
1512
+ Should generate an operation like below:
1513
+
1514
+ ```
1515
+ optional(name?: string)
1516
+ ```
1517
+
1518
+ Expected two request:
1519
+ First request path:
1520
+
1521
+ ```
1522
+ /optional
1523
+ ```
898
1524
 
899
- - Endpoint: `get /parameters/collection-format/query/tsv`
1525
+ Second request path:
900
1526
 
901
- This test is testing sending a tsv collection format array query parameters
1527
+ ```
1528
+ /optional/foo
1529
+ ```
1530
+
1531
+ ### Parameters_Query_Constant_post
1532
+
1533
+ - Endpoint: `post /parameters/query/constant`
1534
+
1535
+ Expect to handle a constant value for query and mock api returns nothing
902
1536
 
903
1537
  ### Parameters_Spread_Alias_spreadAsRequestBody
904
1538
 
@@ -1165,7 +1799,7 @@ Expected input body:
1165
1799
  }
1166
1800
  ],
1167
1801
  "intValue": 1,
1168
- "floatValue": 1.1,
1802
+ "floatValue": 1.25,
1169
1803
  "innerModel": {
1170
1804
  "name": "InnerMadge",
1171
1805
  "description": "innerDesc"
@@ -1193,7 +1827,7 @@ Expected response body:
1193
1827
  }
1194
1828
  ],
1195
1829
  "intValue": 1,
1196
- "floatValue": 1.1,
1830
+ "floatValue": 1.25,
1197
1831
  "innerModel": {
1198
1832
  "name": "InnerMadge",
1199
1833
  "description": "innerDesc"
@@ -1309,9 +1943,9 @@ Expected request body is a string '{cat}'.
1309
1943
  Expect request (
1310
1944
 
1311
1945
  - 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, cadl-ranch will check it; content-type of other parts is optional, cadl-ranch will ignore it.
1946
+ appropriate media type, server will check it; content-type of other parts is optional, server will ignore it.
1313
1947
  - 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, cadl-ranch can't parse them all.
1948
+ If there are duplicated filename in same filedName, server can't parse them all.
1315
1949
  ):
1316
1950
 
1317
1951
  ```
@@ -1334,9 +1968,9 @@ Content-Type: application/octet-stream;
1334
1968
  Expect request (
1335
1969
 
1336
1970
  - 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, cadl-ranch will check it; content-type of other parts is optional, cadl-ranch will ignore it.
1971
+ appropriate media type, server will check it; content-type of other parts is optional, server will ignore it.
1338
1972
  - 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, cadl-ranch can't parse them all.
1973
+ If there are duplicated filename in same fieldName, server can't parse them all.
1340
1974
  ):
1341
1975
 
1342
1976
  ```
@@ -1364,9 +1998,9 @@ Content-Type: application/octet-stream;
1364
1998
  Expect request (
1365
1999
 
1366
2000
  - 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, cadl-ranch will check it; content-type of other parts is optional, cadl-ranch will ignore it.
2001
+ appropriate media type, server will check it; content-type of other parts is optional, server will ignore it.
1368
2002
  - 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, cadl-ranch can't parse them all.
2003
+ If there are duplicated filename in same fieldName, server can't parse them all.
1370
2004
  ):
1371
2005
 
1372
2006
  ```
@@ -1416,6 +2050,68 @@ Content-Type: image/jpg
1416
2050
  --abcde12345--
1417
2051
  ```
1418
2052
 
2053
+ ### Payload_MultiPart_FormData_File_uploadFileArray
2054
+
2055
+ - Endpoint: `post /multipart/form-data/file/file-array`
2056
+
2057
+ Test multiple File instances in multipart form data.
2058
+ Expected request:
2059
+
2060
+ ```
2061
+ POST /multipart/form-data/file/file-array HTTP/1.1
2062
+ Content-Type: multipart/form-data; boundary=abcde12345
2063
+
2064
+ --abcde12345
2065
+ Content-Disposition: form-data; name="files"; filename="image1.png"
2066
+ Content-Type: image/png
2067
+
2068
+ {…file content of image.png…}
2069
+ --abcde12345
2070
+ Content-Disposition: form-data; name="files"; filename="image2.png"
2071
+ Content-Type: image/png
2072
+
2073
+ {…file content of image.png…}
2074
+ --abcde12345--
2075
+ ```
2076
+
2077
+ ### Payload_MultiPart_FormData_File_uploadFileRequiredFilename
2078
+
2079
+ - Endpoint: `post /multipart/form-data/file/required-filename`
2080
+
2081
+ Test File type in multipart form data with required filename.
2082
+ Expected request:
2083
+
2084
+ ```
2085
+ POST /multipart/form-data/file/required-filename HTTP/1.1
2086
+ Content-Type: multipart/form-data; boundary=abcde12345
2087
+
2088
+ --abcde12345
2089
+ Content-Disposition: form-data; name="file"; filename="image.png"
2090
+ Content-Type: image/png
2091
+
2092
+ {…file content of image.png…}
2093
+ --abcde12345--
2094
+ ```
2095
+
2096
+ ### Payload_MultiPart_FormData_File_uploadFileSpecificContentType
2097
+
2098
+ - Endpoint: `post /multipart/form-data/file/specific-content-type`
2099
+
2100
+ Test File type in multipart form data with specific content type.
2101
+ Expected request:
2102
+
2103
+ ```
2104
+ POST /multipart/form-data/file/specific-content-type HTTP/1.1
2105
+ Content-Type: multipart/form-data; boundary=abcde12345
2106
+
2107
+ --abcde12345
2108
+ Content-Disposition: form-data; name="file"; filename="image.png"
2109
+ Content-Type: image/png
2110
+
2111
+ {…file content of image.png…}
2112
+ --abcde12345--
2113
+ ```
2114
+
1419
2115
  ### Payload_MultiPart_FormData_fileArrayAndBasic
1420
2116
 
1421
2117
  - Endpoint: `post /multipart/form-data/complex-parts`
@@ -1423,9 +2119,9 @@ Content-Type: image/jpg
1423
2119
  Expect request (
1424
2120
 
1425
2121
  - 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, cadl-ranch will check it; content-type of other parts is optional, cadl-ranch will ignore it.
2122
+ appropriate media type, server will check it; content-type of other parts is optional, server will ignore it.
1427
2123
  - 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, cadl-ranch can't parse them all.
2124
+ If there are duplicated filename in same fieldName, server can't parse them all.
1429
2125
  ):
1430
2126
 
1431
2127
  ```
@@ -1533,7 +2229,7 @@ Content-Type: application/octet-stream
1533
2229
 
1534
2230
  - Endpoint: `post /multipart/form-data/complex-parts-with-httppart`
1535
2231
 
1536
- For File part, filename will not be checked but it is necessary otherwise cadl-ranch can't parse it;
2232
+ For File part, filename will not be checked but it is necessary otherwise server can't parse it;
1537
2233
  content-type will be checked with value "application/octet-stream". Expect request:
1538
2234
 
1539
2235
  ```
@@ -1606,9 +2302,9 @@ Content-Type: text/plain
1606
2302
  Expect request (
1607
2303
 
1608
2304
  - 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, cadl-ranch will check it; content-type of other parts is optional, cadl-ranch will ignore it.
2305
+ appropriate media type, server will check it; content-type of other parts is optional, server will ignore it.
1610
2306
  - 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, cadl-ranch can't parse them all.
2307
+ If there are duplicated filename in same fieldName, server can't parse them all.
1612
2308
  ):
1613
2309
 
1614
2310
  ```
@@ -1638,9 +2334,9 @@ Content-Type: application/octet-stream
1638
2334
  Please send request twice, first time with only profileImage, second time with both profileImage and picture(
1639
2335
 
1640
2336
  - 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, cadl-ranch will check it; content-type of other parts is optional, cadl-ranch will ignore it.
2337
+ appropriate media type, server will check it; content-type of other parts is optional, server will ignore it.
1642
2338
  - 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, cadl-ranch can't parse them all.
2339
+ If there are duplicated filename in same fieldName, server can't parse them all.
1644
2340
  ):
1645
2341
 
1646
2342
  ```
@@ -1661,41 +2357,686 @@ Content-Type: application/octet-stream
1661
2357
  --abcde12345--
1662
2358
  ```
1663
2359
 
1664
- ### Payload_Pageable_ServerDrivenPagination_link
2360
+ ### Payload_MultiPart_FormData_optionalParts
1665
2361
 
1666
- - Endpoint: `get /payload/pageable/server-driven-pagination/link`
2362
+ - Endpoint: `post /multipart/form-data/optional-parts`
1667
2363
 
1668
- Test case for using link as pagination.
2364
+ Please send request three times:
1669
2365
 
1670
- Two requests need to be tested.
2366
+ - First time with only id
2367
+ - Second time with only profileImage
2368
+ - Third time with both id and profileImage
1671
2369
 
1672
- 1. Initial request:
1673
- Expected route: /payload/pageable/server-driven-pagination/link
1674
- Expected response body:
2370
+ Expect requests (
2371
+
2372
+ - according to https://datatracker.ietf.org/doc/html/rfc7578#section-4.4, content-type of file part shall be labeled with
2373
+ appropriate media type, server will check it; content-type of other parts is optional, server will ignore it.
2374
+ - according to https://datatracker.ietf.org/doc/html/rfc7578#section-4.2, filename of file part SHOULD be supplied.
2375
+ If there are duplicated filename in same fieldName, server can't parse them all.
2376
+ ):
1675
2377
 
1676
- ```json
1677
- {
1678
- "pets": [
1679
- { "id": "1", "name": "dog" },
1680
- { "id": "2", "name": "cat" }
1681
- ],
1682
- "next": "http://[host]:[port]/payload/pageable/server-driven-pagination/link/nextPage"
1683
- }
1684
2378
  ```
2379
+ POST /upload HTTP/1.1
2380
+ Content-Length: 428
2381
+ Content-Type: multipart/form-data; boundary=abcde12345
1685
2382
 
1686
- 2. Next page request:
1687
- Expected route: /payload/pageable/server-driven-pagination/link/nextPage
1688
- Expected response body:
2383
+ --abcde12345
2384
+ Content-Disposition: form-data; name="id"
2385
+ Content-Type: text/plain
1689
2386
 
1690
- ```json
1691
- {
1692
- "pets": [
1693
- { "id": "3", "name": "bird" },
2387
+ 123
2388
+ --abcde12345--
2389
+ ```
2390
+
2391
+ ```
2392
+ POST /upload HTTP/1.1
2393
+ Content-Length: 428
2394
+ Content-Type: multipart/form-data; boundary=abcde12345
2395
+
2396
+ --abcde12345
2397
+ Content-Disposition: form-data; name="profileImage"; filename="<any-or-no-name-is-ok>"
2398
+ Content-Type: application/octet-stream
2399
+
2400
+ {…file content of .jpg file…}
2401
+ --abcde12345--
2402
+ ```
2403
+
2404
+ ```
2405
+ POST /upload HTTP/1.1
2406
+ Content-Length: 428
2407
+ Content-Type: multipart/form-data; boundary=abcde12345
2408
+
2409
+ --abcde12345
2410
+ Content-Disposition: form-data; name="id"
2411
+ Content-Type: text/plain
2412
+
2413
+ 123
2414
+ --abcde12345
2415
+ Content-Disposition: form-data; name="profileImage"; filename="<any-or-no-name-is-ok>"
2416
+ Content-Type: application/octet-stream
2417
+
2418
+ {…file content of .jpg file…}
2419
+ --abcde12345--
2420
+ ```
2421
+
2422
+ ### Payload_MultiPart_FormData_withWireName
2423
+
2424
+ - Endpoint: `post /multipart/form-data/mixed-parts-with-wire-name`
2425
+
2426
+ Expect request with wire names (
2427
+
2428
+ - according to https://datatracker.ietf.org/doc/html/rfc7578#section-4.4, content-type of file part shall be labeled with
2429
+ appropriate media type, server will check it; content-type of other parts is optional, server will ignore it.
2430
+ - according to https://datatracker.ietf.org/doc/html/rfc7578#section-4.2, filename of file part SHOULD be supplied.
2431
+ If there are duplicated filename in same fieldName, server can't parse them all.
2432
+ ):
2433
+
2434
+ ```
2435
+ POST /upload HTTP/1.1
2436
+ Content-Length: 428
2437
+ Content-Type: multipart/form-data; boundary=abcde12345
2438
+
2439
+ --abcde12345
2440
+ Content-Disposition: form-data; name="id"
2441
+ Content-Type: text/plain
2442
+
2443
+ 123
2444
+ --abcde12345
2445
+ Content-Disposition: form-data; name="profileImage"; filename="<any-or-no-name-is-ok>"
2446
+ Content-Type: application/octet-stream;
2447
+
2448
+ {…file content of .jpg file…}
2449
+ --abcde12345--
2450
+ ```
2451
+
2452
+ ### Payload_Pageable_PageSize_listWithoutContinuation
2453
+
2454
+ - Endpoint: `get /payload/pageable/pagesize/without-continuation`
2455
+
2456
+ Test case for simple pagination without nextlink or continuationToken.
2457
+
2458
+ Single request:
2459
+ Expected route: /payload/pageable/pagesize/without-continuation
2460
+
2461
+ Expected response body:
2462
+
2463
+ ```json
2464
+ {
2465
+ "pets": [
2466
+ { "id": "1", "name": "dog" },
2467
+ { "id": "2", "name": "cat" },
2468
+ { "id": "3", "name": "bird" },
2469
+ { "id": "4", "name": "fish" }
2470
+ ]
2471
+ }
2472
+ ```
2473
+
2474
+ ### Payload_Pageable_PageSize_listWithPageSize
2475
+
2476
+ - Endpoint: `get /payload/pageable/pagesize/list`
2477
+
2478
+ Test case for pagination with a regular @pageSize parameter.
2479
+
2480
+ Two requests need to be tested:
2481
+
2482
+ 1. Request with pageSize=2:
2483
+ Expected route: /payload/pageable/pagesize/list?pageSize=2
2484
+
2485
+ Expected response body:
2486
+
2487
+ ```json
2488
+ {
2489
+ "pets": [
2490
+ { "id": "1", "name": "dog" },
2491
+ { "id": "2", "name": "cat" }
2492
+ ]
2493
+ }
2494
+ ```
2495
+
2496
+ 2. Request with pageSize=4:
2497
+ Expected route: /payload/pageable/pagesize/list?pageSize=4
2498
+
2499
+ Expected response body:
2500
+
2501
+ ```json
2502
+ {
2503
+ "pets": [
2504
+ { "id": "1", "name": "dog" },
2505
+ { "id": "2", "name": "cat" },
2506
+ { "id": "3", "name": "bird" },
2507
+ { "id": "4", "name": "fish" }
2508
+ ]
2509
+ }
2510
+ ```
2511
+
2512
+ ### Payload_Pageable_ServerDrivenPagination_AlternateInitialVerb_post
2513
+
2514
+ - Endpoint: `post /payload/pageable/server-driven-pagination/link/initial-post`
2515
+
2516
+ Test case for initial POST request followed by GET for next pages using link pagination.
2517
+ The initial request is a POST with a filter body, and the next page is fetched using a GET request on the next link.
2518
+
2519
+ Two requests need to be tested.
2520
+
2521
+ 1. Initial request (POST):
2522
+ Expected route: /payload/pageable/server-driven-pagination/link/initial-post
2523
+ Expected request body:
2524
+
2525
+ ```json
2526
+ { "filter": "foo eq bar" }
2527
+ ```
2528
+
2529
+ Expected response body:
2530
+
2531
+ ```json
2532
+ {
2533
+ "pets": [
2534
+ { "id": "1", "name": "dog" },
2535
+ { "id": "2", "name": "cat" }
2536
+ ],
2537
+ "next": "http://[host]:[port]/payload/pageable/server-driven-pagination/link/initial-post/nextPage?token=abc"
2538
+ }
2539
+ ```
2540
+
2541
+ 2. Next page request (GET):
2542
+ Expected route: /payload/pageable/server-driven-pagination/link/initial-post/nextPage?token=abc
2543
+ Expected response body:
2544
+
2545
+ ```json
2546
+ {
2547
+ "pets": [
2548
+ { "id": "3", "name": "bird" },
2549
+ { "id": "4", "name": "fish" }
2550
+ ]
2551
+ }
2552
+ ```
2553
+
2554
+ ### Payload_Pageable_ServerDrivenPagination_ContinuationToken_requestHeaderNestedResponseBody
2555
+
2556
+ - Endpoint: `get /payload/pageable/server-driven-pagination/continuationtoken/request-header-nested-response-body`
2557
+
2558
+ 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.
2559
+
2560
+ Two requests need to be tested.
2561
+
2562
+ 1. Initial request:
2563
+ Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-header-nested-response-body?bar=bar
2564
+
2565
+ Expected request header:
2566
+ foo=foo
2567
+
2568
+ Expected response body:
2569
+
2570
+ ```json
2571
+ {
2572
+ "nestedItems": {
2573
+ "pets": [
2574
+ { "id": "1", "name": "dog" },
2575
+ { "id": "2", "name": "cat" }
2576
+ ]
2577
+ },
2578
+ "next": {
2579
+ "nextToken": "page2"
2580
+ }
2581
+ }
2582
+ ```
2583
+
2584
+ 2. Next page request:
2585
+ Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-header-nested-response-body?bar=bar
2586
+
2587
+ Expected request header:
2588
+ token=page2
2589
+ foo=foo
2590
+
2591
+ Expected response body:
2592
+
2593
+ ```json
2594
+ {
2595
+ "nestedItems": {
2596
+ "pets": [
2597
+ { "id": "3", "name": "bird" },
2598
+ { "id": "4", "name": "fish" }
2599
+ ]
2600
+ }
2601
+ }
2602
+ ```
2603
+
2604
+ ### Payload_Pageable_ServerDrivenPagination_ContinuationToken_requestHeaderResponseBody
2605
+
2606
+ - Endpoint: `get /payload/pageable/server-driven-pagination/continuationtoken/request-header-response-body`
2607
+
2608
+ Test case for using continuation token as pagination. Continuation token is passed in the request header and response body.
2609
+
2610
+ Two requests need to be tested.
2611
+
2612
+ 1. Initial request:
2613
+ Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-header-response-body?bar=bar
2614
+
2615
+ Expected request header:
2616
+ foo=foo
2617
+
2618
+ Expected response body:
2619
+
2620
+ ```json
2621
+ {
2622
+ "pets": [
2623
+ { "id": "1", "name": "dog" },
2624
+ { "id": "2", "name": "cat" }
2625
+ ],
2626
+ "nextToken": "page2"
2627
+ }
2628
+ ```
2629
+
2630
+ 2. Next page request:
2631
+ Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-header-response-body?bar=bar
2632
+
2633
+ Expected request header:
2634
+ token=page2
2635
+ foo=foo
2636
+
2637
+ Expected response body:
2638
+
2639
+ ```json
2640
+ {
2641
+ "pets": [
2642
+ { "id": "3", "name": "bird" },
2643
+ { "id": "4", "name": "fish" }
2644
+ ]
2645
+ }
2646
+ ```
2647
+
2648
+ ### Payload_Pageable_ServerDrivenPagination_ContinuationToken_requestHeaderResponseHeader
2649
+
2650
+ - Endpoint: `get /payload/pageable/server-driven-pagination/continuationtoken/request-header-response-header`
2651
+
2652
+ Test case for using continuation token as pagination. Continuation token is passed in the request header and response header.
2653
+
2654
+ Two requests need to be tested.
2655
+
2656
+ 1. Initial request:
2657
+ Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-header-response-header?bar=bar
2658
+
2659
+ Expected request header:
2660
+ foo=foo
2661
+
2662
+ Expected response body:
2663
+
2664
+ ```json
2665
+ {
2666
+ "pets": [
2667
+ { "id": "1", "name": "dog" },
2668
+ { "id": "2", "name": "cat" }
2669
+ ]
2670
+ }
2671
+ ```
2672
+
2673
+ Expected response header:
2674
+ next-token=page2
2675
+
2676
+ 2. Next page request:
2677
+ Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-header-response-header?bar=bar
2678
+
2679
+ Expected request header:
2680
+ token=page2
2681
+ foo=foo
2682
+
2683
+ Expected response body:
2684
+
2685
+ ```json
2686
+ {
2687
+ "pets": [
2688
+ { "id": "3", "name": "bird" },
2689
+ { "id": "4", "name": "fish" }
2690
+ ]
2691
+ }
2692
+ ```
2693
+
2694
+ ### Payload_Pageable_ServerDrivenPagination_ContinuationToken_requestQueryNestedResponseBody
2695
+
2696
+ - Endpoint: `get /payload/pageable/server-driven-pagination/continuationtoken/request-query-nested-response-body`
2697
+
2698
+ 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.
2699
+
2700
+ Two requests need to be tested.
2701
+
2702
+ 1. Initial request:
2703
+ Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-query-nested-response-body?bar=bar
2704
+
2705
+ Expected request header:
2706
+ foo=foo
2707
+
2708
+ Expected response body:
2709
+
2710
+ ```json
2711
+ {
2712
+ "nestedItems": {
2713
+ "pets": [
2714
+ { "id": "1", "name": "dog" },
2715
+ { "id": "2", "name": "cat" }
2716
+ ]
2717
+ },
2718
+ "nestedNext": {
2719
+ "nextToken": "page2"
2720
+ }
2721
+ }
2722
+ ```
2723
+
2724
+ 2. Next page request:
2725
+ Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-query-nested-response-body?bar=bar&token=page2
2726
+
2727
+ Expected request header:
2728
+ foo=foo
2729
+
2730
+ Expected response body:
2731
+
2732
+ ```json
2733
+ {
2734
+ "nestedItems": {
2735
+ "pets": [
2736
+ { "id": "3", "name": "bird" },
2737
+ { "id": "4", "name": "fish" }
2738
+ ]
2739
+ }
2740
+ }
2741
+ ```
2742
+
2743
+ ### Payload_Pageable_ServerDrivenPagination_ContinuationToken_requestQueryResponseBody
2744
+
2745
+ - Endpoint: `get /payload/pageable/server-driven-pagination/continuationtoken/request-query-response-body`
2746
+
2747
+ Test case for using continuation token as pagination. Continuation token is passed in the request query and response body.
2748
+
2749
+ Two requests need to be tested.
2750
+
2751
+ 1. Initial request:
2752
+ Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-query-response-body?bar=bar
2753
+
2754
+ Expected request header:
2755
+ foo=foo
2756
+
2757
+ Expected response body:
2758
+
2759
+ ```json
2760
+ {
2761
+ "pets": [
2762
+ { "id": "1", "name": "dog" },
2763
+ { "id": "2", "name": "cat" }
2764
+ ],
2765
+ "nextToken": "page2"
2766
+ }
2767
+ ```
2768
+
2769
+ 2. Next page request:
2770
+ Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-query-response-body?bar=bar&token=page2
2771
+
2772
+ Expected request header:
2773
+ foo=foo
2774
+
2775
+ Expected response body:
2776
+
2777
+ ```json
2778
+ {
2779
+ "pets": [
2780
+ { "id": "3", "name": "bird" },
2781
+ { "id": "4", "name": "fish" }
2782
+ ]
2783
+ }
2784
+ ```
2785
+
2786
+ ### Payload_Pageable_ServerDrivenPagination_ContinuationToken_requestQueryResponseHeader
2787
+
2788
+ - Endpoint: `get /payload/pageable/server-driven-pagination/continuationtoken/request-query-response-header`
2789
+
2790
+ Test case for using continuation token as pagination. Continuation token is passed in the request query and response header.
2791
+
2792
+ Two requests need to be tested.
2793
+
2794
+ 1. Initial request:
2795
+ Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-query-response-header?bar=bar
2796
+
2797
+ Expected request header:
2798
+ foo=foo
2799
+
2800
+ Expected response body:
2801
+
2802
+ ```json
2803
+ {
2804
+ "pets": [
2805
+ { "id": "1", "name": "dog" },
2806
+ { "id": "2", "name": "cat" }
2807
+ ]
2808
+ }
2809
+ ```
2810
+
2811
+ Expected response header:
2812
+ next-token=page2
2813
+
2814
+ 2. Next page request:
2815
+ Expected route: /payload/pageable/server-driven-pagination/continuationtoken/request-query-response-header?bar=bar&token=page2
2816
+
2817
+ Expected request header:
2818
+ foo=foo
2819
+
2820
+ Expected response body:
2821
+
2822
+ ```json
2823
+ {
2824
+ "pets": [
2825
+ { "id": "3", "name": "bird" },
2826
+ { "id": "4", "name": "fish" }
2827
+ ]
2828
+ }
2829
+ ```
2830
+
2831
+ ### Payload_Pageable_ServerDrivenPagination_link
2832
+
2833
+ - Endpoint: `get /payload/pageable/server-driven-pagination/link`
2834
+
2835
+ Test case for using link as pagination.
2836
+
2837
+ Two requests need to be tested.
2838
+
2839
+ 1. Initial request:
2840
+ Expected route: /payload/pageable/server-driven-pagination/link
2841
+ Expected response body:
2842
+
2843
+ ```json
2844
+ {
2845
+ "pets": [
2846
+ { "id": "1", "name": "dog" },
2847
+ { "id": "2", "name": "cat" }
2848
+ ],
2849
+ "next": "http://[host]:[port]/payload/pageable/server-driven-pagination/link/nextPage"
2850
+ }
2851
+ ```
2852
+
2853
+ 2. Next page request:
2854
+ Expected route: /payload/pageable/server-driven-pagination/link/nextPage
2855
+ Expected response body:
2856
+
2857
+ ```json
2858
+ {
2859
+ "pets": [
2860
+ { "id": "3", "name": "bird" },
2861
+ { "id": "4", "name": "fish" }
2862
+ ]
2863
+ }
2864
+ ```
2865
+
2866
+ ### Payload_Pageable_ServerDrivenPagination_linkString
2867
+
2868
+ - Endpoint: `get /payload/pageable/server-driven-pagination/link-string`
2869
+
2870
+ Test case for using link as pagination with string nextLink.
2871
+
2872
+ Two requests need to be tested.
2873
+
2874
+ 1. Initial request:
2875
+ Expected route: /payload/pageable/server-driven-pagination/link-string
2876
+ Expected response body:
2877
+
2878
+ ```json
2879
+ {
2880
+ "pets": [
2881
+ { "id": "1", "name": "dog" },
2882
+ { "id": "2", "name": "cat" }
2883
+ ],
2884
+ "next": "http://[host]:[port]/payload/pageable/server-driven-pagination/link-string/nextPage"
2885
+ }
2886
+ ```
2887
+
2888
+ 2. Next page request:
2889
+ Expected route: /payload/pageable/server-driven-pagination/link-string/nextPage
2890
+ Expected response body:
2891
+
2892
+ ```json
2893
+ {
2894
+ "pets": [
2895
+ { "id": "3", "name": "bird" },
1694
2896
  { "id": "4", "name": "fish" }
1695
2897
  ]
1696
2898
  }
1697
2899
  ```
1698
2900
 
2901
+ ### Payload_Pageable_ServerDrivenPagination_nestedLink
2902
+
2903
+ - Endpoint: `get /payload/pageable/server-driven-pagination/nested-link`
2904
+
2905
+ Test case for using link as pagination with nested structure.
2906
+
2907
+ Two requests need to be tested.
2908
+
2909
+ 1. Initial request:
2910
+ Expected route: /payload/pageable/server-driven-pagination/nested-link
2911
+ Expected response body:
2912
+
2913
+ ```json
2914
+ {
2915
+ "nestedItems": {
2916
+ "pets": [
2917
+ { "id": "1", "name": "dog" },
2918
+ { "id": "2", "name": "cat" }
2919
+ ]
2920
+ },
2921
+ "nestedNext": {
2922
+ "next": "http://[host]:[port]/payload/pageable/server-driven-pagination/nested-link/nextPage"
2923
+ }
2924
+ }
2925
+ ```
2926
+
2927
+ 2. Next page request:
2928
+ Expected route: /payload/pageable/server-driven-pagination/nested-link/nextPage
2929
+ Expected response body:
2930
+
2931
+ ```json
2932
+ {
2933
+ "nestedItems": {
2934
+ "pets": [
2935
+ { "id": "3", "name": "bird" },
2936
+ { "id": "4", "name": "fish" }
2937
+ ]
2938
+ }
2939
+ }
2940
+ ```
2941
+
2942
+ ### Payload_Pageable_XmlPagination_listWithContinuation
2943
+
2944
+ - Endpoint: `get /payload/pageable/xml/list-with-continuation`
2945
+
2946
+ Test case for XML pagination with continuation token. Continuation token is passed in the request query and response body.
2947
+
2948
+ Two requests need to be tested.
2949
+
2950
+ 1. Initial request:
2951
+ Expected route: /payload/pageable/xml/list
2952
+
2953
+ Expected response body:
2954
+
2955
+ ```xml
2956
+ <PetListResult>
2957
+ <Pets>
2958
+ <Pet>
2959
+ <Id>1</Id>
2960
+ <Name>dog</Name>
2961
+ </Pet>
2962
+ <Pet>
2963
+ <Id>2</Id>
2964
+ <Name>cat</Name>
2965
+ </Pet>
2966
+ </Pets>
2967
+ <NextMarker>page2</NextMarker>
2968
+ </PetListResult>
2969
+ ```
2970
+
2971
+ 2. Next page request:
2972
+ Expected route: /payload/pageable/xml/list?marker=page2
2973
+
2974
+ Expected response body:
2975
+
2976
+ ```xml
2977
+ <PetListResult>
2978
+ <Pets>
2979
+ <Pet>
2980
+ <Id>3</Id>
2981
+ <Name>bird</Name>
2982
+ </Pet>
2983
+ <Pet>
2984
+ <Id>4</Id>
2985
+ <Name>fish</Name>
2986
+ </Pet>
2987
+ </Pets>
2988
+ </PetListResult>
2989
+ ```
2990
+
2991
+ ### Payload_Pageable_XmlPagination_listWithNextLink
2992
+
2993
+ - Endpoint: `get /payload/pageable/xml/list-with-next-link`
2994
+
2995
+ Test case for XML pagination with next link.
2996
+
2997
+ Two requests need to be tested.
2998
+
2999
+ 1. Initial request:
3000
+ Expected route: /payload/pageable/xml/list-with-next-link
3001
+
3002
+ Expected response body:
3003
+
3004
+ ```xml
3005
+ <PetListResult>
3006
+ <Pets>
3007
+ <Pet>
3008
+ <Id>1</Id>
3009
+ <Name>dog</Name>
3010
+ </Pet>
3011
+ <Pet>
3012
+ <Id>2</Id>
3013
+ <Name>cat</Name>
3014
+ </Pet>
3015
+ </Pets>
3016
+ <NextLink>http://[host]:[port]/payload/pageable/xml/list-with-next-link/nextPage</NextLink>
3017
+ </PetListResult>
3018
+ ```
3019
+
3020
+ 2. Next page request:
3021
+ Expected route: /payload/pageable/xml/list-with-next-link/nextPage
3022
+
3023
+ Expected response body:
3024
+
3025
+ ```xml
3026
+ <PetListResult>
3027
+ <Pets>
3028
+ <Pet>
3029
+ <Id>3</Id>
3030
+ <Name>bird</Name>
3031
+ </Pet>
3032
+ <Pet>
3033
+ <Id>4</Id>
3034
+ <Name>fish</Name>
3035
+ </Pet>
3036
+ </Pets>
3037
+ </PetListResult>
3038
+ ```
3039
+
1699
3040
  ### Payload_Xml_ModelWithArrayOfModelValue_get
1700
3041
 
1701
3042
  - Endpoint: `get /payload/xml/modelWithArrayOfModel`
@@ -1762,6 +3103,32 @@ Expected request body:
1762
3103
  </ModelWithAttributes>
1763
3104
  ```
1764
3105
 
3106
+ ### Payload_Xml_ModelWithDatetimeValue_get
3107
+
3108
+ - Endpoint: `get /payload/xml/modelWithDatetime`
3109
+
3110
+ Expected response body:
3111
+
3112
+ ```xml
3113
+ <ModelWithDatetime>
3114
+ <rfc3339>2022-08-26T18:38:00.000Z</rfc3339>
3115
+ <rfc7231>Fri, 26 Aug 2022 14:38:00 GMT</rfc7231>
3116
+ </ModelWithDatetime>
3117
+ ```
3118
+
3119
+ ### Payload_Xml_ModelWithDatetimeValue_put
3120
+
3121
+ - Endpoint: `put /payload/xml/modelWithDatetime`
3122
+
3123
+ Expected request body:
3124
+
3125
+ ```xml
3126
+ <ModelWithDatetime>
3127
+ <rfc3339>2022-08-26T18:38:00.000Z</rfc3339>
3128
+ <rfc7231>Fri, 26 Aug 2022 14:38:00 GMT</rfc7231>
3129
+ </ModelWithDatetime>
3130
+ ```
3131
+
1765
3132
  ### Payload_Xml_ModelWithDictionaryValue_get
1766
3133
 
1767
3134
  - Endpoint: `get /payload/xml/modelWithDictionary`
@@ -1858,6 +3225,114 @@ Expected request body:
1858
3225
  </ModelWithEncodedNamesSrc>
1859
3226
  ```
1860
3227
 
3228
+ ### Payload_Xml_ModelWithEnumValue_get
3229
+
3230
+ - Endpoint: `get /payload/xml/modelWithEnum`
3231
+
3232
+ Expected response body:
3233
+
3234
+ ```xml
3235
+ <ModelWithEnum>
3236
+ <status>success</status>
3237
+ </ModelWithEnum>
3238
+ ```
3239
+
3240
+ ### Payload_Xml_ModelWithEnumValue_put
3241
+
3242
+ - Endpoint: `put /payload/xml/modelWithEnum`
3243
+
3244
+ Expected request body:
3245
+
3246
+ ```xml
3247
+ <ModelWithEnum>
3248
+ <status>success</status>
3249
+ </ModelWithEnum>
3250
+ ```
3251
+
3252
+ ### Payload_Xml_ModelWithNamespaceOnPropertiesValue_get
3253
+
3254
+ - Endpoint: `get /payload/xml/modelWithNamespaceOnProperties`
3255
+
3256
+ Expected response body:
3257
+
3258
+ ```xml
3259
+ <smp:ModelWithNamespaceOnProperties xmlns:smp="http://example.com/schema" xmlns:ns2="http://example.com/ns2">
3260
+ <id>123</id>
3261
+ <smp:title>The Great Gatsby</smp:title>
3262
+ <ns2:author>F. Scott Fitzgerald</ns2:author>
3263
+ </smp:ModelWithNamespaceOnProperties>
3264
+ ```
3265
+
3266
+ ### Payload_Xml_ModelWithNamespaceOnPropertiesValue_put
3267
+
3268
+ - Endpoint: `put /payload/xml/modelWithNamespaceOnProperties`
3269
+
3270
+ Expected request body:
3271
+
3272
+ ```xml
3273
+ <smp:ModelWithNamespaceOnProperties xmlns:smp="http://example.com/schema" xmlns:ns2="http://example.com/ns2">
3274
+ <id>123</id>
3275
+ <smp:title>The Great Gatsby</smp:title>
3276
+ <ns2:author>F. Scott Fitzgerald</ns2:author>
3277
+ </smp:ModelWithNamespaceOnProperties>
3278
+ ```
3279
+
3280
+ ### Payload_Xml_ModelWithNamespaceValue_get
3281
+
3282
+ - Endpoint: `get /payload/xml/modelWithNamespace`
3283
+
3284
+ Expected response body:
3285
+
3286
+ ```xml
3287
+ <smp:ModelWithNamespace xmlns:smp="http://example.com/schema">
3288
+ <id>123</id>
3289
+ <title>The Great Gatsby</title>
3290
+ </smp:ModelWithNamespace>
3291
+ ```
3292
+
3293
+ ### Payload_Xml_ModelWithNamespaceValue_put
3294
+
3295
+ - Endpoint: `put /payload/xml/modelWithNamespace`
3296
+
3297
+ Expected request body:
3298
+
3299
+ ```xml
3300
+ <smp:ModelWithNamespace xmlns:smp="http://example.com/schema">
3301
+ <id>123</id>
3302
+ <title>The Great Gatsby</title>
3303
+ </smp:ModelWithNamespace>
3304
+ ```
3305
+
3306
+ ### Payload_Xml_ModelWithNestedModelValue_get
3307
+
3308
+ - Endpoint: `get /payload/xml/modelWithNestedModel`
3309
+
3310
+ Expected response body:
3311
+
3312
+ ```xml
3313
+ <ModelWithNestedModel>
3314
+ <nested>
3315
+ <name>foo</name>
3316
+ <age>123</age>
3317
+ </nested>
3318
+ </ModelWithNestedModel>
3319
+ ```
3320
+
3321
+ ### Payload_Xml_ModelWithNestedModelValue_put
3322
+
3323
+ - Endpoint: `put /payload/xml/modelWithNestedModel`
3324
+
3325
+ Expected request body:
3326
+
3327
+ ```xml
3328
+ <ModelWithNestedModel>
3329
+ <nested>
3330
+ <name>foo</name>
3331
+ <age>123</age>
3332
+ </nested>
3333
+ </ModelWithNestedModel>
3334
+ ```
3335
+
1861
3336
  ### Payload_Xml_ModelWithOptionalFieldValue_get
1862
3337
 
1863
3338
  - Endpoint: `get /payload/xml/modelWithOptionalField`
@@ -1918,6 +3393,32 @@ Expected request body:
1918
3393
  </ModelWithRenamedArrays>
1919
3394
  ```
1920
3395
 
3396
+ ### Payload_Xml_ModelWithRenamedAttributeValue_get
3397
+
3398
+ - Endpoint: `get /payload/xml/modelWithRenamedAttribute`
3399
+
3400
+ Expected response body:
3401
+
3402
+ ```xml
3403
+ <ModelWithRenamedAttribute xml-id="123">
3404
+ <title>The Great Gatsby</title>
3405
+ <author>F. Scott Fitzgerald</author>
3406
+ </ModelWithRenamedAttribute>
3407
+ ```
3408
+
3409
+ ### Payload_Xml_ModelWithRenamedAttributeValue_put
3410
+
3411
+ - Endpoint: `put /payload/xml/modelWithRenamedAttribute`
3412
+
3413
+ Expected request body:
3414
+
3415
+ ```xml
3416
+ <ModelWithRenamedAttribute xml-id="123">
3417
+ <title>The Great Gatsby</title>
3418
+ <author>F. Scott Fitzgerald</author>
3419
+ </ModelWithRenamedAttribute>
3420
+ ```
3421
+
1921
3422
  ### Payload_Xml_ModelWithRenamedFieldsValue_get
1922
3423
 
1923
3424
  - Endpoint: `get /payload/xml/modelWithRenamedFields`
@@ -1956,6 +3457,178 @@ Expected request body:
1956
3457
  </ModelWithRenamedFieldsSrc>
1957
3458
  ```
1958
3459
 
3460
+ ### Payload_Xml_ModelWithRenamedNestedModelValue_get
3461
+
3462
+ - Endpoint: `get /payload/xml/modelWithRenamedNestedModel`
3463
+
3464
+ Expected response body:
3465
+
3466
+ ```xml
3467
+ <ModelWithRenamedNestedModel>
3468
+ <author>
3469
+ <name>foo</name>
3470
+ </author>
3471
+ </ModelWithRenamedNestedModel>
3472
+ ```
3473
+
3474
+ ### Payload_Xml_ModelWithRenamedNestedModelValue_put
3475
+
3476
+ - Endpoint: `put /payload/xml/modelWithRenamedNestedModel`
3477
+
3478
+ Expected request body:
3479
+
3480
+ ```xml
3481
+ <ModelWithRenamedNestedModel>
3482
+ <author>
3483
+ <name>foo</name>
3484
+ </author>
3485
+ </ModelWithRenamedNestedModel>
3486
+ ```
3487
+
3488
+ ### Payload_Xml_ModelWithRenamedPropertyValue_get
3489
+
3490
+ - Endpoint: `get /payload/xml/modelWithRenamedProperty`
3491
+
3492
+ Expected response body:
3493
+
3494
+ ```xml
3495
+ <ModelWithRenamedProperty>
3496
+ <renamedTitle>foo</renamedTitle>
3497
+ <author>bar</author>
3498
+ </ModelWithRenamedProperty>
3499
+ ```
3500
+
3501
+ ### Payload_Xml_ModelWithRenamedPropertyValue_put
3502
+
3503
+ - Endpoint: `put /payload/xml/modelWithRenamedProperty`
3504
+
3505
+ Expected request body:
3506
+
3507
+ ```xml
3508
+ <ModelWithRenamedProperty>
3509
+ <renamedTitle>foo</renamedTitle>
3510
+ <author>bar</author>
3511
+ </ModelWithRenamedProperty>
3512
+ ```
3513
+
3514
+ ### Payload_Xml_ModelWithRenamedUnwrappedModelArrayValue_get
3515
+
3516
+ - Endpoint: `get /payload/xml/modelWithRenamedUnwrappedModelArray`
3517
+
3518
+ Expected response body:
3519
+
3520
+ ```xml
3521
+ <ModelWithRenamedUnwrappedModelArray>
3522
+ <ModelItem>
3523
+ <name>foo</name>
3524
+ <age>123</age>
3525
+ </ModelItem>
3526
+ <ModelItem>
3527
+ <name>bar</name>
3528
+ <age>456</age>
3529
+ </ModelItem>
3530
+ </ModelWithRenamedUnwrappedModelArray>
3531
+ ```
3532
+
3533
+ ### Payload_Xml_ModelWithRenamedUnwrappedModelArrayValue_put
3534
+
3535
+ - Endpoint: `put /payload/xml/modelWithRenamedUnwrappedModelArray`
3536
+
3537
+ Expected request body:
3538
+
3539
+ ```xml
3540
+ <ModelWithRenamedUnwrappedModelArray>
3541
+ <ModelItem>
3542
+ <name>foo</name>
3543
+ <age>123</age>
3544
+ </ModelItem>
3545
+ <ModelItem>
3546
+ <name>bar</name>
3547
+ <age>456</age>
3548
+ </ModelItem>
3549
+ </ModelWithRenamedUnwrappedModelArray>
3550
+ ```
3551
+
3552
+ ### Payload_Xml_ModelWithRenamedWrappedAndItemModelArrayValue_get
3553
+
3554
+ - Endpoint: `get /payload/xml/modelWithRenamedWrappedAndItemModelArray`
3555
+
3556
+ Expected response body:
3557
+
3558
+ ```xml
3559
+ <ModelWithRenamedWrappedAndItemModelArray>
3560
+ <AllBooks>
3561
+ <XmlBook>
3562
+ <title>The Great Gatsby</title>
3563
+ </XmlBook>
3564
+ <XmlBook>
3565
+ <title>Les Miserables</title>
3566
+ </XmlBook>
3567
+ </AllBooks>
3568
+ </ModelWithRenamedWrappedAndItemModelArray>
3569
+ ```
3570
+
3571
+ ### Payload_Xml_ModelWithRenamedWrappedAndItemModelArrayValue_put
3572
+
3573
+ - Endpoint: `put /payload/xml/modelWithRenamedWrappedAndItemModelArray`
3574
+
3575
+ Expected request body:
3576
+
3577
+ ```xml
3578
+ <ModelWithRenamedWrappedAndItemModelArray>
3579
+ <AllBooks>
3580
+ <XmlBook>
3581
+ <title>The Great Gatsby</title>
3582
+ </XmlBook>
3583
+ <XmlBook>
3584
+ <title>Les Miserables</title>
3585
+ </XmlBook>
3586
+ </AllBooks>
3587
+ </ModelWithRenamedWrappedAndItemModelArray>
3588
+ ```
3589
+
3590
+ ### Payload_Xml_ModelWithRenamedWrappedModelArrayValue_get
3591
+
3592
+ - Endpoint: `get /payload/xml/modelWithRenamedWrappedModelArray`
3593
+
3594
+ Expected response body:
3595
+
3596
+ ```xml
3597
+ <ModelWithRenamedWrappedModelArray>
3598
+ <AllItems>
3599
+ <SimpleModel>
3600
+ <name>foo</name>
3601
+ <age>123</age>
3602
+ </SimpleModel>
3603
+ <SimpleModel>
3604
+ <name>bar</name>
3605
+ <age>456</age>
3606
+ </SimpleModel>
3607
+ </AllItems>
3608
+ </ModelWithRenamedWrappedModelArray>
3609
+ ```
3610
+
3611
+ ### Payload_Xml_ModelWithRenamedWrappedModelArrayValue_put
3612
+
3613
+ - Endpoint: `put /payload/xml/modelWithRenamedWrappedModelArray`
3614
+
3615
+ Expected request body:
3616
+
3617
+ ```xml
3618
+ <ModelWithRenamedWrappedModelArray>
3619
+ <AllItems>
3620
+ <SimpleModel>
3621
+ <name>foo</name>
3622
+ <age>123</age>
3623
+ </SimpleModel>
3624
+ <SimpleModel>
3625
+ <name>bar</name>
3626
+ <age>456</age>
3627
+ </SimpleModel>
3628
+ </AllItems>
3629
+ </ModelWithRenamedWrappedModelArray>
3630
+ ```
3631
+
1959
3632
  ### Payload_Xml_ModelWithSimpleArraysValue_get
1960
3633
 
1961
3634
  - Endpoint: `get /payload/xml/modelWithSimpleArrays`
@@ -2056,6 +3729,74 @@ Expected request body:
2056
3729
  </ModelWithUnwrappedArray>
2057
3730
  ```
2058
3731
 
3732
+ ### Payload_Xml_ModelWithUnwrappedModelArrayValue_get
3733
+
3734
+ - Endpoint: `get /payload/xml/modelWithUnwrappedModelArray`
3735
+
3736
+ Expected response body:
3737
+
3738
+ ```xml
3739
+ <ModelWithUnwrappedModelArray>
3740
+ <items>
3741
+ <name>foo</name>
3742
+ <age>123</age>
3743
+ </items>
3744
+ <items>
3745
+ <name>bar</name>
3746
+ <age>456</age>
3747
+ </items>
3748
+ </ModelWithUnwrappedModelArray>
3749
+ ```
3750
+
3751
+ ### Payload_Xml_ModelWithUnwrappedModelArrayValue_put
3752
+
3753
+ - Endpoint: `put /payload/xml/modelWithUnwrappedModelArray`
3754
+
3755
+ Expected request body:
3756
+
3757
+ ```xml
3758
+ <ModelWithUnwrappedModelArray>
3759
+ <items>
3760
+ <name>foo</name>
3761
+ <age>123</age>
3762
+ </items>
3763
+ <items>
3764
+ <name>bar</name>
3765
+ <age>456</age>
3766
+ </items>
3767
+ </ModelWithUnwrappedModelArray>
3768
+ ```
3769
+
3770
+ ### Payload_Xml_ModelWithWrappedPrimitiveCustomItemNamesValue_get
3771
+
3772
+ - Endpoint: `get /payload/xml/modelWithWrappedPrimitiveCustomItemNames`
3773
+
3774
+ Expected response body:
3775
+
3776
+ ```xml
3777
+ <ModelWithWrappedPrimitiveCustomItemNames>
3778
+ <ItemsTags>
3779
+ <ItemName>fiction</ItemName>
3780
+ <ItemName>classic</ItemName>
3781
+ </ItemsTags>
3782
+ </ModelWithWrappedPrimitiveCustomItemNames>
3783
+ ```
3784
+
3785
+ ### Payload_Xml_ModelWithWrappedPrimitiveCustomItemNamesValue_put
3786
+
3787
+ - Endpoint: `put /payload/xml/modelWithWrappedPrimitiveCustomItemNames`
3788
+
3789
+ Expected request body:
3790
+
3791
+ ```xml
3792
+ <ModelWithWrappedPrimitiveCustomItemNames>
3793
+ <ItemsTags>
3794
+ <ItemName>fiction</ItemName>
3795
+ <ItemName>classic</ItemName>
3796
+ </ItemsTags>
3797
+ </ModelWithWrappedPrimitiveCustomItemNames>
3798
+ ```
3799
+
2059
3800
  ### Payload_Xml_SimpleModelValue_get
2060
3801
 
2061
3802
  - Endpoint: `get /payload/xml/simpleModel`
@@ -2082,6 +3823,19 @@ Expected request body:
2082
3823
  </SimpleModel>
2083
3824
  ```
2084
3825
 
3826
+ ### Payload_Xml_XmlErrorValue_get
3827
+
3828
+ - Endpoint: `get /payload/xml/error`
3829
+
3830
+ Expected error response body:
3831
+
3832
+ ```xml
3833
+ <XmlErrorBody>
3834
+ <message>Something went wrong</message>
3835
+ <code>400</code>
3836
+ </XmlErrorBody>
3837
+ ```
3838
+
2085
3839
  ### Response_StatusCodeRange_errorResponseStatusCode404
2086
3840
 
2087
3841
  - Endpoint: `get /response/status-code-range/error-response-status-code-404`
@@ -2200,7 +3954,7 @@ Expected path: /routes/path/label/standard/record.a,1,b,2
2200
3954
 
2201
3955
  Test matrix expansion with explode: true when passed an array value.
2202
3956
  Param value: ["a","b"]
2203
- Expected path: /routes/path/matrix/explode/array;a.b
3957
+ Expected path: /routes/path/matrix/explode/array;param=a;param=b
2204
3958
 
2205
3959
  ### Routes_PathParameters_MatrixExpansion_Explode_primitive
2206
3960
 
@@ -2208,7 +3962,7 @@ Expected path: /routes/path/matrix/explode/array;a.b
2208
3962
 
2209
3963
  Test matrix expansion with explode: true when passed a primitive value.
2210
3964
  Param value: "a"
2211
- Expected path: /routes/path/matrix/explode/primitive;a
3965
+ Expected path: /routes/path/matrix/explode/primitive;param=a
2212
3966
 
2213
3967
  ### Routes_PathParameters_MatrixExpansion_Explode_record
2214
3968
 
@@ -2224,7 +3978,7 @@ Expected path: /routes/path/matrix/explode/record;a=1;b=2
2224
3978
 
2225
3979
  Test matrix expansion with explode: false when passed an array value.
2226
3980
  Param value: ["a","b"]
2227
- Expected path: /routes/path/matrix/standard/array;a,b
3981
+ Expected path: /routes/path/matrix/standard/array;param=a;param=b
2228
3982
 
2229
3983
  ### Routes_PathParameters_MatrixExpansion_Standard_primitive
2230
3984
 
@@ -2232,7 +3986,7 @@ Expected path: /routes/path/matrix/standard/array;a,b
2232
3986
 
2233
3987
  Test matrix expansion with explode: false when passed a primitive value.
2234
3988
  Param value: "a"
2235
- Expected path: /routes/path/matrix/standard/primitive;a
3989
+ Expected path: /routes/path/matrix/standard/primitive;param=a
2236
3990
 
2237
3991
  ### Routes_PathParameters_MatrixExpansion_Standard_record
2238
3992
 
@@ -2240,7 +3994,7 @@ Expected path: /routes/path/matrix/standard/primitive;a
2240
3994
 
2241
3995
  Test matrix expansion with explode: false when passed a record value.
2242
3996
  Param value: {a: 1, b: 2}
2243
- Expected path: /routes/path/matrix/standard/record;a,1,b,2
3997
+ Expected path: /routes/path/matrix/standard/record;a=1;b=2
2244
3998
 
2245
3999
  ### Routes_PathParameters_PathExpansion_Explode_array
2246
4000
 
@@ -2615,6 +4369,36 @@ Expected header parameters:
2615
4369
 
2616
4370
  Check we recognize Repeatability-Request-ID and Repeatability-First-Sent.
2617
4371
 
4372
+ ### SpecialWords_ExtensibleStrings_putExtensibleStringValue
4373
+
4374
+ - Endpoint: `put /special-words/extensible-strings/string`
4375
+
4376
+ Verify that enum members with special word names can be sent and received properly.
4377
+ Send 'class' and expect the same value back.
4378
+
4379
+ ### SpecialWords_ModelProperties_dictMethods
4380
+
4381
+ - Endpoint: `get /special-words/model-properties/dict-methods`
4382
+
4383
+ 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.
4384
+
4385
+ Send
4386
+
4387
+ ```json
4388
+ {
4389
+ "keys": "ok",
4390
+ "items": "ok",
4391
+ "values": "ok",
4392
+ "popitem": "ok",
4393
+ "clear": "ok",
4394
+ "update": "ok",
4395
+ "setdefault": "ok",
4396
+ "pop": "ok",
4397
+ "get": "ok",
4398
+ "copy": "ok"
4399
+ }
4400
+ ```
4401
+
2618
4402
  ### SpecialWords_ModelProperties_sameAsModel
2619
4403
 
2620
4404
  - Endpoint: `get /special-words/model-properties/same-as-model`
@@ -2627,6 +4411,18 @@ Send
2627
4411
  { "SameAsModel": "ok" }
2628
4412
  ```
2629
4413
 
4414
+ ### SpecialWords_ModelProperties_withList
4415
+
4416
+ - Endpoint: `get /special-words/model-properties/list`
4417
+
4418
+ Verify that a property can be named "list", which is a reserved word in many languages like Python.
4419
+
4420
+ Send
4421
+
4422
+ ```json
4423
+ { "list": "ok" }
4424
+ ```
4425
+
2630
4426
  ### SpecialWords_Models_and
2631
4427
 
2632
4428
  - Endpoint: `get /special-words/models/and`
@@ -3359,6 +5155,18 @@ Verify that the name "with" works. Send this parameter to pass with value `ok`.
3359
5155
 
3360
5156
  Verify that the name "yield" works. Send this parameter to pass with value `ok`.
3361
5157
 
5158
+ ### Streaming_Jsonl_Basic_receive
5159
+
5160
+ - Endpoint: `get /streaming/jsonl/basic/receive`
5161
+
5162
+ Basic jsonl streaming for response.
5163
+
5164
+ ### Streaming_Jsonl_Basic_send
5165
+
5166
+ - Endpoint: `post /streaming/jsonl/basic/send`
5167
+
5168
+ Basic jsonl streaming for request.
5169
+
3362
5170
  ### Type_Array_BooleanValue_get
3363
5171
 
3364
5172
  - Endpoint: `get /type/array/boolean`
@@ -3913,6 +5721,90 @@ Expect to send a known value. Mock api expect to receive 'Monday'
3913
5721
 
3914
5722
  Expect to handle an unknown value. Mock api expect to receive 'Weekend'
3915
5723
 
5724
+ ### Type_File_Body_downloadFileDefaultContentType
5725
+
5726
+ - Endpoint: `get /type/file/body/response/default-content-type`
5727
+
5728
+ Test File type as response body with unspecified content type.
5729
+ The File type accepts any content type. For testing, server will return image/png.
5730
+ Expected response:
5731
+
5732
+ - Content-Type header: image/png
5733
+ - Body: binary content matching packages/http-specs/assets/image.png
5734
+
5735
+ ### Type_File_Body_downloadFileJsonContentType
5736
+
5737
+ - Endpoint: `get /type/file/body/response/json-content-type`
5738
+
5739
+ Test File type as response body with JSON content type.
5740
+ Expected response:
5741
+
5742
+ - Content-Type header: application/json
5743
+ - Body: JSON content with file data
5744
+
5745
+ ### Type_File_Body_downloadFileMultipleContentTypes
5746
+
5747
+ - Endpoint: `get /type/file/body/response/multiple-content-types`
5748
+
5749
+ Test File type as response body with multiple allowed content types.
5750
+ Service will return image/png.
5751
+ Expected response:
5752
+
5753
+ - Content-Type header: image/png
5754
+ - Body: binary content matching packages/http-specs/assets/image.png
5755
+
5756
+ ### Type_File_Body_downloadFileSpecificContentType
5757
+
5758
+ - Endpoint: `get /type/file/body/response/specific-content-type`
5759
+
5760
+ Test File type as response body with specific content type.
5761
+ Expected response:
5762
+
5763
+ - Content-Type header: image/png
5764
+ - Body: binary content matching packages/http-specs/assets/image.png
5765
+
5766
+ ### Type_File_Body_uploadFileDefaultContentType
5767
+
5768
+ - Endpoint: `post /type/file/body/request/default-content-type`
5769
+
5770
+ Test File type as request body with unspecified content type.
5771
+ The File type accepts any content type. For testing, sender will use image/png.
5772
+ Expected request:
5773
+
5774
+ - Content-Type header: image/png
5775
+ - Body: binary content matching packages/http-specs/assets/image.png
5776
+
5777
+ ### Type_File_Body_uploadFileJsonContentType
5778
+
5779
+ - Endpoint: `post /type/file/body/request/json-content-type`
5780
+
5781
+ Test File type as request body with JSON content type.
5782
+ Expected request:
5783
+
5784
+ - Content-Type header: application/json
5785
+ - Body: JSON content with file data
5786
+
5787
+ ### Type_File_Body_uploadFileMultipleContentTypes
5788
+
5789
+ - Endpoint: `post /type/file/body/request/multiple-content-types`
5790
+
5791
+ Test File type as request body with multiple allowed content types (image/png or image/jpeg).
5792
+ Client should send image/png.
5793
+ Expected request:
5794
+
5795
+ - Content-Type header: image/png
5796
+ - Body: binary content matching packages/http-specs/assets/image.png
5797
+
5798
+ ### Type_File_Body_uploadFileSpecificContentType
5799
+
5800
+ - Endpoint: `post /type/file/body/request/specific-content-type`
5801
+
5802
+ Test File type as request body with specific content type.
5803
+ Expected request:
5804
+
5805
+ - Content-Type header: image/png
5806
+ - Body: binary content matching packages/http-specs/assets/image.png
5807
+
3916
5808
  ### Type_Model_Empty_getEmpty
3917
5809
 
3918
5810
  - Endpoint: `get /type/model/empty/alone`
@@ -4428,13 +6320,7 @@ Expected input body:
4428
6320
  - Endpoint: `get /type/model/visibility`
4429
6321
 
4430
6322
  Generate and receive output model with readonly properties.
4431
- Expected input body:
4432
-
4433
- ```json
4434
- {
4435
- "queryProp": 123
4436
- }
4437
- ```
6323
+ Expected no body with `?queryProp=123`.
4438
6324
 
4439
6325
  Expected response body:
4440
6326
 
@@ -4449,13 +6335,7 @@ Expected response body:
4449
6335
  - Endpoint: `head /type/model/visibility`
4450
6336
 
4451
6337
  Generate abd send put model with write/create properties.
4452
- Expected input body:
4453
-
4454
- ```json
4455
- {
4456
- "queryProp": 123
4457
- }
4458
- ```
6338
+ Expected no body with `?queryProp=123`.
4459
6339
 
4460
6340
  ### Type_Model_Visibility_patchModel
4461
6341
 
@@ -5152,42 +7032,6 @@ Expected input body:
5152
7032
  }
5153
7033
  ```
5154
7034
 
5155
- ### Type_Property_AdditionalProperties_SpreadRecordDiscriminatedUnion_get
5156
-
5157
- - Endpoint: `get /type/property/additionalProperties/spreadRecordDiscriminatedUnion`
5158
-
5159
- Expected response body:
5160
-
5161
- ```json
5162
- {
5163
- "name": "abc",
5164
- "prop1": { "kind": "kind0", "fooProp": "abc" },
5165
- "prop2": {
5166
- "kind": "kind1",
5167
- "start": "2021-01-01T00:00:00Z",
5168
- "end": "2021-01-02T00:00:00Z"
5169
- }
5170
- }
5171
- ```
5172
-
5173
- ### Type_Property_AdditionalProperties_SpreadRecordDiscriminatedUnion_put
5174
-
5175
- - Endpoint: `put /type/property/additionalProperties/spreadRecordDiscriminatedUnion`
5176
-
5177
- Expected input body:
5178
-
5179
- ```json
5180
- {
5181
- "name": "abc",
5182
- "prop1": { "kind": "kind0", "fooProp": "abc" },
5183
- "prop2": {
5184
- "kind": "kind1",
5185
- "start": "2021-01-01T00:00:00Z",
5186
- "end": "2021-01-02T00:00:00Z"
5187
- }
5188
- }
5189
- ```
5190
-
5191
7035
  ### Type_Property_AdditionalProperties_SpreadRecordNonDiscriminatedUnion_get
5192
7036
 
5193
7037
  - Endpoint: `get /type/property/additionalProperties/spreadRecordNonDiscriminatedUnion`
@@ -6950,6 +8794,178 @@ Expect to handle a unknown type value. Mock api will return 'test'
6950
8794
 
6951
8795
  Expect to send a string value. Mock api expect to receive 'test'
6952
8796
 
8797
+ ### Type_Union_Discriminated_Envelope_Object_CustomProperties_get
8798
+
8799
+ - Endpoint: `get /type/union/discriminated/envelope/object/custom-properties`
8800
+
8801
+ Test discriminated union with custom property names.
8802
+ When value of query parameter "petType" is "cat" or no query parameter input, the expected response is:
8803
+
8804
+ ```json
8805
+ {
8806
+ "petType": "cat",
8807
+ "petData": {
8808
+ "name": "Whiskers",
8809
+ "meow": true
8810
+ }
8811
+ }
8812
+ ```
8813
+
8814
+ When it is "dog", expected response is:
8815
+
8816
+ ```json
8817
+ {
8818
+ "petType": "dog",
8819
+ "petData": {
8820
+ "name": "Rex",
8821
+ "bark": false
8822
+ }
8823
+ }
8824
+ ```
8825
+
8826
+ ### Type_Union_Discriminated_Envelope_Object_CustomProperties_put
8827
+
8828
+ - Endpoint: `put /type/union/discriminated/envelope/object/custom-properties`
8829
+
8830
+ Test discriminated union with custom property names.
8831
+ Send the union as:
8832
+
8833
+ ```json
8834
+ {
8835
+ "petType": "cat",
8836
+ "petData": {
8837
+ "name": "Whiskers",
8838
+ "meow": true
8839
+ }
8840
+ }
8841
+ ```
8842
+
8843
+ ### Type_Union_Discriminated_Envelope_Object_Default_get
8844
+
8845
+ - Endpoint: `get /type/union/discriminated/envelope/object/default`
8846
+
8847
+ Test discriminated union with envelope serialization.
8848
+ When value of query parameter "kind" is "cat" or no query parameter input, the expected response is:
8849
+
8850
+ ```json
8851
+ {
8852
+ "kind": "cat",
8853
+ "value": {
8854
+ "name": "Whiskers",
8855
+ "meow": true
8856
+ }
8857
+ }
8858
+ ```
8859
+
8860
+ When it is "dog", expected response is:
8861
+
8862
+ ```json
8863
+ {
8864
+ "kind": "dog",
8865
+ "value": {
8866
+ "name": "Rex",
8867
+ "bark": false
8868
+ }
8869
+ }
8870
+ ```
8871
+
8872
+ ### Type_Union_Discriminated_Envelope_Object_Default_put
8873
+
8874
+ - Endpoint: `put /type/union/discriminated/envelope/object/default`
8875
+
8876
+ Test discriminated union with envelope serialization.
8877
+ Send the union as:
8878
+
8879
+ ```json
8880
+ {
8881
+ "kind": "cat",
8882
+ "value": {
8883
+ "name": "Whiskers",
8884
+ "meow": true
8885
+ }
8886
+ }
8887
+ ```
8888
+
8889
+ ### Type_Union_Discriminated_NoEnvelope_CustomDiscriminator_get
8890
+
8891
+ - Endpoint: `get /type/union/discriminated/no-envelope/custom-discriminator`
8892
+
8893
+ Test discriminated union with inline discriminator and custom discriminator property name.
8894
+ When value of query parameter "type" is "cat" or no query parameter input, the expected response is:
8895
+
8896
+ ```json
8897
+ {
8898
+ "type": "cat",
8899
+ "name": "Whiskers",
8900
+ "meow": true
8901
+ }
8902
+ ```
8903
+
8904
+ When it is "dog", expected response is:
8905
+
8906
+ ```json
8907
+ {
8908
+ "type": "dog",
8909
+ "name": "Rex",
8910
+ "bark": false
8911
+ }
8912
+ ```
8913
+
8914
+ ### Type_Union_Discriminated_NoEnvelope_CustomDiscriminator_put
8915
+
8916
+ - Endpoint: `put /type/union/discriminated/no-envelope/custom-discriminator`
8917
+
8918
+ Test discriminated union with inline discriminator and custom discriminator property name.
8919
+ Send the union as:
8920
+
8921
+ ```json
8922
+ {
8923
+ "type": "cat",
8924
+ "name": "Whiskers",
8925
+ "meow": true
8926
+ }
8927
+ ```
8928
+
8929
+ ### Type_Union_Discriminated_NoEnvelope_Default_get
8930
+
8931
+ - Endpoint: `get /type/union/discriminated/no-envelope/default`
8932
+
8933
+ Test discriminated union with inline discriminator.
8934
+ When value of query parameter "kind" is "cat" or no query parameter input, the expected response is:
8935
+
8936
+ ```json
8937
+ {
8938
+ "kind": "cat",
8939
+ "name": "Whiskers",
8940
+ "meow": true
8941
+ }
8942
+ ```
8943
+
8944
+ When it is "dog", expected response is:
8945
+
8946
+ ```json
8947
+ {
8948
+ "kind": "dog",
8949
+ "name": "Rex",
8950
+ "bark": false
8951
+ }
8952
+ ```
8953
+
8954
+ ### Type_Union_Discriminated_NoEnvelope_Default_put
8955
+
8956
+ - Endpoint: `put /type/union/discriminated/no-envelope/default`
8957
+
8958
+ Test discriminated union with inline discriminator.
8959
+ Send the union as:
8960
+
8961
+ ```json
8962
+ {
8963
+ "kind": "cat",
8964
+ "name": "Whiskers",
8965
+ "meow": true
8966
+ }
8967
+ ```
8968
+
6953
8969
  ### Type_Union_EnumsOnly_get
6954
8970
 
6955
8971
  - Endpoint: `get /type/union/enums-only`
@@ -7401,7 +9417,7 @@ Expected request body:
7401
9417
 
7402
9418
  - Endpoint: `post /versioning/removed/api-version:{version}/v3`
7403
9419
 
7404
- path: "/versioning/removed/api-version[:]v1/v3"
9420
+ path: "/versioning/removed/api-version:v1/v3"
7405
9421
  Expected request body:
7406
9422
 
7407
9423
  ```json
@@ -7414,7 +9430,7 @@ Expected response body:
7414
9430
  { "id": "123", "enumProp": "enumMemberV1" }
7415
9431
  ```
7416
9432
 
7417
- path: "/versioning/removed/api-version[:]v2preview/v3"
9433
+ path: "/versioning/removed/api-version:v2preview/v3"
7418
9434
  Expected request body:
7419
9435
 
7420
9436
  ```json
@@ -7427,7 +9443,7 @@ Expected response body:
7427
9443
  { "id": "123" }
7428
9444
  ```
7429
9445
 
7430
- path: "/versioning/removed/api-version[:]v2/v3"
9446
+ path: "/versioning/removed/api-version:v2/v3"
7431
9447
  Expected request body:
7432
9448
 
7433
9449
  ```json