From 86209ed270ea1e05b289f025f34b1579835aa60b Mon Sep 17 00:00:00 2001 From: jolov Date: Fri, 16 Jan 2026 16:47:27 -0800 Subject: [PATCH 1/4] Fix PrimaryNamespace logic --- .../emitter/src/lib/client-model-builder.ts | 2 - .../emitter/src/lib/utils.ts | 6 + .../emitter/test/Unit/utils.test.ts | 42 +- .../ModelReaderWriterContextDefinition.cs | 2 +- .../src/Properties/launchSettings.json | 10 - .../src/TypeFactory.cs | 2 +- ...ArrayContext.cs => Encode_ArrayContext.cs} | 2 +- .../multipart/src/Generated/FormData.cs | 8 - .../http/payload/multipart/tspCodeModel.json | 930 +++++------------- ...eArrayContext.cs => _Type_ArrayContext.cs} | 2 +- ...ryContext.cs => _TypeDictionaryContext.cs} | 2 +- ...text.cs => _Type_EnumExtensibleContext.cs} | 2 +- ...edContext.cs => _Type_EnumFixedContext.cs} | 2 +- ...tyContext.cs => _TypeModelEmptyContext.cs} | 2 +- ...delInheritanceEnumDiscriminatorContext.cs} | 2 +- ...lInheritanceNestedDiscriminatorContext.cs} | 2 +- ...odelInheritanceNotDiscriminatedContext.cs} | 2 +- ... _TypeModelInheritanceRecursiveContext.cs} | 2 +- ...lInheritanceSingleDiscriminatorContext.cs} | 2 +- ...geContext.cs => _TypeModelUsageContext.cs} | 2 +- ...text.cs => _TypeModelVisibilityContext.cs} | 2 +- ...ypePropertyAdditionalPropertiesContext.cs} | 2 +- ...ext.cs => _TypePropertyNullableContext.cs} | 2 +- ...ext.cs => _TypePropertyOptionalContext.cs} | 2 +- ...t.cs => _TypePropertyValueTypesContext.cs} | 2 +- ...ScalarContext.cs => _TypeScalarContext.cs} | 2 +- ...t.cs => _TypeUnionDiscriminatedContext.cs} | 2 +- ...peUnionContext.cs => _TypeUnionContext.cs} | 2 +- 28 files changed, 315 insertions(+), 727 deletions(-) rename packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/src/Generated/Models/{EncodeArrayContext.cs => Encode_ArrayContext.cs} (84%) rename packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/Models/{TypeArrayContext.cs => _Type_ArrayContext.cs} (70%) rename packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/Models/{TypeDictionaryContext.cs => _TypeDictionaryContext.cs} (70%) rename packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Generated/Models/{TypeEnumExtensibleContext.cs => _Type_EnumExtensibleContext.cs} (61%) rename packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Generated/Models/{TypeEnumFixedContext.cs => _Type_EnumFixedContext.cs} (62%) rename packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/src/Generated/Models/{TypeModelEmptyContext.cs => _TypeModelEmptyContext.cs} (79%) rename packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/src/Generated/Models/{TypeModelInheritanceEnumDiscriminatorContext.cs => _TypeModelInheritanceEnumDiscriminatorContext.cs} (81%) rename packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/src/Generated/Models/{TypeModelInheritanceNestedDiscriminatorContext.cs => _TypeModelInheritanceNestedDiscriminatorContext.cs} (83%) rename packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/src/Generated/Models/{TypeModelInheritanceNotDiscriminatedContext.cs => _TypeModelInheritanceNotDiscriminatedContext.cs} (74%) rename packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/src/Generated/Models/{TypeModelInheritanceRecursiveContext.cs => _TypeModelInheritanceRecursiveContext.cs} (72%) rename packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/src/Generated/Models/{TypeModelInheritanceSingleDiscriminatorContext.cs => _TypeModelInheritanceSingleDiscriminatorContext.cs} (85%) rename packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/src/Generated/Models/{TypeModelUsageContext.cs => _TypeModelUsageContext.cs} (79%) rename packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/src/Generated/Models/{TypeModelVisibilityContext.cs => _TypeModelVisibilityContext.cs} (75%) rename packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/{TypePropertyAdditionalPropertiesContext.cs => _TypePropertyAdditionalPropertiesContext.cs} (96%) rename packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/Models/{TypePropertyNullableContext.cs => _TypePropertyNullableContext.cs} (88%) rename packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/{TypePropertyOptionalContext.cs => _TypePropertyOptionalContext.cs} (93%) rename packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/{TypePropertyValueTypesContext.cs => _TypePropertyValueTypesContext.cs} (95%) rename packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Models/{TypeScalarContext.cs => _TypeScalarContext.cs} (62%) rename packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/src/Generated/Models/{TypeUnionDiscriminatedContext.cs => _TypeUnionDiscriminatedContext.cs} (72%) rename packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/Models/{TypeUnionContext.cs => _TypeUnionContext.cs} (93%) diff --git a/packages/http-client-csharp/emitter/src/lib/client-model-builder.ts b/packages/http-client-csharp/emitter/src/lib/client-model-builder.ts index abfd0fefb05..d723966f55f 100644 --- a/packages/http-client-csharp/emitter/src/lib/client-model-builder.ts +++ b/packages/http-client-csharp/emitter/src/lib/client-model-builder.ts @@ -47,8 +47,6 @@ export function createModel(sdkContext: CSharpEmitterContext): CodeModel { fixNamingConflicts(models, constants); const clientModel: CodeModel = { - // To ensure deterministic library name, customers would need to set the package-name property as the ordering of the namespaces could change - // if the typespec is changed. name: getClientNamespaceString(sdkContext)!, apiVersions: rootApiVersions, enums: enums, diff --git a/packages/http-client-csharp/emitter/src/lib/utils.ts b/packages/http-client-csharp/emitter/src/lib/utils.ts index 54edf8a4f84..41646f5b031 100644 --- a/packages/http-client-csharp/emitter/src/lib/utils.ts +++ b/packages/http-client-csharp/emitter/src/lib/utils.ts @@ -140,15 +140,21 @@ export async function execAsync( export function getClientNamespaceString(context: CSharpEmitterContext): string | undefined { return getClientNamespaceStringHelper( + // namespace is not a public emitter option, but it is supported by TCGC + (context.emitContext.options as any).namespace, context.emitContext.options["package-name"], listAllServiceNamespaces(context)[0], ); } export function getClientNamespaceStringHelper( + namespaceOverride?: string, packageName?: string, namespace?: Namespace, ): string | undefined { + if (namespaceOverride) { + return namespaceOverride; + } if (packageName) { packageName = packageName .replace(/-/g, ".") diff --git a/packages/http-client-csharp/emitter/test/Unit/utils.test.ts b/packages/http-client-csharp/emitter/test/Unit/utils.test.ts index fae2a7d9549..c5a7b94d6fa 100644 --- a/packages/http-client-csharp/emitter/test/Unit/utils.test.ts +++ b/packages/http-client-csharp/emitter/test/Unit/utils.test.ts @@ -1,7 +1,8 @@ +import { listAllServiceNamespaces } from "@azure-tools/typespec-client-generator-core"; import * as childProcess from "child_process"; import { EventEmitter } from "events"; import { beforeEach, describe, expect, it, vi } from "vitest"; -import { execCSharpGenerator } from "../../src/lib/utils.js"; +import { execCSharpGenerator, getClientNamespaceStringHelper } from "../../src/lib/utils.js"; import { CSharpEmitterContext } from "../../src/sdk-context.js"; import { createCSharpSdkContext, @@ -84,3 +85,42 @@ describe("execCSharpGenerator tests", () => { expect(result.exitCode).toBe(0); }); }); + +describe("getClientNamespaceStringHelper", () => { + it("should return the formatted package name when namespace is undefined", () => { + expect(getClientNamespaceStringHelper(undefined, "client-plane-generated")).toBe( + "Client.Plane.Generated", + ); + expect(getClientNamespaceStringHelper(undefined, "client-plane-Generated")).toBe( + "Client.Plane.Generated", + ); + expect(getClientNamespaceStringHelper(undefined, "client-Plane-generated")).toBe( + "Client.Plane.Generated", + ); + }); + + it("should handle dots in package name", () => { + expect(getClientNamespaceStringHelper(undefined, "client.plane.generated")).toBe( + "Client.Plane.Generated", + ); + }); + + it("should return namespace override when provided", async () => { + expect(getClientNamespaceStringHelper("Namespace.Override", "Package.Name")).toBe( + "Namespace.Override", + ); + }); + + it("should fallback to Namespace from spec when namespace and package are not provided", async () => { + const runner = await createEmitterTestHost(); + const program = await typeSpecCompile(``, runner, { IsVersionNeeded: false }); + + const context = createEmitterContext(program); + const sdkContext = await createCSharpSdkContext(context); + const primaryNamespace = listAllServiceNamespaces(sdkContext)[0]; + + expect(getClientNamespaceStringHelper(undefined, undefined, primaryNamespace)).toBe( + "Azure.Csharp.Testing", + ); + }); +}); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelReaderWriterContextDefinition.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelReaderWriterContextDefinition.cs index 52964fc9a13..a7080cbf090 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelReaderWriterContextDefinition.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ModelReaderWriterContextDefinition.cs @@ -21,7 +21,7 @@ public class ModelReaderWriterContextDefinition : TypeProvider private static readonly CSharpTypeNameComparer s_cSharpTypeNameComparer = new CSharpTypeNameComparer(); private static readonly TypeProviderTypeNameComparer s_typeProviderNameComparer = new TypeProviderTypeNameComparer(); - internal static readonly string s_name = $"{ScmCodeModelGenerator.Instance.TypeFactory.ServiceName}Context"; + internal static readonly string s_name = $"{RemovePeriods(ScmCodeModelGenerator.Instance.TypeFactory.PrimaryNamespace)}Context"; protected override string BuildName() => s_name; diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Properties/launchSettings.json b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Properties/launchSettings.json index b95f8ae913a..744f37906d1 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Properties/launchSettings.json +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Properties/launchSettings.json @@ -10,11 +10,6 @@ "commandName": "Executable", "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.exe" }, - "http-authentication-noauth-union": { - "commandLineArgs": "$(SolutionDir)/TestProjects/Spector/http/authentication/noauth/union -g StubLibraryGenerator", - "commandName": "Executable", - "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.exe" - }, "http-authentication-oauth2": { "commandLineArgs": "$(SolutionDir)/TestProjects/Spector/http/authentication/oauth2 -g StubLibraryGenerator", "commandName": "Executable", @@ -100,11 +95,6 @@ "commandName": "Executable", "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.exe" }, - "http-parameters-query": { - "commandLineArgs": "$(SolutionDir)/TestProjects/Spector/http/parameters/query -g StubLibraryGenerator", - "commandName": "Executable", - "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.exe" - }, "http-parameters-spread": { "commandLineArgs": "$(SolutionDir)/TestProjects/Spector/http/parameters/spread -g StubLibraryGenerator", "commandName": "Executable", diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/TypeFactory.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/TypeFactory.cs index b3e048b86a9..bd6a4d8c6dc 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/TypeFactory.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/TypeFactory.cs @@ -435,7 +435,7 @@ public EnumCacheKey(InputEnumType enumType, TypeProvider? declaringType) } private string? _primaryNamespace; - internal string PrimaryNamespace => _primaryNamespace ??= GetCleanNameSpace(CodeModelGenerator.Instance.InputLibrary.InputNamespace.Name); + public string PrimaryNamespace => _primaryNamespace ??= GetCleanNameSpace(CodeModelGenerator.Instance.InputLibrary.InputNamespace.Name); public string ServiceName => _serviceName ??= BuildServiceName(); private string? _serviceName; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/src/Generated/Models/EncodeArrayContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/src/Generated/Models/Encode_ArrayContext.cs similarity index 84% rename from packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/src/Generated/Models/EncodeArrayContext.cs rename to packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/src/Generated/Models/Encode_ArrayContext.cs index ba94dca212b..f3ab669d97b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/src/Generated/Models/EncodeArrayContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/src/Generated/Models/Encode_ArrayContext.cs @@ -10,7 +10,7 @@ namespace Encode._Array [ModelReaderWriterBuildable(typeof(NewlineDelimitedArrayProperty))] [ModelReaderWriterBuildable(typeof(PipeDelimitedArrayProperty))] [ModelReaderWriterBuildable(typeof(SpaceDelimitedArrayProperty))] - public partial class EncodeArrayContext : ModelReaderWriterContext + public partial class Encode_ArrayContext : ModelReaderWriterContext { } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormData.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormData.cs index d543051acc1..0d2268a2a18 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormData.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormData.cs @@ -19,14 +19,6 @@ public partial class FormData public virtual Task BasicAsync(BinaryContent content, string contentType, RequestOptions options = null) => throw null; - public virtual ClientResult WithWireName(BinaryContent content, string contentType, RequestOptions options = null) => throw null; - - public virtual Task WithWireNameAsync(BinaryContent content, string contentType, RequestOptions options = null) => throw null; - - public virtual ClientResult OptionalParts(BinaryContent content, string contentType, RequestOptions options = null) => throw null; - - public virtual Task OptionalPartsAsync(BinaryContent content, string contentType, RequestOptions options = null) => throw null; - public virtual ClientResult FileArrayAndBasic(BinaryContent content, string contentType, RequestOptions options = null) => throw null; public virtual Task FileArrayAndBasicAsync(BinaryContent content, string contentType, RequestOptions options = null) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/tspCodeModel.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/tspCodeModel.json index 654b074b5fe..bc036ea43f6 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/tspCodeModel.json +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/tspCodeModel.json @@ -402,75 +402,11 @@ }, "value": "multipart/form-data", "decorators": [] - }, - { - "$id": "51", - "kind": "constant", - "name": "BasicRequestContentType24", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "52", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - { - "$id": "53", - "kind": "constant", - "name": "BasicRequestContentType25", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "54", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - { - "$id": "55", - "kind": "constant", - "name": "BasicRequestContentType26", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "56", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - { - "$id": "57", - "kind": "constant", - "name": "BasicRequestContentType27", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "58", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] } ], "models": [ { - "$id": "59", + "$id": "51", "kind": "model", "name": "MultiPartRequest", "namespace": "Payload.MultiPart", @@ -479,12 +415,12 @@ "decorators": [], "properties": [ { - "$id": "60", + "$id": "52", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "61", + "$id": "53", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -510,12 +446,12 @@ "isHttpMetadata": false }, { - "$id": "62", + "$id": "54", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "63", + "$id": "55", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -544,155 +480,7 @@ ] }, { - "$id": "64", - "kind": "model", - "name": "MultiPartRequestWithWireName", - "namespace": "Payload.MultiPart", - "crossLanguageDefinitionId": "Payload.MultiPart.MultiPartRequestWithWireName", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "65", - "kind": "property", - "name": "identifier", - "serializedName": "id", - "type": { - "$id": "66", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.MultiPart.MultiPartRequestWithWireName.identifier", - "serializationOptions": { - "multipart": { - "isFilePart": false, - "isMulti": false, - "defaultContentTypes": [ - "text/plain" - ], - "name": "id", - "headers": [] - } - }, - "isHttpMetadata": false - }, - { - "$id": "67", - "kind": "property", - "name": "image", - "serializedName": "profileImage", - "type": { - "$id": "68", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.MultiPart.MultiPartRequestWithWireName.image", - "serializationOptions": { - "multipart": { - "isFilePart": true, - "isMulti": false, - "defaultContentTypes": [ - "application/octet-stream" - ], - "name": "profileImage", - "headers": [] - } - }, - "isHttpMetadata": false - } - ] - }, - { - "$id": "69", - "kind": "model", - "name": "MultiPartOptionalRequest", - "namespace": "Payload.MultiPart", - "crossLanguageDefinitionId": "Payload.MultiPart.MultiPartOptionalRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "70", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "71", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.MultiPart.MultiPartOptionalRequest.id", - "serializationOptions": { - "multipart": { - "isFilePart": false, - "isMulti": false, - "defaultContentTypes": [ - "text/plain" - ], - "name": "id", - "headers": [] - } - }, - "isHttpMetadata": false - }, - { - "$id": "72", - "kind": "property", - "name": "profileImage", - "serializedName": "profileImage", - "type": { - "$id": "73", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.MultiPart.MultiPartOptionalRequest.profileImage", - "serializationOptions": { - "multipart": { - "isFilePart": true, - "isMulti": false, - "defaultContentTypes": [ - "application/octet-stream" - ], - "name": "profileImage", - "headers": [] - } - }, - "isHttpMetadata": false - } - ] - }, - { - "$id": "74", + "$id": "56", "kind": "model", "name": "ComplexPartsRequest", "namespace": "Payload.MultiPart", @@ -701,12 +489,12 @@ "decorators": [], "properties": [ { - "$id": "75", + "$id": "57", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "76", + "$id": "58", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -732,12 +520,12 @@ "isHttpMetadata": false }, { - "$id": "77", + "$id": "59", "kind": "property", "name": "address", "serializedName": "address", "type": { - "$id": "78", + "$id": "60", "kind": "model", "name": "Address", "namespace": "Payload.MultiPart", @@ -746,12 +534,12 @@ "decorators": [], "properties": [ { - "$id": "79", + "$id": "61", "kind": "property", "name": "city", "serializedName": "city", "type": { - "$id": "80", + "$id": "62", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -792,12 +580,12 @@ "isHttpMetadata": false }, { - "$id": "81", + "$id": "63", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "82", + "$id": "64", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -824,16 +612,16 @@ "isHttpMetadata": false }, { - "$id": "83", + "$id": "65", "kind": "property", "name": "pictures", "serializedName": "pictures", "type": { - "$id": "84", + "$id": "66", "kind": "array", "name": "ArrayHttpPart", "valueType": { - "$id": "85", + "$id": "67", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -865,10 +653,10 @@ ] }, { - "$ref": "78" + "$ref": "60" }, { - "$id": "86", + "$id": "68", "kind": "model", "name": "JsonPartRequest", "namespace": "Payload.MultiPart", @@ -877,12 +665,12 @@ "decorators": [], "properties": [ { - "$id": "87", + "$id": "69", "kind": "property", "name": "address", "serializedName": "address", "type": { - "$ref": "78" + "$ref": "60" }, "optional": false, "readOnly": false, @@ -904,12 +692,12 @@ "isHttpMetadata": false }, { - "$id": "88", + "$id": "70", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "89", + "$id": "71", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -938,7 +726,7 @@ ] }, { - "$id": "90", + "$id": "72", "kind": "model", "name": "BinaryArrayPartsRequest", "namespace": "Payload.MultiPart", @@ -947,12 +735,12 @@ "decorators": [], "properties": [ { - "$id": "91", + "$id": "73", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "92", + "$id": "74", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -978,16 +766,16 @@ "isHttpMetadata": false }, { - "$id": "93", + "$id": "75", "kind": "property", "name": "pictures", "serializedName": "pictures", "type": { - "$id": "94", + "$id": "76", "kind": "array", "name": "ArrayHttpPart1", "valueType": { - "$id": "95", + "$id": "77", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -1019,7 +807,7 @@ ] }, { - "$id": "96", + "$id": "78", "kind": "model", "name": "MultiBinaryPartsRequest", "namespace": "Payload.MultiPart", @@ -1028,12 +816,12 @@ "decorators": [], "properties": [ { - "$id": "97", + "$id": "79", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "98", + "$id": "80", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -1060,12 +848,12 @@ "isHttpMetadata": false }, { - "$id": "99", + "$id": "81", "kind": "property", "name": "picture", "serializedName": "picture", "type": { - "$id": "100", + "$id": "82", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -1094,7 +882,7 @@ ] }, { - "$id": "101", + "$id": "83", "kind": "model", "name": "AnonymousModelRequest", "namespace": "Payload.MultiPart.FormData", @@ -1103,12 +891,12 @@ "decorators": [], "properties": [ { - "$id": "102", + "$id": "84", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "103", + "$id": "85", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -1137,7 +925,7 @@ ] }, { - "$id": "104", + "$id": "86", "kind": "model", "name": "ComplexHttpPartsModelRequest", "namespace": "Payload.MultiPart", @@ -1146,12 +934,12 @@ "decorators": [], "properties": [ { - "$id": "105", + "$id": "87", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "106", + "$id": "88", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1177,12 +965,12 @@ "isHttpMetadata": false }, { - "$id": "107", + "$id": "89", "kind": "property", "name": "address", "serializedName": "address", "type": { - "$ref": "78" + "$ref": "60" }, "optional": false, "readOnly": false, @@ -1204,12 +992,12 @@ "isHttpMetadata": false }, { - "$id": "108", + "$id": "90", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "109", + "$id": "91", "kind": "model", "name": "FileRequiredMetaData", "namespace": "Payload.MultiPart", @@ -1217,7 +1005,7 @@ "usage": "Input", "decorators": [], "baseModel": { - "$id": "110", + "$id": "92", "kind": "model", "name": "File", "namespace": "TypeSpec.Http", @@ -1228,13 +1016,13 @@ "decorators": [], "properties": [ { - "$id": "111", + "$id": "93", "kind": "property", "name": "contentType", "summary": "The allowed media (MIME) types of the file contents.", "doc": "The allowed media (MIME) types of the file contents.\n\nIn file bodies, this value comes from the `Content-Type` header of the request or response. In JSON bodies,\nthis value is serialized as a field in the response.\n\nNOTE: this is not _necessarily_ the same as the `Content-Type` header of the request or response, but\nit will be for file bodies. It may be different if the file is serialized as a JSON object. It always refers to the\n_contents_ of the file, and not necessarily the way the file itself is transmitted or serialized.", "type": { - "$id": "112", + "$id": "94", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1250,13 +1038,13 @@ "isHttpMetadata": false }, { - "$id": "113", + "$id": "95", "kind": "property", "name": "filename", "summary": "The name of the file, if any.", "doc": "The name of the file, if any.\n\nIn file bodies, this value comes from the `filename` parameter of the `Content-Disposition` header of the response\nor multipart payload. In JSON bodies, this value is serialized as a field in the response.\n\nNOTE: By default, `filename` cannot be sent in request payloads and can only be sent in responses and multipart\npayloads, as the `Content-Disposition` header is not valid in requests. If you want to send the `filename` in a request,\nyou must extend the `File` model and override the `filename` property with a different location defined by HTTP metadata\ndecorators.", "type": { - "$id": "114", + "$id": "96", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1272,13 +1060,13 @@ "isHttpMetadata": false }, { - "$id": "115", + "$id": "97", "kind": "property", "name": "contents", "summary": "The contents of the file.", "doc": "The contents of the file.\n\nIn file bodies, this value comes from the body of the request, response, or multipart payload. In JSON bodies,\nthis value is serialized as a field in the response.", "type": { - "$id": "116", + "$id": "98", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -1298,11 +1086,11 @@ }, "properties": [ { - "$id": "117", + "$id": "99", "kind": "property", "name": "filename", "type": { - "$id": "118", + "$id": "100", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1318,11 +1106,11 @@ "isHttpMetadata": false }, { - "$id": "119", + "$id": "101", "kind": "property", "name": "contentType", "type": { - "$id": "120", + "$id": "102", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1350,10 +1138,10 @@ "isFilePart": true, "isMulti": false, "filename": { - "$id": "121", + "$id": "103", "apiVersions": [], "type": { - "$id": "122", + "$id": "104", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1383,10 +1171,10 @@ "serializationOptions": {} }, "contentType": { - "$id": "123", + "$id": "105", "apiVersions": [], "type": { - "$id": "124", + "$id": "106", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1425,16 +1213,16 @@ "isHttpMetadata": false }, { - "$id": "125", + "$id": "107", "kind": "property", "name": "previousAddresses", "serializedName": "previousAddresses", "type": { - "$id": "126", + "$id": "108", "kind": "array", "name": "ArrayAddress", "valueType": { - "$ref": "78" + "$ref": "60" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1459,16 +1247,16 @@ "isHttpMetadata": false }, { - "$id": "127", + "$id": "109", "kind": "property", "name": "pictures", "serializedName": "pictures", "type": { - "$id": "128", + "$id": "110", "kind": "array", "name": "ArrayHttpPart2", "valueType": { - "$ref": "109" + "$ref": "91" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1484,10 +1272,10 @@ "isFilePart": true, "isMulti": true, "filename": { - "$ref": "121" + "$ref": "103" }, "contentType": { - "$ref": "123" + "$ref": "105" }, "defaultContentTypes": [ "*/*" @@ -1501,13 +1289,13 @@ ] }, { - "$ref": "109" + "$ref": "91" }, { - "$ref": "110" + "$ref": "92" }, { - "$id": "129", + "$id": "111", "kind": "model", "name": "FileWithHttpPartSpecificContentTypeRequest", "namespace": "Payload.MultiPart", @@ -1516,12 +1304,12 @@ "decorators": [], "properties": [ { - "$id": "130", + "$id": "112", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "131", + "$id": "113", "kind": "model", "name": "FileSpecificContentType", "namespace": "Payload.MultiPart", @@ -1529,15 +1317,15 @@ "usage": "Input", "decorators": [], "baseModel": { - "$ref": "110" + "$ref": "92" }, "properties": [ { - "$id": "132", + "$id": "114", "kind": "property", "name": "filename", "type": { - "$id": "133", + "$id": "115", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1553,7 +1341,7 @@ "isHttpMetadata": false }, { - "$id": "134", + "$id": "116", "kind": "property", "name": "contentType", "type": { @@ -1581,10 +1369,10 @@ "isFilePart": true, "isMulti": false, "filename": { - "$id": "135", + "$id": "117", "apiVersions": [], "type": { - "$id": "136", + "$id": "118", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1614,15 +1402,15 @@ "serializationOptions": {} }, "contentType": { - "$id": "137", + "$id": "119", "apiVersions": [], "type": { - "$id": "138", + "$id": "120", "kind": "constant", "decorators": [], "value": "image/jpg", "valueType": { - "$id": "139", + "$id": "121", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1666,10 +1454,10 @@ ] }, { - "$ref": "131" + "$ref": "113" }, { - "$id": "140", + "$id": "122", "kind": "model", "name": "FileWithHttpPartRequiredContentTypeRequest", "namespace": "Payload.MultiPart", @@ -1678,12 +1466,12 @@ "decorators": [], "properties": [ { - "$id": "141", + "$id": "123", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$ref": "109" + "$ref": "91" }, "optional": false, "readOnly": false, @@ -1696,10 +1484,10 @@ "isFilePart": true, "isMulti": false, "filename": { - "$ref": "121" + "$ref": "103" }, "contentType": { - "$ref": "123" + "$ref": "105" }, "defaultContentTypes": [ "*/*" @@ -1713,7 +1501,7 @@ ] }, { - "$id": "142", + "$id": "124", "kind": "model", "name": "FileWithHttpPartOptionalContentTypeRequest", "namespace": "Payload.MultiPart", @@ -1722,12 +1510,12 @@ "decorators": [], "properties": [ { - "$id": "143", + "$id": "125", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "144", + "$id": "126", "kind": "model", "name": "FileOptionalContentType", "namespace": "Payload.MultiPart", @@ -1735,15 +1523,15 @@ "usage": "Input", "decorators": [], "baseModel": { - "$ref": "110" + "$ref": "92" }, "properties": [ { - "$id": "145", + "$id": "127", "kind": "property", "name": "filename", "type": { - "$id": "146", + "$id": "128", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1771,10 +1559,10 @@ "isFilePart": true, "isMulti": false, "filename": { - "$id": "147", + "$id": "129", "apiVersions": [], "type": { - "$id": "148", + "$id": "130", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1804,12 +1592,12 @@ "serializationOptions": {} }, "contentType": { - "$id": "149", + "$id": "131", "doc": "The allowed media (MIME) types of the file contents.\n\nIn file bodies, this value comes from the `Content-Type` header of the request or response. In JSON bodies,\nthis value is serialized as a field in the response.\n\nNOTE: this is not _necessarily_ the same as the `Content-Type` header of the request or response, but\nit will be for file bodies. It may be different if the file is serialized as a JSON object. It always refers to the\n_contents_ of the file, and not necessarily the way the file itself is transmitted or serialized.", "summary": "The allowed media (MIME) types of the file contents.", "apiVersions": [], "type": { - "$id": "150", + "$id": "132", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1850,10 +1638,10 @@ ] }, { - "$ref": "144" + "$ref": "126" }, { - "$id": "151", + "$id": "133", "kind": "model", "name": "FloatRequest", "namespace": "Payload.MultiPart.FormData.HttpParts.NonString", @@ -1862,12 +1650,12 @@ "decorators": [], "properties": [ { - "$id": "152", + "$id": "134", "kind": "property", "name": "temperature", "serializedName": "temperature", "type": { - "$id": "153", + "$id": "135", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -1884,15 +1672,15 @@ "isFilePart": false, "isMulti": false, "contentType": { - "$id": "154", + "$id": "136", "apiVersions": [], "type": { - "$id": "155", + "$id": "137", "kind": "constant", "decorators": [], "value": "text/plain", "valueType": { - "$id": "156", + "$id": "138", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1938,7 +1726,7 @@ ], "clients": [ { - "$id": "157", + "$id": "139", "kind": "client", "name": "MultiPartClient", "namespace": "Payload.MultiPart", @@ -1946,13 +1734,13 @@ "methods": [], "parameters": [ { - "$id": "158", + "$id": "140", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "159", + "$id": "141", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1963,7 +1751,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "160", + "$id": "142", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1982,27 +1770,27 @@ "apiVersions": [], "children": [ { - "$id": "161", + "$id": "143", "kind": "client", "name": "FormData", "namespace": "Payload.MultiPart.FormData", "methods": [ { - "$id": "162", + "$id": "144", "kind": "basic", "name": "basic", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data", "operation": { - "$id": "163", + "$id": "145", "name": "basic", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data", "accessibility": "public", "parameters": [ { - "$id": "164", + "$id": "146", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -2018,12 +1806,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.basic.contentType" }, { - "$id": "165", + "$id": "147", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "59" + "$ref": "51" }, "isApiVersion": false, "contentTypes": [ @@ -2060,7 +1848,7 @@ }, "parameters": [ { - "$id": "166", + "$id": "148", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -2077,12 +1865,12 @@ "decorators": [] }, { - "$id": "167", + "$id": "149", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "59" + "$ref": "51" }, "location": "Body", "isApiVersion": false, @@ -2101,252 +1889,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.basic" }, { - "$id": "168", - "kind": "basic", - "name": "withWireName", - "accessibility": "public", - "apiVersions": [], - "doc": "Test content-type: multipart/form-data with wire names", - "operation": { - "$id": "169", - "name": "withWireName", - "resourceName": "FormData", - "doc": "Test content-type: multipart/form-data with wire names", - "accessibility": "public", - "parameters": [ - { - "$id": "170", - "kind": "header", - "name": "contentType", - "serializedName": "Content-Type", - "type": { - "$ref": "7" - }, - "isApiVersion": false, - "optional": false, - "isContentType": true, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.withWireName.contentType" - }, - { - "$id": "171", - "kind": "body", - "name": "body", - "serializedName": "body", - "type": { - "$ref": "64" - }, - "isApiVersion": false, - "contentTypes": [ - "multipart/form-data" - ], - "defaultContentType": "multipart/form-data", - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.withWireName.body" - } - ], - "responses": [ - { - "statusCodes": [ - 204 - ], - "headers": [], - "isErrorResponse": false - } - ], - "httpMethod": "POST", - "uri": "{endpoint}", - "path": "/multipart/form-data/mixed-parts-with-wire-name", - "requestMediaTypes": [ - "multipart/form-data" - ], - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.withWireName", - "decorators": [] - }, - "parameters": [ - { - "$id": "172", - "kind": "method", - "name": "contentType", - "serializedName": "Content-Type", - "type": { - "$ref": "9" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.withWireName.contentType", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "173", - "kind": "method", - "name": "body", - "serializedName": "body", - "type": { - "$ref": "64" - }, - "location": "Body", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.withWireName.body", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": {}, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.withWireName" - }, - { - "$id": "174", - "kind": "basic", - "name": "optionalParts", - "accessibility": "public", - "apiVersions": [], - "doc": "Test content-type: multipart/form-data with optional parts", - "operation": { - "$id": "175", - "name": "optionalParts", - "resourceName": "FormData", - "doc": "Test content-type: multipart/form-data with optional parts", - "accessibility": "public", - "parameters": [ - { - "$id": "176", - "kind": "header", - "name": "contentType", - "serializedName": "Content-Type", - "type": { - "$ref": "11" - }, - "isApiVersion": false, - "optional": false, - "isContentType": true, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.optionalParts.contentType" - }, - { - "$id": "177", - "kind": "body", - "name": "body", - "serializedName": "body", - "type": { - "$ref": "69" - }, - "isApiVersion": false, - "contentTypes": [ - "multipart/form-data" - ], - "defaultContentType": "multipart/form-data", - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.optionalParts.body" - } - ], - "responses": [ - { - "statusCodes": [ - 204 - ], - "headers": [], - "isErrorResponse": false - } - ], - "httpMethod": "POST", - "uri": "{endpoint}", - "path": "/multipart/form-data/optional-parts", - "requestMediaTypes": [ - "multipart/form-data" - ], - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.optionalParts", - "decorators": [] - }, - "parameters": [ - { - "$id": "178", - "kind": "method", - "name": "contentType", - "serializedName": "Content-Type", - "type": { - "$ref": "13" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.optionalParts.contentType", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "179", - "kind": "method", - "name": "body", - "serializedName": "body", - "type": { - "$ref": "69" - }, - "location": "Body", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.optionalParts.body", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": {}, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.optionalParts" - }, - { - "$id": "180", + "$id": "150", "kind": "basic", "name": "fileArrayAndBasic", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for mixed scenarios", "operation": { - "$id": "181", + "$id": "151", "name": "fileArrayAndBasic", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data for mixed scenarios", "accessibility": "public", "parameters": [ { - "$id": "182", + "$id": "152", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "15" + "$ref": "7" }, "isApiVersion": false, "optional": false, @@ -2357,12 +1919,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.fileArrayAndBasic.contentType" }, { - "$id": "183", + "$id": "153", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "74" + "$ref": "56" }, "isApiVersion": false, "contentTypes": [ @@ -2399,12 +1961,12 @@ }, "parameters": [ { - "$id": "184", + "$id": "154", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "17" + "$ref": "9" }, "location": "Header", "isApiVersion": false, @@ -2416,12 +1978,12 @@ "decorators": [] }, { - "$id": "185", + "$id": "155", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "74" + "$ref": "56" }, "location": "Body", "isApiVersion": false, @@ -2440,26 +2002,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.fileArrayAndBasic" }, { - "$id": "186", + "$id": "156", "kind": "basic", "name": "jsonPart", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for scenario contains json part and binary part ", "operation": { - "$id": "187", + "$id": "157", "name": "jsonPart", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data for scenario contains json part and binary part ", "accessibility": "public", "parameters": [ { - "$id": "188", + "$id": "158", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "19" + "$ref": "11" }, "isApiVersion": false, "optional": false, @@ -2470,12 +2032,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.jsonPart.contentType" }, { - "$id": "189", + "$id": "159", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "86" + "$ref": "68" }, "isApiVersion": false, "contentTypes": [ @@ -2512,12 +2074,12 @@ }, "parameters": [ { - "$id": "190", + "$id": "160", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "21" + "$ref": "13" }, "location": "Header", "isApiVersion": false, @@ -2529,12 +2091,12 @@ "decorators": [] }, { - "$id": "191", + "$id": "161", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "86" + "$ref": "68" }, "location": "Body", "isApiVersion": false, @@ -2553,26 +2115,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.jsonPart" }, { - "$id": "192", + "$id": "162", "kind": "basic", "name": "binaryArrayParts", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for scenario contains multi binary parts", "operation": { - "$id": "193", + "$id": "163", "name": "binaryArrayParts", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data for scenario contains multi binary parts", "accessibility": "public", "parameters": [ { - "$id": "194", + "$id": "164", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "23" + "$ref": "15" }, "isApiVersion": false, "optional": false, @@ -2583,12 +2145,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.binaryArrayParts.contentType" }, { - "$id": "195", + "$id": "165", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "90" + "$ref": "72" }, "isApiVersion": false, "contentTypes": [ @@ -2625,12 +2187,12 @@ }, "parameters": [ { - "$id": "196", + "$id": "166", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "25" + "$ref": "17" }, "location": "Header", "isApiVersion": false, @@ -2642,12 +2204,12 @@ "decorators": [] }, { - "$id": "197", + "$id": "167", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "90" + "$ref": "72" }, "location": "Body", "isApiVersion": false, @@ -2666,26 +2228,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.binaryArrayParts" }, { - "$id": "198", + "$id": "168", "kind": "basic", "name": "multiBinaryParts", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for scenario contains multi binary parts", "operation": { - "$id": "199", + "$id": "169", "name": "multiBinaryParts", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data for scenario contains multi binary parts", "accessibility": "public", "parameters": [ { - "$id": "200", + "$id": "170", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "27" + "$ref": "19" }, "isApiVersion": false, "optional": false, @@ -2696,12 +2258,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.multiBinaryParts.contentType" }, { - "$id": "201", + "$id": "171", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "96" + "$ref": "78" }, "isApiVersion": false, "contentTypes": [ @@ -2738,12 +2300,12 @@ }, "parameters": [ { - "$id": "202", + "$id": "172", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "29" + "$ref": "21" }, "location": "Header", "isApiVersion": false, @@ -2755,12 +2317,12 @@ "decorators": [] }, { - "$id": "203", + "$id": "173", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "96" + "$ref": "78" }, "location": "Body", "isApiVersion": false, @@ -2779,26 +2341,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.multiBinaryParts" }, { - "$id": "204", + "$id": "174", "kind": "basic", "name": "checkFileNameAndContentType", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data", "operation": { - "$id": "205", + "$id": "175", "name": "checkFileNameAndContentType", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data", "accessibility": "public", "parameters": [ { - "$id": "206", + "$id": "176", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "31" + "$ref": "23" }, "isApiVersion": false, "optional": false, @@ -2809,12 +2371,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.checkFileNameAndContentType.contentType" }, { - "$id": "207", + "$id": "177", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "59" + "$ref": "51" }, "isApiVersion": false, "contentTypes": [ @@ -2851,12 +2413,12 @@ }, "parameters": [ { - "$id": "208", + "$id": "178", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "33" + "$ref": "25" }, "location": "Header", "isApiVersion": false, @@ -2868,12 +2430,12 @@ "decorators": [] }, { - "$id": "209", + "$id": "179", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "59" + "$ref": "51" }, "location": "Body", "isApiVersion": false, @@ -2892,26 +2454,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.checkFileNameAndContentType" }, { - "$id": "210", + "$id": "180", "kind": "basic", "name": "anonymousModel", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data", "operation": { - "$id": "211", + "$id": "181", "name": "anonymousModel", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data", "accessibility": "public", "parameters": [ { - "$id": "212", + "$id": "182", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "35" + "$ref": "27" }, "isApiVersion": false, "optional": false, @@ -2922,12 +2484,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.anonymousModel.contentType" }, { - "$id": "213", + "$id": "183", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "101" + "$ref": "83" }, "isApiVersion": false, "contentTypes": [ @@ -2964,12 +2526,12 @@ }, "parameters": [ { - "$id": "214", + "$id": "184", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "37" + "$ref": "29" }, "location": "Header", "isApiVersion": false, @@ -2981,12 +2543,12 @@ "decorators": [] }, { - "$id": "215", + "$id": "185", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "101" + "$ref": "83" }, "location": "Body", "isApiVersion": false, @@ -3007,13 +2569,13 @@ ], "parameters": [ { - "$id": "216", + "$id": "186", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "217", + "$id": "187", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3024,7 +2586,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "218", + "$id": "188", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3042,36 +2604,36 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData", "apiVersions": [], "parent": { - "$ref": "157" + "$ref": "139" }, "children": [ { - "$id": "219", + "$id": "189", "kind": "client", "name": "HttpParts", "namespace": "Payload.MultiPart.FormData.HttpParts", "methods": [ { - "$id": "220", + "$id": "190", "kind": "basic", "name": "jsonArrayAndFileArray", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for mixed scenarios", "operation": { - "$id": "221", + "$id": "191", "name": "jsonArrayAndFileArray", "resourceName": "HttpParts", "doc": "Test content-type: multipart/form-data for mixed scenarios", "accessibility": "public", "parameters": [ { - "$id": "222", + "$id": "192", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "39" + "$ref": "31" }, "isApiVersion": false, "optional": false, @@ -3082,12 +2644,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.jsonArrayAndFileArray.contentType" }, { - "$id": "223", + "$id": "193", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "104" + "$ref": "86" }, "isApiVersion": false, "contentTypes": [ @@ -3124,12 +2686,12 @@ }, "parameters": [ { - "$id": "224", + "$id": "194", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "41" + "$ref": "33" }, "location": "Header", "isApiVersion": false, @@ -3141,12 +2703,12 @@ "decorators": [] }, { - "$id": "225", + "$id": "195", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "104" + "$ref": "86" }, "location": "Body", "isApiVersion": false, @@ -3167,13 +2729,13 @@ ], "parameters": [ { - "$id": "226", + "$id": "196", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "227", + "$id": "197", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3184,7 +2746,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "228", + "$id": "198", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3202,36 +2764,36 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts", "apiVersions": [], "parent": { - "$ref": "161" + "$ref": "143" }, "children": [ { - "$id": "229", + "$id": "199", "kind": "client", "name": "ContentType", "namespace": "Payload.MultiPart.FormData.HttpParts.ContentType", "methods": [ { - "$id": "230", + "$id": "200", "kind": "basic", "name": "imageJpegContentType", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data", "operation": { - "$id": "231", + "$id": "201", "name": "imageJpegContentType", "resourceName": "ContentType", "doc": "Test content-type: multipart/form-data", "accessibility": "public", "parameters": [ { - "$id": "232", + "$id": "202", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "43" + "$ref": "35" }, "isApiVersion": false, "optional": false, @@ -3242,12 +2804,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType.imageJpegContentType.contentType" }, { - "$id": "233", + "$id": "203", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "129" + "$ref": "111" }, "isApiVersion": false, "contentTypes": [ @@ -3284,12 +2846,12 @@ }, "parameters": [ { - "$id": "234", + "$id": "204", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "45" + "$ref": "37" }, "location": "Header", "isApiVersion": false, @@ -3301,12 +2863,12 @@ "decorators": [] }, { - "$id": "235", + "$id": "205", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "129" + "$ref": "111" }, "location": "Body", "isApiVersion": false, @@ -3325,26 +2887,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType.imageJpegContentType" }, { - "$id": "236", + "$id": "206", "kind": "basic", "name": "requiredContentType", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data", "operation": { - "$id": "237", + "$id": "207", "name": "requiredContentType", "resourceName": "ContentType", "doc": "Test content-type: multipart/form-data", "accessibility": "public", "parameters": [ { - "$id": "238", + "$id": "208", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "47" + "$ref": "39" }, "isApiVersion": false, "optional": false, @@ -3355,12 +2917,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType.requiredContentType.contentType" }, { - "$id": "239", + "$id": "209", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "140" + "$ref": "122" }, "isApiVersion": false, "contentTypes": [ @@ -3397,12 +2959,12 @@ }, "parameters": [ { - "$id": "240", + "$id": "210", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "49" + "$ref": "41" }, "location": "Header", "isApiVersion": false, @@ -3414,12 +2976,12 @@ "decorators": [] }, { - "$id": "241", + "$id": "211", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "140" + "$ref": "122" }, "location": "Body", "isApiVersion": false, @@ -3438,26 +3000,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType.requiredContentType" }, { - "$id": "242", + "$id": "212", "kind": "basic", "name": "optionalContentType", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for optional content type", "operation": { - "$id": "243", + "$id": "213", "name": "optionalContentType", "resourceName": "ContentType", "doc": "Test content-type: multipart/form-data for optional content type", "accessibility": "public", "parameters": [ { - "$id": "244", + "$id": "214", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "51" + "$ref": "43" }, "isApiVersion": false, "optional": false, @@ -3468,12 +3030,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType.optionalContentType.contentType" }, { - "$id": "245", + "$id": "215", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "142" + "$ref": "124" }, "isApiVersion": false, "contentTypes": [ @@ -3510,12 +3072,12 @@ }, "parameters": [ { - "$id": "246", + "$id": "216", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "53" + "$ref": "45" }, "location": "Header", "isApiVersion": false, @@ -3527,12 +3089,12 @@ "decorators": [] }, { - "$id": "247", + "$id": "217", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "142" + "$ref": "124" }, "location": "Body", "isApiVersion": false, @@ -3553,13 +3115,13 @@ ], "parameters": [ { - "$id": "248", + "$id": "218", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "249", + "$id": "219", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3570,7 +3132,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "250", + "$id": "220", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3588,36 +3150,36 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType", "apiVersions": [], "parent": { - "$ref": "219" + "$ref": "189" } }, { - "$id": "251", + "$id": "221", "kind": "client", "name": "NonString", "namespace": "Payload.MultiPart.FormData.HttpParts.NonString", "methods": [ { - "$id": "252", + "$id": "222", "kind": "basic", "name": "float", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for non string", "operation": { - "$id": "253", + "$id": "223", "name": "float", "resourceName": "NonString", "doc": "Test content-type: multipart/form-data for non string", "accessibility": "public", "parameters": [ { - "$id": "254", + "$id": "224", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "55" + "$ref": "47" }, "isApiVersion": false, "optional": false, @@ -3628,12 +3190,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.NonString.float.contentType" }, { - "$id": "255", + "$id": "225", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "151" + "$ref": "133" }, "isApiVersion": false, "contentTypes": [ @@ -3670,12 +3232,12 @@ }, "parameters": [ { - "$id": "256", + "$id": "226", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "57" + "$ref": "49" }, "location": "Header", "isApiVersion": false, @@ -3687,12 +3249,12 @@ "decorators": [] }, { - "$id": "257", + "$id": "227", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "151" + "$ref": "133" }, "location": "Body", "isApiVersion": false, @@ -3713,13 +3275,13 @@ ], "parameters": [ { - "$id": "258", + "$id": "228", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "259", + "$id": "229", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3730,7 +3292,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "260", + "$id": "230", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3748,7 +3310,7 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.NonString", "apiVersions": [], "parent": { - "$ref": "219" + "$ref": "189" } } ] diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/Models/TypeArrayContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/Models/_Type_ArrayContext.cs similarity index 70% rename from packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/Models/TypeArrayContext.cs rename to packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/Models/_Type_ArrayContext.cs index 27848a76cea..a06d0a8ec92 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/Models/TypeArrayContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Generated/Models/_Type_ArrayContext.cs @@ -7,7 +7,7 @@ namespace _Type._Array { [ModelReaderWriterBuildable(typeof(InnerModel))] - public partial class TypeArrayContext : ModelReaderWriterContext + public partial class _Type_ArrayContext : ModelReaderWriterContext { } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/Models/TypeDictionaryContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/Models/_TypeDictionaryContext.cs similarity index 70% rename from packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/Models/TypeDictionaryContext.cs rename to packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/Models/_TypeDictionaryContext.cs index b0cbc52a2cf..457fcc40c76 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/Models/TypeDictionaryContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Generated/Models/_TypeDictionaryContext.cs @@ -7,7 +7,7 @@ namespace _Type.Dictionary { [ModelReaderWriterBuildable(typeof(InnerModel))] - public partial class TypeDictionaryContext : ModelReaderWriterContext + public partial class _TypeDictionaryContext : ModelReaderWriterContext { } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Generated/Models/TypeEnumExtensibleContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Generated/Models/_Type_EnumExtensibleContext.cs similarity index 61% rename from packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Generated/Models/TypeEnumExtensibleContext.cs rename to packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Generated/Models/_Type_EnumExtensibleContext.cs index c60105a53bc..ce3a01322e5 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Generated/Models/TypeEnumExtensibleContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Generated/Models/_Type_EnumExtensibleContext.cs @@ -6,7 +6,7 @@ namespace _Type._Enum.Extensible { - public partial class TypeEnumExtensibleContext : ModelReaderWriterContext + public partial class _Type_EnumExtensibleContext : ModelReaderWriterContext { } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Generated/Models/TypeEnumFixedContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Generated/Models/_Type_EnumFixedContext.cs similarity index 62% rename from packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Generated/Models/TypeEnumFixedContext.cs rename to packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Generated/Models/_Type_EnumFixedContext.cs index 314182f5c45..6adf89b656a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Generated/Models/TypeEnumFixedContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Generated/Models/_Type_EnumFixedContext.cs @@ -6,7 +6,7 @@ namespace _Type._Enum.Fixed { - public partial class TypeEnumFixedContext : ModelReaderWriterContext + public partial class _Type_EnumFixedContext : ModelReaderWriterContext { } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/src/Generated/Models/TypeModelEmptyContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/src/Generated/Models/_TypeModelEmptyContext.cs similarity index 79% rename from packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/src/Generated/Models/TypeModelEmptyContext.cs rename to packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/src/Generated/Models/_TypeModelEmptyContext.cs index af2bb3586aa..b72f861d1d1 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/src/Generated/Models/TypeModelEmptyContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/src/Generated/Models/_TypeModelEmptyContext.cs @@ -9,7 +9,7 @@ namespace _Type.Model.Empty [ModelReaderWriterBuildable(typeof(EmptyInput))] [ModelReaderWriterBuildable(typeof(EmptyInputOutput))] [ModelReaderWriterBuildable(typeof(EmptyOutput))] - public partial class TypeModelEmptyContext : ModelReaderWriterContext + public partial class _TypeModelEmptyContext : ModelReaderWriterContext { } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/src/Generated/Models/TypeModelInheritanceEnumDiscriminatorContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/src/Generated/Models/_TypeModelInheritanceEnumDiscriminatorContext.cs similarity index 81% rename from packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/src/Generated/Models/TypeModelInheritanceEnumDiscriminatorContext.cs rename to packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/src/Generated/Models/_TypeModelInheritanceEnumDiscriminatorContext.cs index 9d70445f3a6..b495b0c63ff 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/src/Generated/Models/TypeModelInheritanceEnumDiscriminatorContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/src/Generated/Models/_TypeModelInheritanceEnumDiscriminatorContext.cs @@ -12,7 +12,7 @@ namespace _Type.Model.Inheritance.EnumDiscriminator [ModelReaderWriterBuildable(typeof(Snake))] [ModelReaderWriterBuildable(typeof(UnknownDog))] [ModelReaderWriterBuildable(typeof(UnknownSnake))] - public partial class TypeModelInheritanceEnumDiscriminatorContext : ModelReaderWriterContext + public partial class _TypeModelInheritanceEnumDiscriminatorContext : ModelReaderWriterContext { } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/src/Generated/Models/TypeModelInheritanceNestedDiscriminatorContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/src/Generated/Models/_TypeModelInheritanceNestedDiscriminatorContext.cs similarity index 83% rename from packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/src/Generated/Models/TypeModelInheritanceNestedDiscriminatorContext.cs rename to packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/src/Generated/Models/_TypeModelInheritanceNestedDiscriminatorContext.cs index 2951a9d76f5..f81c0d9cc5c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/src/Generated/Models/TypeModelInheritanceNestedDiscriminatorContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/src/Generated/Models/_TypeModelInheritanceNestedDiscriminatorContext.cs @@ -13,7 +13,7 @@ namespace _Type.Model.Inheritance.NestedDiscriminator [ModelReaderWriterBuildable(typeof(Shark))] [ModelReaderWriterBuildable(typeof(UnknownFish))] [ModelReaderWriterBuildable(typeof(UnknownShark))] - public partial class TypeModelInheritanceNestedDiscriminatorContext : ModelReaderWriterContext + public partial class _TypeModelInheritanceNestedDiscriminatorContext : ModelReaderWriterContext { } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/src/Generated/Models/TypeModelInheritanceNotDiscriminatedContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/src/Generated/Models/_TypeModelInheritanceNotDiscriminatedContext.cs similarity index 74% rename from packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/src/Generated/Models/TypeModelInheritanceNotDiscriminatedContext.cs rename to packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/src/Generated/Models/_TypeModelInheritanceNotDiscriminatedContext.cs index 7b4543f451b..d252b0dff1b 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/src/Generated/Models/TypeModelInheritanceNotDiscriminatedContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/src/Generated/Models/_TypeModelInheritanceNotDiscriminatedContext.cs @@ -9,7 +9,7 @@ namespace _Type.Model.Inheritance.NotDiscriminated [ModelReaderWriterBuildable(typeof(Cat))] [ModelReaderWriterBuildable(typeof(Pet))] [ModelReaderWriterBuildable(typeof(Siamese))] - public partial class TypeModelInheritanceNotDiscriminatedContext : ModelReaderWriterContext + public partial class _TypeModelInheritanceNotDiscriminatedContext : ModelReaderWriterContext { } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/src/Generated/Models/TypeModelInheritanceRecursiveContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/src/Generated/Models/_TypeModelInheritanceRecursiveContext.cs similarity index 72% rename from packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/src/Generated/Models/TypeModelInheritanceRecursiveContext.cs rename to packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/src/Generated/Models/_TypeModelInheritanceRecursiveContext.cs index a06f7cd8f4e..730aaf940c3 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/src/Generated/Models/TypeModelInheritanceRecursiveContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/src/Generated/Models/_TypeModelInheritanceRecursiveContext.cs @@ -8,7 +8,7 @@ namespace _Type.Model.Inheritance.Recursive { [ModelReaderWriterBuildable(typeof(Element))] [ModelReaderWriterBuildable(typeof(Extension))] - public partial class TypeModelInheritanceRecursiveContext : ModelReaderWriterContext + public partial class _TypeModelInheritanceRecursiveContext : ModelReaderWriterContext { } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/src/Generated/Models/TypeModelInheritanceSingleDiscriminatorContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/src/Generated/Models/_TypeModelInheritanceSingleDiscriminatorContext.cs similarity index 85% rename from packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/src/Generated/Models/TypeModelInheritanceSingleDiscriminatorContext.cs rename to packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/src/Generated/Models/_TypeModelInheritanceSingleDiscriminatorContext.cs index b0755c8987f..66003f92303 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/src/Generated/Models/TypeModelInheritanceSingleDiscriminatorContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/src/Generated/Models/_TypeModelInheritanceSingleDiscriminatorContext.cs @@ -15,7 +15,7 @@ namespace _Type.Model.Inheritance.SingleDiscriminator [ModelReaderWriterBuildable(typeof(TRex))] [ModelReaderWriterBuildable(typeof(UnknownBird))] [ModelReaderWriterBuildable(typeof(UnknownDinosaur))] - public partial class TypeModelInheritanceSingleDiscriminatorContext : ModelReaderWriterContext + public partial class _TypeModelInheritanceSingleDiscriminatorContext : ModelReaderWriterContext { } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/src/Generated/Models/TypeModelUsageContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/src/Generated/Models/_TypeModelUsageContext.cs similarity index 79% rename from packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/src/Generated/Models/TypeModelUsageContext.cs rename to packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/src/Generated/Models/_TypeModelUsageContext.cs index 1f18d53d3ed..ce0a2f8e119 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/src/Generated/Models/TypeModelUsageContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/src/Generated/Models/_TypeModelUsageContext.cs @@ -9,7 +9,7 @@ namespace _Type.Model.Usage [ModelReaderWriterBuildable(typeof(InputOutputRecord))] [ModelReaderWriterBuildable(typeof(InputRecord))] [ModelReaderWriterBuildable(typeof(OutputRecord))] - public partial class TypeModelUsageContext : ModelReaderWriterContext + public partial class _TypeModelUsageContext : ModelReaderWriterContext { } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/src/Generated/Models/TypeModelVisibilityContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/src/Generated/Models/_TypeModelVisibilityContext.cs similarity index 75% rename from packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/src/Generated/Models/TypeModelVisibilityContext.cs rename to packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/src/Generated/Models/_TypeModelVisibilityContext.cs index ac9f65da2ac..c4d28a30bed 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/src/Generated/Models/TypeModelVisibilityContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/src/Generated/Models/_TypeModelVisibilityContext.cs @@ -8,7 +8,7 @@ namespace _Type.Model.Visibility { [ModelReaderWriterBuildable(typeof(ReadOnlyModel))] [ModelReaderWriterBuildable(typeof(VisibilityModel))] - public partial class TypeModelVisibilityContext : ModelReaderWriterContext + public partial class _TypeModelVisibilityContext : ModelReaderWriterContext { } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/TypePropertyAdditionalPropertiesContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/_TypePropertyAdditionalPropertiesContext.cs similarity index 96% rename from packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/TypePropertyAdditionalPropertiesContext.cs rename to packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/_TypePropertyAdditionalPropertiesContext.cs index 77cfa26babd..ad3172fc71e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/TypePropertyAdditionalPropertiesContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/_TypePropertyAdditionalPropertiesContext.cs @@ -45,7 +45,7 @@ namespace _Type.Property.AdditionalProperties [ModelReaderWriterBuildable(typeof(WidgetData0))] [ModelReaderWriterBuildable(typeof(WidgetData1))] [ModelReaderWriterBuildable(typeof(WidgetData2))] - public partial class TypePropertyAdditionalPropertiesContext : ModelReaderWriterContext + public partial class _TypePropertyAdditionalPropertiesContext : ModelReaderWriterContext { } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/Models/TypePropertyNullableContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/Models/_TypePropertyNullableContext.cs similarity index 88% rename from packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/Models/TypePropertyNullableContext.cs rename to packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/Models/_TypePropertyNullableContext.cs index 7c082980c17..ace8879df09 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/Models/TypePropertyNullableContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Generated/Models/_TypePropertyNullableContext.cs @@ -14,7 +14,7 @@ namespace _Type.Property.Nullable [ModelReaderWriterBuildable(typeof(DurationProperty))] [ModelReaderWriterBuildable(typeof(InnerModel))] [ModelReaderWriterBuildable(typeof(StringProperty))] - public partial class TypePropertyNullableContext : ModelReaderWriterContext + public partial class _TypePropertyNullableContext : ModelReaderWriterContext { } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/TypePropertyOptionalContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/_TypePropertyOptionalContext.cs similarity index 93% rename from packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/TypePropertyOptionalContext.cs rename to packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/_TypePropertyOptionalContext.cs index 4e48e1d8386..54babecfa21 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/TypePropertyOptionalContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/_TypePropertyOptionalContext.cs @@ -22,7 +22,7 @@ namespace _Type.Property.Optional [ModelReaderWriterBuildable(typeof(UnionFloatLiteralProperty))] [ModelReaderWriterBuildable(typeof(UnionIntLiteralProperty))] [ModelReaderWriterBuildable(typeof(UnionStringLiteralProperty))] - public partial class TypePropertyOptionalContext : ModelReaderWriterContext + public partial class _TypePropertyOptionalContext : ModelReaderWriterContext { } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/TypePropertyValueTypesContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/_TypePropertyValueTypesContext.cs similarity index 95% rename from packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/TypePropertyValueTypesContext.cs rename to packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/_TypePropertyValueTypesContext.cs index ddbec9c1f1d..565ab4b9a5e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/TypePropertyValueTypesContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/_TypePropertyValueTypesContext.cs @@ -36,7 +36,7 @@ namespace _Type.Property.ValueTypes [ModelReaderWriterBuildable(typeof(UnknownDictProperty))] [ModelReaderWriterBuildable(typeof(UnknownIntProperty))] [ModelReaderWriterBuildable(typeof(UnknownStringProperty))] - public partial class TypePropertyValueTypesContext : ModelReaderWriterContext + public partial class _TypePropertyValueTypesContext : ModelReaderWriterContext { } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Models/TypeScalarContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Models/_TypeScalarContext.cs similarity index 62% rename from packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Models/TypeScalarContext.cs rename to packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Models/_TypeScalarContext.cs index 34e703fd60a..3fb2aaf1b05 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Models/TypeScalarContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Generated/Models/_TypeScalarContext.cs @@ -6,7 +6,7 @@ namespace _Type.Scalar { - public partial class TypeScalarContext : ModelReaderWriterContext + public partial class _TypeScalarContext : ModelReaderWriterContext { } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/src/Generated/Models/TypeUnionDiscriminatedContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/src/Generated/Models/_TypeUnionDiscriminatedContext.cs similarity index 72% rename from packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/src/Generated/Models/TypeUnionDiscriminatedContext.cs rename to packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/src/Generated/Models/_TypeUnionDiscriminatedContext.cs index 3e4c5df7631..78a47c274e1 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/src/Generated/Models/TypeUnionDiscriminatedContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/discriminated/src/Generated/Models/_TypeUnionDiscriminatedContext.cs @@ -8,7 +8,7 @@ namespace _Type.Union.Discriminated { [ModelReaderWriterBuildable(typeof(Cat))] [ModelReaderWriterBuildable(typeof(Dog))] - public partial class TypeUnionDiscriminatedContext : ModelReaderWriterContext + public partial class _TypeUnionDiscriminatedContext : ModelReaderWriterContext { } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/Models/TypeUnionContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/Models/_TypeUnionContext.cs similarity index 93% rename from packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/Models/TypeUnionContext.cs rename to packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/Models/_TypeUnionContext.cs index b729a9e7e74..60e51e84695 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/Models/TypeUnionContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Generated/Models/_TypeUnionContext.cs @@ -22,7 +22,7 @@ namespace _Type.Union [ModelReaderWriterBuildable(typeof(MixedLiteralsCases))] [ModelReaderWriterBuildable(typeof(MixedTypesCases))] [ModelReaderWriterBuildable(typeof(StringAndArrayCases))] - public partial class TypeUnionContext : ModelReaderWriterContext + public partial class _TypeUnionContext : ModelReaderWriterContext { } } From 0fffea57009399c64975aaa2e3c6568a77427eaa Mon Sep 17 00:00:00 2001 From: jolov Date: Fri, 16 Jan 2026 17:09:12 -0800 Subject: [PATCH 2/4] merge fixes --- .../emitter/src/lib/utils.ts | 15 +- .../http/payload/multipart/tspCodeModel.json | 930 +++++------------- 2 files changed, 258 insertions(+), 687 deletions(-) diff --git a/packages/http-client-csharp/emitter/src/lib/utils.ts b/packages/http-client-csharp/emitter/src/lib/utils.ts index 93001017bea..aa8af4d3889 100644 --- a/packages/http-client-csharp/emitter/src/lib/utils.ts +++ b/packages/http-client-csharp/emitter/src/lib/utils.ts @@ -144,22 +144,31 @@ export function getClientNamespaceString(context: CSharpEmitterContext): string const packageName = context.emitContext.options["package-name"]; const serviceNamespaces = listAllServiceNamespaces(context); const firstNamespace = serviceNamespaces.length > 0 ? serviceNamespaces[0] : undefined; + // namespace is not a public emitter option, but it is supported by TCGC + const namespaceOverride = (context.emitContext.options as any).namespace; if (packageName) { - return getClientNamespaceStringHelper(packageName, firstNamespace); + return getClientNamespaceStringHelper(namespaceOverride, packageName, firstNamespace); } if (containsMultiServiceClient(context.sdkPackage.clients)) { - return getClientNamespaceStringHelper(context.sdkPackage.clients[0].namespace); + return getClientNamespaceStringHelper( + namespaceOverride, + context.sdkPackage.clients[0].namespace, + ); } - return getClientNamespaceStringHelper(undefined, firstNamespace); + return getClientNamespaceStringHelper(namespaceOverride, undefined, firstNamespace); } export function getClientNamespaceStringHelper( + namespaceOverride?: string, packageName?: string, namespace?: Namespace, ): string | undefined { + if (namespaceOverride) { + return namespaceOverride; + } if (packageName) { packageName = packageName .replace(/-/g, ".") diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/tspCodeModel.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/tspCodeModel.json index aca01b6f369..ed8a123eb0f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/tspCodeModel.json +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/tspCodeModel.json @@ -402,75 +402,11 @@ }, "value": "multipart/form-data", "decorators": [] - }, - { - "$id": "51", - "kind": "constant", - "name": "BasicRequestContentType24", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "52", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - { - "$id": "53", - "kind": "constant", - "name": "BasicRequestContentType25", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "54", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - { - "$id": "55", - "kind": "constant", - "name": "BasicRequestContentType26", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "56", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] - }, - { - "$id": "57", - "kind": "constant", - "name": "BasicRequestContentType27", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "58", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] } ], "models": [ { - "$id": "59", + "$id": "51", "kind": "model", "name": "MultiPartRequest", "namespace": "Payload.MultiPart", @@ -479,12 +415,12 @@ "decorators": [], "properties": [ { - "$id": "60", + "$id": "52", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "61", + "$id": "53", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -510,12 +446,12 @@ "isHttpMetadata": false }, { - "$id": "62", + "$id": "54", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "63", + "$id": "55", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -544,155 +480,7 @@ ] }, { - "$id": "64", - "kind": "model", - "name": "MultiPartRequestWithWireName", - "namespace": "Payload.MultiPart", - "crossLanguageDefinitionId": "Payload.MultiPart.MultiPartRequestWithWireName", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "65", - "kind": "property", - "name": "identifier", - "serializedName": "id", - "type": { - "$id": "66", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.MultiPart.MultiPartRequestWithWireName.identifier", - "serializationOptions": { - "multipart": { - "isFilePart": false, - "isMulti": false, - "defaultContentTypes": [ - "text/plain" - ], - "name": "id", - "headers": [] - } - }, - "isHttpMetadata": false - }, - { - "$id": "67", - "kind": "property", - "name": "image", - "serializedName": "profileImage", - "type": { - "$id": "68", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.MultiPart.MultiPartRequestWithWireName.image", - "serializationOptions": { - "multipart": { - "isFilePart": true, - "isMulti": false, - "defaultContentTypes": [ - "application/octet-stream" - ], - "name": "profileImage", - "headers": [] - } - }, - "isHttpMetadata": false - } - ] - }, - { - "$id": "69", - "kind": "model", - "name": "MultiPartOptionalRequest", - "namespace": "Payload.MultiPart", - "crossLanguageDefinitionId": "Payload.MultiPart.MultiPartOptionalRequest", - "usage": "Input,MultipartFormData", - "decorators": [], - "properties": [ - { - "$id": "70", - "kind": "property", - "name": "id", - "serializedName": "id", - "type": { - "$id": "71", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.MultiPart.MultiPartOptionalRequest.id", - "serializationOptions": { - "multipart": { - "isFilePart": false, - "isMulti": false, - "defaultContentTypes": [ - "text/plain" - ], - "name": "id", - "headers": [] - } - }, - "isHttpMetadata": false - }, - { - "$id": "72", - "kind": "property", - "name": "profileImage", - "serializedName": "profileImage", - "type": { - "$id": "73", - "kind": "bytes", - "name": "bytes", - "encode": "base64", - "crossLanguageDefinitionId": "TypeSpec.bytes", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.MultiPart.MultiPartOptionalRequest.profileImage", - "serializationOptions": { - "multipart": { - "isFilePart": true, - "isMulti": false, - "defaultContentTypes": [ - "application/octet-stream" - ], - "name": "profileImage", - "headers": [] - } - }, - "isHttpMetadata": false - } - ] - }, - { - "$id": "74", + "$id": "56", "kind": "model", "name": "ComplexPartsRequest", "namespace": "Payload.MultiPart", @@ -701,12 +489,12 @@ "decorators": [], "properties": [ { - "$id": "75", + "$id": "57", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "76", + "$id": "58", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -732,12 +520,12 @@ "isHttpMetadata": false }, { - "$id": "77", + "$id": "59", "kind": "property", "name": "address", "serializedName": "address", "type": { - "$id": "78", + "$id": "60", "kind": "model", "name": "Address", "namespace": "Payload.MultiPart", @@ -746,12 +534,12 @@ "decorators": [], "properties": [ { - "$id": "79", + "$id": "61", "kind": "property", "name": "city", "serializedName": "city", "type": { - "$id": "80", + "$id": "62", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -792,12 +580,12 @@ "isHttpMetadata": false }, { - "$id": "81", + "$id": "63", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "82", + "$id": "64", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -824,16 +612,16 @@ "isHttpMetadata": false }, { - "$id": "83", + "$id": "65", "kind": "property", "name": "pictures", "serializedName": "pictures", "type": { - "$id": "84", + "$id": "66", "kind": "array", "name": "ArrayHttpPart", "valueType": { - "$id": "85", + "$id": "67", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -865,10 +653,10 @@ ] }, { - "$ref": "78" + "$ref": "60" }, { - "$id": "86", + "$id": "68", "kind": "model", "name": "JsonPartRequest", "namespace": "Payload.MultiPart", @@ -877,12 +665,12 @@ "decorators": [], "properties": [ { - "$id": "87", + "$id": "69", "kind": "property", "name": "address", "serializedName": "address", "type": { - "$ref": "78" + "$ref": "60" }, "optional": false, "readOnly": false, @@ -904,12 +692,12 @@ "isHttpMetadata": false }, { - "$id": "88", + "$id": "70", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "89", + "$id": "71", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -938,7 +726,7 @@ ] }, { - "$id": "90", + "$id": "72", "kind": "model", "name": "BinaryArrayPartsRequest", "namespace": "Payload.MultiPart", @@ -947,12 +735,12 @@ "decorators": [], "properties": [ { - "$id": "91", + "$id": "73", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "92", + "$id": "74", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -978,16 +766,16 @@ "isHttpMetadata": false }, { - "$id": "93", + "$id": "75", "kind": "property", "name": "pictures", "serializedName": "pictures", "type": { - "$id": "94", + "$id": "76", "kind": "array", "name": "ArrayHttpPart1", "valueType": { - "$id": "95", + "$id": "77", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -1019,7 +807,7 @@ ] }, { - "$id": "96", + "$id": "78", "kind": "model", "name": "MultiBinaryPartsRequest", "namespace": "Payload.MultiPart", @@ -1028,12 +816,12 @@ "decorators": [], "properties": [ { - "$id": "97", + "$id": "79", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "98", + "$id": "80", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -1060,12 +848,12 @@ "isHttpMetadata": false }, { - "$id": "99", + "$id": "81", "kind": "property", "name": "picture", "serializedName": "picture", "type": { - "$id": "100", + "$id": "82", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -1094,7 +882,7 @@ ] }, { - "$id": "101", + "$id": "83", "kind": "model", "name": "AnonymousModelRequest", "namespace": "Payload.MultiPart.FormData", @@ -1103,12 +891,12 @@ "decorators": [], "properties": [ { - "$id": "102", + "$id": "84", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "103", + "$id": "85", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -1137,7 +925,7 @@ ] }, { - "$id": "104", + "$id": "86", "kind": "model", "name": "ComplexHttpPartsModelRequest", "namespace": "Payload.MultiPart", @@ -1146,12 +934,12 @@ "decorators": [], "properties": [ { - "$id": "105", + "$id": "87", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "106", + "$id": "88", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1177,12 +965,12 @@ "isHttpMetadata": false }, { - "$id": "107", + "$id": "89", "kind": "property", "name": "address", "serializedName": "address", "type": { - "$ref": "78" + "$ref": "60" }, "optional": false, "readOnly": false, @@ -1204,12 +992,12 @@ "isHttpMetadata": false }, { - "$id": "108", + "$id": "90", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "109", + "$id": "91", "kind": "model", "name": "FileRequiredMetaData", "namespace": "Payload.MultiPart", @@ -1217,7 +1005,7 @@ "usage": "Input", "decorators": [], "baseModel": { - "$id": "110", + "$id": "92", "kind": "model", "name": "File", "namespace": "TypeSpec.Http", @@ -1228,13 +1016,13 @@ "decorators": [], "properties": [ { - "$id": "111", + "$id": "93", "kind": "property", "name": "contentType", "summary": "The allowed media (MIME) types of the file contents.", "doc": "The allowed media (MIME) types of the file contents.\n\nIn file bodies, this value comes from the `Content-Type` header of the request or response. In JSON bodies,\nthis value is serialized as a field in the response.\n\nNOTE: this is not _necessarily_ the same as the `Content-Type` header of the request or response, but\nit will be for file bodies. It may be different if the file is serialized as a JSON object. It always refers to the\n_contents_ of the file, and not necessarily the way the file itself is transmitted or serialized.", "type": { - "$id": "112", + "$id": "94", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1250,13 +1038,13 @@ "isHttpMetadata": false }, { - "$id": "113", + "$id": "95", "kind": "property", "name": "filename", "summary": "The name of the file, if any.", "doc": "The name of the file, if any.\n\nIn file bodies, this value comes from the `filename` parameter of the `Content-Disposition` header of the response\nor multipart payload. In JSON bodies, this value is serialized as a field in the response.\n\nNOTE: By default, `filename` cannot be sent in request payloads and can only be sent in responses and multipart\npayloads, as the `Content-Disposition` header is not valid in requests. If you want to send the `filename` in a request,\nyou must extend the `File` model and override the `filename` property with a different location defined by HTTP metadata\ndecorators.", "type": { - "$id": "114", + "$id": "96", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1272,13 +1060,13 @@ "isHttpMetadata": false }, { - "$id": "115", + "$id": "97", "kind": "property", "name": "contents", "summary": "The contents of the file.", "doc": "The contents of the file.\n\nIn file bodies, this value comes from the body of the request, response, or multipart payload. In JSON bodies,\nthis value is serialized as a field in the response.", "type": { - "$id": "116", + "$id": "98", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -1298,11 +1086,11 @@ }, "properties": [ { - "$id": "117", + "$id": "99", "kind": "property", "name": "filename", "type": { - "$id": "118", + "$id": "100", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1318,11 +1106,11 @@ "isHttpMetadata": false }, { - "$id": "119", + "$id": "101", "kind": "property", "name": "contentType", "type": { - "$id": "120", + "$id": "102", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1350,10 +1138,10 @@ "isFilePart": true, "isMulti": false, "filename": { - "$id": "121", + "$id": "103", "apiVersions": [], "type": { - "$id": "122", + "$id": "104", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1383,10 +1171,10 @@ "serializationOptions": {} }, "contentType": { - "$id": "123", + "$id": "105", "apiVersions": [], "type": { - "$id": "124", + "$id": "106", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1425,16 +1213,16 @@ "isHttpMetadata": false }, { - "$id": "125", + "$id": "107", "kind": "property", "name": "previousAddresses", "serializedName": "previousAddresses", "type": { - "$id": "126", + "$id": "108", "kind": "array", "name": "ArrayAddress", "valueType": { - "$ref": "78" + "$ref": "60" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1459,16 +1247,16 @@ "isHttpMetadata": false }, { - "$id": "127", + "$id": "109", "kind": "property", "name": "pictures", "serializedName": "pictures", "type": { - "$id": "128", + "$id": "110", "kind": "array", "name": "ArrayHttpPart2", "valueType": { - "$ref": "109" + "$ref": "91" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1484,10 +1272,10 @@ "isFilePart": true, "isMulti": true, "filename": { - "$ref": "121" + "$ref": "103" }, "contentType": { - "$ref": "123" + "$ref": "105" }, "defaultContentTypes": [ "*/*" @@ -1501,13 +1289,13 @@ ] }, { - "$ref": "109" + "$ref": "91" }, { - "$ref": "110" + "$ref": "92" }, { - "$id": "129", + "$id": "111", "kind": "model", "name": "FileWithHttpPartSpecificContentTypeRequest", "namespace": "Payload.MultiPart", @@ -1516,12 +1304,12 @@ "decorators": [], "properties": [ { - "$id": "130", + "$id": "112", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "131", + "$id": "113", "kind": "model", "name": "FileSpecificContentType", "namespace": "Payload.MultiPart", @@ -1529,15 +1317,15 @@ "usage": "Input", "decorators": [], "baseModel": { - "$ref": "110" + "$ref": "92" }, "properties": [ { - "$id": "132", + "$id": "114", "kind": "property", "name": "filename", "type": { - "$id": "133", + "$id": "115", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1553,7 +1341,7 @@ "isHttpMetadata": false }, { - "$id": "134", + "$id": "116", "kind": "property", "name": "contentType", "type": { @@ -1581,10 +1369,10 @@ "isFilePart": true, "isMulti": false, "filename": { - "$id": "135", + "$id": "117", "apiVersions": [], "type": { - "$id": "136", + "$id": "118", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1614,15 +1402,15 @@ "serializationOptions": {} }, "contentType": { - "$id": "137", + "$id": "119", "apiVersions": [], "type": { - "$id": "138", + "$id": "120", "kind": "constant", "decorators": [], "value": "image/jpg", "valueType": { - "$id": "139", + "$id": "121", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1666,10 +1454,10 @@ ] }, { - "$ref": "131" + "$ref": "113" }, { - "$id": "140", + "$id": "122", "kind": "model", "name": "FileWithHttpPartRequiredContentTypeRequest", "namespace": "Payload.MultiPart", @@ -1678,12 +1466,12 @@ "decorators": [], "properties": [ { - "$id": "141", + "$id": "123", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$ref": "109" + "$ref": "91" }, "optional": false, "readOnly": false, @@ -1696,10 +1484,10 @@ "isFilePart": true, "isMulti": false, "filename": { - "$ref": "121" + "$ref": "103" }, "contentType": { - "$ref": "123" + "$ref": "105" }, "defaultContentTypes": [ "*/*" @@ -1713,7 +1501,7 @@ ] }, { - "$id": "142", + "$id": "124", "kind": "model", "name": "FileWithHttpPartOptionalContentTypeRequest", "namespace": "Payload.MultiPart", @@ -1722,12 +1510,12 @@ "decorators": [], "properties": [ { - "$id": "143", + "$id": "125", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "144", + "$id": "126", "kind": "model", "name": "FileOptionalContentType", "namespace": "Payload.MultiPart", @@ -1735,15 +1523,15 @@ "usage": "Input", "decorators": [], "baseModel": { - "$ref": "110" + "$ref": "92" }, "properties": [ { - "$id": "145", + "$id": "127", "kind": "property", "name": "filename", "type": { - "$id": "146", + "$id": "128", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1771,10 +1559,10 @@ "isFilePart": true, "isMulti": false, "filename": { - "$id": "147", + "$id": "129", "apiVersions": [], "type": { - "$id": "148", + "$id": "130", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1804,12 +1592,12 @@ "serializationOptions": {} }, "contentType": { - "$id": "149", + "$id": "131", "doc": "The allowed media (MIME) types of the file contents.\n\nIn file bodies, this value comes from the `Content-Type` header of the request or response. In JSON bodies,\nthis value is serialized as a field in the response.\n\nNOTE: this is not _necessarily_ the same as the `Content-Type` header of the request or response, but\nit will be for file bodies. It may be different if the file is serialized as a JSON object. It always refers to the\n_contents_ of the file, and not necessarily the way the file itself is transmitted or serialized.", "summary": "The allowed media (MIME) types of the file contents.", "apiVersions": [], "type": { - "$id": "150", + "$id": "132", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1850,10 +1638,10 @@ ] }, { - "$ref": "144" + "$ref": "126" }, { - "$id": "151", + "$id": "133", "kind": "model", "name": "FloatRequest", "namespace": "Payload.MultiPart.FormData.HttpParts.NonString", @@ -1862,12 +1650,12 @@ "decorators": [], "properties": [ { - "$id": "152", + "$id": "134", "kind": "property", "name": "temperature", "serializedName": "temperature", "type": { - "$id": "153", + "$id": "135", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -1884,15 +1672,15 @@ "isFilePart": false, "isMulti": false, "contentType": { - "$id": "154", + "$id": "136", "apiVersions": [], "type": { - "$id": "155", + "$id": "137", "kind": "constant", "decorators": [], "value": "text/plain", "valueType": { - "$id": "156", + "$id": "138", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1938,7 +1726,7 @@ ], "clients": [ { - "$id": "157", + "$id": "139", "kind": "client", "name": "MultiPartClient", "namespace": "Payload.MultiPart", @@ -1946,13 +1734,13 @@ "methods": [], "parameters": [ { - "$id": "158", + "$id": "140", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "159", + "$id": "141", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1963,7 +1751,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "160", + "$id": "142", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1982,27 +1770,27 @@ "apiVersions": [], "children": [ { - "$id": "161", + "$id": "143", "kind": "client", "name": "FormData", "namespace": "Payload.MultiPart.FormData", "methods": [ { - "$id": "162", + "$id": "144", "kind": "basic", "name": "basic", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data", "operation": { - "$id": "163", + "$id": "145", "name": "basic", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data", "accessibility": "public", "parameters": [ { - "$id": "164", + "$id": "146", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -2018,12 +1806,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.basic.contentType" }, { - "$id": "165", + "$id": "147", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "59" + "$ref": "51" }, "isApiVersion": false, "contentTypes": [ @@ -2060,7 +1848,7 @@ }, "parameters": [ { - "$id": "166", + "$id": "148", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -2077,12 +1865,12 @@ "decorators": [] }, { - "$id": "167", + "$id": "149", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "59" + "$ref": "51" }, "location": "Body", "isApiVersion": false, @@ -2101,252 +1889,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.basic" }, { - "$id": "168", - "kind": "basic", - "name": "withWireName", - "accessibility": "public", - "apiVersions": [], - "doc": "Test content-type: multipart/form-data with wire names", - "operation": { - "$id": "169", - "name": "withWireName", - "resourceName": "FormData", - "doc": "Test content-type: multipart/form-data with wire names", - "accessibility": "public", - "parameters": [ - { - "$id": "170", - "kind": "header", - "name": "contentType", - "serializedName": "Content-Type", - "type": { - "$ref": "7" - }, - "isApiVersion": false, - "optional": false, - "isContentType": true, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.withWireName.contentType" - }, - { - "$id": "171", - "kind": "body", - "name": "body", - "serializedName": "body", - "type": { - "$ref": "64" - }, - "isApiVersion": false, - "contentTypes": [ - "multipart/form-data" - ], - "defaultContentType": "multipart/form-data", - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.withWireName.body" - } - ], - "responses": [ - { - "statusCodes": [ - 204 - ], - "headers": [], - "isErrorResponse": false - } - ], - "httpMethod": "POST", - "uri": "{endpoint}", - "path": "/multipart/form-data/mixed-parts-with-wire-name", - "requestMediaTypes": [ - "multipart/form-data" - ], - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.withWireName", - "decorators": [] - }, - "parameters": [ - { - "$id": "172", - "kind": "method", - "name": "contentType", - "serializedName": "Content-Type", - "type": { - "$ref": "9" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.withWireName.contentType", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "173", - "kind": "method", - "name": "body", - "serializedName": "body", - "type": { - "$ref": "64" - }, - "location": "Body", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.withWireName.body", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": {}, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.withWireName" - }, - { - "$id": "174", - "kind": "basic", - "name": "optionalParts", - "accessibility": "public", - "apiVersions": [], - "doc": "Test content-type: multipart/form-data with optional parts", - "operation": { - "$id": "175", - "name": "optionalParts", - "resourceName": "FormData", - "doc": "Test content-type: multipart/form-data with optional parts", - "accessibility": "public", - "parameters": [ - { - "$id": "176", - "kind": "header", - "name": "contentType", - "serializedName": "Content-Type", - "type": { - "$ref": "11" - }, - "isApiVersion": false, - "optional": false, - "isContentType": true, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.optionalParts.contentType" - }, - { - "$id": "177", - "kind": "body", - "name": "body", - "serializedName": "body", - "type": { - "$ref": "69" - }, - "isApiVersion": false, - "contentTypes": [ - "multipart/form-data" - ], - "defaultContentType": "multipart/form-data", - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.optionalParts.body" - } - ], - "responses": [ - { - "statusCodes": [ - 204 - ], - "headers": [], - "isErrorResponse": false - } - ], - "httpMethod": "POST", - "uri": "{endpoint}", - "path": "/multipart/form-data/optional-parts", - "requestMediaTypes": [ - "multipart/form-data" - ], - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.optionalParts", - "decorators": [] - }, - "parameters": [ - { - "$id": "178", - "kind": "method", - "name": "contentType", - "serializedName": "Content-Type", - "type": { - "$ref": "13" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.optionalParts.contentType", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "179", - "kind": "method", - "name": "body", - "serializedName": "body", - "type": { - "$ref": "69" - }, - "location": "Body", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.optionalParts.body", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": {}, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Payload.MultiPart.FormData.optionalParts" - }, - { - "$id": "180", + "$id": "150", "kind": "basic", "name": "fileArrayAndBasic", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for mixed scenarios", "operation": { - "$id": "181", + "$id": "151", "name": "fileArrayAndBasic", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data for mixed scenarios", "accessibility": "public", "parameters": [ { - "$id": "182", + "$id": "152", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "15" + "$ref": "7" }, "isApiVersion": false, "optional": false, @@ -2357,12 +1919,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.fileArrayAndBasic.contentType" }, { - "$id": "183", + "$id": "153", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "74" + "$ref": "56" }, "isApiVersion": false, "contentTypes": [ @@ -2399,12 +1961,12 @@ }, "parameters": [ { - "$id": "184", + "$id": "154", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "17" + "$ref": "9" }, "location": "Header", "isApiVersion": false, @@ -2416,12 +1978,12 @@ "decorators": [] }, { - "$id": "185", + "$id": "155", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "74" + "$ref": "56" }, "location": "Body", "isApiVersion": false, @@ -2440,26 +2002,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.fileArrayAndBasic" }, { - "$id": "186", + "$id": "156", "kind": "basic", "name": "jsonPart", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for scenario contains json part and binary part ", "operation": { - "$id": "187", + "$id": "157", "name": "jsonPart", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data for scenario contains json part and binary part ", "accessibility": "public", "parameters": [ { - "$id": "188", + "$id": "158", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "19" + "$ref": "11" }, "isApiVersion": false, "optional": false, @@ -2470,12 +2032,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.jsonPart.contentType" }, { - "$id": "189", + "$id": "159", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "86" + "$ref": "68" }, "isApiVersion": false, "contentTypes": [ @@ -2512,12 +2074,12 @@ }, "parameters": [ { - "$id": "190", + "$id": "160", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "21" + "$ref": "13" }, "location": "Header", "isApiVersion": false, @@ -2529,12 +2091,12 @@ "decorators": [] }, { - "$id": "191", + "$id": "161", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "86" + "$ref": "68" }, "location": "Body", "isApiVersion": false, @@ -2553,26 +2115,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.jsonPart" }, { - "$id": "192", + "$id": "162", "kind": "basic", "name": "binaryArrayParts", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for scenario contains multi binary parts", "operation": { - "$id": "193", + "$id": "163", "name": "binaryArrayParts", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data for scenario contains multi binary parts", "accessibility": "public", "parameters": [ { - "$id": "194", + "$id": "164", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "23" + "$ref": "15" }, "isApiVersion": false, "optional": false, @@ -2583,12 +2145,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.binaryArrayParts.contentType" }, { - "$id": "195", + "$id": "165", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "90" + "$ref": "72" }, "isApiVersion": false, "contentTypes": [ @@ -2625,12 +2187,12 @@ }, "parameters": [ { - "$id": "196", + "$id": "166", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "25" + "$ref": "17" }, "location": "Header", "isApiVersion": false, @@ -2642,12 +2204,12 @@ "decorators": [] }, { - "$id": "197", + "$id": "167", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "90" + "$ref": "72" }, "location": "Body", "isApiVersion": false, @@ -2666,26 +2228,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.binaryArrayParts" }, { - "$id": "198", + "$id": "168", "kind": "basic", "name": "multiBinaryParts", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for scenario contains multi binary parts", "operation": { - "$id": "199", + "$id": "169", "name": "multiBinaryParts", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data for scenario contains multi binary parts", "accessibility": "public", "parameters": [ { - "$id": "200", + "$id": "170", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "27" + "$ref": "19" }, "isApiVersion": false, "optional": false, @@ -2696,12 +2258,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.multiBinaryParts.contentType" }, { - "$id": "201", + "$id": "171", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "96" + "$ref": "78" }, "isApiVersion": false, "contentTypes": [ @@ -2738,12 +2300,12 @@ }, "parameters": [ { - "$id": "202", + "$id": "172", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "29" + "$ref": "21" }, "location": "Header", "isApiVersion": false, @@ -2755,12 +2317,12 @@ "decorators": [] }, { - "$id": "203", + "$id": "173", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "96" + "$ref": "78" }, "location": "Body", "isApiVersion": false, @@ -2779,26 +2341,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.multiBinaryParts" }, { - "$id": "204", + "$id": "174", "kind": "basic", "name": "checkFileNameAndContentType", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data", "operation": { - "$id": "205", + "$id": "175", "name": "checkFileNameAndContentType", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data", "accessibility": "public", "parameters": [ { - "$id": "206", + "$id": "176", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "31" + "$ref": "23" }, "isApiVersion": false, "optional": false, @@ -2809,12 +2371,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.checkFileNameAndContentType.contentType" }, { - "$id": "207", + "$id": "177", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "59" + "$ref": "51" }, "isApiVersion": false, "contentTypes": [ @@ -2851,12 +2413,12 @@ }, "parameters": [ { - "$id": "208", + "$id": "178", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "33" + "$ref": "25" }, "location": "Header", "isApiVersion": false, @@ -2868,12 +2430,12 @@ "decorators": [] }, { - "$id": "209", + "$id": "179", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "59" + "$ref": "51" }, "location": "Body", "isApiVersion": false, @@ -2892,26 +2454,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.checkFileNameAndContentType" }, { - "$id": "210", + "$id": "180", "kind": "basic", "name": "anonymousModel", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data", "operation": { - "$id": "211", + "$id": "181", "name": "anonymousModel", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data", "accessibility": "public", "parameters": [ { - "$id": "212", + "$id": "182", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "35" + "$ref": "27" }, "isApiVersion": false, "optional": false, @@ -2922,12 +2484,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.anonymousModel.contentType" }, { - "$id": "213", + "$id": "183", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "101" + "$ref": "83" }, "isApiVersion": false, "contentTypes": [ @@ -2964,12 +2526,12 @@ }, "parameters": [ { - "$id": "214", + "$id": "184", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "37" + "$ref": "29" }, "location": "Header", "isApiVersion": false, @@ -2981,12 +2543,12 @@ "decorators": [] }, { - "$id": "215", + "$id": "185", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "101" + "$ref": "83" }, "location": "Body", "isApiVersion": false, @@ -3007,13 +2569,13 @@ ], "parameters": [ { - "$id": "216", + "$id": "186", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "217", + "$id": "187", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3024,7 +2586,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "218", + "$id": "188", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3042,36 +2604,36 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData", "apiVersions": [], "parent": { - "$ref": "157" + "$ref": "139" }, "children": [ { - "$id": "219", + "$id": "189", "kind": "client", "name": "HttpParts", "namespace": "Payload.MultiPart.FormData.HttpParts", "methods": [ { - "$id": "220", + "$id": "190", "kind": "basic", "name": "jsonArrayAndFileArray", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for mixed scenarios", "operation": { - "$id": "221", + "$id": "191", "name": "jsonArrayAndFileArray", "resourceName": "HttpParts", "doc": "Test content-type: multipart/form-data for mixed scenarios", "accessibility": "public", "parameters": [ { - "$id": "222", + "$id": "192", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "39" + "$ref": "31" }, "isApiVersion": false, "optional": false, @@ -3082,12 +2644,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.jsonArrayAndFileArray.contentType" }, { - "$id": "223", + "$id": "193", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "104" + "$ref": "86" }, "isApiVersion": false, "contentTypes": [ @@ -3124,12 +2686,12 @@ }, "parameters": [ { - "$id": "224", + "$id": "194", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "41" + "$ref": "33" }, "location": "Header", "isApiVersion": false, @@ -3141,12 +2703,12 @@ "decorators": [] }, { - "$id": "225", + "$id": "195", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "104" + "$ref": "86" }, "location": "Body", "isApiVersion": false, @@ -3167,13 +2729,13 @@ ], "parameters": [ { - "$id": "226", + "$id": "196", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "227", + "$id": "197", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3184,7 +2746,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "228", + "$id": "198", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3202,36 +2764,36 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts", "apiVersions": [], "parent": { - "$ref": "161" + "$ref": "143" }, "children": [ { - "$id": "229", + "$id": "199", "kind": "client", "name": "ContentType", "namespace": "Payload.MultiPart.FormData.HttpParts.ContentType", "methods": [ { - "$id": "230", + "$id": "200", "kind": "basic", "name": "imageJpegContentType", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data", "operation": { - "$id": "231", + "$id": "201", "name": "imageJpegContentType", "resourceName": "ContentType", "doc": "Test content-type: multipart/form-data", "accessibility": "public", "parameters": [ { - "$id": "232", + "$id": "202", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "43" + "$ref": "35" }, "isApiVersion": false, "optional": false, @@ -3242,12 +2804,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType.imageJpegContentType.contentType" }, { - "$id": "233", + "$id": "203", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "129" + "$ref": "111" }, "isApiVersion": false, "contentTypes": [ @@ -3284,12 +2846,12 @@ }, "parameters": [ { - "$id": "234", + "$id": "204", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "45" + "$ref": "37" }, "location": "Header", "isApiVersion": false, @@ -3301,12 +2863,12 @@ "decorators": [] }, { - "$id": "235", + "$id": "205", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "129" + "$ref": "111" }, "location": "Body", "isApiVersion": false, @@ -3325,26 +2887,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType.imageJpegContentType" }, { - "$id": "236", + "$id": "206", "kind": "basic", "name": "requiredContentType", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data", "operation": { - "$id": "237", + "$id": "207", "name": "requiredContentType", "resourceName": "ContentType", "doc": "Test content-type: multipart/form-data", "accessibility": "public", "parameters": [ { - "$id": "238", + "$id": "208", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "47" + "$ref": "39" }, "isApiVersion": false, "optional": false, @@ -3355,12 +2917,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType.requiredContentType.contentType" }, { - "$id": "239", + "$id": "209", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "140" + "$ref": "122" }, "isApiVersion": false, "contentTypes": [ @@ -3397,12 +2959,12 @@ }, "parameters": [ { - "$id": "240", + "$id": "210", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "49" + "$ref": "41" }, "location": "Header", "isApiVersion": false, @@ -3414,12 +2976,12 @@ "decorators": [] }, { - "$id": "241", + "$id": "211", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "140" + "$ref": "122" }, "location": "Body", "isApiVersion": false, @@ -3438,26 +3000,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType.requiredContentType" }, { - "$id": "242", + "$id": "212", "kind": "basic", "name": "optionalContentType", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for optional content type", "operation": { - "$id": "243", + "$id": "213", "name": "optionalContentType", "resourceName": "ContentType", "doc": "Test content-type: multipart/form-data for optional content type", "accessibility": "public", "parameters": [ { - "$id": "244", + "$id": "214", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "51" + "$ref": "43" }, "isApiVersion": false, "optional": false, @@ -3468,12 +3030,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType.optionalContentType.contentType" }, { - "$id": "245", + "$id": "215", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "142" + "$ref": "124" }, "isApiVersion": false, "contentTypes": [ @@ -3510,12 +3072,12 @@ }, "parameters": [ { - "$id": "246", + "$id": "216", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "53" + "$ref": "45" }, "location": "Header", "isApiVersion": false, @@ -3527,12 +3089,12 @@ "decorators": [] }, { - "$id": "247", + "$id": "217", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "142" + "$ref": "124" }, "location": "Body", "isApiVersion": false, @@ -3553,13 +3115,13 @@ ], "parameters": [ { - "$id": "248", + "$id": "218", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "249", + "$id": "219", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3570,7 +3132,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "250", + "$id": "220", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3588,37 +3150,37 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType", "apiVersions": [], "parent": { - "$ref": "219" + "$ref": "189" }, "isMultiServiceClient": false }, { - "$id": "251", + "$id": "221", "kind": "client", "name": "NonString", "namespace": "Payload.MultiPart.FormData.HttpParts.NonString", "methods": [ { - "$id": "252", + "$id": "222", "kind": "basic", "name": "float", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for non string", "operation": { - "$id": "253", + "$id": "223", "name": "float", "resourceName": "NonString", "doc": "Test content-type: multipart/form-data for non string", "accessibility": "public", "parameters": [ { - "$id": "254", + "$id": "224", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "55" + "$ref": "47" }, "isApiVersion": false, "optional": false, @@ -3629,12 +3191,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.NonString.float.contentType" }, { - "$id": "255", + "$id": "225", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "151" + "$ref": "133" }, "isApiVersion": false, "contentTypes": [ @@ -3671,12 +3233,12 @@ }, "parameters": [ { - "$id": "256", + "$id": "226", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "57" + "$ref": "49" }, "location": "Header", "isApiVersion": false, @@ -3688,12 +3250,12 @@ "decorators": [] }, { - "$id": "257", + "$id": "227", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "151" + "$ref": "133" }, "location": "Body", "isApiVersion": false, @@ -3714,13 +3276,13 @@ ], "parameters": [ { - "$id": "258", + "$id": "228", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "259", + "$id": "229", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3731,7 +3293,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "260", + "$id": "230", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3749,7 +3311,7 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.NonString", "apiVersions": [], "parent": { - "$ref": "219" + "$ref": "189" }, "isMultiServiceClient": false } From 41e980bb49e29ffe559c122719e5c01b81b03f61 Mon Sep 17 00:00:00 2001 From: jolov Date: Fri, 16 Jan 2026 17:50:59 -0800 Subject: [PATCH 3/4] regen --- .../multipart/src/Generated/FormData.cs | 8 + .../http/payload/multipart/tspCodeModel.json | 930 +++++++++++++----- 2 files changed, 692 insertions(+), 246 deletions(-) diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormData.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormData.cs index 0d2268a2a18..d543051acc1 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormData.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Generated/FormData.cs @@ -19,6 +19,14 @@ public partial class FormData public virtual Task BasicAsync(BinaryContent content, string contentType, RequestOptions options = null) => throw null; + public virtual ClientResult WithWireName(BinaryContent content, string contentType, RequestOptions options = null) => throw null; + + public virtual Task WithWireNameAsync(BinaryContent content, string contentType, RequestOptions options = null) => throw null; + + public virtual ClientResult OptionalParts(BinaryContent content, string contentType, RequestOptions options = null) => throw null; + + public virtual Task OptionalPartsAsync(BinaryContent content, string contentType, RequestOptions options = null) => throw null; + public virtual ClientResult FileArrayAndBasic(BinaryContent content, string contentType, RequestOptions options = null) => throw null; public virtual Task FileArrayAndBasicAsync(BinaryContent content, string contentType, RequestOptions options = null) => throw null; diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/tspCodeModel.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/tspCodeModel.json index ed8a123eb0f..aca01b6f369 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/tspCodeModel.json +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/tspCodeModel.json @@ -402,11 +402,75 @@ }, "value": "multipart/form-data", "decorators": [] + }, + { + "$id": "51", + "kind": "constant", + "name": "BasicRequestContentType24", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "52", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "53", + "kind": "constant", + "name": "BasicRequestContentType25", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "54", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "55", + "kind": "constant", + "name": "BasicRequestContentType26", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "56", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "57", + "kind": "constant", + "name": "BasicRequestContentType27", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "58", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] } ], "models": [ { - "$id": "51", + "$id": "59", "kind": "model", "name": "MultiPartRequest", "namespace": "Payload.MultiPart", @@ -415,12 +479,12 @@ "decorators": [], "properties": [ { - "$id": "52", + "$id": "60", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "53", + "$id": "61", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -446,12 +510,12 @@ "isHttpMetadata": false }, { - "$id": "54", + "$id": "62", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "55", + "$id": "63", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -480,7 +544,155 @@ ] }, { - "$id": "56", + "$id": "64", + "kind": "model", + "name": "MultiPartRequestWithWireName", + "namespace": "Payload.MultiPart", + "crossLanguageDefinitionId": "Payload.MultiPart.MultiPartRequestWithWireName", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ + { + "$id": "65", + "kind": "property", + "name": "identifier", + "serializedName": "id", + "type": { + "$id": "66", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.MultiPart.MultiPartRequestWithWireName.identifier", + "serializationOptions": { + "multipart": { + "isFilePart": false, + "isMulti": false, + "defaultContentTypes": [ + "text/plain" + ], + "name": "id", + "headers": [] + } + }, + "isHttpMetadata": false + }, + { + "$id": "67", + "kind": "property", + "name": "image", + "serializedName": "profileImage", + "type": { + "$id": "68", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.MultiPart.MultiPartRequestWithWireName.image", + "serializationOptions": { + "multipart": { + "isFilePart": true, + "isMulti": false, + "defaultContentTypes": [ + "application/octet-stream" + ], + "name": "profileImage", + "headers": [] + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "69", + "kind": "model", + "name": "MultiPartOptionalRequest", + "namespace": "Payload.MultiPart", + "crossLanguageDefinitionId": "Payload.MultiPart.MultiPartOptionalRequest", + "usage": "Input,MultipartFormData", + "decorators": [], + "properties": [ + { + "$id": "70", + "kind": "property", + "name": "id", + "serializedName": "id", + "type": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.MultiPart.MultiPartOptionalRequest.id", + "serializationOptions": { + "multipart": { + "isFilePart": false, + "isMulti": false, + "defaultContentTypes": [ + "text/plain" + ], + "name": "id", + "headers": [] + } + }, + "isHttpMetadata": false + }, + { + "$id": "72", + "kind": "property", + "name": "profileImage", + "serializedName": "profileImage", + "type": { + "$id": "73", + "kind": "bytes", + "name": "bytes", + "encode": "base64", + "crossLanguageDefinitionId": "TypeSpec.bytes", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.MultiPart.MultiPartOptionalRequest.profileImage", + "serializationOptions": { + "multipart": { + "isFilePart": true, + "isMulti": false, + "defaultContentTypes": [ + "application/octet-stream" + ], + "name": "profileImage", + "headers": [] + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "74", "kind": "model", "name": "ComplexPartsRequest", "namespace": "Payload.MultiPart", @@ -489,12 +701,12 @@ "decorators": [], "properties": [ { - "$id": "57", + "$id": "75", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "58", + "$id": "76", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -520,12 +732,12 @@ "isHttpMetadata": false }, { - "$id": "59", + "$id": "77", "kind": "property", "name": "address", "serializedName": "address", "type": { - "$id": "60", + "$id": "78", "kind": "model", "name": "Address", "namespace": "Payload.MultiPart", @@ -534,12 +746,12 @@ "decorators": [], "properties": [ { - "$id": "61", + "$id": "79", "kind": "property", "name": "city", "serializedName": "city", "type": { - "$id": "62", + "$id": "80", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -580,12 +792,12 @@ "isHttpMetadata": false }, { - "$id": "63", + "$id": "81", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "64", + "$id": "82", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -612,16 +824,16 @@ "isHttpMetadata": false }, { - "$id": "65", + "$id": "83", "kind": "property", "name": "pictures", "serializedName": "pictures", "type": { - "$id": "66", + "$id": "84", "kind": "array", "name": "ArrayHttpPart", "valueType": { - "$id": "67", + "$id": "85", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -653,10 +865,10 @@ ] }, { - "$ref": "60" + "$ref": "78" }, { - "$id": "68", + "$id": "86", "kind": "model", "name": "JsonPartRequest", "namespace": "Payload.MultiPart", @@ -665,12 +877,12 @@ "decorators": [], "properties": [ { - "$id": "69", + "$id": "87", "kind": "property", "name": "address", "serializedName": "address", "type": { - "$ref": "60" + "$ref": "78" }, "optional": false, "readOnly": false, @@ -692,12 +904,12 @@ "isHttpMetadata": false }, { - "$id": "70", + "$id": "88", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "71", + "$id": "89", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -726,7 +938,7 @@ ] }, { - "$id": "72", + "$id": "90", "kind": "model", "name": "BinaryArrayPartsRequest", "namespace": "Payload.MultiPart", @@ -735,12 +947,12 @@ "decorators": [], "properties": [ { - "$id": "73", + "$id": "91", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "74", + "$id": "92", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -766,16 +978,16 @@ "isHttpMetadata": false }, { - "$id": "75", + "$id": "93", "kind": "property", "name": "pictures", "serializedName": "pictures", "type": { - "$id": "76", + "$id": "94", "kind": "array", "name": "ArrayHttpPart1", "valueType": { - "$id": "77", + "$id": "95", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -807,7 +1019,7 @@ ] }, { - "$id": "78", + "$id": "96", "kind": "model", "name": "MultiBinaryPartsRequest", "namespace": "Payload.MultiPart", @@ -816,12 +1028,12 @@ "decorators": [], "properties": [ { - "$id": "79", + "$id": "97", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "80", + "$id": "98", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -848,12 +1060,12 @@ "isHttpMetadata": false }, { - "$id": "81", + "$id": "99", "kind": "property", "name": "picture", "serializedName": "picture", "type": { - "$id": "82", + "$id": "100", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -882,7 +1094,7 @@ ] }, { - "$id": "83", + "$id": "101", "kind": "model", "name": "AnonymousModelRequest", "namespace": "Payload.MultiPart.FormData", @@ -891,12 +1103,12 @@ "decorators": [], "properties": [ { - "$id": "84", + "$id": "102", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "85", + "$id": "103", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -925,7 +1137,7 @@ ] }, { - "$id": "86", + "$id": "104", "kind": "model", "name": "ComplexHttpPartsModelRequest", "namespace": "Payload.MultiPart", @@ -934,12 +1146,12 @@ "decorators": [], "properties": [ { - "$id": "87", + "$id": "105", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "88", + "$id": "106", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -965,12 +1177,12 @@ "isHttpMetadata": false }, { - "$id": "89", + "$id": "107", "kind": "property", "name": "address", "serializedName": "address", "type": { - "$ref": "60" + "$ref": "78" }, "optional": false, "readOnly": false, @@ -992,12 +1204,12 @@ "isHttpMetadata": false }, { - "$id": "90", + "$id": "108", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "91", + "$id": "109", "kind": "model", "name": "FileRequiredMetaData", "namespace": "Payload.MultiPart", @@ -1005,7 +1217,7 @@ "usage": "Input", "decorators": [], "baseModel": { - "$id": "92", + "$id": "110", "kind": "model", "name": "File", "namespace": "TypeSpec.Http", @@ -1016,13 +1228,13 @@ "decorators": [], "properties": [ { - "$id": "93", + "$id": "111", "kind": "property", "name": "contentType", "summary": "The allowed media (MIME) types of the file contents.", "doc": "The allowed media (MIME) types of the file contents.\n\nIn file bodies, this value comes from the `Content-Type` header of the request or response. In JSON bodies,\nthis value is serialized as a field in the response.\n\nNOTE: this is not _necessarily_ the same as the `Content-Type` header of the request or response, but\nit will be for file bodies. It may be different if the file is serialized as a JSON object. It always refers to the\n_contents_ of the file, and not necessarily the way the file itself is transmitted or serialized.", "type": { - "$id": "94", + "$id": "112", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1038,13 +1250,13 @@ "isHttpMetadata": false }, { - "$id": "95", + "$id": "113", "kind": "property", "name": "filename", "summary": "The name of the file, if any.", "doc": "The name of the file, if any.\n\nIn file bodies, this value comes from the `filename` parameter of the `Content-Disposition` header of the response\nor multipart payload. In JSON bodies, this value is serialized as a field in the response.\n\nNOTE: By default, `filename` cannot be sent in request payloads and can only be sent in responses and multipart\npayloads, as the `Content-Disposition` header is not valid in requests. If you want to send the `filename` in a request,\nyou must extend the `File` model and override the `filename` property with a different location defined by HTTP metadata\ndecorators.", "type": { - "$id": "96", + "$id": "114", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1060,13 +1272,13 @@ "isHttpMetadata": false }, { - "$id": "97", + "$id": "115", "kind": "property", "name": "contents", "summary": "The contents of the file.", "doc": "The contents of the file.\n\nIn file bodies, this value comes from the body of the request, response, or multipart payload. In JSON bodies,\nthis value is serialized as a field in the response.", "type": { - "$id": "98", + "$id": "116", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -1086,11 +1298,11 @@ }, "properties": [ { - "$id": "99", + "$id": "117", "kind": "property", "name": "filename", "type": { - "$id": "100", + "$id": "118", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1106,11 +1318,11 @@ "isHttpMetadata": false }, { - "$id": "101", + "$id": "119", "kind": "property", "name": "contentType", "type": { - "$id": "102", + "$id": "120", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1138,10 +1350,10 @@ "isFilePart": true, "isMulti": false, "filename": { - "$id": "103", + "$id": "121", "apiVersions": [], "type": { - "$id": "104", + "$id": "122", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1171,10 +1383,10 @@ "serializationOptions": {} }, "contentType": { - "$id": "105", + "$id": "123", "apiVersions": [], "type": { - "$id": "106", + "$id": "124", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1213,16 +1425,16 @@ "isHttpMetadata": false }, { - "$id": "107", + "$id": "125", "kind": "property", "name": "previousAddresses", "serializedName": "previousAddresses", "type": { - "$id": "108", + "$id": "126", "kind": "array", "name": "ArrayAddress", "valueType": { - "$ref": "60" + "$ref": "78" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1247,16 +1459,16 @@ "isHttpMetadata": false }, { - "$id": "109", + "$id": "127", "kind": "property", "name": "pictures", "serializedName": "pictures", "type": { - "$id": "110", + "$id": "128", "kind": "array", "name": "ArrayHttpPart2", "valueType": { - "$ref": "91" + "$ref": "109" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1272,10 +1484,10 @@ "isFilePart": true, "isMulti": true, "filename": { - "$ref": "103" + "$ref": "121" }, "contentType": { - "$ref": "105" + "$ref": "123" }, "defaultContentTypes": [ "*/*" @@ -1289,13 +1501,13 @@ ] }, { - "$ref": "91" + "$ref": "109" }, { - "$ref": "92" + "$ref": "110" }, { - "$id": "111", + "$id": "129", "kind": "model", "name": "FileWithHttpPartSpecificContentTypeRequest", "namespace": "Payload.MultiPart", @@ -1304,12 +1516,12 @@ "decorators": [], "properties": [ { - "$id": "112", + "$id": "130", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "113", + "$id": "131", "kind": "model", "name": "FileSpecificContentType", "namespace": "Payload.MultiPart", @@ -1317,15 +1529,15 @@ "usage": "Input", "decorators": [], "baseModel": { - "$ref": "92" + "$ref": "110" }, "properties": [ { - "$id": "114", + "$id": "132", "kind": "property", "name": "filename", "type": { - "$id": "115", + "$id": "133", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1341,7 +1553,7 @@ "isHttpMetadata": false }, { - "$id": "116", + "$id": "134", "kind": "property", "name": "contentType", "type": { @@ -1369,10 +1581,10 @@ "isFilePart": true, "isMulti": false, "filename": { - "$id": "117", + "$id": "135", "apiVersions": [], "type": { - "$id": "118", + "$id": "136", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1402,15 +1614,15 @@ "serializationOptions": {} }, "contentType": { - "$id": "119", + "$id": "137", "apiVersions": [], "type": { - "$id": "120", + "$id": "138", "kind": "constant", "decorators": [], "value": "image/jpg", "valueType": { - "$id": "121", + "$id": "139", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1454,10 +1666,10 @@ ] }, { - "$ref": "113" + "$ref": "131" }, { - "$id": "122", + "$id": "140", "kind": "model", "name": "FileWithHttpPartRequiredContentTypeRequest", "namespace": "Payload.MultiPart", @@ -1466,12 +1678,12 @@ "decorators": [], "properties": [ { - "$id": "123", + "$id": "141", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$ref": "91" + "$ref": "109" }, "optional": false, "readOnly": false, @@ -1484,10 +1696,10 @@ "isFilePart": true, "isMulti": false, "filename": { - "$ref": "103" + "$ref": "121" }, "contentType": { - "$ref": "105" + "$ref": "123" }, "defaultContentTypes": [ "*/*" @@ -1501,7 +1713,7 @@ ] }, { - "$id": "124", + "$id": "142", "kind": "model", "name": "FileWithHttpPartOptionalContentTypeRequest", "namespace": "Payload.MultiPart", @@ -1510,12 +1722,12 @@ "decorators": [], "properties": [ { - "$id": "125", + "$id": "143", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "126", + "$id": "144", "kind": "model", "name": "FileOptionalContentType", "namespace": "Payload.MultiPart", @@ -1523,15 +1735,15 @@ "usage": "Input", "decorators": [], "baseModel": { - "$ref": "92" + "$ref": "110" }, "properties": [ { - "$id": "127", + "$id": "145", "kind": "property", "name": "filename", "type": { - "$id": "128", + "$id": "146", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1559,10 +1771,10 @@ "isFilePart": true, "isMulti": false, "filename": { - "$id": "129", + "$id": "147", "apiVersions": [], "type": { - "$id": "130", + "$id": "148", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1592,12 +1804,12 @@ "serializationOptions": {} }, "contentType": { - "$id": "131", + "$id": "149", "doc": "The allowed media (MIME) types of the file contents.\n\nIn file bodies, this value comes from the `Content-Type` header of the request or response. In JSON bodies,\nthis value is serialized as a field in the response.\n\nNOTE: this is not _necessarily_ the same as the `Content-Type` header of the request or response, but\nit will be for file bodies. It may be different if the file is serialized as a JSON object. It always refers to the\n_contents_ of the file, and not necessarily the way the file itself is transmitted or serialized.", "summary": "The allowed media (MIME) types of the file contents.", "apiVersions": [], "type": { - "$id": "132", + "$id": "150", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1638,10 +1850,10 @@ ] }, { - "$ref": "126" + "$ref": "144" }, { - "$id": "133", + "$id": "151", "kind": "model", "name": "FloatRequest", "namespace": "Payload.MultiPart.FormData.HttpParts.NonString", @@ -1650,12 +1862,12 @@ "decorators": [], "properties": [ { - "$id": "134", + "$id": "152", "kind": "property", "name": "temperature", "serializedName": "temperature", "type": { - "$id": "135", + "$id": "153", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -1672,15 +1884,15 @@ "isFilePart": false, "isMulti": false, "contentType": { - "$id": "136", + "$id": "154", "apiVersions": [], "type": { - "$id": "137", + "$id": "155", "kind": "constant", "decorators": [], "value": "text/plain", "valueType": { - "$id": "138", + "$id": "156", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -1726,7 +1938,7 @@ ], "clients": [ { - "$id": "139", + "$id": "157", "kind": "client", "name": "MultiPartClient", "namespace": "Payload.MultiPart", @@ -1734,13 +1946,13 @@ "methods": [], "parameters": [ { - "$id": "140", + "$id": "158", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "141", + "$id": "159", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1751,7 +1963,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "142", + "$id": "160", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1770,27 +1982,27 @@ "apiVersions": [], "children": [ { - "$id": "143", + "$id": "161", "kind": "client", "name": "FormData", "namespace": "Payload.MultiPart.FormData", "methods": [ { - "$id": "144", + "$id": "162", "kind": "basic", "name": "basic", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data", "operation": { - "$id": "145", + "$id": "163", "name": "basic", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data", "accessibility": "public", "parameters": [ { - "$id": "146", + "$id": "164", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -1806,12 +2018,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.basic.contentType" }, { - "$id": "147", + "$id": "165", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "51" + "$ref": "59" }, "isApiVersion": false, "contentTypes": [ @@ -1848,7 +2060,7 @@ }, "parameters": [ { - "$id": "148", + "$id": "166", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -1865,12 +2077,12 @@ "decorators": [] }, { - "$id": "149", + "$id": "167", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "51" + "$ref": "59" }, "location": "Body", "isApiVersion": false, @@ -1889,26 +2101,252 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.basic" }, { - "$id": "150", + "$id": "168", + "kind": "basic", + "name": "withWireName", + "accessibility": "public", + "apiVersions": [], + "doc": "Test content-type: multipart/form-data with wire names", + "operation": { + "$id": "169", + "name": "withWireName", + "resourceName": "FormData", + "doc": "Test content-type: multipart/form-data with wire names", + "accessibility": "public", + "parameters": [ + { + "$id": "170", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "7" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.MultiPart.FormData.withWireName.contentType" + }, + { + "$id": "171", + "kind": "body", + "name": "body", + "serializedName": "body", + "type": { + "$ref": "64" + }, + "isApiVersion": false, + "contentTypes": [ + "multipart/form-data" + ], + "defaultContentType": "multipart/form-data", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Payload.MultiPart.FormData.withWireName.body" + } + ], + "responses": [ + { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/multipart/form-data/mixed-parts-with-wire-name", + "requestMediaTypes": [ + "multipart/form-data" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.MultiPart.FormData.withWireName", + "decorators": [] + }, + "parameters": [ + { + "$id": "172", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "9" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.MultiPart.FormData.withWireName.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "173", + "kind": "method", + "name": "body", + "serializedName": "body", + "type": { + "$ref": "64" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Payload.MultiPart.FormData.withWireName.body", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.MultiPart.FormData.withWireName" + }, + { + "$id": "174", + "kind": "basic", + "name": "optionalParts", + "accessibility": "public", + "apiVersions": [], + "doc": "Test content-type: multipart/form-data with optional parts", + "operation": { + "$id": "175", + "name": "optionalParts", + "resourceName": "FormData", + "doc": "Test content-type: multipart/form-data with optional parts", + "accessibility": "public", + "parameters": [ + { + "$id": "176", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "11" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Payload.MultiPart.FormData.optionalParts.contentType" + }, + { + "$id": "177", + "kind": "body", + "name": "body", + "serializedName": "body", + "type": { + "$ref": "69" + }, + "isApiVersion": false, + "contentTypes": [ + "multipart/form-data" + ], + "defaultContentType": "multipart/form-data", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Payload.MultiPart.FormData.optionalParts.body" + } + ], + "responses": [ + { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/multipart/form-data/optional-parts", + "requestMediaTypes": [ + "multipart/form-data" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Payload.MultiPart.FormData.optionalParts", + "decorators": [] + }, + "parameters": [ + { + "$id": "178", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "13" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Payload.MultiPart.FormData.optionalParts.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "179", + "kind": "method", + "name": "body", + "serializedName": "body", + "type": { + "$ref": "69" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Payload.MultiPart.FormData.optionalParts.body", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Payload.MultiPart.FormData.optionalParts" + }, + { + "$id": "180", "kind": "basic", "name": "fileArrayAndBasic", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for mixed scenarios", "operation": { - "$id": "151", + "$id": "181", "name": "fileArrayAndBasic", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data for mixed scenarios", "accessibility": "public", "parameters": [ { - "$id": "152", + "$id": "182", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "7" + "$ref": "15" }, "isApiVersion": false, "optional": false, @@ -1919,12 +2357,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.fileArrayAndBasic.contentType" }, { - "$id": "153", + "$id": "183", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "56" + "$ref": "74" }, "isApiVersion": false, "contentTypes": [ @@ -1961,12 +2399,12 @@ }, "parameters": [ { - "$id": "154", + "$id": "184", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "9" + "$ref": "17" }, "location": "Header", "isApiVersion": false, @@ -1978,12 +2416,12 @@ "decorators": [] }, { - "$id": "155", + "$id": "185", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "56" + "$ref": "74" }, "location": "Body", "isApiVersion": false, @@ -2002,26 +2440,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.fileArrayAndBasic" }, { - "$id": "156", + "$id": "186", "kind": "basic", "name": "jsonPart", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for scenario contains json part and binary part ", "operation": { - "$id": "157", + "$id": "187", "name": "jsonPart", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data for scenario contains json part and binary part ", "accessibility": "public", "parameters": [ { - "$id": "158", + "$id": "188", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "11" + "$ref": "19" }, "isApiVersion": false, "optional": false, @@ -2032,12 +2470,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.jsonPart.contentType" }, { - "$id": "159", + "$id": "189", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "68" + "$ref": "86" }, "isApiVersion": false, "contentTypes": [ @@ -2074,12 +2512,12 @@ }, "parameters": [ { - "$id": "160", + "$id": "190", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "13" + "$ref": "21" }, "location": "Header", "isApiVersion": false, @@ -2091,12 +2529,12 @@ "decorators": [] }, { - "$id": "161", + "$id": "191", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "68" + "$ref": "86" }, "location": "Body", "isApiVersion": false, @@ -2115,26 +2553,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.jsonPart" }, { - "$id": "162", + "$id": "192", "kind": "basic", "name": "binaryArrayParts", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for scenario contains multi binary parts", "operation": { - "$id": "163", + "$id": "193", "name": "binaryArrayParts", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data for scenario contains multi binary parts", "accessibility": "public", "parameters": [ { - "$id": "164", + "$id": "194", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "15" + "$ref": "23" }, "isApiVersion": false, "optional": false, @@ -2145,12 +2583,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.binaryArrayParts.contentType" }, { - "$id": "165", + "$id": "195", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "72" + "$ref": "90" }, "isApiVersion": false, "contentTypes": [ @@ -2187,12 +2625,12 @@ }, "parameters": [ { - "$id": "166", + "$id": "196", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "17" + "$ref": "25" }, "location": "Header", "isApiVersion": false, @@ -2204,12 +2642,12 @@ "decorators": [] }, { - "$id": "167", + "$id": "197", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "72" + "$ref": "90" }, "location": "Body", "isApiVersion": false, @@ -2228,26 +2666,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.binaryArrayParts" }, { - "$id": "168", + "$id": "198", "kind": "basic", "name": "multiBinaryParts", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for scenario contains multi binary parts", "operation": { - "$id": "169", + "$id": "199", "name": "multiBinaryParts", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data for scenario contains multi binary parts", "accessibility": "public", "parameters": [ { - "$id": "170", + "$id": "200", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "19" + "$ref": "27" }, "isApiVersion": false, "optional": false, @@ -2258,12 +2696,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.multiBinaryParts.contentType" }, { - "$id": "171", + "$id": "201", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "78" + "$ref": "96" }, "isApiVersion": false, "contentTypes": [ @@ -2300,12 +2738,12 @@ }, "parameters": [ { - "$id": "172", + "$id": "202", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "21" + "$ref": "29" }, "location": "Header", "isApiVersion": false, @@ -2317,12 +2755,12 @@ "decorators": [] }, { - "$id": "173", + "$id": "203", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "78" + "$ref": "96" }, "location": "Body", "isApiVersion": false, @@ -2341,26 +2779,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.multiBinaryParts" }, { - "$id": "174", + "$id": "204", "kind": "basic", "name": "checkFileNameAndContentType", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data", "operation": { - "$id": "175", + "$id": "205", "name": "checkFileNameAndContentType", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data", "accessibility": "public", "parameters": [ { - "$id": "176", + "$id": "206", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "23" + "$ref": "31" }, "isApiVersion": false, "optional": false, @@ -2371,12 +2809,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.checkFileNameAndContentType.contentType" }, { - "$id": "177", + "$id": "207", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "51" + "$ref": "59" }, "isApiVersion": false, "contentTypes": [ @@ -2413,12 +2851,12 @@ }, "parameters": [ { - "$id": "178", + "$id": "208", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "25" + "$ref": "33" }, "location": "Header", "isApiVersion": false, @@ -2430,12 +2868,12 @@ "decorators": [] }, { - "$id": "179", + "$id": "209", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "51" + "$ref": "59" }, "location": "Body", "isApiVersion": false, @@ -2454,26 +2892,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.checkFileNameAndContentType" }, { - "$id": "180", + "$id": "210", "kind": "basic", "name": "anonymousModel", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data", "operation": { - "$id": "181", + "$id": "211", "name": "anonymousModel", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data", "accessibility": "public", "parameters": [ { - "$id": "182", + "$id": "212", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "27" + "$ref": "35" }, "isApiVersion": false, "optional": false, @@ -2484,12 +2922,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.anonymousModel.contentType" }, { - "$id": "183", + "$id": "213", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "83" + "$ref": "101" }, "isApiVersion": false, "contentTypes": [ @@ -2526,12 +2964,12 @@ }, "parameters": [ { - "$id": "184", + "$id": "214", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "29" + "$ref": "37" }, "location": "Header", "isApiVersion": false, @@ -2543,12 +2981,12 @@ "decorators": [] }, { - "$id": "185", + "$id": "215", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "83" + "$ref": "101" }, "location": "Body", "isApiVersion": false, @@ -2569,13 +3007,13 @@ ], "parameters": [ { - "$id": "186", + "$id": "216", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "187", + "$id": "217", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2586,7 +3024,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "188", + "$id": "218", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2604,36 +3042,36 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData", "apiVersions": [], "parent": { - "$ref": "139" + "$ref": "157" }, "children": [ { - "$id": "189", + "$id": "219", "kind": "client", "name": "HttpParts", "namespace": "Payload.MultiPart.FormData.HttpParts", "methods": [ { - "$id": "190", + "$id": "220", "kind": "basic", "name": "jsonArrayAndFileArray", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for mixed scenarios", "operation": { - "$id": "191", + "$id": "221", "name": "jsonArrayAndFileArray", "resourceName": "HttpParts", "doc": "Test content-type: multipart/form-data for mixed scenarios", "accessibility": "public", "parameters": [ { - "$id": "192", + "$id": "222", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "31" + "$ref": "39" }, "isApiVersion": false, "optional": false, @@ -2644,12 +3082,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.jsonArrayAndFileArray.contentType" }, { - "$id": "193", + "$id": "223", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "86" + "$ref": "104" }, "isApiVersion": false, "contentTypes": [ @@ -2686,12 +3124,12 @@ }, "parameters": [ { - "$id": "194", + "$id": "224", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "33" + "$ref": "41" }, "location": "Header", "isApiVersion": false, @@ -2703,12 +3141,12 @@ "decorators": [] }, { - "$id": "195", + "$id": "225", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "86" + "$ref": "104" }, "location": "Body", "isApiVersion": false, @@ -2729,13 +3167,13 @@ ], "parameters": [ { - "$id": "196", + "$id": "226", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "197", + "$id": "227", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2746,7 +3184,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "198", + "$id": "228", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2764,36 +3202,36 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts", "apiVersions": [], "parent": { - "$ref": "143" + "$ref": "161" }, "children": [ { - "$id": "199", + "$id": "229", "kind": "client", "name": "ContentType", "namespace": "Payload.MultiPart.FormData.HttpParts.ContentType", "methods": [ { - "$id": "200", + "$id": "230", "kind": "basic", "name": "imageJpegContentType", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data", "operation": { - "$id": "201", + "$id": "231", "name": "imageJpegContentType", "resourceName": "ContentType", "doc": "Test content-type: multipart/form-data", "accessibility": "public", "parameters": [ { - "$id": "202", + "$id": "232", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "35" + "$ref": "43" }, "isApiVersion": false, "optional": false, @@ -2804,12 +3242,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType.imageJpegContentType.contentType" }, { - "$id": "203", + "$id": "233", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "111" + "$ref": "129" }, "isApiVersion": false, "contentTypes": [ @@ -2846,12 +3284,12 @@ }, "parameters": [ { - "$id": "204", + "$id": "234", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "37" + "$ref": "45" }, "location": "Header", "isApiVersion": false, @@ -2863,12 +3301,12 @@ "decorators": [] }, { - "$id": "205", + "$id": "235", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "111" + "$ref": "129" }, "location": "Body", "isApiVersion": false, @@ -2887,26 +3325,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType.imageJpegContentType" }, { - "$id": "206", + "$id": "236", "kind": "basic", "name": "requiredContentType", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data", "operation": { - "$id": "207", + "$id": "237", "name": "requiredContentType", "resourceName": "ContentType", "doc": "Test content-type: multipart/form-data", "accessibility": "public", "parameters": [ { - "$id": "208", + "$id": "238", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "39" + "$ref": "47" }, "isApiVersion": false, "optional": false, @@ -2917,12 +3355,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType.requiredContentType.contentType" }, { - "$id": "209", + "$id": "239", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "122" + "$ref": "140" }, "isApiVersion": false, "contentTypes": [ @@ -2959,12 +3397,12 @@ }, "parameters": [ { - "$id": "210", + "$id": "240", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "41" + "$ref": "49" }, "location": "Header", "isApiVersion": false, @@ -2976,12 +3414,12 @@ "decorators": [] }, { - "$id": "211", + "$id": "241", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "122" + "$ref": "140" }, "location": "Body", "isApiVersion": false, @@ -3000,26 +3438,26 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType.requiredContentType" }, { - "$id": "212", + "$id": "242", "kind": "basic", "name": "optionalContentType", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for optional content type", "operation": { - "$id": "213", + "$id": "243", "name": "optionalContentType", "resourceName": "ContentType", "doc": "Test content-type: multipart/form-data for optional content type", "accessibility": "public", "parameters": [ { - "$id": "214", + "$id": "244", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "43" + "$ref": "51" }, "isApiVersion": false, "optional": false, @@ -3030,12 +3468,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType.optionalContentType.contentType" }, { - "$id": "215", + "$id": "245", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "124" + "$ref": "142" }, "isApiVersion": false, "contentTypes": [ @@ -3072,12 +3510,12 @@ }, "parameters": [ { - "$id": "216", + "$id": "246", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "45" + "$ref": "53" }, "location": "Header", "isApiVersion": false, @@ -3089,12 +3527,12 @@ "decorators": [] }, { - "$id": "217", + "$id": "247", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "124" + "$ref": "142" }, "location": "Body", "isApiVersion": false, @@ -3115,13 +3553,13 @@ ], "parameters": [ { - "$id": "218", + "$id": "248", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "219", + "$id": "249", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3132,7 +3570,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "220", + "$id": "250", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3150,37 +3588,37 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType", "apiVersions": [], "parent": { - "$ref": "189" + "$ref": "219" }, "isMultiServiceClient": false }, { - "$id": "221", + "$id": "251", "kind": "client", "name": "NonString", "namespace": "Payload.MultiPart.FormData.HttpParts.NonString", "methods": [ { - "$id": "222", + "$id": "252", "kind": "basic", "name": "float", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for non string", "operation": { - "$id": "223", + "$id": "253", "name": "float", "resourceName": "NonString", "doc": "Test content-type: multipart/form-data for non string", "accessibility": "public", "parameters": [ { - "$id": "224", + "$id": "254", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "47" + "$ref": "55" }, "isApiVersion": false, "optional": false, @@ -3191,12 +3629,12 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.NonString.float.contentType" }, { - "$id": "225", + "$id": "255", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "133" + "$ref": "151" }, "isApiVersion": false, "contentTypes": [ @@ -3233,12 +3671,12 @@ }, "parameters": [ { - "$id": "226", + "$id": "256", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "49" + "$ref": "57" }, "location": "Header", "isApiVersion": false, @@ -3250,12 +3688,12 @@ "decorators": [] }, { - "$id": "227", + "$id": "257", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "133" + "$ref": "151" }, "location": "Body", "isApiVersion": false, @@ -3276,13 +3714,13 @@ ], "parameters": [ { - "$id": "228", + "$id": "258", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "229", + "$id": "259", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3293,7 +3731,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "230", + "$id": "260", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3311,7 +3749,7 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.NonString", "apiVersions": [], "parent": { - "$ref": "189" + "$ref": "219" }, "isMultiServiceClient": false } From c5611d09e25a04c39347f45e67a43eafa8ce38be Mon Sep 17 00:00:00 2001 From: jolov Date: Fri, 16 Jan 2026 17:55:00 -0800 Subject: [PATCH 4/4] regen --- .../src/Properties/launchSettings.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Properties/launchSettings.json b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Properties/launchSettings.json index 744f37906d1..b95f8ae913a 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Properties/launchSettings.json +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Properties/launchSettings.json @@ -10,6 +10,11 @@ "commandName": "Executable", "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.exe" }, + "http-authentication-noauth-union": { + "commandLineArgs": "$(SolutionDir)/TestProjects/Spector/http/authentication/noauth/union -g StubLibraryGenerator", + "commandName": "Executable", + "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.exe" + }, "http-authentication-oauth2": { "commandLineArgs": "$(SolutionDir)/TestProjects/Spector/http/authentication/oauth2 -g StubLibraryGenerator", "commandName": "Executable", @@ -95,6 +100,11 @@ "commandName": "Executable", "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.exe" }, + "http-parameters-query": { + "commandLineArgs": "$(SolutionDir)/TestProjects/Spector/http/parameters/query -g StubLibraryGenerator", + "commandName": "Executable", + "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.exe" + }, "http-parameters-spread": { "commandLineArgs": "$(SolutionDir)/TestProjects/Spector/http/parameters/spread -g StubLibraryGenerator", "commandName": "Executable",