@typespec/http-specs 0.1.0-alpha.16-dev.4 → 0.1.0-alpha.16-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/specs/payload/multipart/main.tsp +21 -26
package/package.json
CHANGED
|
@@ -9,8 +9,8 @@ using Spector;
|
|
|
9
9
|
namespace Payload.MultiPart;
|
|
10
10
|
|
|
11
11
|
model MultiPartRequest {
|
|
12
|
-
id: string
|
|
13
|
-
profileImage: bytes
|
|
12
|
+
id: HttpPart<string>;
|
|
13
|
+
profileImage: HttpPart<bytes>;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
model Address {
|
|
@@ -52,25 +52,25 @@ model ComplexHttpPartsModelRequest {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
model ComplexPartsRequest {
|
|
55
|
-
id: string
|
|
56
|
-
address: Address
|
|
57
|
-
profileImage: bytes
|
|
58
|
-
pictures: bytes[];
|
|
55
|
+
id: HttpPart<string>;
|
|
56
|
+
address: HttpPart<Address>;
|
|
57
|
+
profileImage: HttpPart<bytes>;
|
|
58
|
+
pictures: HttpPart<bytes>[];
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
model JsonPartRequest {
|
|
62
|
-
address: Address
|
|
63
|
-
profileImage: bytes
|
|
62
|
+
address: HttpPart<Address>;
|
|
63
|
+
profileImage: HttpPart<bytes>;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
model BinaryArrayPartsRequest {
|
|
67
|
-
id: string
|
|
68
|
-
pictures: bytes[];
|
|
67
|
+
id: HttpPart<string>;
|
|
68
|
+
pictures: HttpPart<bytes>[];
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
model MultiBinaryPartsRequest {
|
|
72
|
-
profileImage: bytes
|
|
73
|
-
picture?: bytes
|
|
72
|
+
profileImage: HttpPart<bytes>;
|
|
73
|
+
picture?: HttpPart<bytes>;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
@route("/form-data")
|
|
@@ -106,8 +106,7 @@ namespace FormData {
|
|
|
106
106
|
@route("/mixed-parts")
|
|
107
107
|
op basic(
|
|
108
108
|
@header contentType: "multipart/form-data",
|
|
109
|
-
|
|
110
|
-
@body body: MultiPartRequest,
|
|
109
|
+
@multipartBody body: MultiPartRequest,
|
|
111
110
|
): NoContentResponse;
|
|
112
111
|
|
|
113
112
|
@scenario
|
|
@@ -167,8 +166,7 @@ namespace FormData {
|
|
|
167
166
|
@route("/complex-parts")
|
|
168
167
|
op fileArrayAndBasic(
|
|
169
168
|
@header contentType: "multipart/form-data",
|
|
170
|
-
|
|
171
|
-
@body body: ComplexPartsRequest,
|
|
169
|
+
@multipartBody body: ComplexPartsRequest,
|
|
172
170
|
): NoContentResponse;
|
|
173
171
|
|
|
174
172
|
@scenario
|
|
@@ -204,8 +202,7 @@ namespace FormData {
|
|
|
204
202
|
@route("/json-part")
|
|
205
203
|
op jsonPart(
|
|
206
204
|
@header contentType: "multipart/form-data",
|
|
207
|
-
|
|
208
|
-
@body body: JsonPartRequest,
|
|
205
|
+
@multipartBody body: JsonPartRequest,
|
|
209
206
|
): NoContentResponse;
|
|
210
207
|
|
|
211
208
|
@scenario
|
|
@@ -244,8 +241,7 @@ namespace FormData {
|
|
|
244
241
|
@route("/binary-array-parts")
|
|
245
242
|
op binaryArrayParts(
|
|
246
243
|
@header contentType: "multipart/form-data",
|
|
247
|
-
|
|
248
|
-
@body body: BinaryArrayPartsRequest,
|
|
244
|
+
@multipartBody body: BinaryArrayPartsRequest,
|
|
249
245
|
): NoContentResponse;
|
|
250
246
|
|
|
251
247
|
@scenario
|
|
@@ -279,8 +275,7 @@ namespace FormData {
|
|
|
279
275
|
@route("/multi-binary-parts")
|
|
280
276
|
op multiBinaryParts(
|
|
281
277
|
@header contentType: "multipart/form-data",
|
|
282
|
-
|
|
283
|
-
@body body: MultiBinaryPartsRequest,
|
|
278
|
+
@multipartBody body: MultiBinaryPartsRequest,
|
|
284
279
|
): NoContentResponse;
|
|
285
280
|
|
|
286
281
|
@scenario
|
|
@@ -309,11 +304,9 @@ namespace FormData {
|
|
|
309
304
|
@route("/check-filename-and-content-type")
|
|
310
305
|
op checkFileNameAndContentType(
|
|
311
306
|
@header contentType: "multipart/form-data",
|
|
312
|
-
|
|
313
|
-
@body body: MultiPartRequest,
|
|
307
|
+
@multipartBody body: MultiPartRequest,
|
|
314
308
|
): NoContentResponse;
|
|
315
309
|
|
|
316
|
-
#suppress "deprecated" "For testing to migrate for 1.0-rc"
|
|
317
310
|
@scenario
|
|
318
311
|
@scenarioDoc("""
|
|
319
312
|
Expect request (
|
|
@@ -340,7 +333,9 @@ namespace FormData {
|
|
|
340
333
|
@route("/anonymous-model")
|
|
341
334
|
op anonymousModel(
|
|
342
335
|
@header contentType: "multipart/form-data",
|
|
343
|
-
|
|
336
|
+
@multipartBody body: {
|
|
337
|
+
profileImage: HttpPart<bytes>;
|
|
338
|
+
},
|
|
344
339
|
): NoContentResponse;
|
|
345
340
|
|
|
346
341
|
namespace HttpParts {
|