diff --git a/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/PlantOperations.RestClient.cs b/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/PlantOperations.RestClient.cs index c3f500e7a8b..37d98ca8b50 100644 --- a/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/PlantOperations.RestClient.cs +++ b/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/PlantOperations.RestClient.cs @@ -26,6 +26,18 @@ internal PipelineMessage CreateGetTreeRequest(RequestOptions options) return message; } + internal PipelineMessage CreateGetTreeAsJsonRequest(RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/plants/tree/as-plant/json", false); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + internal PipelineMessage CreateUpdateTreeRequest(BinaryContent content, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); @@ -39,5 +51,19 @@ internal PipelineMessage CreateUpdateTreeRequest(BinaryContent content, RequestO message.Apply(options); return message; } + + internal PipelineMessage CreateUpdateTreeAsJsonRequest(BinaryContent content, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/plants/tree/as-plant/json", false); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "PUT", PipelineMessageClassifier200); + PipelineRequest request = message.Request; + request.Headers.Set("Content-Type", "application/json"); + request.Headers.Set("Accept", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } } } diff --git a/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/PlantOperations.cs b/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/PlantOperations.cs index 4c35052674e..6ce49821335 100644 --- a/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/PlantOperations.cs +++ b/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/PlantOperations.cs @@ -136,6 +136,110 @@ public virtual async Task> GetTreeAsync(CancellationToken can } } + /// + /// [Protocol Method] Get a tree as a plant + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual ClientResult GetTreeAsJson(RequestOptions options) + { + try + { + System.Console.WriteLine("Entering method GetTreeAsJson."); + using PipelineMessage message = CreateGetTreeAsJsonRequest(options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + catch (Exception ex) + { + System.Console.WriteLine($"An exception was thrown in method GetTreeAsJson: {ex}"); + throw; + } + finally + { + System.Console.WriteLine("Exiting method GetTreeAsJson."); + } + } + + /// + /// [Protocol Method] Get a tree as a plant + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual async Task GetTreeAsJsonAsync(RequestOptions options) + { + try + { + System.Console.WriteLine("Entering method GetTreeAsJsonAsync."); + using PipelineMessage message = CreateGetTreeAsJsonRequest(options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + catch (Exception ex) + { + System.Console.WriteLine($"An exception was thrown in method GetTreeAsJsonAsync: {ex}"); + throw; + } + finally + { + System.Console.WriteLine("Exiting method GetTreeAsJsonAsync."); + } + } + + /// Get a tree as a plant. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + public virtual ClientResult GetTreeAsJson(CancellationToken cancellationToken = default) + { + try + { + System.Console.WriteLine("Entering method GetTreeAsJson."); + ClientResult result = GetTreeAsJson(cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((Tree)result, result.GetRawResponse()); + } + catch (Exception ex) + { + System.Console.WriteLine($"An exception was thrown in method GetTreeAsJson: {ex}"); + throw; + } + finally + { + System.Console.WriteLine("Exiting method GetTreeAsJson."); + } + } + + /// Get a tree as a plant. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + public virtual async Task> GetTreeAsJsonAsync(CancellationToken cancellationToken = default) + { + try + { + System.Console.WriteLine("Entering method GetTreeAsJsonAsync."); + ClientResult result = await GetTreeAsJsonAsync(cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue((Tree)result, result.GetRawResponse()); + } + catch (Exception ex) + { + System.Console.WriteLine($"An exception was thrown in method GetTreeAsJsonAsync: {ex}"); + throw; + } + finally + { + System.Console.WriteLine("Exiting method GetTreeAsJsonAsync."); + } + } + /// /// [Protocol Method] Update a tree as a plant /// @@ -255,5 +359,125 @@ public virtual async Task> UpdateTreeAsync(Tree tree, Cancell System.Console.WriteLine("Exiting method UpdateTreeAsync."); } } + + /// + /// [Protocol Method] Update a tree as a plant + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The content to send as the body of the request. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual ClientResult UpdateTreeAsJson(BinaryContent content, RequestOptions options = null) + { + try + { + System.Console.WriteLine("Entering method UpdateTreeAsJson."); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateUpdateTreeAsJsonRequest(content, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + catch (Exception ex) + { + System.Console.WriteLine($"An exception was thrown in method UpdateTreeAsJson: {ex}"); + throw; + } + finally + { + System.Console.WriteLine("Exiting method UpdateTreeAsJson."); + } + } + + /// + /// [Protocol Method] Update a tree as a plant + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The content to send as the body of the request. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual async Task UpdateTreeAsJsonAsync(BinaryContent content, RequestOptions options = null) + { + try + { + System.Console.WriteLine("Entering method UpdateTreeAsJsonAsync."); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateUpdateTreeAsJsonRequest(content, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + catch (Exception ex) + { + System.Console.WriteLine($"An exception was thrown in method UpdateTreeAsJsonAsync: {ex}"); + throw; + } + finally + { + System.Console.WriteLine("Exiting method UpdateTreeAsJsonAsync."); + } + } + + /// Update a tree as a plant. + /// + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// Service returned a non-success status code. + public virtual ClientResult UpdateTreeAsJson(Tree tree, CancellationToken cancellationToken = default) + { + try + { + System.Console.WriteLine("Entering method UpdateTreeAsJson."); + Argument.AssertNotNull(tree, nameof(tree)); + + ClientResult result = UpdateTreeAsJson(tree, cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((Tree)result, result.GetRawResponse()); + } + catch (Exception ex) + { + System.Console.WriteLine($"An exception was thrown in method UpdateTreeAsJson: {ex}"); + throw; + } + finally + { + System.Console.WriteLine("Exiting method UpdateTreeAsJson."); + } + } + + /// Update a tree as a plant. + /// + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// Service returned a non-success status code. + public virtual async Task> UpdateTreeAsJsonAsync(Tree tree, CancellationToken cancellationToken = default) + { + try + { + System.Console.WriteLine("Entering method UpdateTreeAsJsonAsync."); + Argument.AssertNotNull(tree, nameof(tree)); + + ClientResult result = await UpdateTreeAsJsonAsync(tree, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue((Tree)result, result.GetRawResponse()); + } + catch (Exception ex) + { + System.Console.WriteLine($"An exception was thrown in method UpdateTreeAsJsonAsync: {ex}"); + throw; + } + finally + { + System.Console.WriteLine("Exiting method UpdateTreeAsJsonAsync."); + } + } } } diff --git a/docs/samples/client/csharp/SampleService/main.tsp b/docs/samples/client/csharp/SampleService/main.tsp index a07120f277b..2722adc9c6f 100644 --- a/docs/samples/client/csharp/SampleService/main.tsp +++ b/docs/samples/client/csharp/SampleService/main.tsp @@ -791,7 +791,6 @@ model Plant { } @doc("Tree is a specific type of plant") -@usage(Usage.xml | Usage.output | Usage.json) model Tree extends Plant { species: "tree"; @@ -809,6 +808,14 @@ interface PlantOperations { @body body: Tree; }; + @doc("Get a tree as a plant") + @get + @route("/tree/as-plant/json") + getTreeAsJson(): { + @header contentType: "application/json"; + @body body: Tree; + }; + @doc("Update a tree as a plant") @put @route("/tree/as-plant") @@ -816,6 +823,14 @@ interface PlantOperations { @header contentType: "application/xml"; @body body: Tree; }; + + @doc("Update a tree as a plant") + @put + @route("/tree/as-plant/json") + updateTreeAsJson(@body tree: Tree, @header contentType: "application/json"): { + @header contentType: "application/json"; + @body body: Tree; + }; } @clientInitialization({ diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs index 4234b1cad7d..2ad9a1fcd88 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/MrwSerializationTypeDefinition.cs @@ -193,6 +193,11 @@ protected override MethodProvider[] BuildMethods() if (ScmCodeModelGenerator.Instance.TypeFactory.RootInputModels.Contains(_inputModel)) { methods.Add(BuildImplicitToBinaryContent()); + // Add internal ToBinaryContent helper for format-specific serialization + if (_supportsJson && _supportsXml) + { + methods.Add(BuildToBinaryContentMethod()); + } } if (ScmCodeModelGenerator.Instance.TypeFactory.RootOutputModels.Contains(_inputModel)) @@ -326,6 +331,23 @@ private MethodProvider BuildImplicitToBinaryContent() this); } + private MethodProvider BuildToBinaryContentMethod() + { + var formatParameter = new ParameterProvider("format", $"The format to use for serialization", typeof(string)); + + // ModelReaderWriterOptions options = new ModelReaderWriterOptions(format); + // return BinaryContent.Create(this, options); + var requestContentType = ScmCodeModelGenerator.Instance.TypeFactory.RequestContentApi.RequestContentType; + return new MethodProvider( + new MethodSignature($"To{requestContentType.Name}", FormattableStringHelpers.FromString($"Converts the model to {requestContentType.Name} using the specified format"), MethodSignatureModifiers.Internal, requestContentType, null, [formatParameter]), + new MethodBodyStatement[] + { + Declare("options", typeof(ModelReaderWriterOptions), New.Instance(typeof(ModelReaderWriterOptions), formatParameter), out var options), + Return(RequestContentApiSnippets.Create(This, options.As())) + }, + this); + } + /// /// Builds the types that the model type serialization implements. /// diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ScmMethodProviderCollection.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ScmMethodProviderCollection.cs index 2d931e09f99..6e49138c7e1 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ScmMethodProviderCollection.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ScmMethodProviderCollection.cs @@ -5,6 +5,7 @@ using System.ClientModel.Primitives; using System.Collections; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text.Json; using System.Threading.Tasks; @@ -28,6 +29,8 @@ public class ScmMethodProviderCollection : IReadOnlyList private readonly MethodProvider _createRequestMethod; private static readonly ClientPipelineExtensionsDefinition _clientPipelineExtensionsDefinition = new(); private static readonly CancellationTokenExtensionsDefinition _cancellationTokenExtensionsDefinition = new(); + private const string JsonMediaType = "application/json"; + private const string XmlMediaType = "application/xml"; private IList ProtocolMethodParameters => _protocolMethodParameters ??= RestClientProvider.GetMethodParameters(ServiceMethod, ScmMethodKind.Protocol, Client); private IList? _protocolMethodParameters; @@ -224,8 +227,31 @@ private IEnumerable GetStackVariablesForProtocolParamConver SerializationFormat.Default)); declarations["content"] = content; } - // else rely on implicit operator to convert to BinaryContent - // For BinaryData we have special handling as well + else + { + // Check if this is a dual-format model that needs explicit serialization + ModelProvider? bodyModel = null; + InputModelType? bodyInputModel = null; + if (parameter.Type is { IsFrameworkType: false }) + { + var inputParam = ServiceMethod.Parameters.FirstOrDefault(p => p.Location == InputRequestLocation.Body); + if (inputParam?.Type is InputModelType model) + { + bodyInputModel = model; + bodyModel = ScmCodeModelGenerator.Instance.TypeFactory.CreateModel(model); + } + } + + if (TryGetFormatArgumentForDualFormatModel(bodyModel, bodyInputModel, out var format)) + { + // Create using declaration for BinaryContent + var methodName = $"To{requestContentType.Name}"; + statements.Add(UsingDeclare("content", requestContentType, parameter.Invoke(methodName, format), out var content)); + declarations["content"] = content; + } + // else rely on implicit operator to convert to BinaryContent + // For BinaryData we have special handling as well + } } } @@ -684,7 +710,16 @@ private IReadOnlyList GetProtocolMethodArguments(Dictionary? format) + { + format = null; + + // Find the first JSON or XML media type + string? matchedMediaType = null; + if (ServiceMethod.Operation.RequestMediaTypes != null) + { + foreach (var mediaType in ServiceMethod.Operation.RequestMediaTypes) + { + if (mediaType.Contains(XmlMediaType, StringComparison.OrdinalIgnoreCase) || + mediaType.Contains(JsonMediaType, StringComparison.OrdinalIgnoreCase)) + { + matchedMediaType = mediaType; + break; + } + } + } + + // Check if this is a dual-format model + if (matchedMediaType != null && + bodyModel != null && + bodyInputModel != null && + bodyInputModel.Usage.HasFlag(InputModelTypeUsage.Json) && + bodyInputModel.Usage.HasFlag(InputModelTypeUsage.Xml)) + { + // Determine the format: XML or JSON + format = matchedMediaType.Contains(XmlMediaType, StringComparison.OrdinalIgnoreCase) + ? ModelReaderWriterOptionsSnippets.XmlFormat + : ModelReaderWriterOptionsSnippets.JsonFormat; + return true; + } + + return false; + } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TreeXmlTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TreeXmlTests.cs index 9893fc02829..34024d47cc2 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TreeXmlTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TreeXmlTests.cs @@ -75,5 +75,40 @@ private void RoundTripTestXml(string format, RoundTripStrategy strategy) Tree model2 = (Tree)strategy.Read(roundTrip, modelInstance, options); CompareModels(model, model2, format); } + + [Test] + public void ToBinaryContent_WithJsonFormat_ProducesJsonPayload() + { + var tree = new Tree("tree-123", 500, 100); + + // Use reflection to call the internal ToBinaryContent method + var method = typeof(Tree).GetMethod("ToBinaryContent", + System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public); + Assert.IsNotNull(method, "ToBinaryContent method should exist on Tree"); + + var binaryContent = (BinaryContent)method!.Invoke(tree, new object[] { "J" })!; + + // Verify the MediaType is set correctly for JSON + Assert.That(binaryContent.MediaType, + Is.EqualTo("application/json"), + "MediaType should be application/json for format 'J'"); + } + + [Test] + public void ToBinaryContent_WithXmlFormat_ProducesXmlPayload() + { + var tree = new Tree("tree-123", 500, 100); + + // Use reflection to call the internal ToBinaryContent method + var method = typeof(Tree).GetMethod("ToBinaryContent", + System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public); + Assert.IsNotNull(method, "ToBinaryContent method should exist on Tree"); + + var binaryContent = (BinaryContent)method!.Invoke(tree, new object[] { "X" })!; + + // Verify the MediaType is null or empty for XML format + Assert.That(string.IsNullOrEmpty(binaryContent.MediaType), Is.True, + "MediaType should be null or empty for format 'X'"); + } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/MrwSerializationTypeDefinitionTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/MrwSerializationTypeDefinitionTests.cs index 8132e9f323f..26c91e80700 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/MrwSerializationTypeDefinitionTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/MrwSerializationTypeDefinitions/MrwSerializationTypeDefinitionTests.cs @@ -1325,9 +1325,57 @@ public void TestArrayEncodingDeserializationStatement(string encoding, string ex var (_, serialization) = CreateModelAndSerialization(inputModel); var deserializeMethod = serialization.BuildDeserializationMethod(); var methodBody = deserializeMethod.BodyStatements!.ToDisplayString(); - - Assert.IsTrue(methodBody.Contains($".Split('{expectedDelimiter}')") || methodBody.Contains($".Split(\"{expectedDelimiter}\")"), + + Assert.IsTrue(methodBody.Contains($".Split('{expectedDelimiter}')") || methodBody.Contains($".Split(\"{expectedDelimiter}\")"), $"Expected deserialization to use Split with delimiter '{expectedDelimiter}', but got: {methodBody}"); } + + [Test] + public void TestBuildToBinaryContentMethod_DualFormatModel_MethodGenerated() + { + // Create a model that supports both JSON and XML + var inputModel = InputFactory.Model("DualFormatModel", usage: InputModelTypeUsage.Json | InputModelTypeUsage.Xml); + var (model, serialization) = CreateModelAndSerialization(inputModel); + + // Verify the ToBinaryContent method is generated + var toBinaryContentMethod = serialization.Methods.FirstOrDefault(m => + m.Signature.Name == "ToBinaryContent" && + m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Internal)); + + Assert.IsNotNull(toBinaryContentMethod, "ToBinaryContent method should be generated for dual-format models"); + Assert.AreEqual(1, toBinaryContentMethod!.Signature.Parameters.Count); + Assert.AreEqual("format", toBinaryContentMethod.Signature.Parameters[0].Name); + Assert.AreEqual(typeof(string), toBinaryContentMethod.Signature.Parameters[0].Type.FrameworkType); + } + + [Test] + public void TestBuildToBinaryContentMethod_JsonOnlyModel_MethodNotGenerated() + { + // Create a model that supports only JSON + var inputModel = InputFactory.Model("JsonOnlyModel", usage: InputModelTypeUsage.Json); + var (model, serialization) = CreateModelAndSerialization(inputModel); + + // Verify the ToBinaryContent method is NOT generated + var toBinaryContentMethod = serialization.Methods.FirstOrDefault(m => + m.Signature.Name == "ToBinaryContent" && + m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Internal)); + + Assert.IsNull(toBinaryContentMethod, "ToBinaryContent method should not be generated for JSON-only models"); + } + + [Test] + public void TestBuildToBinaryContentMethod_XmlOnlyModel_MethodNotGenerated() + { + // Create a model that supports only XML + var inputModel = InputFactory.Model("XmlOnlyModel", usage: InputModelTypeUsage.Xml); + var (model, serialization) = CreateModelAndSerialization(inputModel); + + // Verify the ToBinaryContent method is NOT generated + var toBinaryContentMethod = serialization.Methods.FirstOrDefault(m => + m.Signature.Name == "ToBinaryContent" && + m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Internal)); + + Assert.IsNull(toBinaryContentMethod, "ToBinaryContent method should not be generated for XML-only models"); + } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ScmMethodProviderCollectionTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ScmMethodProviderCollectionTests.cs index 6d98f35ba47..fa86d0b38f8 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ScmMethodProviderCollectionTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/ScmMethodProviderCollectionTests.cs @@ -1756,5 +1756,104 @@ public async Task CombinedMissingOperationParamsAndNonBodyModelParams() var methodBody = convenienceMethod!.BodyStatements!.ToDisplayString(); Assert.AreEqual(Helpers.GetExpectedFromFile(), methodBody); } + + [Test] + public void ConvenienceMethod_DualFormatModel_XmlContentType_CallsToBinaryContentWithX() + { + // Create a dual-format model + var dualFormatModel = InputFactory.Model("DualFormatModel", usage: InputModelTypeUsage.Json | InputModelTypeUsage.Xml); + var bodyParam = InputFactory.BodyParameter("body", dualFormatModel, isRequired: true); + var methodBodyParam = InputFactory.MethodParameter("body", dualFormatModel, isRequired: true, location: InputRequestLocation.Body); + + var operation = InputFactory.Operation( + "UpdateModel", + parameters: [bodyParam], + requestMediaTypes: ["application/xml"], + responses: [InputFactory.OperationResponse([200])]); + + var serviceMethod = InputFactory.BasicServiceMethod("UpdateModel", operation, parameters: [methodBodyParam]); + var inputClient = InputFactory.Client("TestClient", methods: [serviceMethod]); + + MockHelpers.LoadMockGenerator(clients: () => [inputClient], inputModels: () => [dualFormatModel]); + + var client = ScmCodeModelGenerator.Instance.TypeFactory.CreateClient(inputClient); + var methodCollection = new ScmMethodProviderCollection(serviceMethod, client!); + + var convenienceMethod = methodCollection.FirstOrDefault(m => + m.Signature.Parameters.All(p => p.Name != "options") && + m.Signature.Name == "UpdateModel"); + + Assert.IsNotNull(convenienceMethod); + var methodBody = convenienceMethod!.BodyStatements!.ToDisplayString(); + var expectedMethodBody = Helpers.GetExpectedFromFile(); + + Assert.AreEqual(expectedMethodBody, methodBody); + } + + [Test] + public void ConvenienceMethod_DualFormatModel_JsonContentType_CallsToBinaryContentWithJ() + { + // Create a dual-format model + var dualFormatModel = InputFactory.Model("DualFormatModel", usage: InputModelTypeUsage.Json | InputModelTypeUsage.Xml); + var bodyParam = InputFactory.BodyParameter("body", dualFormatModel, isRequired: true); + var methodBodyParam = InputFactory.MethodParameter("body", dualFormatModel, isRequired: true, location: InputRequestLocation.Body); + + var operation = InputFactory.Operation( + "UpdateModel", + parameters: [bodyParam], + requestMediaTypes: ["application/json"], + responses: [InputFactory.OperationResponse([200])]); + + var serviceMethod = InputFactory.BasicServiceMethod("UpdateModel", operation, parameters: [methodBodyParam]); + var inputClient = InputFactory.Client("TestClient", methods: [serviceMethod]); + + MockHelpers.LoadMockGenerator(clients: () => [inputClient], inputModels: () => [dualFormatModel]); + + var client = ScmCodeModelGenerator.Instance.TypeFactory.CreateClient(inputClient); + var methodCollection = new ScmMethodProviderCollection(serviceMethod, client!); + + var convenienceMethod = methodCollection.FirstOrDefault(m => + m.Signature.Parameters.All(p => p.Name != "options") && + m.Signature.Name == "UpdateModel"); + + Assert.IsNotNull(convenienceMethod); + var methodBody = convenienceMethod!.BodyStatements!.ToDisplayString(); + var expectedMethodBody = Helpers.GetExpectedFromFile(); + + Assert.AreEqual(expectedMethodBody, methodBody); + } + + [Test] + public void ConvenienceMethod_SingleFormatModel_UsesImplicitOperator() + { + // Create a JSON-only model + var jsonOnlyModel = InputFactory.Model("JsonOnlyModel", usage: InputModelTypeUsage.Json); + var bodyParam = InputFactory.BodyParameter("body", jsonOnlyModel, isRequired: true); + var methodBodyParam = InputFactory.MethodParameter("body", jsonOnlyModel, isRequired: true, location: InputRequestLocation.Body); + + var operation = InputFactory.Operation( + "UpdateModel", + parameters: [bodyParam], + requestMediaTypes: ["application/json"], + responses: [InputFactory.OperationResponse([200])]); + + var serviceMethod = InputFactory.BasicServiceMethod("UpdateModel", operation, parameters: [methodBodyParam]); + var inputClient = InputFactory.Client("TestClient", methods: [serviceMethod]); + + MockHelpers.LoadMockGenerator(clients: () => [inputClient], inputModels: () => [jsonOnlyModel]); + + var client = ScmCodeModelGenerator.Instance.TypeFactory.CreateClient(inputClient); + var methodCollection = new ScmMethodProviderCollection(serviceMethod, client!); + + var convenienceMethod = methodCollection.FirstOrDefault(m => + m.Signature.Parameters.All(p => p.Name != "options") && + m.Signature.Name == "UpdateModel"); + + Assert.IsNotNull(convenienceMethod); + var methodBody = convenienceMethod!.BodyStatements!.ToDisplayString(); + var expectedMethodBody = Helpers.GetExpectedFromFile(); + + Assert.AreEqual(expectedMethodBody, methodBody); + } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_DualFormatModel_JsonContentType_CallsToBinaryContentWithJ.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_DualFormatModel_JsonContentType_CallsToBinaryContentWithJ.cs new file mode 100644 index 00000000000..baeda794215 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_DualFormatModel_JsonContentType_CallsToBinaryContentWithJ.cs @@ -0,0 +1,4 @@ +global::Sample.Argument.AssertNotNull(body, nameof(body)); + +using global::System.ClientModel.BinaryContent content = body.ToBinaryContent("J"); +return this.UpdateModel(content, cancellationToken.ToRequestOptions()); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_DualFormatModel_XmlContentType_CallsToBinaryContentWithX.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_DualFormatModel_XmlContentType_CallsToBinaryContentWithX.cs new file mode 100644 index 00000000000..71551d82947 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_DualFormatModel_XmlContentType_CallsToBinaryContentWithX.cs @@ -0,0 +1,4 @@ +global::Sample.Argument.AssertNotNull(body, nameof(body)); + +using global::System.ClientModel.BinaryContent content = body.ToBinaryContent("X"); +return this.UpdateModel(content, cancellationToken.ToRequestOptions()); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_SingleFormatModel_UsesImplicitOperator.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_SingleFormatModel_UsesImplicitOperator.cs new file mode 100644 index 00000000000..efb6afcb9f1 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Providers/TestData/ScmMethodProviderCollectionTests/ConvenienceMethod_SingleFormatModel_UsesImplicitOperator.cs @@ -0,0 +1,3 @@ +global::Sample.Argument.AssertNotNull(body, nameof(body)); + +return this.UpdateModel(body, cancellationToken.ToRequestOptions()); diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Tree.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Tree.Serialization.cs index dbfad92ae54..63271333b38 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Tree.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Tree.Serialization.cs @@ -95,6 +95,14 @@ public static implicit operator BinaryContent(Tree tree) return BinaryContent.Create(tree, ModelSerializationExtensions.WireOptions); } + /// Converts the model to BinaryContent using the specified format. + /// The format to use for serialization. + internal BinaryContent ToBinaryContent(string format) + { + ModelReaderWriterOptions options = new ModelReaderWriterOptions(format); + return BinaryContent.Create(this, options); + } + /// The to deserialize the from. public static explicit operator Tree(ClientResult result) { diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.RestClient.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.RestClient.cs index d78f85e8ace..2e630d7c798 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.RestClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.RestClient.cs @@ -29,6 +29,18 @@ internal PipelineMessage CreateGetTreeRequest(RequestOptions options) return message; } + internal PipelineMessage CreateGetTreeAsJsonRequest(RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/plants/tree/as-plant/json", false); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + internal PipelineMessage CreateUpdateTreeRequest(BinaryContent content, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); @@ -42,5 +54,19 @@ internal PipelineMessage CreateUpdateTreeRequest(BinaryContent content, RequestO message.Apply(options); return message; } + + internal PipelineMessage CreateUpdateTreeAsJsonRequest(BinaryContent content, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/plants/tree/as-plant/json", false); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "PUT", PipelineMessageClassifier200); + PipelineRequest request = message.Request; + request.Headers.Set("Content-Type", "application/json"); + request.Headers.Set("Accept", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } } } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.cs index ae0fb734f9a..6db6d1ce51e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/PlantOperations.cs @@ -87,6 +87,58 @@ public virtual async Task> GetTreeAsync(CancellationToken can return ClientResult.FromValue((Tree)result, result.GetRawResponse()); } + /// + /// [Protocol Method] Get a tree as a plant + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual ClientResult GetTreeAsJson(RequestOptions options) + { + using PipelineMessage message = CreateGetTreeAsJsonRequest(options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + /// + /// [Protocol Method] Get a tree as a plant + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual async Task GetTreeAsJsonAsync(RequestOptions options) + { + using PipelineMessage message = CreateGetTreeAsJsonRequest(options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + /// Get a tree as a plant. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + public virtual ClientResult GetTreeAsJson(CancellationToken cancellationToken = default) + { + ClientResult result = GetTreeAsJson(cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((Tree)result, result.GetRawResponse()); + } + + /// Get a tree as a plant. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + public virtual async Task> GetTreeAsJsonAsync(CancellationToken cancellationToken = default) + { + ClientResult result = await GetTreeAsJsonAsync(cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue((Tree)result, result.GetRawResponse()); + } + /// /// [Protocol Method] Update a tree as a plant /// @@ -138,7 +190,8 @@ public virtual ClientResult UpdateTree(Tree tree, CancellationToken cancel { Argument.AssertNotNull(tree, nameof(tree)); - ClientResult result = UpdateTree(tree, cancellationToken.ToRequestOptions()); + using BinaryContent content = tree.ToBinaryContent("X"); + ClientResult result = UpdateTree(content, cancellationToken.ToRequestOptions()); return ClientResult.FromValue((Tree)result, result.GetRawResponse()); } @@ -151,7 +204,78 @@ public virtual async Task> UpdateTreeAsync(Tree tree, Cancell { Argument.AssertNotNull(tree, nameof(tree)); - ClientResult result = await UpdateTreeAsync(tree, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + using BinaryContent content = tree.ToBinaryContent("X"); + ClientResult result = await UpdateTreeAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue((Tree)result, result.GetRawResponse()); + } + + /// + /// [Protocol Method] Update a tree as a plant + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The content to send as the body of the request. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual ClientResult UpdateTreeAsJson(BinaryContent content, RequestOptions options = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateUpdateTreeAsJsonRequest(content, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + /// + /// [Protocol Method] Update a tree as a plant + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The content to send as the body of the request. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual async Task UpdateTreeAsJsonAsync(BinaryContent content, RequestOptions options = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateUpdateTreeAsJsonRequest(content, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + /// Update a tree as a plant. + /// + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// Service returned a non-success status code. + public virtual ClientResult UpdateTreeAsJson(Tree tree, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tree, nameof(tree)); + + using BinaryContent content = tree.ToBinaryContent("J"); + ClientResult result = UpdateTreeAsJson(content, cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((Tree)result, result.GetRawResponse()); + } + + /// Update a tree as a plant. + /// + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// Service returned a non-success status code. + public virtual async Task> UpdateTreeAsJsonAsync(Tree tree, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tree, nameof(tree)); + + using BinaryContent content = tree.ToBinaryContent("J"); + ClientResult result = await UpdateTreeAsJsonAsync(content, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue((Tree)result, result.GetRawResponse()); } } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/tspCodeModel.json b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/tspCodeModel.json index 55c184d8933..12681c77a41 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/tspCodeModel.json +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/tspCodeModel.json @@ -1935,7 +1935,7 @@ { "$id": "212", "kind": "constant", - "name": "GetXmlAdvancedModelResponseContentType5", + "name": "getTreeAsJsonContentType", "namespace": "", "usage": "None", "valueType": { @@ -1945,13 +1945,13 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/xml", + "value": "application/json", "decorators": [] }, { "$id": "214", "kind": "constant", - "name": "GetXmlAdvancedModelResponseContentType6", + "name": "GetTreeAsJsonResponseContentType", "namespace": "", "usage": "None", "valueType": { @@ -1961,13 +1961,13 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "application/xml", + "value": "application/json", "decorators": [] }, { "$id": "216", "kind": "constant", - "name": "updateTreeContentType", + "name": "GetXmlAdvancedModelResponseContentType5", "namespace": "", "usage": "None", "valueType": { @@ -1983,7 +1983,7 @@ { "$id": "218", "kind": "constant", - "name": "GetXmlAdvancedModelResponseContentType7", + "name": "GetXmlAdvancedModelResponseContentType6", "namespace": "", "usage": "None", "valueType": { @@ -1999,7 +1999,7 @@ { "$id": "220", "kind": "constant", - "name": "getWidgetMetricsContentType", + "name": "updateTreeContentType", "namespace": "", "usage": "None", "valueType": { @@ -2009,13 +2009,109 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "222", + "kind": "constant", + "name": "GetXmlAdvancedModelResponseContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/xml", + "decorators": [] + }, + { + "$id": "224", + "kind": "constant", + "name": "GetTreeAsJsonResponseContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "226", + "kind": "constant", + "name": "GetTreeAsJsonResponseContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "228", + "kind": "constant", + "name": "updateTreeAsJsonContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "230", + "kind": "constant", + "name": "GetTreeAsJsonResponseContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "231", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "232", + "kind": "constant", + "name": "getWidgetMetricsContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "233", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, "value": "application/json", "decorators": [] } ], "models": [ { - "$id": "222", + "$id": "234", "kind": "model", "name": "Thing", "namespace": "SampleTypeSpec", @@ -2030,13 +2126,13 @@ }, "properties": [ { - "$id": "223", + "$id": "235", "kind": "property", "name": "name", "serializedName": "name", "doc": "name of the Thing", "type": { - "$id": "224", + "$id": "236", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2056,29 +2152,29 @@ "isHttpMetadata": false }, { - "$id": "225", + "$id": "237", "kind": "property", "name": "requiredUnion", "serializedName": "requiredUnion", "doc": "required Union", "type": { - "$id": "226", + "$id": "238", "kind": "union", "name": "ThingRequiredUnion", "variantTypes": [ { - "$id": "227", + "$id": "239", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "228", + "$id": "240", "kind": "array", "name": "Array", "valueType": { - "$id": "229", + "$id": "241", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2088,7 +2184,7 @@ "decorators": [] }, { - "$id": "230", + "$id": "242", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -2112,7 +2208,7 @@ "isHttpMetadata": false }, { - "$id": "231", + "$id": "243", "kind": "property", "name": "requiredLiteralString", "serializedName": "requiredLiteralString", @@ -2134,16 +2230,16 @@ "isHttpMetadata": false }, { - "$id": "232", + "$id": "244", "kind": "property", "name": "requiredNullableString", "serializedName": "requiredNullableString", "doc": "required nullable string", "type": { - "$id": "233", + "$id": "245", "kind": "nullable", "type": { - "$id": "234", + "$id": "246", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2165,16 +2261,16 @@ "isHttpMetadata": false }, { - "$id": "235", + "$id": "247", "kind": "property", "name": "optionalNullableString", "serializedName": "optionalNullableString", "doc": "required optional string", "type": { - "$id": "236", + "$id": "248", "kind": "nullable", "type": { - "$id": "237", + "$id": "249", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2196,7 +2292,7 @@ "isHttpMetadata": false }, { - "$id": "238", + "$id": "250", "kind": "property", "name": "requiredLiteralInt", "serializedName": "requiredLiteralInt", @@ -2218,7 +2314,7 @@ "isHttpMetadata": false }, { - "$id": "239", + "$id": "251", "kind": "property", "name": "requiredLiteralFloat", "serializedName": "requiredLiteralFloat", @@ -2240,7 +2336,7 @@ "isHttpMetadata": false }, { - "$id": "240", + "$id": "252", "kind": "property", "name": "requiredLiteralBool", "serializedName": "requiredLiteralBool", @@ -2262,7 +2358,7 @@ "isHttpMetadata": false }, { - "$id": "241", + "$id": "253", "kind": "property", "name": "optionalLiteralString", "serializedName": "optionalLiteralString", @@ -2284,13 +2380,13 @@ "isHttpMetadata": false }, { - "$id": "242", + "$id": "254", "kind": "property", "name": "requiredNullableLiteralString", "serializedName": "requiredNullableLiteralString", "doc": "required nullable literal string", "type": { - "$id": "243", + "$id": "255", "kind": "nullable", "type": { "$ref": "5" @@ -2311,7 +2407,7 @@ "isHttpMetadata": false }, { - "$id": "244", + "$id": "256", "kind": "property", "name": "optionalLiteralInt", "serializedName": "optionalLiteralInt", @@ -2333,7 +2429,7 @@ "isHttpMetadata": false }, { - "$id": "245", + "$id": "257", "kind": "property", "name": "optionalLiteralFloat", "serializedName": "optionalLiteralFloat", @@ -2355,7 +2451,7 @@ "isHttpMetadata": false }, { - "$id": "246", + "$id": "258", "kind": "property", "name": "optionalLiteralBool", "serializedName": "optionalLiteralBool", @@ -2377,13 +2473,13 @@ "isHttpMetadata": false }, { - "$id": "247", + "$id": "259", "kind": "property", "name": "requiredBadDescription", "serializedName": "requiredBadDescription", "doc": "description with xml <|endoftext|>", "type": { - "$id": "248", + "$id": "260", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2403,20 +2499,20 @@ "isHttpMetadata": false }, { - "$id": "249", + "$id": "261", "kind": "property", "name": "optionalNullableList", "serializedName": "optionalNullableList", "doc": "optional nullable collection", "type": { - "$id": "250", + "$id": "262", "kind": "nullable", "type": { - "$id": "251", + "$id": "263", "kind": "array", "name": "Array1", "valueType": { - "$id": "252", + "$id": "264", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -2441,16 +2537,16 @@ "isHttpMetadata": false }, { - "$id": "253", + "$id": "265", "kind": "property", "name": "requiredNullableList", "serializedName": "requiredNullableList", "doc": "required nullable collection", "type": { - "$id": "254", + "$id": "266", "kind": "nullable", "type": { - "$ref": "251" + "$ref": "263" }, "namespace": "SampleTypeSpec" }, @@ -2468,13 +2564,13 @@ "isHttpMetadata": false }, { - "$id": "255", + "$id": "267", "kind": "property", "name": "propertyWithSpecialDocs", "serializedName": "propertyWithSpecialDocs", "doc": "This tests:\n- Simple bullet point. This bullet point is going to be very long to test how text wrapping is handled in bullet points within documentation comments. It should properly indent the wrapped lines.\n- Another bullet point with **bold text**. This bullet point is also intentionally long to see how the formatting is preserved when the text wraps onto multiple lines in the generated documentation.\n- Third bullet point with *italic text*. Similar to the previous points, this one is extended to ensure that the wrapping and formatting are correctly applied in the output.\n- Complex bullet point with **bold** and *italic* combined. This bullet point combines both bold and italic formatting and is long enough to test the wrapping behavior in such cases.\n- **Bold bullet point**: A bullet point that is entirely bolded. This point is also made lengthy to observe how the bold formatting is maintained across wrapped lines.\n- *Italic bullet point*: A bullet point that is entirely italicized. This final point is extended to verify that italic formatting is correctly applied even when the text spans multiple lines.", "type": { - "$id": "256", + "$id": "268", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2496,7 +2592,7 @@ ] }, { - "$id": "257", + "$id": "269", "kind": "model", "name": "RoundTripModel", "namespace": "SampleTypeSpec", @@ -2511,13 +2607,13 @@ }, "properties": [ { - "$id": "258", + "$id": "270", "kind": "property", "name": "requiredString", "serializedName": "requiredString", "doc": "Required string, illustrating a reference type property.", "type": { - "$id": "259", + "$id": "271", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2537,13 +2633,13 @@ "isHttpMetadata": false }, { - "$id": "260", + "$id": "272", "kind": "property", "name": "requiredInt", "serializedName": "requiredInt", "doc": "Required int, illustrating a value type property.", "type": { - "$id": "261", + "$id": "273", "kind": "int32", "name": "int32", "encode": "string", @@ -2564,13 +2660,13 @@ "isHttpMetadata": false }, { - "$id": "262", + "$id": "274", "kind": "property", "name": "requiredCollection", "serializedName": "requiredCollection", "doc": "Required collection of enums", "type": { - "$id": "263", + "$id": "275", "kind": "array", "name": "ArrayStringFixedEnum", "valueType": { @@ -2593,16 +2689,16 @@ "isHttpMetadata": false }, { - "$id": "264", + "$id": "276", "kind": "property", "name": "requiredDictionary", "serializedName": "requiredDictionary", "doc": "Required dictionary of enums", "type": { - "$id": "265", + "$id": "277", "kind": "dict", "keyType": { - "$id": "266", + "$id": "278", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2627,13 +2723,13 @@ "isHttpMetadata": false }, { - "$id": "267", + "$id": "279", "kind": "property", "name": "requiredModel", "serializedName": "requiredModel", "doc": "Required model", "type": { - "$ref": "222" + "$ref": "234" }, "optional": false, "readOnly": false, @@ -2649,7 +2745,7 @@ "isHttpMetadata": false }, { - "$id": "268", + "$id": "280", "kind": "property", "name": "intExtensibleEnum", "serializedName": "intExtensibleEnum", @@ -2671,13 +2767,13 @@ "isHttpMetadata": false }, { - "$id": "269", + "$id": "281", "kind": "property", "name": "intExtensibleEnumCollection", "serializedName": "intExtensibleEnumCollection", "doc": "this is a collection of int based extensible enum", "type": { - "$id": "270", + "$id": "282", "kind": "array", "name": "ArrayIntExtensibleEnum", "valueType": { @@ -2700,7 +2796,7 @@ "isHttpMetadata": false }, { - "$id": "271", + "$id": "283", "kind": "property", "name": "floatExtensibleEnum", "serializedName": "floatExtensibleEnum", @@ -2722,7 +2818,7 @@ "isHttpMetadata": false }, { - "$id": "272", + "$id": "284", "kind": "property", "name": "floatExtensibleEnumWithIntValue", "serializedName": "floatExtensibleEnumWithIntValue", @@ -2744,13 +2840,13 @@ "isHttpMetadata": false }, { - "$id": "273", + "$id": "285", "kind": "property", "name": "floatExtensibleEnumCollection", "serializedName": "floatExtensibleEnumCollection", "doc": "this is a collection of float based extensible enum", "type": { - "$id": "274", + "$id": "286", "kind": "array", "name": "ArrayFloatExtensibleEnum", "valueType": { @@ -2773,7 +2869,7 @@ "isHttpMetadata": false }, { - "$id": "275", + "$id": "287", "kind": "property", "name": "floatFixedEnum", "serializedName": "floatFixedEnum", @@ -2795,7 +2891,7 @@ "isHttpMetadata": false }, { - "$id": "276", + "$id": "288", "kind": "property", "name": "floatFixedEnumWithIntValue", "serializedName": "floatFixedEnumWithIntValue", @@ -2817,13 +2913,13 @@ "isHttpMetadata": false }, { - "$id": "277", + "$id": "289", "kind": "property", "name": "floatFixedEnumCollection", "serializedName": "floatFixedEnumCollection", "doc": "this is a collection of float based fixed enum", "type": { - "$id": "278", + "$id": "290", "kind": "array", "name": "ArrayFloatFixedEnum", "valueType": { @@ -2846,7 +2942,7 @@ "isHttpMetadata": false }, { - "$id": "279", + "$id": "291", "kind": "property", "name": "intFixedEnum", "serializedName": "intFixedEnum", @@ -2868,13 +2964,13 @@ "isHttpMetadata": false }, { - "$id": "280", + "$id": "292", "kind": "property", "name": "intFixedEnumCollection", "serializedName": "intFixedEnumCollection", "doc": "this is a collection of int based fixed enum", "type": { - "$id": "281", + "$id": "293", "kind": "array", "name": "ArrayIntFixedEnum", "valueType": { @@ -2897,7 +2993,7 @@ "isHttpMetadata": false }, { - "$id": "282", + "$id": "294", "kind": "property", "name": "stringFixedEnum", "serializedName": "stringFixedEnum", @@ -2919,13 +3015,13 @@ "isHttpMetadata": false }, { - "$id": "283", + "$id": "295", "kind": "property", "name": "requiredUnknown", "serializedName": "requiredUnknown", "doc": "required unknown", "type": { - "$id": "284", + "$id": "296", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2945,13 +3041,13 @@ "isHttpMetadata": false }, { - "$id": "285", + "$id": "297", "kind": "property", "name": "optionalUnknown", "serializedName": "optionalUnknown", "doc": "optional unknown", "type": { - "$id": "286", + "$id": "298", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2971,23 +3067,23 @@ "isHttpMetadata": false }, { - "$id": "287", + "$id": "299", "kind": "property", "name": "requiredRecordUnknown", "serializedName": "requiredRecordUnknown", "doc": "required record of unknown", "type": { - "$id": "288", + "$id": "300", "kind": "dict", "keyType": { - "$id": "289", + "$id": "301", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "290", + "$id": "302", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -3009,13 +3105,13 @@ "isHttpMetadata": false }, { - "$id": "291", + "$id": "303", "kind": "property", "name": "optionalRecordUnknown", "serializedName": "optionalRecordUnknown", "doc": "optional record of unknown", "type": { - "$ref": "288" + "$ref": "300" }, "optional": true, "readOnly": false, @@ -3031,13 +3127,13 @@ "isHttpMetadata": false }, { - "$id": "292", + "$id": "304", "kind": "property", "name": "readOnlyRequiredRecordUnknown", "serializedName": "readOnlyRequiredRecordUnknown", "doc": "required readonly record of unknown", "type": { - "$ref": "288" + "$ref": "300" }, "optional": false, "readOnly": true, @@ -3053,13 +3149,13 @@ "isHttpMetadata": false }, { - "$id": "293", + "$id": "305", "kind": "property", "name": "readOnlyOptionalRecordUnknown", "serializedName": "readOnlyOptionalRecordUnknown", "doc": "optional readonly record of unknown", "type": { - "$ref": "288" + "$ref": "300" }, "optional": true, "readOnly": true, @@ -3075,13 +3171,13 @@ "isHttpMetadata": false }, { - "$id": "294", + "$id": "306", "kind": "property", "name": "modelWithRequiredNullable", "serializedName": "modelWithRequiredNullable", "doc": "this is a model with required nullable properties", "type": { - "$id": "295", + "$id": "307", "kind": "model", "name": "ModelWithRequiredNullableProperties", "namespace": "SampleTypeSpec", @@ -3096,16 +3192,16 @@ }, "properties": [ { - "$id": "296", + "$id": "308", "kind": "property", "name": "requiredNullablePrimitive", "serializedName": "requiredNullablePrimitive", "doc": "required nullable primitive type", "type": { - "$id": "297", + "$id": "309", "kind": "nullable", "type": { - "$id": "298", + "$id": "310", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -3127,13 +3223,13 @@ "isHttpMetadata": false }, { - "$id": "299", + "$id": "311", "kind": "property", "name": "requiredExtensibleEnum", "serializedName": "requiredExtensibleEnum", "doc": "required nullable extensible enum type", "type": { - "$id": "300", + "$id": "312", "kind": "nullable", "type": { "$ref": "22" @@ -3154,13 +3250,13 @@ "isHttpMetadata": false }, { - "$id": "301", + "$id": "313", "kind": "property", "name": "requiredFixedEnum", "serializedName": "requiredFixedEnum", "doc": "required nullable fixed enum type", "type": { - "$id": "302", + "$id": "314", "kind": "nullable", "type": { "$ref": "17" @@ -3196,13 +3292,13 @@ "isHttpMetadata": false }, { - "$id": "303", + "$id": "315", "kind": "property", "name": "requiredBytes", "serializedName": "requiredBytes", "doc": "Required bytes", "type": { - "$id": "304", + "$id": "316", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -3225,10 +3321,10 @@ ] }, { - "$ref": "295" + "$ref": "307" }, { - "$id": "305", + "$id": "317", "kind": "model", "name": "Wrapper", "namespace": "SampleTypeSpec", @@ -3238,12 +3334,12 @@ "serializationOptions": {}, "properties": [ { - "$id": "306", + "$id": "318", "kind": "property", "name": "p1", "doc": "header parameter", "type": { - "$id": "307", + "$id": "319", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3259,12 +3355,12 @@ "isHttpMetadata": true }, { - "$id": "308", + "$id": "320", "kind": "property", "name": "action", "doc": "body parameter", "type": { - "$ref": "257" + "$ref": "269" }, "optional": false, "readOnly": false, @@ -3276,12 +3372,12 @@ "isHttpMetadata": false }, { - "$id": "309", + "$id": "321", "kind": "property", "name": "p2", "doc": "path parameter", "type": { - "$id": "310", + "$id": "322", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3299,7 +3395,7 @@ ] }, { - "$id": "311", + "$id": "323", "kind": "model", "name": "Friend", "namespace": "SampleTypeSpec", @@ -3314,13 +3410,13 @@ }, "properties": [ { - "$id": "312", + "$id": "324", "kind": "property", "name": "name", "serializedName": "name", "doc": "name of the NotFriend", "type": { - "$id": "313", + "$id": "325", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3342,7 +3438,7 @@ ] }, { - "$id": "314", + "$id": "326", "kind": "model", "name": "RenamedModel", "namespace": "SampleTypeSpec", @@ -3357,13 +3453,13 @@ }, "properties": [ { - "$id": "315", + "$id": "327", "kind": "property", "name": "otherName", "serializedName": "otherName", "doc": "name of the ModelWithClientName", "type": { - "$id": "316", + "$id": "328", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3385,7 +3481,7 @@ ] }, { - "$id": "317", + "$id": "329", "kind": "model", "name": "ReturnsAnonymousModelResponse", "namespace": "SampleTypeSpec", @@ -3400,7 +3496,7 @@ "properties": [] }, { - "$id": "318", + "$id": "330", "kind": "model", "name": "ListWithNextLinkResponse", "namespace": "SampleTypeSpec", @@ -3414,16 +3510,16 @@ }, "properties": [ { - "$id": "319", + "$id": "331", "kind": "property", "name": "things", "serializedName": "things", "type": { - "$id": "320", + "$id": "332", "kind": "array", "name": "ArrayThing", "valueType": { - "$ref": "222" + "$ref": "234" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -3442,12 +3538,12 @@ "isHttpMetadata": false }, { - "$id": "321", + "$id": "333", "kind": "property", "name": "next", "serializedName": "next", "type": { - "$id": "322", + "$id": "334", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -3469,7 +3565,7 @@ ] }, { - "$id": "323", + "$id": "335", "kind": "model", "name": "ListWithStringNextLinkResponse", "namespace": "SampleTypeSpec", @@ -3483,12 +3579,12 @@ }, "properties": [ { - "$id": "324", + "$id": "336", "kind": "property", "name": "things", "serializedName": "things", "type": { - "$ref": "320" + "$ref": "332" }, "optional": false, "readOnly": false, @@ -3504,12 +3600,12 @@ "isHttpMetadata": false }, { - "$id": "325", + "$id": "337", "kind": "property", "name": "next", "serializedName": "next", "type": { - "$id": "326", + "$id": "338", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3531,7 +3627,7 @@ ] }, { - "$id": "327", + "$id": "339", "kind": "model", "name": "ListWithContinuationTokenResponse", "namespace": "SampleTypeSpec", @@ -3545,12 +3641,12 @@ }, "properties": [ { - "$id": "328", + "$id": "340", "kind": "property", "name": "things", "serializedName": "things", "type": { - "$ref": "320" + "$ref": "332" }, "optional": false, "readOnly": false, @@ -3566,12 +3662,12 @@ "isHttpMetadata": false }, { - "$id": "329", + "$id": "341", "kind": "property", "name": "nextToken", "serializedName": "nextToken", "type": { - "$id": "330", + "$id": "342", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3593,7 +3689,7 @@ ] }, { - "$id": "331", + "$id": "343", "kind": "model", "name": "ListWithContinuationTokenHeaderResponseResponse", "namespace": "", @@ -3607,12 +3703,12 @@ }, "properties": [ { - "$id": "332", + "$id": "344", "kind": "property", "name": "things", "serializedName": "things", "type": { - "$ref": "320" + "$ref": "332" }, "optional": false, "readOnly": false, @@ -3630,7 +3726,7 @@ ] }, { - "$id": "333", + "$id": "345", "kind": "model", "name": "PageThing", "namespace": "SampleTypeSpec", @@ -3644,12 +3740,12 @@ }, "properties": [ { - "$id": "334", + "$id": "346", "kind": "property", "name": "items", "serializedName": "items", "type": { - "$ref": "320" + "$ref": "332" }, "optional": false, "readOnly": false, @@ -3667,7 +3763,7 @@ ] }, { - "$id": "335", + "$id": "347", "kind": "model", "name": "ModelWithEmbeddedNonBodyParameters", "namespace": "SampleTypeSpec", @@ -3681,13 +3777,13 @@ }, "properties": [ { - "$id": "336", + "$id": "348", "kind": "property", "name": "name", "serializedName": "name", "doc": "name of the ModelWithEmbeddedNonBodyParameters", "type": { - "$id": "337", + "$id": "349", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3707,13 +3803,13 @@ "isHttpMetadata": false }, { - "$id": "338", + "$id": "350", "kind": "property", "name": "requiredHeader", "serializedName": "requiredHeader", "doc": "required header parameter", "type": { - "$id": "339", + "$id": "351", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3733,13 +3829,13 @@ "isHttpMetadata": true }, { - "$id": "340", + "$id": "352", "kind": "property", "name": "optionalHeader", "serializedName": "optionalHeader", "doc": "optional header parameter", "type": { - "$id": "341", + "$id": "353", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3759,13 +3855,13 @@ "isHttpMetadata": true }, { - "$id": "342", + "$id": "354", "kind": "property", "name": "requiredQuery", "serializedName": "requiredQuery", "doc": "required query parameter", "type": { - "$id": "343", + "$id": "355", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3785,13 +3881,13 @@ "isHttpMetadata": true }, { - "$id": "344", + "$id": "356", "kind": "property", "name": "optionalQuery", "serializedName": "optionalQuery", "doc": "optional query parameter", "type": { - "$id": "345", + "$id": "357", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3813,7 +3909,7 @@ ] }, { - "$id": "346", + "$id": "358", "kind": "model", "name": "DynamicModel", "namespace": "SampleTypeSpec", @@ -3833,12 +3929,12 @@ }, "properties": [ { - "$id": "347", + "$id": "359", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "348", + "$id": "360", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3858,12 +3954,12 @@ "isHttpMetadata": false }, { - "$id": "349", + "$id": "361", "kind": "property", "name": "optionalUnknown", "serializedName": "optionalUnknown", "type": { - "$id": "350", + "$id": "362", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -3883,12 +3979,12 @@ "isHttpMetadata": false }, { - "$id": "351", + "$id": "363", "kind": "property", "name": "optionalInt", "serializedName": "optionalInt", "type": { - "$id": "352", + "$id": "364", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -3908,15 +4004,15 @@ "isHttpMetadata": false }, { - "$id": "353", + "$id": "365", "kind": "property", "name": "optionalNullableList", "serializedName": "optionalNullableList", "type": { - "$id": "354", + "$id": "366", "kind": "nullable", "type": { - "$ref": "251" + "$ref": "263" }, "namespace": "SampleTypeSpec" }, @@ -3934,15 +4030,15 @@ "isHttpMetadata": false }, { - "$id": "355", + "$id": "367", "kind": "property", "name": "requiredNullableList", "serializedName": "requiredNullableList", "type": { - "$id": "356", + "$id": "368", "kind": "nullable", "type": { - "$ref": "251" + "$ref": "263" }, "namespace": "SampleTypeSpec" }, @@ -3960,25 +4056,25 @@ "isHttpMetadata": false }, { - "$id": "357", + "$id": "369", "kind": "property", "name": "optionalNullableDictionary", "serializedName": "optionalNullableDictionary", "type": { - "$id": "358", + "$id": "370", "kind": "nullable", "type": { - "$id": "359", + "$id": "371", "kind": "dict", "keyType": { - "$id": "360", + "$id": "372", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "361", + "$id": "373", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -4002,15 +4098,15 @@ "isHttpMetadata": false }, { - "$id": "362", + "$id": "374", "kind": "property", "name": "requiredNullableDictionary", "serializedName": "requiredNullableDictionary", "type": { - "$id": "363", + "$id": "375", "kind": "nullable", "type": { - "$ref": "359" + "$ref": "371" }, "namespace": "SampleTypeSpec" }, @@ -4028,12 +4124,12 @@ "isHttpMetadata": false }, { - "$id": "364", + "$id": "376", "kind": "property", "name": "primitiveDictionary", "serializedName": "primitiveDictionary", "type": { - "$ref": "359" + "$ref": "371" }, "optional": false, "readOnly": false, @@ -4049,12 +4145,12 @@ "isHttpMetadata": false }, { - "$id": "365", + "$id": "377", "kind": "property", "name": "foo", "serializedName": "foo", "type": { - "$id": "366", + "$id": "378", "kind": "model", "name": "AnotherDynamicModel", "namespace": "SampleTypeSpec", @@ -4074,12 +4170,12 @@ }, "properties": [ { - "$id": "367", + "$id": "379", "kind": "property", "name": "bar", "serializedName": "bar", "type": { - "$id": "368", + "$id": "380", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4114,16 +4210,16 @@ "isHttpMetadata": false }, { - "$id": "369", + "$id": "381", "kind": "property", "name": "listFoo", "serializedName": "listFoo", "type": { - "$id": "370", + "$id": "382", "kind": "array", "name": "ArrayAnotherDynamicModel", "valueType": { - "$ref": "366" + "$ref": "378" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -4142,16 +4238,16 @@ "isHttpMetadata": false }, { - "$id": "371", + "$id": "383", "kind": "property", "name": "listOfListFoo", "serializedName": "listOfListFoo", "type": { - "$id": "372", + "$id": "384", "kind": "array", "name": "ArrayArray", "valueType": { - "$ref": "370" + "$ref": "382" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -4170,22 +4266,22 @@ "isHttpMetadata": false }, { - "$id": "373", + "$id": "385", "kind": "property", "name": "dictionaryFoo", "serializedName": "dictionaryFoo", "type": { - "$id": "374", + "$id": "386", "kind": "dict", "keyType": { - "$id": "375", + "$id": "387", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "366" + "$ref": "378" }, "decorators": [] }, @@ -4203,22 +4299,22 @@ "isHttpMetadata": false }, { - "$id": "376", + "$id": "388", "kind": "property", "name": "dictionaryOfDictionaryFoo", "serializedName": "dictionaryOfDictionaryFoo", "type": { - "$id": "377", + "$id": "389", "kind": "dict", "keyType": { - "$id": "378", + "$id": "390", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "374" + "$ref": "386" }, "decorators": [] }, @@ -4236,22 +4332,22 @@ "isHttpMetadata": false }, { - "$id": "379", + "$id": "391", "kind": "property", "name": "dictionaryListFoo", "serializedName": "dictionaryListFoo", "type": { - "$id": "380", + "$id": "392", "kind": "dict", "keyType": { - "$id": "381", + "$id": "393", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "370" + "$ref": "382" }, "decorators": [] }, @@ -4269,16 +4365,16 @@ "isHttpMetadata": false }, { - "$id": "382", + "$id": "394", "kind": "property", "name": "listOfDictionaryFoo", "serializedName": "listOfDictionaryFoo", "type": { - "$id": "383", + "$id": "395", "kind": "array", "name": "ArrayRecord", "valueType": { - "$ref": "374" + "$ref": "386" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -4299,10 +4395,10 @@ ] }, { - "$ref": "366" + "$ref": "378" }, { - "$id": "384", + "$id": "396", "kind": "model", "name": "XmlAdvancedModel", "namespace": "SampleTypeSpec", @@ -4326,13 +4422,13 @@ }, "properties": [ { - "$id": "385", + "$id": "397", "kind": "property", "name": "name", "serializedName": "name", "doc": "A simple string property", "type": { - "$id": "386", + "$id": "398", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4354,13 +4450,13 @@ "isHttpMetadata": false }, { - "$id": "387", + "$id": "399", "kind": "property", "name": "age", "serializedName": "age", "doc": "An integer property", "type": { - "$id": "388", + "$id": "400", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -4382,13 +4478,13 @@ "isHttpMetadata": false }, { - "$id": "389", + "$id": "401", "kind": "property", "name": "enabled", "serializedName": "enabled", "doc": "A boolean property", "type": { - "$id": "390", + "$id": "402", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -4410,13 +4506,13 @@ "isHttpMetadata": false }, { - "$id": "391", + "$id": "403", "kind": "property", "name": "score", "serializedName": "score", "doc": "A float property", "type": { - "$id": "392", + "$id": "404", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -4438,13 +4534,13 @@ "isHttpMetadata": false }, { - "$id": "393", + "$id": "405", "kind": "property", "name": "optionalString", "serializedName": "optionalString", "doc": "An optional string", "type": { - "$id": "394", + "$id": "406", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4466,13 +4562,13 @@ "isHttpMetadata": false }, { - "$id": "395", + "$id": "407", "kind": "property", "name": "optionalInt", "serializedName": "optionalInt", "doc": "An optional integer", "type": { - "$id": "396", + "$id": "408", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -4494,16 +4590,16 @@ "isHttpMetadata": false }, { - "$id": "397", + "$id": "409", "kind": "property", "name": "nullableString", "serializedName": "nullableString", "doc": "A nullable string", "type": { - "$id": "398", + "$id": "410", "kind": "nullable", "type": { - "$id": "399", + "$id": "411", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4527,13 +4623,13 @@ "isHttpMetadata": false }, { - "$id": "400", + "$id": "412", "kind": "property", "name": "id", "serializedName": "id", "doc": "A string as XML attribute", "type": { - "$id": "401", + "$id": "413", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4560,13 +4656,13 @@ "isHttpMetadata": false }, { - "$id": "402", + "$id": "414", "kind": "property", "name": "version", "serializedName": "version", "doc": "An integer as XML attribute", "type": { - "$id": "403", + "$id": "415", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -4593,13 +4689,13 @@ "isHttpMetadata": false }, { - "$id": "404", + "$id": "416", "kind": "property", "name": "isActive", "serializedName": "isActive", "doc": "A boolean as XML attribute", "type": { - "$id": "405", + "$id": "417", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -4626,13 +4722,13 @@ "isHttpMetadata": false }, { - "$id": "406", + "$id": "418", "kind": "property", "name": "originalName", "serializedName": "RenamedProperty", "doc": "A property with a custom XML element name", "type": { - "$id": "407", + "$id": "419", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4661,13 +4757,13 @@ "isHttpMetadata": false }, { - "$id": "408", + "$id": "420", "kind": "property", "name": "xmlIdentifier", "serializedName": "xml-id", "doc": "An attribute with a custom XML name", "type": { - "$id": "409", + "$id": "421", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4700,13 +4796,13 @@ "isHttpMetadata": false }, { - "$id": "410", + "$id": "422", "kind": "property", "name": "content", "serializedName": "content", "doc": "Text content in the element (unwrapped string)", "type": { - "$id": "411", + "$id": "423", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4733,13 +4829,13 @@ "isHttpMetadata": false }, { - "$id": "412", + "$id": "424", "kind": "property", "name": "unwrappedStrings", "serializedName": "unwrappedStrings", "doc": "An unwrapped array of strings - items appear directly without wrapper", "type": { - "$ref": "228" + "$ref": "240" }, "optional": false, "readOnly": false, @@ -4763,13 +4859,13 @@ "isHttpMetadata": false }, { - "$id": "413", + "$id": "425", "kind": "property", "name": "unwrappedCounts", "serializedName": "unwrappedCounts", "doc": "An unwrapped array of integers", "type": { - "$ref": "251" + "$ref": "263" }, "optional": false, "readOnly": false, @@ -4793,17 +4889,17 @@ "isHttpMetadata": false }, { - "$id": "414", + "$id": "426", "kind": "property", "name": "unwrappedItems", "serializedName": "unwrappedItems", "doc": "An unwrapped array of models", "type": { - "$id": "415", + "$id": "427", "kind": "array", "name": "ArrayXmlItem", "valueType": { - "$id": "416", + "$id": "428", "kind": "model", "name": "XmlItem", "namespace": "SampleTypeSpec", @@ -4827,13 +4923,13 @@ }, "properties": [ { - "$id": "417", + "$id": "429", "kind": "property", "name": "itemName", "serializedName": "itemName", "doc": "The item name", "type": { - "$id": "418", + "$id": "430", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4855,13 +4951,13 @@ "isHttpMetadata": false }, { - "$id": "419", + "$id": "431", "kind": "property", "name": "itemValue", "serializedName": "itemValue", "doc": "The item value", "type": { - "$id": "420", + "$id": "432", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -4883,13 +4979,13 @@ "isHttpMetadata": false }, { - "$id": "421", + "$id": "433", "kind": "property", "name": "itemId", "serializedName": "itemId", "doc": "Item ID as attribute", "type": { - "$id": "422", + "$id": "434", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4942,13 +5038,13 @@ "isHttpMetadata": false }, { - "$id": "423", + "$id": "435", "kind": "property", "name": "wrappedColors", "serializedName": "wrappedColors", "doc": "A wrapped array of strings (default)", "type": { - "$ref": "228" + "$ref": "240" }, "optional": false, "readOnly": false, @@ -4967,13 +5063,13 @@ "isHttpMetadata": false }, { - "$id": "424", + "$id": "436", "kind": "property", "name": "items", "serializedName": "ItemCollection", "doc": "A wrapped array with custom wrapper name", "type": { - "$ref": "415" + "$ref": "427" }, "optional": false, "readOnly": false, @@ -4999,13 +5095,13 @@ "isHttpMetadata": false }, { - "$id": "425", + "$id": "437", "kind": "property", "name": "nestedModel", "serializedName": "nestedModel", "doc": "A nested model property", "type": { - "$id": "426", + "$id": "438", "kind": "model", "name": "XmlNestedModel", "namespace": "SampleTypeSpec", @@ -5022,13 +5118,13 @@ }, "properties": [ { - "$id": "427", + "$id": "439", "kind": "property", "name": "value", "serializedName": "value", "doc": "The value of the nested model", "type": { - "$id": "428", + "$id": "440", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5050,13 +5146,13 @@ "isHttpMetadata": false }, { - "$id": "429", + "$id": "441", "kind": "property", "name": "nestedId", "serializedName": "nestedId", "doc": "An attribute on the nested model", "type": { - "$id": "430", + "$id": "442", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -5100,13 +5196,13 @@ "isHttpMetadata": false }, { - "$id": "431", + "$id": "443", "kind": "property", "name": "optionalNestedModel", "serializedName": "optionalNestedModel", "doc": "An optional nested model", "type": { - "$ref": "426" + "$ref": "438" }, "optional": true, "readOnly": false, @@ -5124,23 +5220,23 @@ "isHttpMetadata": false }, { - "$id": "432", + "$id": "444", "kind": "property", "name": "metadata", "serializedName": "metadata", "doc": "A dictionary property", "type": { - "$id": "433", + "$id": "445", "kind": "dict", "keyType": { - "$id": "434", + "$id": "446", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "435", + "$id": "447", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5164,18 +5260,18 @@ "isHttpMetadata": false }, { - "$id": "436", + "$id": "448", "kind": "property", "name": "createdAt", "serializedName": "createdAt", "doc": "A date-time property", "type": { - "$id": "437", + "$id": "449", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "438", + "$id": "450", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5200,18 +5296,18 @@ "isHttpMetadata": false }, { - "$id": "439", + "$id": "451", "kind": "property", "name": "duration", "serializedName": "duration", "doc": "A duration property", "type": { - "$id": "440", + "$id": "452", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "441", + "$id": "453", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5236,13 +5332,13 @@ "isHttpMetadata": false }, { - "$id": "442", + "$id": "454", "kind": "property", "name": "data", "serializedName": "data", "doc": "A bytes property", "type": { - "$id": "443", + "$id": "455", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -5265,13 +5361,13 @@ "isHttpMetadata": false }, { - "$id": "444", + "$id": "456", "kind": "property", "name": "optionalRecordUnknown", "serializedName": "optionalRecordUnknown", "doc": "optional record of unknown", "type": { - "$ref": "288" + "$ref": "300" }, "optional": true, "readOnly": false, @@ -5289,7 +5385,7 @@ "isHttpMetadata": false }, { - "$id": "445", + "$id": "457", "kind": "property", "name": "fixedEnum", "serializedName": "fixedEnum", @@ -5313,7 +5409,7 @@ "isHttpMetadata": false }, { - "$id": "446", + "$id": "458", "kind": "property", "name": "extensibleEnum", "serializedName": "extensibleEnum", @@ -5337,7 +5433,7 @@ "isHttpMetadata": false }, { - "$id": "447", + "$id": "459", "kind": "property", "name": "optionalFixedEnum", "serializedName": "optionalFixedEnum", @@ -5361,7 +5457,7 @@ "isHttpMetadata": false }, { - "$id": "448", + "$id": "460", "kind": "property", "name": "optionalExtensibleEnum", "serializedName": "optionalExtensibleEnum", @@ -5385,12 +5481,12 @@ "isHttpMetadata": false }, { - "$id": "449", + "$id": "461", "kind": "property", "name": "label", "serializedName": "label", "type": { - "$id": "450", + "$id": "462", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5405,13 +5501,13 @@ "name": "TypeSpec.Xml.@ns", "arguments": { "ns": { - "$id": "451", + "$id": "463", "kind": "enumvalue", "decorators": [], "name": "ns1", "value": "https://example.com/ns1", "enumType": { - "$id": "452", + "$id": "464", "kind": "enum", "decorators": [ { @@ -5423,7 +5519,7 @@ "isGeneratedName": false, "namespace": "SampleTypeSpec", "valueType": { - "$id": "453", + "$id": "465", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -5432,29 +5528,29 @@ }, "values": [ { - "$id": "454", + "$id": "466", "kind": "enumvalue", "decorators": [], "name": "ns1", "value": "https://example.com/ns1", "enumType": { - "$ref": "452" + "$ref": "464" }, "valueType": { - "$ref": "453" + "$ref": "465" } }, { - "$id": "455", + "$id": "467", "kind": "enumvalue", "decorators": [], "name": "ns2", "value": "https://example.com/ns2", "enumType": { - "$ref": "452" + "$ref": "464" }, "valueType": { - "$ref": "453" + "$ref": "465" } } ], @@ -5471,7 +5567,7 @@ "__accessSet": true }, "valueType": { - "$ref": "453" + "$ref": "465" } } } @@ -5496,12 +5592,12 @@ "isHttpMetadata": false }, { - "$id": "456", + "$id": "468", "kind": "property", "name": "daysUsed", "serializedName": "daysUsed", "type": { - "$id": "457", + "$id": "469", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -5516,16 +5612,16 @@ "name": "TypeSpec.Xml.@ns", "arguments": { "ns": { - "$id": "458", + "$id": "470", "kind": "enumvalue", "decorators": [], "name": "ns2", "value": "https://example.com/ns2", "enumType": { - "$ref": "452" + "$ref": "464" }, "valueType": { - "$ref": "453" + "$ref": "465" } } } @@ -5546,12 +5642,12 @@ "isHttpMetadata": false }, { - "$id": "459", + "$id": "471", "kind": "property", "name": "fooItems", "serializedName": "fooItems", "type": { - "$ref": "228" + "$ref": "240" }, "optional": false, "readOnly": false, @@ -5582,12 +5678,12 @@ "isHttpMetadata": false }, { - "$id": "460", + "$id": "472", "kind": "property", "name": "anotherModel", "serializedName": "anotherModel", "type": { - "$ref": "426" + "$ref": "438" }, "optional": false, "readOnly": false, @@ -5617,16 +5713,16 @@ "isHttpMetadata": false }, { - "$id": "461", + "$id": "473", "kind": "property", "name": "modelsWithNamespaces", "serializedName": "modelsWithNamespaces", "type": { - "$id": "462", + "$id": "474", "kind": "array", "name": "ArrayXmlModelWithNamespace", "valueType": { - "$id": "463", + "$id": "475", "kind": "model", "name": "XmlModelWithNamespace", "namespace": "SampleTypeSpec", @@ -5654,12 +5750,12 @@ }, "properties": [ { - "$id": "464", + "$id": "476", "kind": "property", "name": "foo", "serializedName": "foo", "type": { - "$id": "465", + "$id": "477", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5706,12 +5802,12 @@ "isHttpMetadata": false }, { - "$id": "466", + "$id": "478", "kind": "property", "name": "unwrappedModelsWithNamespaces", "serializedName": "unwrappedModelsWithNamespaces", "type": { - "$ref": "462" + "$ref": "474" }, "optional": false, "readOnly": false, @@ -5735,16 +5831,16 @@ "isHttpMetadata": false }, { - "$id": "467", + "$id": "479", "kind": "property", "name": "listOfListFoo", "serializedName": "listOfListFoo", "type": { - "$id": "468", + "$id": "480", "kind": "array", "name": "ArrayArray1", "valueType": { - "$ref": "415" + "$ref": "427" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -5766,22 +5862,22 @@ "isHttpMetadata": false }, { - "$id": "469", + "$id": "481", "kind": "property", "name": "dictionaryFoo", "serializedName": "dictionaryFoo", "type": { - "$id": "470", + "$id": "482", "kind": "dict", "keyType": { - "$id": "471", + "$id": "483", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "416" + "$ref": "428" }, "decorators": [] }, @@ -5801,22 +5897,22 @@ "isHttpMetadata": false }, { - "$id": "472", + "$id": "484", "kind": "property", "name": "dictionaryOfDictionaryFoo", "serializedName": "dictionaryOfDictionaryFoo", "type": { - "$id": "473", + "$id": "485", "kind": "dict", "keyType": { - "$id": "474", + "$id": "486", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "470" + "$ref": "482" }, "decorators": [] }, @@ -5836,22 +5932,22 @@ "isHttpMetadata": false }, { - "$id": "475", + "$id": "487", "kind": "property", "name": "dictionaryListFoo", "serializedName": "dictionaryListFoo", "type": { - "$id": "476", + "$id": "488", "kind": "dict", "keyType": { - "$id": "477", + "$id": "489", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "415" + "$ref": "427" }, "decorators": [] }, @@ -5871,16 +5967,16 @@ "isHttpMetadata": false }, { - "$id": "478", + "$id": "490", "kind": "property", "name": "listOfDictionaryFoo", "serializedName": "listOfDictionaryFoo", "type": { - "$id": "479", + "$id": "491", "kind": "array", "name": "ArrayRecord1", "valueType": { - "$ref": "470" + "$ref": "482" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -5904,16 +6000,16 @@ ] }, { - "$ref": "416" + "$ref": "428" }, { - "$ref": "426" + "$ref": "438" }, { - "$ref": "463" + "$ref": "475" }, { - "$id": "480", + "$id": "492", "kind": "model", "name": "Animal", "namespace": "SampleTypeSpec", @@ -5927,13 +6023,13 @@ } }, "discriminatorProperty": { - "$id": "481", + "$id": "493", "kind": "property", "name": "kind", "serializedName": "kind", "doc": "The kind of animal", "type": { - "$id": "482", + "$id": "494", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5954,16 +6050,16 @@ }, "properties": [ { - "$ref": "481" + "$ref": "493" }, { - "$id": "483", + "$id": "495", "kind": "property", "name": "name", "serializedName": "name", "doc": "Name of the animal", "type": { - "$id": "484", + "$id": "496", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5985,7 +6081,7 @@ ], "discriminatedSubtypes": { "pet": { - "$id": "485", + "$id": "497", "kind": "model", "name": "Pet", "namespace": "SampleTypeSpec", @@ -6000,7 +6096,7 @@ } }, "discriminatorProperty": { - "$id": "486", + "$id": "498", "kind": "property", "name": "kind", "serializedName": "kind", @@ -6021,20 +6117,20 @@ "isHttpMetadata": false }, "baseModel": { - "$ref": "480" + "$ref": "492" }, "properties": [ { - "$ref": "486" + "$ref": "498" }, { - "$id": "487", + "$id": "499", "kind": "property", "name": "trained", "serializedName": "trained", "doc": "Whether the pet is trained", "type": { - "$id": "488", + "$id": "500", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -6056,7 +6152,7 @@ ], "discriminatedSubtypes": { "dog": { - "$id": "489", + "$id": "501", "kind": "model", "name": "Dog", "namespace": "SampleTypeSpec", @@ -6071,11 +6167,11 @@ } }, "baseModel": { - "$ref": "485" + "$ref": "497" }, "properties": [ { - "$id": "490", + "$id": "502", "kind": "property", "name": "kind", "serializedName": "kind", @@ -6096,13 +6192,13 @@ "isHttpMetadata": false }, { - "$id": "491", + "$id": "503", "kind": "property", "name": "breed", "serializedName": "breed", "doc": "The breed of the dog", "type": { - "$id": "492", + "$id": "504", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6126,18 +6222,18 @@ } }, "dog": { - "$ref": "489" + "$ref": "501" } } }, { - "$ref": "485" + "$ref": "497" }, { - "$ref": "489" + "$ref": "501" }, { - "$id": "493", + "$id": "505", "kind": "model", "name": "Tree", "namespace": "SampleTypeSpec", @@ -6157,7 +6253,7 @@ } }, "baseModel": { - "$id": "494", + "$id": "506", "kind": "model", "name": "Plant", "namespace": "SampleTypeSpec", @@ -6176,13 +6272,13 @@ } }, "discriminatorProperty": { - "$id": "495", + "$id": "507", "kind": "property", "name": "species", "serializedName": "species", "doc": "The species of plant", "type": { - "$id": "496", + "$id": "508", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6208,16 +6304,16 @@ }, "properties": [ { - "$ref": "495" + "$ref": "507" }, { - "$id": "497", + "$id": "509", "kind": "property", "name": "id", "serializedName": "id", "doc": "The unique identifier of the plant", "type": { - "$id": "498", + "$id": "510", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6242,13 +6338,13 @@ "isHttpMetadata": false }, { - "$id": "499", + "$id": "511", "kind": "property", "name": "height", "serializedName": "height", "doc": "The height of the plant in centimeters", "type": { - "$id": "500", + "$id": "512", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -6275,13 +6371,13 @@ ], "discriminatedSubtypes": { "tree": { - "$ref": "493" + "$ref": "505" } } }, "properties": [ { - "$id": "501", + "$id": "513", "kind": "property", "name": "species", "serializedName": "species", @@ -6307,13 +6403,13 @@ "isHttpMetadata": false }, { - "$id": "502", + "$id": "514", "kind": "property", "name": "age", "serializedName": "age", "doc": "The age of the tree in years", "type": { - "$id": "503", + "$id": "515", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -6340,10 +6436,10 @@ ] }, { - "$ref": "494" + "$ref": "506" }, { - "$id": "504", + "$id": "516", "kind": "model", "name": "GetWidgetMetricsResponse", "namespace": "SampleTypeSpec", @@ -6357,12 +6453,12 @@ }, "properties": [ { - "$id": "505", + "$id": "517", "kind": "property", "name": "numSold", "serializedName": "numSold", "type": { - "$id": "506", + "$id": "518", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -6382,12 +6478,12 @@ "isHttpMetadata": false }, { - "$id": "507", + "$id": "519", "kind": "property", "name": "averagePrice", "serializedName": "averagePrice", "type": { - "$id": "508", + "$id": "520", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -6411,14 +6507,14 @@ ], "clients": [ { - "$id": "509", + "$id": "521", "kind": "client", "name": "SampleTypeSpecClient", "namespace": "SampleTypeSpec", "doc": "This is a sample typespec project.", "methods": [ { - "$id": "510", + "$id": "522", "kind": "basic", "name": "sayHi", "accessibility": "public", @@ -6428,19 +6524,19 @@ ], "doc": "Return hi", "operation": { - "$id": "511", + "$id": "523", "name": "sayHi", "resourceName": "SampleTypeSpec", "doc": "Return hi", "accessibility": "public", "parameters": [ { - "$id": "512", + "$id": "524", "kind": "header", "name": "headParameter", "serializedName": "head-parameter", "type": { - "$id": "513", + "$id": "525", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6455,12 +6551,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.sayHi.headParameter", "methodParameterSegments": [ { - "$id": "514", + "$id": "526", "kind": "method", "name": "headParameter", "serializedName": "head-parameter", "type": { - "$id": "515", + "$id": "527", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6478,12 +6574,12 @@ ] }, { - "$id": "516", + "$id": "528", "kind": "query", "name": "queryParameter", "serializedName": "queryParameter", "type": { - "$id": "517", + "$id": "529", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6498,12 +6594,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "518", + "$id": "530", "kind": "method", "name": "queryParameter", "serializedName": "queryParameter", "type": { - "$id": "519", + "$id": "531", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6521,12 +6617,12 @@ ] }, { - "$id": "520", + "$id": "532", "kind": "query", "name": "optionalQuery", "serializedName": "optionalQuery", "type": { - "$id": "521", + "$id": "533", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6541,12 +6637,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "522", + "$id": "534", "kind": "method", "name": "optionalQuery", "serializedName": "optionalQuery", "type": { - "$id": "523", + "$id": "535", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6564,7 +6660,7 @@ ] }, { - "$id": "524", + "$id": "536", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -6580,7 +6676,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.sayHi.accept", "methodParameterSegments": [ { - "$id": "525", + "$id": "537", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -6605,7 +6701,7 @@ 200 ], "bodyType": { - "$ref": "222" + "$ref": "234" }, "headers": [], "isErrorResponse": false, @@ -6626,21 +6722,21 @@ }, "parameters": [ { - "$ref": "514" + "$ref": "526" }, { - "$ref": "518" + "$ref": "530" }, { - "$ref": "522" + "$ref": "534" }, { - "$ref": "525" + "$ref": "537" } ], "response": { "type": { - "$ref": "222" + "$ref": "234" } }, "isOverride": false, @@ -6649,7 +6745,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.sayHi" }, { - "$id": "526", + "$id": "538", "kind": "basic", "name": "helloAgain", "accessibility": "public", @@ -6659,19 +6755,19 @@ ], "doc": "Return hi again", "operation": { - "$id": "527", + "$id": "539", "name": "helloAgain", "resourceName": "SampleTypeSpec", "doc": "Return hi again", "accessibility": "public", "parameters": [ { - "$id": "528", + "$id": "540", "kind": "header", "name": "p1", "serializedName": "p1", "type": { - "$id": "529", + "$id": "541", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6686,12 +6782,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain.p1", "methodParameterSegments": [ { - "$id": "530", + "$id": "542", "kind": "method", "name": "p1", "serializedName": "p1", "type": { - "$id": "531", + "$id": "543", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6709,7 +6805,7 @@ ] }, { - "$id": "532", + "$id": "544", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -6725,7 +6821,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain.contentType", "methodParameterSegments": [ { - "$id": "533", + "$id": "545", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -6744,12 +6840,12 @@ ] }, { - "$id": "534", + "$id": "546", "kind": "path", "name": "p2", "serializedName": "p2", "type": { - "$id": "535", + "$id": "547", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6767,12 +6863,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain.p2", "methodParameterSegments": [ { - "$id": "536", + "$id": "548", "kind": "method", "name": "p2", "serializedName": "p2", "type": { - "$id": "537", + "$id": "549", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6790,7 +6886,7 @@ ] }, { - "$id": "538", + "$id": "550", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -6806,7 +6902,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain.accept", "methodParameterSegments": [ { - "$id": "539", + "$id": "551", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -6825,12 +6921,12 @@ ] }, { - "$id": "540", + "$id": "552", "kind": "body", "name": "action", "serializedName": "action", "type": { - "$ref": "257" + "$ref": "269" }, "isApiVersion": false, "contentTypes": [ @@ -6844,12 +6940,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain.action", "methodParameterSegments": [ { - "$id": "541", + "$id": "553", "kind": "method", "name": "action", "serializedName": "action", "type": { - "$ref": "257" + "$ref": "269" }, "location": "Body", "isApiVersion": false, @@ -6869,7 +6965,7 @@ 200 ], "bodyType": { - "$ref": "257" + "$ref": "269" }, "headers": [], "isErrorResponse": false, @@ -6893,24 +6989,24 @@ }, "parameters": [ { - "$ref": "530" + "$ref": "542" }, { - "$ref": "541" + "$ref": "553" }, { - "$ref": "533" + "$ref": "545" }, { - "$ref": "536" + "$ref": "548" }, { - "$ref": "539" + "$ref": "551" } ], "response": { "type": { - "$ref": "257" + "$ref": "269" } }, "isOverride": false, @@ -6919,7 +7015,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain" }, { - "$id": "542", + "$id": "554", "kind": "basic", "name": "noContentType", "accessibility": "public", @@ -6929,19 +7025,19 @@ ], "doc": "Return hi again", "operation": { - "$id": "543", + "$id": "555", "name": "noContentType", "resourceName": "SampleTypeSpec", "doc": "Return hi again", "accessibility": "public", "parameters": [ { - "$id": "544", + "$id": "556", "kind": "header", "name": "p1", "serializedName": "p1", "type": { - "$id": "545", + "$id": "557", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6956,12 +7052,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType.p1", "methodParameterSegments": [ { - "$id": "546", + "$id": "558", "kind": "method", "name": "info", "serializedName": "info", "type": { - "$ref": "305" + "$ref": "317" }, "location": "", "isApiVersion": false, @@ -6973,13 +7069,13 @@ "decorators": [] }, { - "$id": "547", + "$id": "559", "kind": "method", "name": "p1", "serializedName": "p1", "doc": "header parameter", "type": { - "$ref": "307" + "$ref": "319" }, "location": "", "isApiVersion": false, @@ -6993,12 +7089,12 @@ ] }, { - "$id": "548", + "$id": "560", "kind": "path", "name": "p2", "serializedName": "p2", "type": { - "$id": "549", + "$id": "561", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7016,16 +7112,16 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType.p2", "methodParameterSegments": [ { - "$ref": "546" + "$ref": "558" }, { - "$id": "550", + "$id": "562", "kind": "method", "name": "p2", "serializedName": "p2", "doc": "path parameter", "type": { - "$ref": "310" + "$ref": "322" }, "location": "", "isApiVersion": false, @@ -7039,7 +7135,7 @@ ] }, { - "$id": "551", + "$id": "563", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -7056,7 +7152,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType.contentType", "methodParameterSegments": [ { - "$id": "552", + "$id": "564", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -7076,7 +7172,7 @@ ] }, { - "$id": "553", + "$id": "565", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -7092,7 +7188,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType.accept", "methodParameterSegments": [ { - "$id": "554", + "$id": "566", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -7111,12 +7207,12 @@ ] }, { - "$id": "555", + "$id": "567", "kind": "body", "name": "action", "serializedName": "action", "type": { - "$ref": "257" + "$ref": "269" }, "isApiVersion": false, "contentTypes": [ @@ -7130,16 +7226,16 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType.action", "methodParameterSegments": [ { - "$ref": "546" + "$ref": "558" }, { - "$id": "556", + "$id": "568", "kind": "method", "name": "action", "serializedName": "action", "doc": "body parameter", "type": { - "$ref": "257" + "$ref": "269" }, "location": "", "isApiVersion": false, @@ -7159,7 +7255,7 @@ 200 ], "bodyType": { - "$ref": "257" + "$ref": "269" }, "headers": [], "isErrorResponse": false, @@ -7183,18 +7279,18 @@ }, "parameters": [ { - "$ref": "546" + "$ref": "558" }, { - "$ref": "552" + "$ref": "564" }, { - "$ref": "554" + "$ref": "566" } ], "response": { "type": { - "$ref": "257" + "$ref": "269" } }, "isOverride": true, @@ -7203,7 +7299,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType" }, { - "$id": "557", + "$id": "569", "kind": "basic", "name": "helloDemo2", "accessibility": "public", @@ -7213,14 +7309,14 @@ ], "doc": "Return hi in demo2", "operation": { - "$id": "558", + "$id": "570", "name": "helloDemo2", "resourceName": "SampleTypeSpec", "doc": "Return hi in demo2", "accessibility": "public", "parameters": [ { - "$id": "559", + "$id": "571", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -7236,7 +7332,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloDemo2.accept", "methodParameterSegments": [ { - "$id": "560", + "$id": "572", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -7261,7 +7357,7 @@ 200 ], "bodyType": { - "$ref": "222" + "$ref": "234" }, "headers": [], "isErrorResponse": false, @@ -7282,12 +7378,12 @@ }, "parameters": [ { - "$ref": "560" + "$ref": "572" } ], "response": { "type": { - "$ref": "222" + "$ref": "234" } }, "isOverride": false, @@ -7296,7 +7392,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloDemo2" }, { - "$id": "561", + "$id": "573", "kind": "basic", "name": "createLiteral", "accessibility": "public", @@ -7306,14 +7402,14 @@ ], "doc": "Create with literal value", "operation": { - "$id": "562", + "$id": "574", "name": "createLiteral", "resourceName": "SampleTypeSpec", "doc": "Create with literal value", "accessibility": "public", "parameters": [ { - "$id": "563", + "$id": "575", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -7330,7 +7426,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.createLiteral.contentType", "methodParameterSegments": [ { - "$id": "564", + "$id": "576", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -7350,7 +7446,7 @@ ] }, { - "$id": "565", + "$id": "577", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -7366,7 +7462,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.createLiteral.accept", "methodParameterSegments": [ { - "$id": "566", + "$id": "578", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -7385,12 +7481,12 @@ ] }, { - "$id": "567", + "$id": "579", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "222" + "$ref": "234" }, "isApiVersion": false, "contentTypes": [ @@ -7404,12 +7500,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.createLiteral.body", "methodParameterSegments": [ { - "$id": "568", + "$id": "580", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "222" + "$ref": "234" }, "location": "Body", "isApiVersion": false, @@ -7429,7 +7525,7 @@ 200 ], "bodyType": { - "$ref": "222" + "$ref": "234" }, "headers": [], "isErrorResponse": false, @@ -7453,18 +7549,18 @@ }, "parameters": [ { - "$ref": "568" + "$ref": "580" }, { - "$ref": "564" + "$ref": "576" }, { - "$ref": "566" + "$ref": "578" } ], "response": { "type": { - "$ref": "222" + "$ref": "234" } }, "isOverride": false, @@ -7473,7 +7569,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.createLiteral" }, { - "$id": "569", + "$id": "581", "kind": "basic", "name": "helloLiteral", "accessibility": "public", @@ -7483,14 +7579,14 @@ ], "doc": "Send literal parameters", "operation": { - "$id": "570", + "$id": "582", "name": "helloLiteral", "resourceName": "SampleTypeSpec", "doc": "Send literal parameters", "accessibility": "public", "parameters": [ { - "$id": "571", + "$id": "583", "kind": "header", "name": "p1", "serializedName": "p1", @@ -7506,7 +7602,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloLiteral.p1", "methodParameterSegments": [ { - "$id": "572", + "$id": "584", "kind": "method", "name": "p1", "serializedName": "p1", @@ -7525,7 +7621,7 @@ ] }, { - "$id": "573", + "$id": "585", "kind": "path", "name": "p2", "serializedName": "p2", @@ -7544,7 +7640,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloLiteral.p2", "methodParameterSegments": [ { - "$id": "574", + "$id": "586", "kind": "method", "name": "p2", "serializedName": "p2", @@ -7563,7 +7659,7 @@ ] }, { - "$id": "575", + "$id": "587", "kind": "query", "name": "p3", "serializedName": "p3", @@ -7579,7 +7675,7 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "576", + "$id": "588", "kind": "method", "name": "p3", "serializedName": "p3", @@ -7598,7 +7694,7 @@ ] }, { - "$id": "577", + "$id": "589", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -7614,7 +7710,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloLiteral.accept", "methodParameterSegments": [ { - "$id": "578", + "$id": "590", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -7639,7 +7735,7 @@ 200 ], "bodyType": { - "$ref": "222" + "$ref": "234" }, "headers": [], "isErrorResponse": false, @@ -7660,21 +7756,21 @@ }, "parameters": [ { - "$ref": "572" + "$ref": "584" }, { - "$ref": "574" + "$ref": "586" }, { - "$ref": "576" + "$ref": "588" }, { - "$ref": "578" + "$ref": "590" } ], "response": { "type": { - "$ref": "222" + "$ref": "234" } }, "isOverride": false, @@ -7683,7 +7779,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloLiteral" }, { - "$id": "579", + "$id": "591", "kind": "basic", "name": "topAction", "accessibility": "public", @@ -7693,24 +7789,24 @@ ], "doc": "top level method", "operation": { - "$id": "580", + "$id": "592", "name": "topAction", "resourceName": "SampleTypeSpec", "doc": "top level method", "accessibility": "public", "parameters": [ { - "$id": "581", + "$id": "593", "kind": "path", "name": "action", "serializedName": "action", "type": { - "$id": "582", + "$id": "594", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "583", + "$id": "595", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7731,17 +7827,17 @@ "crossLanguageDefinitionId": "SampleTypeSpec.topAction.action", "methodParameterSegments": [ { - "$id": "584", + "$id": "596", "kind": "method", "name": "action", "serializedName": "action", "type": { - "$id": "585", + "$id": "597", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "586", + "$id": "598", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7762,7 +7858,7 @@ ] }, { - "$id": "587", + "$id": "599", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -7778,7 +7874,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.topAction.accept", "methodParameterSegments": [ { - "$id": "588", + "$id": "600", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -7803,7 +7899,7 @@ 200 ], "bodyType": { - "$ref": "222" + "$ref": "234" }, "headers": [], "isErrorResponse": false, @@ -7824,15 +7920,15 @@ }, "parameters": [ { - "$ref": "584" + "$ref": "596" }, { - "$ref": "588" + "$ref": "600" } ], "response": { "type": { - "$ref": "222" + "$ref": "234" } }, "isOverride": false, @@ -7841,7 +7937,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.topAction" }, { - "$id": "589", + "$id": "601", "kind": "basic", "name": "topAction2", "accessibility": "public", @@ -7851,14 +7947,14 @@ ], "doc": "top level method2", "operation": { - "$id": "590", + "$id": "602", "name": "topAction2", "resourceName": "SampleTypeSpec", "doc": "top level method2", "accessibility": "public", "parameters": [ { - "$id": "591", + "$id": "603", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -7874,7 +7970,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.topAction2.accept", "methodParameterSegments": [ { - "$id": "592", + "$id": "604", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -7899,7 +7995,7 @@ 200 ], "bodyType": { - "$ref": "222" + "$ref": "234" }, "headers": [], "isErrorResponse": false, @@ -7920,12 +8016,12 @@ }, "parameters": [ { - "$ref": "592" + "$ref": "604" } ], "response": { "type": { - "$ref": "222" + "$ref": "234" } }, "isOverride": false, @@ -7934,7 +8030,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.topAction2" }, { - "$id": "593", + "$id": "605", "kind": "basic", "name": "patchAction", "accessibility": "public", @@ -7944,14 +8040,14 @@ ], "doc": "top level patch", "operation": { - "$id": "594", + "$id": "606", "name": "patchAction", "resourceName": "SampleTypeSpec", "doc": "top level patch", "accessibility": "public", "parameters": [ { - "$id": "595", + "$id": "607", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -7968,7 +8064,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.patchAction.contentType", "methodParameterSegments": [ { - "$id": "596", + "$id": "608", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -7988,7 +8084,7 @@ ] }, { - "$id": "597", + "$id": "609", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -8004,7 +8100,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.patchAction.accept", "methodParameterSegments": [ { - "$id": "598", + "$id": "610", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -8023,12 +8119,12 @@ ] }, { - "$id": "599", + "$id": "611", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "222" + "$ref": "234" }, "isApiVersion": false, "contentTypes": [ @@ -8042,12 +8138,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.patchAction.body", "methodParameterSegments": [ { - "$id": "600", + "$id": "612", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "222" + "$ref": "234" }, "location": "Body", "isApiVersion": false, @@ -8067,7 +8163,7 @@ 200 ], "bodyType": { - "$ref": "222" + "$ref": "234" }, "headers": [], "isErrorResponse": false, @@ -8091,18 +8187,18 @@ }, "parameters": [ { - "$ref": "600" + "$ref": "612" }, { - "$ref": "596" + "$ref": "608" }, { - "$ref": "598" + "$ref": "610" } ], "response": { "type": { - "$ref": "222" + "$ref": "234" } }, "isOverride": false, @@ -8111,7 +8207,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.patchAction" }, { - "$id": "601", + "$id": "613", "kind": "basic", "name": "anonymousBody", "accessibility": "public", @@ -8121,14 +8217,14 @@ ], "doc": "body parameter without body decorator", "operation": { - "$id": "602", + "$id": "614", "name": "anonymousBody", "resourceName": "SampleTypeSpec", "doc": "body parameter without body decorator", "accessibility": "public", "parameters": [ { - "$id": "603", + "$id": "615", "kind": "query", "name": "requiredQueryParam", "serializedName": "requiredQueryParam", @@ -8144,7 +8240,7 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "604", + "$id": "616", "kind": "method", "name": "requiredQueryParam", "serializedName": "requiredQueryParam", @@ -8163,7 +8259,7 @@ ] }, { - "$id": "605", + "$id": "617", "kind": "header", "name": "requiredHeader", "serializedName": "required-header", @@ -8179,7 +8275,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.anonymousBody.requiredHeader", "methodParameterSegments": [ { - "$id": "606", + "$id": "618", "kind": "method", "name": "requiredHeader", "serializedName": "required-header", @@ -8198,7 +8294,7 @@ ] }, { - "$id": "607", + "$id": "619", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -8215,7 +8311,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.anonymousBody.contentType", "methodParameterSegments": [ { - "$id": "608", + "$id": "620", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -8235,7 +8331,7 @@ ] }, { - "$id": "609", + "$id": "621", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -8251,7 +8347,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.anonymousBody.accept", "methodParameterSegments": [ { - "$id": "610", + "$id": "622", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -8270,12 +8366,12 @@ ] }, { - "$id": "611", + "$id": "623", "kind": "body", "name": "thing", "serializedName": "thing", "type": { - "$ref": "222" + "$ref": "234" }, "isApiVersion": false, "contentTypes": [ @@ -8289,13 +8385,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.anonymousBody.body", "methodParameterSegments": [ { - "$id": "612", + "$id": "624", "kind": "method", "name": "name", "serializedName": "name", "doc": "name of the Thing", "type": { - "$id": "613", + "$id": "625", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8319,7 +8415,7 @@ 200 ], "bodyType": { - "$ref": "222" + "$ref": "234" }, "headers": [], "isErrorResponse": false, @@ -8343,16 +8439,16 @@ }, "parameters": [ { - "$ref": "612" + "$ref": "624" }, { - "$id": "614", + "$id": "626", "kind": "method", "name": "requiredUnion", "serializedName": "requiredUnion", "doc": "required Union", "type": { - "$ref": "226" + "$ref": "238" }, "location": "Body", "isApiVersion": false, @@ -8364,7 +8460,7 @@ "decorators": [] }, { - "$id": "615", + "$id": "627", "kind": "method", "name": "requiredLiteralString", "serializedName": "requiredLiteralString", @@ -8382,13 +8478,13 @@ "decorators": [] }, { - "$id": "616", + "$id": "628", "kind": "method", "name": "requiredNullableString", "serializedName": "requiredNullableString", "doc": "required nullable string", "type": { - "$ref": "233" + "$ref": "245" }, "location": "Body", "isApiVersion": false, @@ -8400,13 +8496,13 @@ "decorators": [] }, { - "$id": "617", + "$id": "629", "kind": "method", "name": "optionalNullableString", "serializedName": "optionalNullableString", "doc": "required optional string", "type": { - "$ref": "236" + "$ref": "248" }, "location": "Body", "isApiVersion": false, @@ -8418,7 +8514,7 @@ "decorators": [] }, { - "$id": "618", + "$id": "630", "kind": "method", "name": "requiredLiteralInt", "serializedName": "requiredLiteralInt", @@ -8436,7 +8532,7 @@ "decorators": [] }, { - "$id": "619", + "$id": "631", "kind": "method", "name": "requiredLiteralFloat", "serializedName": "requiredLiteralFloat", @@ -8454,7 +8550,7 @@ "decorators": [] }, { - "$id": "620", + "$id": "632", "kind": "method", "name": "requiredLiteralBool", "serializedName": "requiredLiteralBool", @@ -8472,18 +8568,18 @@ "decorators": [] }, { - "$id": "621", + "$id": "633", "kind": "method", "name": "optionalLiteralString", "serializedName": "optionalLiteralString", "doc": "optional literal string", "type": { - "$id": "622", + "$id": "634", "kind": "enum", "name": "ThingOptionalLiteralString", "crossLanguageDefinitionId": "", "valueType": { - "$id": "623", + "$id": "635", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8491,12 +8587,12 @@ }, "values": [ { - "$id": "624", + "$id": "636", "kind": "enumvalue", "name": "reject", "value": "reject", "valueType": { - "$id": "625", + "$id": "637", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -8504,7 +8600,7 @@ "crossLanguageDefinitionId": "TypeSpec.string" }, "enumType": { - "$ref": "622" + "$ref": "634" }, "decorators": [] } @@ -8525,13 +8621,13 @@ "decorators": [] }, { - "$id": "626", + "$id": "638", "kind": "method", "name": "requiredNullableLiteralString", "serializedName": "requiredNullableLiteralString", "doc": "required nullable literal string", "type": { - "$ref": "243" + "$ref": "255" }, "location": "Body", "isApiVersion": false, @@ -8543,18 +8639,18 @@ "decorators": [] }, { - "$id": "627", + "$id": "639", "kind": "method", "name": "optionalLiteralInt", "serializedName": "optionalLiteralInt", "doc": "optional literal int", "type": { - "$id": "628", + "$id": "640", "kind": "enum", "name": "ThingOptionalLiteralInt", "crossLanguageDefinitionId": "", "valueType": { - "$id": "629", + "$id": "641", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -8562,12 +8658,12 @@ }, "values": [ { - "$id": "630", + "$id": "642", "kind": "enumvalue", "name": "456", "value": 456, "valueType": { - "$id": "631", + "$id": "643", "kind": "int32", "decorators": [], "doc": "A 32-bit integer. (`-2,147,483,648` to `2,147,483,647`)", @@ -8575,7 +8671,7 @@ "crossLanguageDefinitionId": "TypeSpec.int32" }, "enumType": { - "$ref": "628" + "$ref": "640" }, "decorators": [] } @@ -8596,18 +8692,18 @@ "decorators": [] }, { - "$id": "632", + "$id": "644", "kind": "method", "name": "optionalLiteralFloat", "serializedName": "optionalLiteralFloat", "doc": "optional literal float", "type": { - "$id": "633", + "$id": "645", "kind": "enum", "name": "ThingOptionalLiteralFloat", "crossLanguageDefinitionId": "", "valueType": { - "$id": "634", + "$id": "646", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -8615,12 +8711,12 @@ }, "values": [ { - "$id": "635", + "$id": "647", "kind": "enumvalue", "name": "4.56", "value": 4.56, "valueType": { - "$id": "636", + "$id": "648", "kind": "float32", "decorators": [], "doc": "A 32 bit floating point number. (`±1.5 x 10^−45` to `±3.4 x 10^38`)", @@ -8628,7 +8724,7 @@ "crossLanguageDefinitionId": "TypeSpec.float32" }, "enumType": { - "$ref": "633" + "$ref": "645" }, "decorators": [] } @@ -8649,7 +8745,7 @@ "decorators": [] }, { - "$id": "637", + "$id": "649", "kind": "method", "name": "optionalLiteralBool", "serializedName": "optionalLiteralBool", @@ -8667,13 +8763,13 @@ "decorators": [] }, { - "$id": "638", + "$id": "650", "kind": "method", "name": "requiredBadDescription", "serializedName": "requiredBadDescription", "doc": "description with xml <|endoftext|>", "type": { - "$id": "639", + "$id": "651", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8689,13 +8785,13 @@ "decorators": [] }, { - "$id": "640", + "$id": "652", "kind": "method", "name": "optionalNullableList", "serializedName": "optionalNullableList", "doc": "optional nullable collection", "type": { - "$ref": "250" + "$ref": "262" }, "location": "Body", "isApiVersion": false, @@ -8707,13 +8803,13 @@ "decorators": [] }, { - "$id": "641", + "$id": "653", "kind": "method", "name": "requiredNullableList", "serializedName": "requiredNullableList", "doc": "required nullable collection", "type": { - "$ref": "254" + "$ref": "266" }, "location": "Body", "isApiVersion": false, @@ -8725,13 +8821,13 @@ "decorators": [] }, { - "$id": "642", + "$id": "654", "kind": "method", "name": "propertyWithSpecialDocs", "serializedName": "propertyWithSpecialDocs", "doc": "This tests:\n- Simple bullet point. This bullet point is going to be very long to test how text wrapping is handled in bullet points within documentation comments. It should properly indent the wrapped lines.\n- Another bullet point with **bold text**. This bullet point is also intentionally long to see how the formatting is preserved when the text wraps onto multiple lines in the generated documentation.\n- Third bullet point with *italic text*. Similar to the previous points, this one is extended to ensure that the wrapping and formatting are correctly applied in the output.\n- Complex bullet point with **bold** and *italic* combined. This bullet point combines both bold and italic formatting and is long enough to test the wrapping behavior in such cases.\n- **Bold bullet point**: A bullet point that is entirely bolded. This point is also made lengthy to observe how the bold formatting is maintained across wrapped lines.\n- *Italic bullet point*: A bullet point that is entirely italicized. This final point is extended to verify that italic formatting is correctly applied even when the text spans multiple lines.", "type": { - "$id": "643", + "$id": "655", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8747,21 +8843,21 @@ "decorators": [] }, { - "$ref": "604" + "$ref": "616" }, { - "$ref": "606" + "$ref": "618" }, { - "$ref": "608" + "$ref": "620" }, { - "$ref": "610" + "$ref": "622" } ], "response": { "type": { - "$ref": "222" + "$ref": "234" } }, "isOverride": false, @@ -8770,7 +8866,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.anonymousBody" }, { - "$id": "644", + "$id": "656", "kind": "basic", "name": "friendlyModel", "accessibility": "public", @@ -8780,14 +8876,14 @@ ], "doc": "Model can have its friendly name", "operation": { - "$id": "645", + "$id": "657", "name": "friendlyModel", "resourceName": "SampleTypeSpec", "doc": "Model can have its friendly name", "accessibility": "public", "parameters": [ { - "$id": "646", + "$id": "658", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -8804,7 +8900,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.friendlyModel.contentType", "methodParameterSegments": [ { - "$id": "647", + "$id": "659", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -8824,7 +8920,7 @@ ] }, { - "$id": "648", + "$id": "660", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -8840,7 +8936,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.friendlyModel.accept", "methodParameterSegments": [ { - "$id": "649", + "$id": "661", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -8859,12 +8955,12 @@ ] }, { - "$id": "650", + "$id": "662", "kind": "body", "name": "friend", "serializedName": "friend", "type": { - "$ref": "311" + "$ref": "323" }, "isApiVersion": false, "contentTypes": [ @@ -8878,13 +8974,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.friendlyModel.body", "methodParameterSegments": [ { - "$id": "651", + "$id": "663", "kind": "method", "name": "name", "serializedName": "name", "doc": "name of the NotFriend", "type": { - "$id": "652", + "$id": "664", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8908,7 +9004,7 @@ 200 ], "bodyType": { - "$ref": "311" + "$ref": "323" }, "headers": [], "isErrorResponse": false, @@ -8932,18 +9028,18 @@ }, "parameters": [ { - "$ref": "651" + "$ref": "663" }, { - "$ref": "647" + "$ref": "659" }, { - "$ref": "649" + "$ref": "661" } ], "response": { "type": { - "$ref": "311" + "$ref": "323" } }, "isOverride": false, @@ -8952,7 +9048,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.friendlyModel" }, { - "$id": "653", + "$id": "665", "kind": "basic", "name": "addTimeHeader", "accessibility": "public", @@ -8961,23 +9057,23 @@ "2024-08-16-preview" ], "operation": { - "$id": "654", + "$id": "666", "name": "addTimeHeader", "resourceName": "SampleTypeSpec", "accessibility": "public", "parameters": [ { - "$id": "655", + "$id": "667", "kind": "header", "name": "repeatabilityFirstSent", "serializedName": "Repeatability-First-Sent", "type": { - "$id": "656", + "$id": "668", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc7231", "wireType": { - "$id": "657", + "$id": "669", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8995,17 +9091,17 @@ "crossLanguageDefinitionId": "SampleTypeSpec.addTimeHeader.repeatabilityFirstSent", "methodParameterSegments": [ { - "$id": "658", + "$id": "670", "kind": "method", "name": "repeatabilityFirstSent", "serializedName": "Repeatability-First-Sent", "type": { - "$id": "659", + "$id": "671", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc7231", "wireType": { - "$id": "660", + "$id": "672", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9047,7 +9143,7 @@ }, "parameters": [ { - "$ref": "658" + "$ref": "670" } ], "response": {}, @@ -9057,7 +9153,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.addTimeHeader" }, { - "$id": "661", + "$id": "673", "kind": "basic", "name": "projectedNameModel", "accessibility": "public", @@ -9067,14 +9163,14 @@ ], "doc": "Model can have its projected name", "operation": { - "$id": "662", + "$id": "674", "name": "projectedNameModel", "resourceName": "SampleTypeSpec", "doc": "Model can have its projected name", "accessibility": "public", "parameters": [ { - "$id": "663", + "$id": "675", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -9091,7 +9187,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.projectedNameModel.contentType", "methodParameterSegments": [ { - "$id": "664", + "$id": "676", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -9111,7 +9207,7 @@ ] }, { - "$id": "665", + "$id": "677", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -9127,7 +9223,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.projectedNameModel.accept", "methodParameterSegments": [ { - "$id": "666", + "$id": "678", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -9146,12 +9242,12 @@ ] }, { - "$id": "667", + "$id": "679", "kind": "body", "name": "renamedModel", "serializedName": "renamedModel", "type": { - "$ref": "314" + "$ref": "326" }, "isApiVersion": false, "contentTypes": [ @@ -9165,13 +9261,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.projectedNameModel.body", "methodParameterSegments": [ { - "$id": "668", + "$id": "680", "kind": "method", "name": "otherName", "serializedName": "otherName", "doc": "name of the ModelWithClientName", "type": { - "$id": "669", + "$id": "681", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9195,7 +9291,7 @@ 200 ], "bodyType": { - "$ref": "314" + "$ref": "326" }, "headers": [], "isErrorResponse": false, @@ -9219,18 +9315,18 @@ }, "parameters": [ { - "$ref": "668" + "$ref": "680" }, { - "$ref": "664" + "$ref": "676" }, { - "$ref": "666" + "$ref": "678" } ], "response": { "type": { - "$ref": "314" + "$ref": "326" } }, "isOverride": false, @@ -9239,7 +9335,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.projectedNameModel" }, { - "$id": "670", + "$id": "682", "kind": "basic", "name": "returnsAnonymousModel", "accessibility": "public", @@ -9249,14 +9345,14 @@ ], "doc": "return anonymous model", "operation": { - "$id": "671", + "$id": "683", "name": "returnsAnonymousModel", "resourceName": "SampleTypeSpec", "doc": "return anonymous model", "accessibility": "public", "parameters": [ { - "$id": "672", + "$id": "684", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -9272,7 +9368,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.returnsAnonymousModel.accept", "methodParameterSegments": [ { - "$id": "673", + "$id": "685", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -9297,7 +9393,7 @@ 200 ], "bodyType": { - "$ref": "317" + "$ref": "329" }, "headers": [], "isErrorResponse": false, @@ -9318,12 +9414,12 @@ }, "parameters": [ { - "$ref": "673" + "$ref": "685" } ], "response": { "type": { - "$ref": "317" + "$ref": "329" } }, "isOverride": false, @@ -9332,7 +9428,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.returnsAnonymousModel" }, { - "$id": "674", + "$id": "686", "kind": "basic", "name": "getUnknownValue", "accessibility": "public", @@ -9342,19 +9438,19 @@ ], "doc": "get extensible enum", "operation": { - "$id": "675", + "$id": "687", "name": "getUnknownValue", "resourceName": "SampleTypeSpec", "doc": "get extensible enum", "accessibility": "public", "parameters": [ { - "$id": "676", + "$id": "688", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$id": "677", + "$id": "689", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9369,12 +9465,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.getUnknownValue.accept", "methodParameterSegments": [ { - "$id": "678", + "$id": "690", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "677" + "$ref": "689" }, "location": "Header", "isApiVersion": false, @@ -9394,7 +9490,7 @@ 200 ], "bodyType": { - "$id": "679", + "$id": "691", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9426,12 +9522,12 @@ }, "parameters": [ { - "$ref": "678" + "$ref": "690" } ], "response": { "type": { - "$ref": "679" + "$ref": "691" } }, "isOverride": false, @@ -9440,7 +9536,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.getUnknownValue" }, { - "$id": "680", + "$id": "692", "kind": "basic", "name": "internalProtocol", "accessibility": "public", @@ -9450,14 +9546,14 @@ ], "doc": "When set protocol false and convenient true, then the protocol method should be internal", "operation": { - "$id": "681", + "$id": "693", "name": "internalProtocol", "resourceName": "SampleTypeSpec", "doc": "When set protocol false and convenient true, then the protocol method should be internal", "accessibility": "public", "parameters": [ { - "$id": "682", + "$id": "694", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -9474,7 +9570,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.internalProtocol.contentType", "methodParameterSegments": [ { - "$id": "683", + "$id": "695", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -9494,7 +9590,7 @@ ] }, { - "$id": "684", + "$id": "696", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -9510,7 +9606,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.internalProtocol.accept", "methodParameterSegments": [ { - "$id": "685", + "$id": "697", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -9529,12 +9625,12 @@ ] }, { - "$id": "686", + "$id": "698", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "222" + "$ref": "234" }, "isApiVersion": false, "contentTypes": [ @@ -9548,12 +9644,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.internalProtocol.body", "methodParameterSegments": [ { - "$id": "687", + "$id": "699", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "222" + "$ref": "234" }, "location": "Body", "isApiVersion": false, @@ -9573,7 +9669,7 @@ 200 ], "bodyType": { - "$ref": "222" + "$ref": "234" }, "headers": [], "isErrorResponse": false, @@ -9597,18 +9693,18 @@ }, "parameters": [ { - "$ref": "687" + "$ref": "699" }, { - "$ref": "683" + "$ref": "695" }, { - "$ref": "685" + "$ref": "697" } ], "response": { "type": { - "$ref": "222" + "$ref": "234" } }, "isOverride": false, @@ -9617,7 +9713,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.internalProtocol" }, { - "$id": "688", + "$id": "700", "kind": "basic", "name": "stillConvenient", "accessibility": "public", @@ -9627,7 +9723,7 @@ ], "doc": "When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one", "operation": { - "$id": "689", + "$id": "701", "name": "stillConvenient", "resourceName": "SampleTypeSpec", "doc": "When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one", @@ -9660,7 +9756,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.stillConvenient" }, { - "$id": "690", + "$id": "702", "kind": "basic", "name": "headAsBoolean", "accessibility": "public", @@ -9670,19 +9766,19 @@ ], "doc": "head as boolean.", "operation": { - "$id": "691", + "$id": "703", "name": "headAsBoolean", "resourceName": "SampleTypeSpec", "doc": "head as boolean.", "accessibility": "public", "parameters": [ { - "$id": "692", + "$id": "704", "kind": "path", "name": "id", "serializedName": "id", "type": { - "$id": "693", + "$id": "705", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9700,12 +9796,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.headAsBoolean.id", "methodParameterSegments": [ { - "$id": "694", + "$id": "706", "kind": "method", "name": "id", "serializedName": "id", "type": { - "$id": "695", + "$id": "707", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9744,7 +9840,7 @@ }, "parameters": [ { - "$ref": "694" + "$ref": "706" } ], "response": {}, @@ -9754,7 +9850,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.headAsBoolean" }, { - "$id": "696", + "$id": "708", "kind": "basic", "name": "WithApiVersion", "accessibility": "public", @@ -9764,19 +9860,19 @@ ], "doc": "Return hi again", "operation": { - "$id": "697", + "$id": "709", "name": "WithApiVersion", "resourceName": "SampleTypeSpec", "doc": "Return hi again", "accessibility": "public", "parameters": [ { - "$id": "698", + "$id": "710", "kind": "header", "name": "p1", "serializedName": "p1", "type": { - "$id": "699", + "$id": "711", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9791,12 +9887,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.WithApiVersion.p1", "methodParameterSegments": [ { - "$id": "700", + "$id": "712", "kind": "method", "name": "p1", "serializedName": "p1", "type": { - "$id": "701", + "$id": "713", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9814,12 +9910,12 @@ ] }, { - "$id": "702", + "$id": "714", "kind": "query", "name": "apiVersion", "serializedName": "apiVersion", "type": { - "$id": "703", + "$id": "715", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9829,7 +9925,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "704", + "$id": "716", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -9843,12 +9939,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "705", + "$id": "717", "kind": "method", "name": "apiVersion", "serializedName": "apiVersion", "type": { - "$id": "706", + "$id": "718", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -9858,7 +9954,7 @@ "isApiVersion": true, "defaultValue": { "type": { - "$id": "707", + "$id": "719", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -9896,7 +9992,7 @@ }, "parameters": [ { - "$ref": "700" + "$ref": "712" } ], "response": {}, @@ -9906,7 +10002,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.WithApiVersion" }, { - "$id": "708", + "$id": "720", "kind": "paging", "name": "ListWithNextLink", "accessibility": "public", @@ -9916,14 +10012,14 @@ ], "doc": "List things with nextlink", "operation": { - "$id": "709", + "$id": "721", "name": "ListWithNextLink", "resourceName": "SampleTypeSpec", "doc": "List things with nextlink", "accessibility": "public", "parameters": [ { - "$id": "710", + "$id": "722", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -9939,7 +10035,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ListWithNextLink.accept", "methodParameterSegments": [ { - "$id": "711", + "$id": "723", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -9964,7 +10060,7 @@ 200 ], "bodyType": { - "$ref": "318" + "$ref": "330" }, "headers": [], "isErrorResponse": false, @@ -9985,12 +10081,12 @@ }, "parameters": [ { - "$ref": "711" + "$ref": "723" } ], "response": { "type": { - "$ref": "320" + "$ref": "332" }, "resultSegments": [ "things" @@ -10014,7 +10110,7 @@ } }, { - "$id": "712", + "$id": "724", "kind": "paging", "name": "ListWithStringNextLink", "accessibility": "public", @@ -10024,14 +10120,14 @@ ], "doc": "List things with nextlink", "operation": { - "$id": "713", + "$id": "725", "name": "ListWithStringNextLink", "resourceName": "SampleTypeSpec", "doc": "List things with nextlink", "accessibility": "public", "parameters": [ { - "$id": "714", + "$id": "726", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -10047,7 +10143,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ListWithStringNextLink.accept", "methodParameterSegments": [ { - "$id": "715", + "$id": "727", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -10072,7 +10168,7 @@ 200 ], "bodyType": { - "$ref": "323" + "$ref": "335" }, "headers": [], "isErrorResponse": false, @@ -10093,12 +10189,12 @@ }, "parameters": [ { - "$ref": "715" + "$ref": "727" } ], "response": { "type": { - "$ref": "320" + "$ref": "332" }, "resultSegments": [ "things" @@ -10122,7 +10218,7 @@ } }, { - "$id": "716", + "$id": "728", "kind": "paging", "name": "ListWithContinuationToken", "accessibility": "public", @@ -10132,19 +10228,19 @@ ], "doc": "List things with continuation token", "operation": { - "$id": "717", + "$id": "729", "name": "ListWithContinuationToken", "resourceName": "SampleTypeSpec", "doc": "List things with continuation token", "accessibility": "public", "parameters": [ { - "$id": "718", + "$id": "730", "kind": "query", "name": "token", "serializedName": "token", "type": { - "$id": "719", + "$id": "731", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10159,12 +10255,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "720", + "$id": "732", "kind": "method", "name": "token", "serializedName": "token", "type": { - "$id": "721", + "$id": "733", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10182,7 +10278,7 @@ ] }, { - "$id": "722", + "$id": "734", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -10198,7 +10294,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ListWithContinuationToken.accept", "methodParameterSegments": [ { - "$id": "723", + "$id": "735", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -10223,7 +10319,7 @@ 200 ], "bodyType": { - "$ref": "327" + "$ref": "339" }, "headers": [], "isErrorResponse": false, @@ -10244,15 +10340,15 @@ }, "parameters": [ { - "$ref": "720" + "$ref": "732" }, { - "$ref": "723" + "$ref": "735" } ], "response": { "type": { - "$ref": "320" + "$ref": "332" }, "resultSegments": [ "things" @@ -10268,7 +10364,7 @@ ], "continuationToken": { "parameter": { - "$ref": "718" + "$ref": "730" }, "responseSegments": [ "nextToken" @@ -10279,7 +10375,7 @@ } }, { - "$id": "724", + "$id": "736", "kind": "paging", "name": "ListWithContinuationTokenHeaderResponse", "accessibility": "public", @@ -10289,19 +10385,19 @@ ], "doc": "List things with continuation token header response", "operation": { - "$id": "725", + "$id": "737", "name": "ListWithContinuationTokenHeaderResponse", "resourceName": "SampleTypeSpec", "doc": "List things with continuation token header response", "accessibility": "public", "parameters": [ { - "$id": "726", + "$id": "738", "kind": "query", "name": "token", "serializedName": "token", "type": { - "$id": "727", + "$id": "739", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10316,12 +10412,12 @@ "readOnly": false, "methodParameterSegments": [ { - "$id": "728", + "$id": "740", "kind": "method", "name": "token", "serializedName": "token", "type": { - "$id": "729", + "$id": "741", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10339,7 +10435,7 @@ ] }, { - "$id": "730", + "$id": "742", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -10355,7 +10451,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ListWithContinuationTokenHeaderResponse.accept", "methodParameterSegments": [ { - "$id": "731", + "$id": "743", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -10380,14 +10476,14 @@ 200 ], "bodyType": { - "$ref": "331" + "$ref": "343" }, "headers": [ { "name": "nextToken", "nameInResponse": "next-token", "type": { - "$id": "732", + "$id": "744", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10413,15 +10509,15 @@ }, "parameters": [ { - "$ref": "728" + "$ref": "740" }, { - "$ref": "731" + "$ref": "743" } ], "response": { "type": { - "$ref": "320" + "$ref": "332" }, "resultSegments": [ "things" @@ -10437,7 +10533,7 @@ ], "continuationToken": { "parameter": { - "$ref": "726" + "$ref": "738" }, "responseSegments": [ "next-token" @@ -10448,7 +10544,7 @@ } }, { - "$id": "733", + "$id": "745", "kind": "paging", "name": "ListWithPaging", "accessibility": "public", @@ -10458,14 +10554,14 @@ ], "doc": "List things with paging", "operation": { - "$id": "734", + "$id": "746", "name": "ListWithPaging", "resourceName": "SampleTypeSpec", "doc": "List things with paging", "accessibility": "public", "parameters": [ { - "$id": "735", + "$id": "747", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -10481,7 +10577,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ListWithPaging.accept", "methodParameterSegments": [ { - "$id": "736", + "$id": "748", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -10506,7 +10602,7 @@ 200 ], "bodyType": { - "$ref": "333" + "$ref": "345" }, "headers": [], "isErrorResponse": false, @@ -10527,12 +10623,12 @@ }, "parameters": [ { - "$ref": "736" + "$ref": "748" } ], "response": { "type": { - "$ref": "320" + "$ref": "332" }, "resultSegments": [ "items" @@ -10550,7 +10646,7 @@ } }, { - "$id": "737", + "$id": "749", "kind": "basic", "name": "EmbeddedParameters", "accessibility": "public", @@ -10560,20 +10656,20 @@ ], "doc": "An operation with embedded parameters within the body", "operation": { - "$id": "738", + "$id": "750", "name": "EmbeddedParameters", "resourceName": "SampleTypeSpec", "doc": "An operation with embedded parameters within the body", "accessibility": "public", "parameters": [ { - "$id": "739", + "$id": "751", "kind": "header", "name": "requiredHeader", "serializedName": "required-header", "doc": "required header parameter", "type": { - "$id": "740", + "$id": "752", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10588,12 +10684,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ModelWithEmbeddedNonBodyParameters.requiredHeader", "methodParameterSegments": [ { - "$id": "741", + "$id": "753", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "335" + "$ref": "347" }, "location": "Body", "isApiVersion": false, @@ -10605,13 +10701,13 @@ "decorators": [] }, { - "$id": "742", + "$id": "754", "kind": "method", "name": "requiredHeader", "serializedName": "requiredHeader", "doc": "required header parameter", "type": { - "$ref": "339" + "$ref": "351" }, "location": "", "isApiVersion": false, @@ -10625,13 +10721,13 @@ ] }, { - "$id": "743", + "$id": "755", "kind": "header", "name": "optionalHeader", "serializedName": "optional-header", "doc": "optional header parameter", "type": { - "$id": "744", + "$id": "756", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10646,16 +10742,16 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ModelWithEmbeddedNonBodyParameters.optionalHeader", "methodParameterSegments": [ { - "$ref": "741" + "$ref": "753" }, { - "$id": "745", + "$id": "757", "kind": "method", "name": "optionalHeader", "serializedName": "optionalHeader", "doc": "optional header parameter", "type": { - "$ref": "341" + "$ref": "353" }, "location": "", "isApiVersion": false, @@ -10669,13 +10765,13 @@ ] }, { - "$id": "746", + "$id": "758", "kind": "query", "name": "requiredQuery", "serializedName": "requiredQuery", "doc": "required query parameter", "type": { - "$id": "747", + "$id": "759", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10690,16 +10786,16 @@ "readOnly": false, "methodParameterSegments": [ { - "$ref": "741" + "$ref": "753" }, { - "$id": "748", + "$id": "760", "kind": "method", "name": "requiredQuery", "serializedName": "requiredQuery", "doc": "required query parameter", "type": { - "$ref": "343" + "$ref": "355" }, "location": "", "isApiVersion": false, @@ -10713,13 +10809,13 @@ ] }, { - "$id": "749", + "$id": "761", "kind": "query", "name": "optionalQuery", "serializedName": "optionalQuery", "doc": "optional query parameter", "type": { - "$id": "750", + "$id": "762", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -10734,16 +10830,16 @@ "readOnly": false, "methodParameterSegments": [ { - "$ref": "741" + "$ref": "753" }, { - "$id": "751", + "$id": "763", "kind": "method", "name": "optionalQuery", "serializedName": "optionalQuery", "doc": "optional query parameter", "type": { - "$ref": "345" + "$ref": "357" }, "location": "", "isApiVersion": false, @@ -10757,7 +10853,7 @@ ] }, { - "$id": "752", + "$id": "764", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -10774,7 +10870,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.EmbeddedParameters.contentType", "methodParameterSegments": [ { - "$id": "753", + "$id": "765", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -10794,12 +10890,12 @@ ] }, { - "$id": "754", + "$id": "766", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "335" + "$ref": "347" }, "isApiVersion": false, "contentTypes": [ @@ -10813,7 +10909,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.EmbeddedParameters.body", "methodParameterSegments": [ { - "$ref": "741" + "$ref": "753" } ] } @@ -10842,10 +10938,10 @@ }, "parameters": [ { - "$ref": "741" + "$ref": "753" }, { - "$ref": "753" + "$ref": "765" } ], "response": {}, @@ -10855,7 +10951,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.EmbeddedParameters" }, { - "$id": "755", + "$id": "767", "kind": "basic", "name": "DynamicModelOperation", "accessibility": "public", @@ -10865,14 +10961,14 @@ ], "doc": "An operation with a dynamic model", "operation": { - "$id": "756", + "$id": "768", "name": "DynamicModelOperation", "resourceName": "SampleTypeSpec", "doc": "An operation with a dynamic model", "accessibility": "public", "parameters": [ { - "$id": "757", + "$id": "769", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -10889,7 +10985,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DynamicModelOperation.contentType", "methodParameterSegments": [ { - "$id": "758", + "$id": "770", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -10909,12 +11005,12 @@ ] }, { - "$id": "759", + "$id": "771", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "346" + "$ref": "358" }, "isApiVersion": false, "contentTypes": [ @@ -10928,12 +11024,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DynamicModelOperation.body", "methodParameterSegments": [ { - "$id": "760", + "$id": "772", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "346" + "$ref": "358" }, "location": "Body", "isApiVersion": false, @@ -10971,10 +11067,10 @@ }, "parameters": [ { - "$ref": "760" + "$ref": "772" }, { - "$ref": "758" + "$ref": "770" } ], "response": {}, @@ -10984,7 +11080,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DynamicModelOperation" }, { - "$id": "761", + "$id": "773", "kind": "basic", "name": "GetXmlAdvancedModel", "accessibility": "public", @@ -10994,14 +11090,14 @@ ], "doc": "Get an advanced XML model with various property types", "operation": { - "$id": "762", + "$id": "774", "name": "GetXmlAdvancedModel", "resourceName": "SampleTypeSpec", "doc": "Get an advanced XML model with various property types", "accessibility": "public", "parameters": [ { - "$id": "763", + "$id": "775", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -11017,7 +11113,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.GetXmlAdvancedModel.accept", "methodParameterSegments": [ { - "$id": "764", + "$id": "776", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -11042,7 +11138,7 @@ 200 ], "bodyType": { - "$ref": "384" + "$ref": "396" }, "headers": [ { @@ -11071,12 +11167,12 @@ }, "parameters": [ { - "$ref": "764" + "$ref": "776" } ], "response": { "type": { - "$ref": "384" + "$ref": "396" } }, "isOverride": false, @@ -11085,7 +11181,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.GetXmlAdvancedModel" }, { - "$id": "765", + "$id": "777", "kind": "basic", "name": "UpdateXmlAdvancedModel", "accessibility": "public", @@ -11095,14 +11191,14 @@ ], "doc": "Update an advanced XML model with various property types", "operation": { - "$id": "766", + "$id": "778", "name": "UpdateXmlAdvancedModel", "resourceName": "SampleTypeSpec", "doc": "Update an advanced XML model with various property types", "accessibility": "public", "parameters": [ { - "$id": "767", + "$id": "779", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -11118,7 +11214,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UpdateXmlAdvancedModel.contentType", "methodParameterSegments": [ { - "$id": "768", + "$id": "780", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -11137,7 +11233,7 @@ ] }, { - "$id": "769", + "$id": "781", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -11153,7 +11249,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UpdateXmlAdvancedModel.accept", "methodParameterSegments": [ { - "$id": "770", + "$id": "782", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -11172,12 +11268,12 @@ ] }, { - "$id": "771", + "$id": "783", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "384" + "$ref": "396" }, "isApiVersion": false, "contentTypes": [ @@ -11191,12 +11287,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.UpdateXmlAdvancedModel.body", "methodParameterSegments": [ { - "$id": "772", + "$id": "784", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "384" + "$ref": "396" }, "location": "Body", "isApiVersion": false, @@ -11216,7 +11312,7 @@ 200 ], "bodyType": { - "$ref": "384" + "$ref": "396" }, "headers": [ { @@ -11248,18 +11344,18 @@ }, "parameters": [ { - "$ref": "772" + "$ref": "784" }, { - "$ref": "768" + "$ref": "780" }, { - "$ref": "770" + "$ref": "782" } ], "response": { "type": { - "$ref": "384" + "$ref": "396" } }, "isOverride": false, @@ -11270,12 +11366,12 @@ ], "parameters": [ { - "$id": "773", + "$id": "785", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "774", + "$id": "786", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -11290,7 +11386,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.sampleTypeSpecUrl" }, { - "$ref": "705" + "$ref": "717" } ], "initializedBy": 1, @@ -11302,13 +11398,13 @@ ], "children": [ { - "$id": "775", + "$id": "787", "kind": "client", "name": "AnimalOperations", "namespace": "SampleTypeSpec", "methods": [ { - "$id": "776", + "$id": "788", "kind": "basic", "name": "updatePetAsAnimal", "accessibility": "public", @@ -11318,14 +11414,14 @@ ], "doc": "Update a pet as an animal", "operation": { - "$id": "777", + "$id": "789", "name": "updatePetAsAnimal", "resourceName": "AnimalOperations", "doc": "Update a pet as an animal", "accessibility": "public", "parameters": [ { - "$id": "778", + "$id": "790", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -11342,7 +11438,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updatePetAsAnimal.contentType", "methodParameterSegments": [ { - "$id": "779", + "$id": "791", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -11362,7 +11458,7 @@ ] }, { - "$id": "780", + "$id": "792", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -11378,7 +11474,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updatePetAsAnimal.accept", "methodParameterSegments": [ { - "$id": "781", + "$id": "793", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -11397,12 +11493,12 @@ ] }, { - "$id": "782", + "$id": "794", "kind": "body", "name": "animal", "serializedName": "animal", "type": { - "$ref": "480" + "$ref": "492" }, "isApiVersion": false, "contentTypes": [ @@ -11416,12 +11512,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updatePetAsAnimal.animal", "methodParameterSegments": [ { - "$id": "783", + "$id": "795", "kind": "method", "name": "animal", "serializedName": "animal", "type": { - "$ref": "480" + "$ref": "492" }, "location": "Body", "isApiVersion": false, @@ -11441,7 +11537,7 @@ 200 ], "bodyType": { - "$ref": "480" + "$ref": "492" }, "headers": [], "isErrorResponse": false, @@ -11465,18 +11561,18 @@ }, "parameters": [ { - "$ref": "783" + "$ref": "795" }, { - "$ref": "779" + "$ref": "791" }, { - "$ref": "781" + "$ref": "793" } ], "response": { "type": { - "$ref": "480" + "$ref": "492" } }, "isOverride": false, @@ -11485,7 +11581,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updatePetAsAnimal" }, { - "$id": "784", + "$id": "796", "kind": "basic", "name": "updateDogAsAnimal", "accessibility": "public", @@ -11495,14 +11591,14 @@ ], "doc": "Update a dog as an animal", "operation": { - "$id": "785", + "$id": "797", "name": "updateDogAsAnimal", "resourceName": "AnimalOperations", "doc": "Update a dog as an animal", "accessibility": "public", "parameters": [ { - "$id": "786", + "$id": "798", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -11519,7 +11615,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updateDogAsAnimal.contentType", "methodParameterSegments": [ { - "$id": "787", + "$id": "799", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -11539,7 +11635,7 @@ ] }, { - "$id": "788", + "$id": "800", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -11555,7 +11651,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updateDogAsAnimal.accept", "methodParameterSegments": [ { - "$id": "789", + "$id": "801", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -11574,12 +11670,12 @@ ] }, { - "$id": "790", + "$id": "802", "kind": "body", "name": "animal", "serializedName": "animal", "type": { - "$ref": "480" + "$ref": "492" }, "isApiVersion": false, "contentTypes": [ @@ -11593,12 +11689,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updateDogAsAnimal.animal", "methodParameterSegments": [ { - "$id": "791", + "$id": "803", "kind": "method", "name": "animal", "serializedName": "animal", "type": { - "$ref": "480" + "$ref": "492" }, "location": "Body", "isApiVersion": false, @@ -11618,7 +11714,7 @@ 200 ], "bodyType": { - "$ref": "480" + "$ref": "492" }, "headers": [], "isErrorResponse": false, @@ -11642,18 +11738,18 @@ }, "parameters": [ { - "$ref": "791" + "$ref": "803" }, { - "$ref": "787" + "$ref": "799" }, { - "$ref": "789" + "$ref": "801" } ], "response": { "type": { - "$ref": "480" + "$ref": "492" } }, "isOverride": false, @@ -11664,12 +11760,12 @@ ], "parameters": [ { - "$id": "792", + "$id": "804", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "793", + "$id": "805", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -11692,18 +11788,18 @@ "2024-08-16-preview" ], "parent": { - "$ref": "509" + "$ref": "521" }, "isMultiServiceClient": false }, { - "$id": "794", + "$id": "806", "kind": "client", "name": "PetOperations", "namespace": "SampleTypeSpec", "methods": [ { - "$id": "795", + "$id": "807", "kind": "basic", "name": "updatePetAsPet", "accessibility": "public", @@ -11713,14 +11809,14 @@ ], "doc": "Update a pet as a pet", "operation": { - "$id": "796", + "$id": "808", "name": "updatePetAsPet", "resourceName": "PetOperations", "doc": "Update a pet as a pet", "accessibility": "public", "parameters": [ { - "$id": "797", + "$id": "809", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -11737,7 +11833,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updatePetAsPet.contentType", "methodParameterSegments": [ { - "$id": "798", + "$id": "810", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -11757,7 +11853,7 @@ ] }, { - "$id": "799", + "$id": "811", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -11773,7 +11869,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updatePetAsPet.accept", "methodParameterSegments": [ { - "$id": "800", + "$id": "812", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -11792,12 +11888,12 @@ ] }, { - "$id": "801", + "$id": "813", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$ref": "485" + "$ref": "497" }, "isApiVersion": false, "contentTypes": [ @@ -11811,12 +11907,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updatePetAsPet.pet", "methodParameterSegments": [ { - "$id": "802", + "$id": "814", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "485" + "$ref": "497" }, "location": "Body", "isApiVersion": false, @@ -11836,7 +11932,7 @@ 200 ], "bodyType": { - "$ref": "485" + "$ref": "497" }, "headers": [], "isErrorResponse": false, @@ -11860,18 +11956,18 @@ }, "parameters": [ { - "$ref": "802" + "$ref": "814" }, { - "$ref": "798" + "$ref": "810" }, { - "$ref": "800" + "$ref": "812" } ], "response": { "type": { - "$ref": "485" + "$ref": "497" } }, "isOverride": false, @@ -11880,7 +11976,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updatePetAsPet" }, { - "$id": "803", + "$id": "815", "kind": "basic", "name": "updateDogAsPet", "accessibility": "public", @@ -11890,14 +11986,14 @@ ], "doc": "Update a dog as a pet", "operation": { - "$id": "804", + "$id": "816", "name": "updateDogAsPet", "resourceName": "PetOperations", "doc": "Update a dog as a pet", "accessibility": "public", "parameters": [ { - "$id": "805", + "$id": "817", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -11914,7 +12010,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updateDogAsPet.contentType", "methodParameterSegments": [ { - "$id": "806", + "$id": "818", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -11934,7 +12030,7 @@ ] }, { - "$id": "807", + "$id": "819", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -11950,7 +12046,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updateDogAsPet.accept", "methodParameterSegments": [ { - "$id": "808", + "$id": "820", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -11969,12 +12065,12 @@ ] }, { - "$id": "809", + "$id": "821", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$ref": "485" + "$ref": "497" }, "isApiVersion": false, "contentTypes": [ @@ -11988,12 +12084,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updateDogAsPet.pet", "methodParameterSegments": [ { - "$id": "810", + "$id": "822", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "485" + "$ref": "497" }, "location": "Body", "isApiVersion": false, @@ -12013,7 +12109,7 @@ 200 ], "bodyType": { - "$ref": "485" + "$ref": "497" }, "headers": [], "isErrorResponse": false, @@ -12037,18 +12133,18 @@ }, "parameters": [ { - "$ref": "810" + "$ref": "822" }, { - "$ref": "806" + "$ref": "818" }, { - "$ref": "808" + "$ref": "820" } ], "response": { "type": { - "$ref": "485" + "$ref": "497" } }, "isOverride": false, @@ -12059,12 +12155,12 @@ ], "parameters": [ { - "$id": "811", + "$id": "823", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "812", + "$id": "824", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -12087,18 +12183,18 @@ "2024-08-16-preview" ], "parent": { - "$ref": "509" + "$ref": "521" }, "isMultiServiceClient": false }, { - "$id": "813", + "$id": "825", "kind": "client", "name": "DogOperations", "namespace": "SampleTypeSpec", "methods": [ { - "$id": "814", + "$id": "826", "kind": "basic", "name": "updateDogAsDog", "accessibility": "public", @@ -12108,14 +12204,14 @@ ], "doc": "Update a dog as a dog", "operation": { - "$id": "815", + "$id": "827", "name": "updateDogAsDog", "resourceName": "DogOperations", "doc": "Update a dog as a dog", "accessibility": "public", "parameters": [ { - "$id": "816", + "$id": "828", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -12132,7 +12228,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DogOperations.updateDogAsDog.contentType", "methodParameterSegments": [ { - "$id": "817", + "$id": "829", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -12152,7 +12248,7 @@ ] }, { - "$id": "818", + "$id": "830", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -12168,7 +12264,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DogOperations.updateDogAsDog.accept", "methodParameterSegments": [ { - "$id": "819", + "$id": "831", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -12187,12 +12283,12 @@ ] }, { - "$id": "820", + "$id": "832", "kind": "body", "name": "dog", "serializedName": "dog", "type": { - "$ref": "489" + "$ref": "501" }, "isApiVersion": false, "contentTypes": [ @@ -12206,12 +12302,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DogOperations.updateDogAsDog.dog", "methodParameterSegments": [ { - "$id": "821", + "$id": "833", "kind": "method", "name": "dog", "serializedName": "dog", "type": { - "$ref": "489" + "$ref": "501" }, "location": "Body", "isApiVersion": false, @@ -12231,7 +12327,7 @@ 200 ], "bodyType": { - "$ref": "489" + "$ref": "501" }, "headers": [], "isErrorResponse": false, @@ -12255,18 +12351,18 @@ }, "parameters": [ { - "$ref": "821" + "$ref": "833" }, { - "$ref": "817" + "$ref": "829" }, { - "$ref": "819" + "$ref": "831" } ], "response": { "type": { - "$ref": "489" + "$ref": "501" } }, "isOverride": false, @@ -12277,12 +12373,12 @@ ], "parameters": [ { - "$id": "822", + "$id": "834", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "823", + "$id": "835", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -12305,18 +12401,18 @@ "2024-08-16-preview" ], "parent": { - "$ref": "509" + "$ref": "521" }, "isMultiServiceClient": false }, { - "$id": "824", + "$id": "836", "kind": "client", "name": "PlantOperations", "namespace": "SampleTypeSpec", "methods": [ { - "$id": "825", + "$id": "837", "kind": "basic", "name": "getTree", "accessibility": "public", @@ -12326,14 +12422,14 @@ ], "doc": "Get a tree as a plant", "operation": { - "$id": "826", + "$id": "838", "name": "getTree", "resourceName": "PlantOperations", "doc": "Get a tree as a plant", "accessibility": "public", "parameters": [ { - "$id": "827", + "$id": "839", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -12349,7 +12445,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTree.accept", "methodParameterSegments": [ { - "$id": "828", + "$id": "840", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -12374,7 +12470,7 @@ 200 ], "bodyType": { - "$ref": "493" + "$ref": "505" }, "headers": [ { @@ -12403,12 +12499,12 @@ }, "parameters": [ { - "$ref": "828" + "$ref": "840" } ], "response": { "type": { - "$ref": "493" + "$ref": "505" } }, "isOverride": false, @@ -12417,7 +12513,108 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTree" }, { - "$id": "829", + "$id": "841", + "kind": "basic", + "name": "getTreeAsJson", + "accessibility": "public", + "apiVersions": [ + "2024-07-16-preview", + "2024-08-16-preview" + ], + "doc": "Get a tree as a plant", + "operation": { + "$id": "842", + "name": "getTreeAsJson", + "resourceName": "PlantOperations", + "doc": "Get a tree as a plant", + "accessibility": "public", + "parameters": [ + { + "$id": "843", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "212" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTreeAsJson.accept", + "methodParameterSegments": [ + { + "$id": "844", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "212" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTreeAsJson.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "505" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "214" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{sampleTypeSpecUrl}", + "path": "/plants/tree/as-plant/json", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTreeAsJson", + "decorators": [], + "namespace": "SampleTypeSpec" + }, + "parameters": [ + { + "$ref": "844" + } + ], + "response": { + "type": { + "$ref": "505" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.getTreeAsJson" + }, + { + "$id": "845", "kind": "basic", "name": "updateTree", "accessibility": "public", @@ -12427,19 +12624,19 @@ ], "doc": "Update a tree as a plant", "operation": { - "$id": "830", + "$id": "846", "name": "updateTree", "resourceName": "PlantOperations", "doc": "Update a tree as a plant", "accessibility": "public", "parameters": [ { - "$id": "831", + "$id": "847", "kind": "header", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "212" + "$ref": "216" }, "isApiVersion": false, "optional": false, @@ -12450,12 +12647,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTree.contentType", "methodParameterSegments": [ { - "$id": "832", + "$id": "848", "kind": "method", "name": "contentType", "serializedName": "Content-Type", "type": { - "$ref": "212" + "$ref": "216" }, "location": "Header", "isApiVersion": false, @@ -12469,12 +12666,12 @@ ] }, { - "$id": "833", + "$id": "849", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "216" + "$ref": "220" }, "isApiVersion": false, "optional": false, @@ -12485,12 +12682,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTree.accept", "methodParameterSegments": [ { - "$id": "834", + "$id": "850", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "216" + "$ref": "220" }, "location": "Header", "isApiVersion": false, @@ -12504,12 +12701,12 @@ ] }, { - "$id": "835", + "$id": "851", "kind": "body", "name": "tree", "serializedName": "tree", "type": { - "$ref": "493" + "$ref": "505" }, "isApiVersion": false, "contentTypes": [ @@ -12523,12 +12720,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTree.tree", "methodParameterSegments": [ { - "$id": "836", + "$id": "852", "kind": "method", "name": "tree", "serializedName": "tree", "type": { - "$ref": "493" + "$ref": "505" }, "location": "Body", "isApiVersion": false, @@ -12548,14 +12745,14 @@ 200 ], "bodyType": { - "$ref": "493" + "$ref": "505" }, "headers": [ { "name": "contentType", "nameInResponse": "content-type", "type": { - "$ref": "218" + "$ref": "222" } } ], @@ -12580,34 +12777,217 @@ }, "parameters": [ { - "$ref": "836" + "$ref": "852" }, { - "$ref": "832" + "$ref": "848" }, { - "$ref": "834" + "$ref": "850" } ], "response": { "type": { - "$ref": "493" + "$ref": "505" } }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTree" + }, + { + "$id": "853", + "kind": "basic", + "name": "updateTreeAsJson", + "accessibility": "public", + "apiVersions": [ + "2024-07-16-preview", + "2024-08-16-preview" + ], + "doc": "Update a tree as a plant", + "operation": { + "$id": "854", + "name": "updateTreeAsJson", + "resourceName": "PlantOperations", + "doc": "Update a tree as a plant", + "accessibility": "public", + "parameters": [ + { + "$id": "855", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "224" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTreeAsJson.contentType", + "methodParameterSegments": [ + { + "$id": "856", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "type": { + "$ref": "224" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTreeAsJson.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + }, + { + "$id": "857", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "228" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTreeAsJson.accept", + "methodParameterSegments": [ + { + "$id": "858", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "228" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTreeAsJson.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + }, + { + "$id": "859", + "kind": "body", + "name": "tree", + "serializedName": "tree", + "type": { + "$ref": "505" + }, + "isApiVersion": false, + "contentTypes": [ + "application/json" + ], + "defaultContentType": "application/json", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTreeAsJson.tree", + "methodParameterSegments": [ + { + "$id": "860", + "kind": "method", + "name": "tree", + "serializedName": "tree", + "type": { + "$ref": "505" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTreeAsJson.tree", + "readOnly": false, + "access": "public", + "decorators": [] + } + ] + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "505" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "230" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{sampleTypeSpecUrl}", + "path": "/plants/tree/as-plant/json", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTreeAsJson", + "decorators": [], + "namespace": "SampleTypeSpec" + }, + "parameters": [ + { + "$ref": "860" + }, + { + "$ref": "856" + }, + { + "$ref": "858" + } + ], + "response": { + "type": { + "$ref": "505" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "SampleTypeSpec.PlantOperations.updateTreeAsJson" } ], "parameters": [ { - "$id": "837", + "$id": "861", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "838", + "$id": "862", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -12630,18 +13010,18 @@ "2024-08-16-preview" ], "parent": { - "$ref": "509" + "$ref": "521" }, "isMultiServiceClient": false }, { - "$id": "839", + "$id": "863", "kind": "client", "name": "Metrics", "namespace": "SampleTypeSpec", "methods": [ { - "$id": "840", + "$id": "864", "kind": "basic", "name": "getWidgetMetrics", "accessibility": "public", @@ -12651,14 +13031,14 @@ ], "doc": "Get Widget metrics for given day of week", "operation": { - "$id": "841", + "$id": "865", "name": "getWidgetMetrics", "resourceName": "Metrics", "doc": "Get Widget metrics for given day of week", "accessibility": "public", "parameters": [ { - "$id": "842", + "$id": "866", "kind": "path", "name": "day", "serializedName": "day", @@ -12677,7 +13057,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.Metrics.getWidgetMetrics.day", "methodParameterSegments": [ { - "$id": "843", + "$id": "867", "kind": "method", "name": "day", "serializedName": "day", @@ -12696,12 +13076,12 @@ ] }, { - "$id": "844", + "$id": "868", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "220" + "$ref": "232" }, "isApiVersion": false, "optional": false, @@ -12712,12 +13092,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.Metrics.getWidgetMetrics.accept", "methodParameterSegments": [ { - "$id": "845", + "$id": "869", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "220" + "$ref": "232" }, "location": "Header", "isApiVersion": false, @@ -12737,7 +13117,7 @@ 200 ], "bodyType": { - "$ref": "504" + "$ref": "516" }, "headers": [], "isErrorResponse": false, @@ -12758,15 +13138,15 @@ }, "parameters": [ { - "$ref": "843" + "$ref": "867" }, { - "$ref": "845" + "$ref": "869" } ], "response": { "type": { - "$ref": "504" + "$ref": "516" } }, "isOverride": false, @@ -12777,12 +13157,12 @@ ], "parameters": [ { - "$id": "846", + "$id": "870", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "847", + "$id": "871", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -12805,7 +13185,7 @@ "2024-08-16-preview" ], "parent": { - "$ref": "509" + "$ref": "521" }, "isMultiServiceClient": false }