From 88e86d200db6f519345992125a12732703f8e8ee Mon Sep 17 00:00:00 2001 From: msyyc <70930885+msyyc@users.noreply.github.com> Date: Wed, 12 Jun 2024 11:18:17 +0800 Subject: [PATCH 01/12] multipart api design --- .../multipart_api_design.md | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 packages/typespec-client-generator-core/multipart_api_design.md diff --git a/packages/typespec-client-generator-core/multipart_api_design.md b/packages/typespec-client-generator-core/multipart_api_design.md new file mode 100644 index 0000000000..4dc194bae4 --- /dev/null +++ b/packages/typespec-client-generator-core/multipart_api_design.md @@ -0,0 +1,57 @@ +This doc is to design TCGC API of multipart for language emitters. + +# multipart payload + +Here is classic payload of multipart: +``` +POST /upload HTTP/1.1 +Content-Length: 428 +Content-Type: multipart/form-data; boundary=abcde12345 +--abcde12345 +Content-Disposition: form-data; name="id" +Content-Type: text/plain + +123e4567-e89b-12d3-a456-426655440000 +--abcde12345 +Content-Disposition: form-data; name="profileImage"; filename="image1.png" +Content-Type: image/png + +{…file content…} +--abcde12345-- +``` +According to https://datatracker.ietf.org/doc/html/rfc7578, multipart request payload contains multi independent parts which could be divided into two kinds: one is non-file part which contains `required "name"/optional "Content-Type" / content`; the other one is file part which contains one more `optional "filename"`. + +# Current TCGC API for multipart +Currently TCGC only has boolean flag [isMultipartFileInput](https://github.com/Azure/typespec-azure/blob/ab7a066d4ac0ae23a40f9ff8f4b6037559bda34c/packages/typespec-client-generator-core/src/interfaces.ts#L368) to distinguish file and non-file. After https://github.com/microsoft/typespec/issues/3046 complete, Typespec permit users to define more info explicitly(e.g. content-type) for each part so boolean flag is not enough. + +# proposal about new TCGC API for multipart + +```typescript +exprot interface multipartOptionsType { + isFilePart: boolean; // whether this part is for file + multi: boolean; // whether this part is multi in request payload + headers: HeaderProperty[]; // relates to custom header + filename?: SdkModelPropertyTypeBase; + contentType?: SdkModelPropertyTypeBase; +} + +export interface SdkBodyModelPropertyType extends SdkModelPropertyTypeBase { + kind: "property"; + discriminator: boolean; + serializedName: string; + isMultipartFileInput: boolean; // deprecated + multipartOptions: multipartOptionsType; // new options for multipart + visibility?: Visibility[]; + flatten: boolean; +} +``` + +notes: +- `isFilePart`: same with `isMultipartFileInput` before +- `multi`: mainly for explicity of `Type[]`. In old design for `Model[]`, Typespec can't declare it clearly that SDK shall + (a) serialize array of model as single part or (b) serialize model as single part then send it multi times. With new design, if + `HttpPart`, multi is false and SDK shall follow (a); if `HttpPart[]`, multi is true and follow (b) +- `headers`: equals to custom headers in swagger https://swagger.io/docs/specification/describing-request-body/multipart-requests/ +- `filename`: Typespec permit author use `httpFile` change requiredness for optional metadata properties, including `filename`. +If defined, users could explicitly set it as required or not. +- `contentType`: Typespec permit author use `httpFile` change requiredness for optional metadata properties, including `content-type`. From 24159197908f0da4ea66e59e3a20acfe2ed6a0c5 Mon Sep 17 00:00:00 2001 From: msyyc <70930885+msyyc@users.noreply.github.com> Date: Wed, 12 Jun 2024 11:35:00 +0800 Subject: [PATCH 02/12] update --- .../multipart_api_design.md | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/packages/typespec-client-generator-core/multipart_api_design.md b/packages/typespec-client-generator-core/multipart_api_design.md index 4dc194bae4..fe32a6cbf8 100644 --- a/packages/typespec-client-generator-core/multipart_api_design.md +++ b/packages/typespec-client-generator-core/multipart_api_design.md @@ -24,7 +24,35 @@ According to https://datatracker.ietf.org/doc/html/rfc7578, multipart request pa # Current TCGC API for multipart Currently TCGC only has boolean flag [isMultipartFileInput](https://github.com/Azure/typespec-azure/blob/ab7a066d4ac0ae23a40f9ff8f4b6037559bda34c/packages/typespec-client-generator-core/src/interfaces.ts#L368) to distinguish file and non-file. After https://github.com/microsoft/typespec/issues/3046 complete, Typespec permit users to define more info explicitly(e.g. content-type) for each part so boolean flag is not enough. -# proposal about new TCGC API for multipart +# Multipart in Typespec +Typespec support two kinds of definition for multipart: + +1. Model format + +``` +op upload( + @header `content-type`: "multipart/form-data", + @multipartBody body: { + fullName: HttpPart, + headShots: HttpPart[] + } +): void; +``` + +2. Tuple format + + ``` +op upload( + @header `content-type`: "multipart/form-data", + @multipartBody body: [ + HttpPart, + HttpPart + ] +): void; +``` + +# Proposal about new TCGC API for multipart +Since all language emitters emit multipart body as model format, TCGC will uniform the multipart body type as model, and each model property equals to property of model format or part of tuple format in Typespec. ```typescript exprot interface multipartOptionsType { From e459c114c5d1491fa945fbbb6656da80f043605a Mon Sep 17 00:00:00 2001 From: msyyc <70930885+msyyc@users.noreply.github.com> Date: Wed, 12 Jun 2024 11:52:10 +0800 Subject: [PATCH 03/12] update --- .../typespec-client-generator-core/multipart_api_design.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/typespec-client-generator-core/multipart_api_design.md b/packages/typespec-client-generator-core/multipart_api_design.md index fe32a6cbf8..4c49a0b968 100644 --- a/packages/typespec-client-generator-core/multipart_api_design.md +++ b/packages/typespec-client-generator-core/multipart_api_design.md @@ -80,6 +80,5 @@ notes: (a) serialize array of model as single part or (b) serialize model as single part then send it multi times. With new design, if `HttpPart`, multi is false and SDK shall follow (a); if `HttpPart[]`, multi is true and follow (b) - `headers`: equals to custom headers in swagger https://swagger.io/docs/specification/describing-request-body/multipart-requests/ -- `filename`: Typespec permit author use `httpFile` change requiredness for optional metadata properties, including `filename`. -If defined, users could explicitly set it as required or not. -- `contentType`: Typespec permit author use `httpFile` change requiredness for optional metadata properties, including `content-type`. +- `filename`: When Typespec author use `httpFile` change requiredness for optional metadata properties "filename", this property has value; otherwise it is "undefined". +- `contentType`: When Typespec author use `httpFile` change requiredness for optional metadata properties "contentType", this property has value; otherwise it is "undefined". From cf7dd4734781d14847ee070350b2c3720afb14a3 Mon Sep 17 00:00:00 2001 From: msyyc <70930885+msyyc@users.noreply.github.com> Date: Thu, 13 Jun 2024 11:18:26 +0800 Subject: [PATCH 04/12] undefined namej --- .../multipart_api_design.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/typespec-client-generator-core/multipart_api_design.md b/packages/typespec-client-generator-core/multipart_api_design.md index 4c49a0b968..e2f18b579a 100644 --- a/packages/typespec-client-generator-core/multipart_api_design.md +++ b/packages/typespec-client-generator-core/multipart_api_design.md @@ -56,6 +56,7 @@ Since all language emitters emit multipart body as model format, TCGC will unifo ```typescript exprot interface multipartOptionsType { + isNameDefined? boolean; // whether name is defined in Typespec. For multipart/mixed, name may not be defined for some parts isFilePart: boolean; // whether this part is for file multi: boolean; // whether this part is multi in request payload headers: HeaderProperty[]; // relates to custom header @@ -75,10 +76,11 @@ export interface SdkBodyModelPropertyType extends SdkModelPropertyTypeBase { ``` notes: -- `isFilePart`: same with `isMultipartFileInput` before -- `multi`: mainly for explicity of `Type[]`. In old design for `Model[]`, Typespec can't declare it clearly that SDK shall +- `isNameDefined`: Whether name is defined in Typespec. For multipart/mixed, name may not be defined for some parts. +- `isFilePart`: Same with `isMultipartFileInput` before +- `multi`: Mainly for explicity of `Type[]`. In old design for `Model[]`, Typespec can't declare it clearly that SDK shall (a) serialize array of model as single part or (b) serialize model as single part then send it multi times. With new design, if `HttpPart`, multi is false and SDK shall follow (a); if `HttpPart[]`, multi is true and follow (b) -- `headers`: equals to custom headers in swagger https://swagger.io/docs/specification/describing-request-body/multipart-requests/ +- `headers`: Equals to custom headers in swagger https://swagger.io/docs/specification/describing-request-body/multipart-requests/ - `filename`: When Typespec author use `httpFile` change requiredness for optional metadata properties "filename", this property has value; otherwise it is "undefined". - `contentType`: When Typespec author use `httpFile` change requiredness for optional metadata properties "contentType", this property has value; otherwise it is "undefined". From 5ffebb809bcfb979b523eb82406d77ec395c6f6f Mon Sep 17 00:00:00 2001 From: msyyc <70930885+msyyc@users.noreply.github.com> Date: Thu, 13 Jun 2024 11:20:12 +0800 Subject: [PATCH 05/12] fix --- packages/typespec-client-generator-core/multipart_api_design.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/typespec-client-generator-core/multipart_api_design.md b/packages/typespec-client-generator-core/multipart_api_design.md index e2f18b579a..0417864c50 100644 --- a/packages/typespec-client-generator-core/multipart_api_design.md +++ b/packages/typespec-client-generator-core/multipart_api_design.md @@ -56,7 +56,7 @@ Since all language emitters emit multipart body as model format, TCGC will unifo ```typescript exprot interface multipartOptionsType { - isNameDefined? boolean; // whether name is defined in Typespec. For multipart/mixed, name may not be defined for some parts + isNameDefined: boolean; // whether name is defined in Typespec. For multipart/mixed, name may not be defined for some parts isFilePart: boolean; // whether this part is for file multi: boolean; // whether this part is multi in request payload headers: HeaderProperty[]; // relates to custom header From 5274eb9bee912d50e9688b0c8fafcc3520aa0ae1 Mon Sep 17 00:00:00 2001 From: msyyc <70930885+msyyc@users.noreply.github.com> Date: Thu, 13 Jun 2024 11:35:43 +0800 Subject: [PATCH 06/12] update --- packages/typespec-client-generator-core/multipart_api_design.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/typespec-client-generator-core/multipart_api_design.md b/packages/typespec-client-generator-core/multipart_api_design.md index 0417864c50..e8d7336684 100644 --- a/packages/typespec-client-generator-core/multipart_api_design.md +++ b/packages/typespec-client-generator-core/multipart_api_design.md @@ -46,7 +46,7 @@ op upload( @header `content-type`: "multipart/form-data", @multipartBody body: [ HttpPart, - HttpPart + HttpPart[] ] ): void; ``` From ae2838b28cc9bbd3596421546f5b1a126a311b10 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Mon, 17 Jun 2024 15:47:26 +0800 Subject: [PATCH 07/12] Update multipart_api_design.md --- packages/typespec-client-generator-core/multipart_api_design.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/typespec-client-generator-core/multipart_api_design.md b/packages/typespec-client-generator-core/multipart_api_design.md index e8d7336684..2197572c4f 100644 --- a/packages/typespec-client-generator-core/multipart_api_design.md +++ b/packages/typespec-client-generator-core/multipart_api_design.md @@ -69,7 +69,7 @@ export interface SdkBodyModelPropertyType extends SdkModelPropertyTypeBase { discriminator: boolean; serializedName: string; isMultipartFileInput: boolean; // deprecated - multipartOptions: multipartOptionsType; // new options for multipart + multipartOptions?: multipartOptionsType; // new options for multipart visibility?: Visibility[]; flatten: boolean; } From 6027820c5c91e356893a2ed276028e4bdedc8a87 Mon Sep 17 00:00:00 2001 From: msyyc <70930885+msyyc@users.noreply.github.com> Date: Tue, 18 Jun 2024 13:40:04 +0800 Subject: [PATCH 08/12] update --- .../multipart_api_design.md | 249 ++++++++++++++++++ 1 file changed, 249 insertions(+) diff --git a/packages/typespec-client-generator-core/multipart_api_design.md b/packages/typespec-client-generator-core/multipart_api_design.md index 2197572c4f..66e9c9f632 100644 --- a/packages/typespec-client-generator-core/multipart_api_design.md +++ b/packages/typespec-client-generator-core/multipart_api_design.md @@ -84,3 +84,252 @@ notes: - `headers`: Equals to custom headers in swagger https://swagger.io/docs/specification/describing-request-body/multipart-requests/ - `filename`: When Typespec author use `httpFile` change requiredness for optional metadata properties "filename", this property has value; otherwise it is "undefined". - `contentType`: When Typespec author use `httpFile` change requiredness for optional metadata properties "contentType", this property has value; otherwise it is "undefined". + +# Examples + +## Define "multipart/form-data" with "@body" (compatible for old scenario) +Typespec example: + +``` +model JSON { + name: string; +} + +op upload( + @header `content-type`: "multipart/form-data", + @body body: { + basic: string, + singleJson: JSON, + singleBytes: bytes, + multiJsonOnePart: JSON[], + multiBytes: bytes[] + } +): void; +``` + + +TCGC API example: + +```json + +{ + "properties": [ + { + "name": "basic", + "type": { "kind": "string" }, + "multipartOptions": { + "isNameDefined": true, + "isFilePart": false, + "multi": false, + "headers": [] + } + }, + { + "name": "singleJson", + "type": { "kind": "model" }, + "multipartOptions": { + "isNameDefined": true, + "isFilePart": false, + "multi": false, + "headers": [] + } + }, + { + "name": "singleBytes", + "type": { "kind": "bytes" }, + "multipartOptions": { + "isNameDefined": true, + "isFilePart": true, + "multi": false, + "headers": [] + } + }, + { + "name": "multiJsonOnePart", + "type": { "kind": "array" }, + "multipartOptions": { + "isNameDefined": true, + "isFilePart": true, + "multi": false, + "headers": [] + } + }, + { + "name": "multiBytes", + "type": { "kind": "bytes" }, + "multipartOptions": { + "isNameDefined": true, + "isFilePart": true, + "multi": true, + "headers": [] + } + } + ] +} + +``` + +## Define "multipart/form-data" with "@multipartBody" +Typespec example: + +``` +// "File" is predefined model for user to declare requiredness of metadata properties in part of multipart payload: https://github.com/microsoft/typespec/blob/602fe73692dddf7897363b2ac5d98f5871954612/packages/http/lib/http.tsp#L109-L114 + +model RequiredFileMetadata is File { + contentType: string; + filename: string; +} + +op upload( + @header `content-type`: "multipart/form-data", + @multipartBody body: [ + // single + HttpPart, + HttpPart, + HttpPart, + HttpPart, + HttpPart, + + // multi + HttpPart, + HttpPart[], + HttpPart[], + + // custom header + HttpPart<{ @header `x-ms-header`: "x-custom", @body image: File }> + ] +): void; +``` + +TCGC API example: + +```json + +{ + "properties": [ + { + "name": "basic", + "type": { "kind": "string" }, + "multipartOptions": { + "isNameDefined": true, + "isFilePart": false, + "multi": false, + "headers": [] + } + }, + { + "name": "singleJson", + "type": { "kind": "model" }, + "multipartOptions": { + "isNameDefined": true, + "isFilePart": false, + "multi": false, + "headers": [] + } + }, + { + "name": "singleBytes", + "type": { "kind": "bytes" }, + "multipartOptions": { + "isNameDefined": true, + "isFilePart": true, + "multi": false, + "headers": [] + } + }, + { + "name": "singleFileWithOptionalMetadata", + "type": { "kind": "bytes" }, + "multipartOptions": { + "isNameDefined": true, + "isFilePart": true, + "multi": false, + "headers": [], + "fileName": { "optional": true }, + "contentType": { "optional": true } + } + }, + { + "name": "singleFileWithRequiredMetadata", + "multipartOptions": { + "isNameDefined": true, + "isFilePart": true, + "multi": false, + "headers": [], + "fileName": { "optional": false }, + "contentType": { "optional": false } + } + }, + { + "name": "multiJsonOnePart", + "type": { "kind": "array" }, + "multipartOptions": { + "isNameDefined": true, + "isFilePart": true, + "multi": false, + "headers": [] + } + }, + { + "name": "multiBytes", + "type": { "kind": "bytes" }, + "multipartOptions": { + "isNameDefined": true, + "isFilePart": true, + "multi": true, + "headers": [] + } + }, + { + "name": "multiJsonMultiParts", + "type": { "kind": "model" }, + "multipartOptions": { + "isNameDefined": true, + "isFilePart": true, + "multi": true, + "headers": [] + } + }, + { + "name": "image", + "type": { "kind": "bytes" }, + "multipartOptions": { + "isNameDefined": true, + "isFilePart": true, + "multi": false, + "headers": [{"kind": "header", "name": "x-ms-header"}] + } + } + ] +} + +``` + +## Define "multipart/mixed" with "@multipartBody" +Typespec example: + +``` +op upload( + @header `content-type`: "multipart/mixed", + @multipartBody body: [HttpPart]): void; +``` + +TCGC API example: + +```json +{ + "properties": [ + { + "name": "", + "type": { "kind": "string" }, + "multipartOptions": { + "isNameDefined": false, + "isFilePart": false, + "multi": false, + "headers": [] + } + } + ] +} +``` + From e43207f7a76cc1ffe74a1ce3c7453d5ac14dd831 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Fri, 21 Jun 2024 14:27:14 +0800 Subject: [PATCH 09/12] Update multipart_api_design.md --- packages/typespec-client-generator-core/multipart_api_design.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/typespec-client-generator-core/multipart_api_design.md b/packages/typespec-client-generator-core/multipart_api_design.md index 66e9c9f632..73375e05a4 100644 --- a/packages/typespec-client-generator-core/multipart_api_design.md +++ b/packages/typespec-client-generator-core/multipart_api_design.md @@ -55,7 +55,7 @@ op upload( Since all language emitters emit multipart body as model format, TCGC will uniform the multipart body type as model, and each model property equals to property of model format or part of tuple format in Typespec. ```typescript -exprot interface multipartOptionsType { +export interface multipartOptionsType { isNameDefined: boolean; // whether name is defined in Typespec. For multipart/mixed, name may not be defined for some parts isFilePart: boolean; // whether this part is for file multi: boolean; // whether this part is multi in request payload From da2b65bda6776b8bf439c952cafe9ae8c01aef6f Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Fri, 28 Jun 2024 14:44:13 +0800 Subject: [PATCH 10/12] Update multipart_api_design.md --- .../multipart_api_design.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/typespec-client-generator-core/multipart_api_design.md b/packages/typespec-client-generator-core/multipart_api_design.md index 73375e05a4..cbc8246622 100644 --- a/packages/typespec-client-generator-core/multipart_api_design.md +++ b/packages/typespec-client-generator-core/multipart_api_design.md @@ -101,7 +101,7 @@ op upload( basic: string, singleJson: JSON, singleBytes: bytes, - multiJsonOnePart: JSON[], + multiJsonMultiParts: JSON[], multiBytes: bytes[] } ): void; @@ -145,12 +145,12 @@ TCGC API example: } }, { - "name": "multiJsonOnePart", - "type": { "kind": "array" }, + "name": "multiJsonMultiParts", + "type": { "kind": "model" }, "multipartOptions": { "isNameDefined": true, - "isFilePart": true, - "multi": false, + "isFilePart": false, + "multi": true, "headers": [] } }, @@ -265,7 +265,7 @@ TCGC API example: "type": { "kind": "array" }, "multipartOptions": { "isNameDefined": true, - "isFilePart": true, + "isFilePart": false, "multi": false, "headers": [] } From 526518a76272e7598eab4684e334389f227b330b Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Mon, 1 Jul 2024 10:24:17 +0800 Subject: [PATCH 11/12] Update multipart_api_design.md --- packages/typespec-client-generator-core/multipart_api_design.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/typespec-client-generator-core/multipart_api_design.md b/packages/typespec-client-generator-core/multipart_api_design.md index cbc8246622..90499b21f6 100644 --- a/packages/typespec-client-generator-core/multipart_api_design.md +++ b/packages/typespec-client-generator-core/multipart_api_design.md @@ -239,7 +239,7 @@ TCGC API example: }, { "name": "singleFileWithOptionalMetadata", - "type": { "kind": "bytes" }, + "type": { "kind": "model" }, "multipartOptions": { "isNameDefined": true, "isFilePart": true, From 5e46f1018a137be2c70baeebdfd1f08a7d04e47d Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Fri, 26 Jul 2024 14:56:47 +0800 Subject: [PATCH 12/12] Update multipart_api_design.md --- .../multipart_api_design.md | 37 +++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/packages/typespec-client-generator-core/multipart_api_design.md b/packages/typespec-client-generator-core/multipart_api_design.md index 90499b21f6..33a2c363d4 100644 --- a/packages/typespec-client-generator-core/multipart_api_design.md +++ b/packages/typespec-client-generator-core/multipart_api_design.md @@ -58,7 +58,7 @@ Since all language emitters emit multipart body as model format, TCGC will unifo export interface multipartOptionsType { isNameDefined: boolean; // whether name is defined in Typespec. For multipart/mixed, name may not be defined for some parts isFilePart: boolean; // whether this part is for file - multi: boolean; // whether this part is multi in request payload + isMulti: boolean; // whether this part is multi in request payload headers: HeaderProperty[]; // relates to custom header filename?: SdkModelPropertyTypeBase; contentType?: SdkModelPropertyTypeBase; @@ -78,9 +78,9 @@ export interface SdkBodyModelPropertyType extends SdkModelPropertyTypeBase { notes: - `isNameDefined`: Whether name is defined in Typespec. For multipart/mixed, name may not be defined for some parts. - `isFilePart`: Same with `isMultipartFileInput` before -- `multi`: Mainly for explicity of `Type[]`. In old design for `Model[]`, Typespec can't declare it clearly that SDK shall +- `isMulti`: Mainly for explicity of `Type[]`. In old design for `Model[]`, Typespec can't declare it clearly that SDK shall (a) serialize array of model as single part or (b) serialize model as single part then send it multi times. With new design, if - `HttpPart`, multi is false and SDK shall follow (a); if `HttpPart[]`, multi is true and follow (b) + `HttpPart`, isMulti is false and SDK shall follow (a); if `HttpPart[]`, isMulti is true and follow (b) - `headers`: Equals to custom headers in swagger https://swagger.io/docs/specification/describing-request-body/multipart-requests/ - `filename`: When Typespec author use `httpFile` change requiredness for optional metadata properties "filename", this property has value; otherwise it is "undefined". - `contentType`: When Typespec author use `httpFile` change requiredness for optional metadata properties "contentType", this property has value; otherwise it is "undefined". @@ -120,7 +120,7 @@ TCGC API example: "multipartOptions": { "isNameDefined": true, "isFilePart": false, - "multi": false, + "isMulti": false, "headers": [] } }, @@ -130,7 +130,7 @@ TCGC API example: "multipartOptions": { "isNameDefined": true, "isFilePart": false, - "multi": false, + "isMulti": false, "headers": [] } }, @@ -140,7 +140,7 @@ TCGC API example: "multipartOptions": { "isNameDefined": true, "isFilePart": true, - "multi": false, + "isMulti": false, "headers": [] } }, @@ -150,7 +150,7 @@ TCGC API example: "multipartOptions": { "isNameDefined": true, "isFilePart": false, - "multi": true, + "isMulti": true, "headers": [] } }, @@ -160,7 +160,7 @@ TCGC API example: "multipartOptions": { "isNameDefined": true, "isFilePart": true, - "multi": true, + "isMulti": true, "headers": [] } } @@ -213,7 +213,7 @@ TCGC API example: "multipartOptions": { "isNameDefined": true, "isFilePart": false, - "multi": false, + "isMulti": false, "headers": [] } }, @@ -223,7 +223,7 @@ TCGC API example: "multipartOptions": { "isNameDefined": true, "isFilePart": false, - "multi": false, + "isMulti": false, "headers": [] } }, @@ -233,7 +233,7 @@ TCGC API example: "multipartOptions": { "isNameDefined": true, "isFilePart": true, - "multi": false, + "isMulti": false, "headers": [] } }, @@ -243,7 +243,7 @@ TCGC API example: "multipartOptions": { "isNameDefined": true, "isFilePart": true, - "multi": false, + "isMulti": false, "headers": [], "fileName": { "optional": true }, "contentType": { "optional": true } @@ -254,7 +254,7 @@ TCGC API example: "multipartOptions": { "isNameDefined": true, "isFilePart": true, - "multi": false, + "isMulti": false, "headers": [], "fileName": { "optional": false }, "contentType": { "optional": false } @@ -266,7 +266,7 @@ TCGC API example: "multipartOptions": { "isNameDefined": true, "isFilePart": false, - "multi": false, + "isMulti": false, "headers": [] } }, @@ -276,7 +276,7 @@ TCGC API example: "multipartOptions": { "isNameDefined": true, "isFilePart": true, - "multi": true, + "isMulti": true, "headers": [] } }, @@ -286,7 +286,7 @@ TCGC API example: "multipartOptions": { "isNameDefined": true, "isFilePart": true, - "multi": true, + "isMulti": true, "headers": [] } }, @@ -296,7 +296,7 @@ TCGC API example: "multipartOptions": { "isNameDefined": true, "isFilePart": true, - "multi": false, + "isMulti": false, "headers": [{"kind": "header", "name": "x-ms-header"}] } } @@ -325,11 +325,10 @@ TCGC API example: "multipartOptions": { "isNameDefined": false, "isFilePart": false, - "multi": false, + "isMulti": false, "headers": [] } } ] } ``` -