@typespec/http-specs 0.1.0-alpha.3-dev.6 → 0.1.0-alpha.30-dev.0

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