diff --git a/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/Models/Thing.Serialization.cs b/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/Models/Thing.Serialization.cs index 27a06590654..9932a260154 100644 --- a/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/Models/Thing.Serialization.cs +++ b/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/Models/Thing.Serialization.cs @@ -124,6 +124,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WriteNull("requiredNullableList"u8); } + writer.WritePropertyName("propertyWithSpecialDocs"u8); + writer.WriteStringValue(PropertyWithSpecialDocs); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -182,6 +184,7 @@ internal static Thing DeserializeThing(JsonElement element, ModelReaderWriterOpt string requiredBadDescription = default; IList optionalNullableList = default; IList requiredNullableList = default; + string propertyWithSpecialDocs = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -311,6 +314,11 @@ internal static Thing DeserializeThing(JsonElement element, ModelReaderWriterOpt requiredNullableList = array; continue; } + if (prop.NameEquals("propertyWithSpecialDocs"u8)) + { + propertyWithSpecialDocs = prop.Value.GetString(); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -333,6 +341,7 @@ internal static Thing DeserializeThing(JsonElement element, ModelReaderWriterOpt requiredBadDescription, optionalNullableList ?? new ChangeTrackingList(), requiredNullableList, + propertyWithSpecialDocs, additionalBinaryDataProperties); } diff --git a/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/Models/Thing.cs b/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/Models/Thing.cs index 8345e40fe6e..2bc903282fb 100644 --- a/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/Models/Thing.cs +++ b/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/Models/Thing.cs @@ -21,12 +21,22 @@ public partial class Thing /// required nullable string. /// description with xml <|endoftext|>. /// required nullable collection. - /// , or is null. - public Thing(string name, BinaryData requiredUnion, string requiredNullableString, string requiredBadDescription, IEnumerable requiredNullableList) + /// + /// This tests: + /// - 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. + /// - 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. + /// - 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. + /// - 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. + /// - **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. + /// - *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. + /// + /// , , or is null. + public Thing(string name, BinaryData requiredUnion, string requiredNullableString, string requiredBadDescription, IEnumerable requiredNullableList, string propertyWithSpecialDocs) { Argument.AssertNotNull(name, nameof(name)); Argument.AssertNotNull(requiredUnion, nameof(requiredUnion)); Argument.AssertNotNull(requiredBadDescription, nameof(requiredBadDescription)); + Argument.AssertNotNull(propertyWithSpecialDocs, nameof(propertyWithSpecialDocs)); Name = name; RequiredUnion = requiredUnion; @@ -34,6 +44,7 @@ public Thing(string name, BinaryData requiredUnion, string requiredNullableStrin RequiredBadDescription = requiredBadDescription; OptionalNullableList = new ChangeTrackingList(); RequiredNullableList = requiredNullableList?.ToList(); + PropertyWithSpecialDocs = propertyWithSpecialDocs; } /// Initializes a new instance of . @@ -53,8 +64,17 @@ public Thing(string name, BinaryData requiredUnion, string requiredNullableStrin /// description with xml <|endoftext|>. /// optional nullable collection. /// required nullable collection. + /// + /// This tests: + /// - 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. + /// - 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. + /// - 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. + /// - 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. + /// - **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. + /// - *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. + /// /// Keeps track of any properties unknown to the library. - internal Thing(string name, BinaryData requiredUnion, string requiredLiteralString, string requiredNullableString, string optionalNullableString, int requiredLiteralInt, float requiredLiteralFloat, bool requiredLiteralBool, string optionalLiteralString, string requiredNullableLiteralString, int? optionalLiteralInt, float? optionalLiteralFloat, bool? optionalLiteralBool, string requiredBadDescription, IList optionalNullableList, IList requiredNullableList, IDictionary additionalBinaryDataProperties) + internal Thing(string name, BinaryData requiredUnion, string requiredLiteralString, string requiredNullableString, string optionalNullableString, int requiredLiteralInt, float requiredLiteralFloat, bool requiredLiteralBool, string optionalLiteralString, string requiredNullableLiteralString, int? optionalLiteralInt, float? optionalLiteralFloat, bool? optionalLiteralBool, string requiredBadDescription, IList optionalNullableList, IList requiredNullableList, string propertyWithSpecialDocs, IDictionary additionalBinaryDataProperties) { Name = name; RequiredUnion = requiredUnion; @@ -72,6 +92,7 @@ internal Thing(string name, BinaryData requiredUnion, string requiredLiteralStri RequiredBadDescription = requiredBadDescription; OptionalNullableList = optionalNullableList; RequiredNullableList = requiredNullableList; + PropertyWithSpecialDocs = propertyWithSpecialDocs; _additionalBinaryDataProperties = additionalBinaryDataProperties; } @@ -163,5 +184,16 @@ internal Thing(string name, BinaryData requiredUnion, string requiredLiteralStri /// required nullable collection. public IList RequiredNullableList { get; set; } + + /// + /// This tests: + /// - 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. + /// - 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. + /// - 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. + /// - 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. + /// - **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. + /// - *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. + /// + public string PropertyWithSpecialDocs { get; set; } } } diff --git a/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/SampleTypeSpecClient.cs b/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/SampleTypeSpecClient.cs index 812e2900259..3fe80eeac86 100644 --- a/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/SampleTypeSpecClient.cs +++ b/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/SampleTypeSpecClient.cs @@ -1094,6 +1094,15 @@ public virtual async Task AnonymousBodyAsync(BinaryContent content /// required nullable literal string. /// description with xml <|endoftext|>. /// required nullable collection. + /// + /// This tests: + /// - 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. + /// - 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. + /// - 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. + /// - 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. + /// - **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. + /// - *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. + /// /// required optional string. /// optional literal string. /// optional literal int. @@ -1101,10 +1110,10 @@ public virtual async Task AnonymousBodyAsync(BinaryContent content /// optional literal bool. /// optional nullable collection. /// The cancellation token that can be used to cancel the operation. - /// , , or is null. - /// or is an empty string, and was expected to be non-empty. + /// , , , or is null. + /// , or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. - public virtual ClientResult AnonymousBody(string name, BinaryData requiredUnion, string requiredLiteralString, string requiredNullableString, int requiredLiteralInt, float requiredLiteralFloat, bool requiredLiteralBool, string requiredNullableLiteralString, string requiredBadDescription, IEnumerable requiredNullableList, string optionalNullableString = default, string optionalLiteralString = default, int? optionalLiteralInt = default, float? optionalLiteralFloat = default, bool? optionalLiteralBool = default, IEnumerable optionalNullableList = default, CancellationToken cancellationToken = default) + public virtual ClientResult AnonymousBody(string name, BinaryData requiredUnion, string requiredLiteralString, string requiredNullableString, int requiredLiteralInt, float requiredLiteralFloat, bool requiredLiteralBool, string requiredNullableLiteralString, string requiredBadDescription, IEnumerable requiredNullableList, string propertyWithSpecialDocs, string optionalNullableString = default, string optionalLiteralString = default, int? optionalLiteralInt = default, float? optionalLiteralFloat = default, bool? optionalLiteralBool = default, IEnumerable optionalNullableList = default, CancellationToken cancellationToken = default) { try { @@ -1113,6 +1122,7 @@ public virtual ClientResult AnonymousBody(string name, BinaryData require Argument.AssertNotNull(requiredUnion, nameof(requiredUnion)); Argument.AssertNotNull(requiredLiteralString, nameof(requiredLiteralString)); Argument.AssertNotNullOrEmpty(requiredBadDescription, nameof(requiredBadDescription)); + Argument.AssertNotNullOrEmpty(propertyWithSpecialDocs, nameof(propertyWithSpecialDocs)); Thing spreadModel = new Thing( name, @@ -1131,6 +1141,7 @@ public virtual ClientResult AnonymousBody(string name, BinaryData require requiredBadDescription, optionalNullableList?.ToList() as IList ?? new ChangeTrackingList(), requiredNullableList?.ToList() as IList ?? new ChangeTrackingList(), + propertyWithSpecialDocs, null); ClientResult result = AnonymousBody(spreadModel, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); return ClientResult.FromValue((Thing)result, result.GetRawResponse()); @@ -1157,6 +1168,15 @@ public virtual ClientResult AnonymousBody(string name, BinaryData require /// required nullable literal string. /// description with xml <|endoftext|>. /// required nullable collection. + /// + /// This tests: + /// - 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. + /// - 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. + /// - 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. + /// - 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. + /// - **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. + /// - *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. + /// /// required optional string. /// optional literal string. /// optional literal int. @@ -1164,10 +1184,10 @@ public virtual ClientResult AnonymousBody(string name, BinaryData require /// optional literal bool. /// optional nullable collection. /// The cancellation token that can be used to cancel the operation. - /// , , or is null. - /// or is an empty string, and was expected to be non-empty. + /// , , , or is null. + /// , or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. - public virtual async Task> AnonymousBodyAsync(string name, BinaryData requiredUnion, string requiredLiteralString, string requiredNullableString, int requiredLiteralInt, float requiredLiteralFloat, bool requiredLiteralBool, string requiredNullableLiteralString, string requiredBadDescription, IEnumerable requiredNullableList, string optionalNullableString = default, string optionalLiteralString = default, int? optionalLiteralInt = default, float? optionalLiteralFloat = default, bool? optionalLiteralBool = default, IEnumerable optionalNullableList = default, CancellationToken cancellationToken = default) + public virtual async Task> AnonymousBodyAsync(string name, BinaryData requiredUnion, string requiredLiteralString, string requiredNullableString, int requiredLiteralInt, float requiredLiteralFloat, bool requiredLiteralBool, string requiredNullableLiteralString, string requiredBadDescription, IEnumerable requiredNullableList, string propertyWithSpecialDocs, string optionalNullableString = default, string optionalLiteralString = default, int? optionalLiteralInt = default, float? optionalLiteralFloat = default, bool? optionalLiteralBool = default, IEnumerable optionalNullableList = default, CancellationToken cancellationToken = default) { try { @@ -1176,6 +1196,7 @@ public virtual async Task> AnonymousBodyAsync(string name, B Argument.AssertNotNull(requiredUnion, nameof(requiredUnion)); Argument.AssertNotNull(requiredLiteralString, nameof(requiredLiteralString)); Argument.AssertNotNullOrEmpty(requiredBadDescription, nameof(requiredBadDescription)); + Argument.AssertNotNullOrEmpty(propertyWithSpecialDocs, nameof(propertyWithSpecialDocs)); Thing spreadModel = new Thing( name, @@ -1194,6 +1215,7 @@ public virtual async Task> AnonymousBodyAsync(string name, B requiredBadDescription, optionalNullableList?.ToList() as IList ?? new ChangeTrackingList(), requiredNullableList?.ToList() as IList ?? new ChangeTrackingList(), + propertyWithSpecialDocs, null); ClientResult result = await AnonymousBodyAsync(spreadModel, cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null).ConfigureAwait(false); return ClientResult.FromValue((Thing)result, result.GetRawResponse()); diff --git a/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/SampleTypeSpecModelFactory.cs b/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/SampleTypeSpecModelFactory.cs index 370465cb29d..ff9639bb364 100644 --- a/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/SampleTypeSpecModelFactory.cs +++ b/docs/samples/client/csharp/SampleService/SampleClient/src/Generated/SampleTypeSpecModelFactory.cs @@ -28,8 +28,17 @@ public static partial class SampleTypeSpecModelFactory /// description with xml <|endoftext|>. /// optional nullable collection. /// required nullable collection. + /// + /// This tests: + /// - 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. + /// - 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. + /// - 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. + /// - 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. + /// - **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. + /// - *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. + /// /// A new instance for mocking. - public static Thing Thing(string name = default, BinaryData requiredUnion = default, string requiredLiteralString = default, string requiredNullableString = default, string optionalNullableString = default, int requiredLiteralInt = default, float requiredLiteralFloat = default, bool requiredLiteralBool = default, string optionalLiteralString = default, string requiredNullableLiteralString = default, int? optionalLiteralInt = default, float? optionalLiteralFloat = default, bool? optionalLiteralBool = default, string requiredBadDescription = default, IEnumerable optionalNullableList = default, IEnumerable requiredNullableList = default) + public static Thing Thing(string name = default, BinaryData requiredUnion = default, string requiredLiteralString = default, string requiredNullableString = default, string optionalNullableString = default, int requiredLiteralInt = default, float requiredLiteralFloat = default, bool requiredLiteralBool = default, string optionalLiteralString = default, string requiredNullableLiteralString = default, int? optionalLiteralInt = default, float? optionalLiteralFloat = default, bool? optionalLiteralBool = default, string requiredBadDescription = default, IEnumerable optionalNullableList = default, IEnumerable requiredNullableList = default, string propertyWithSpecialDocs = default) { optionalNullableList ??= new ChangeTrackingList(); requiredNullableList ??= new ChangeTrackingList(); @@ -51,6 +60,7 @@ public static Thing Thing(string name = default, BinaryData requiredUnion = defa requiredBadDescription, optionalNullableList.ToList(), requiredNullableList.ToList(), + propertyWithSpecialDocs, additionalBinaryDataProperties: null); } diff --git a/docs/samples/client/csharp/SampleService/main.tsp b/docs/samples/client/csharp/SampleService/main.tsp index 3a6a1e6e254..e93467b99b1 100644 --- a/docs/samples/client/csharp/SampleService/main.tsp +++ b/docs/samples/client/csharp/SampleService/main.tsp @@ -145,6 +145,17 @@ model Thing { @doc("required nullable collection") requiredNullableList: int32[] | null; + + /** + * This tests: + * - 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. + * - 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. + * - 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. + * - 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. + * - **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. + * - *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. + */ + propertyWithSpecialDocs: string; } @doc("A model with a few required nullable properties") diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/RoundTripModel/RoundTripModel.json b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/RoundTripModel/RoundTripModel.json index ec1ad84baa8..ff8b9ac9257 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/RoundTripModel/RoundTripModel.json +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/RoundTripModel/RoundTripModel.json @@ -20,7 +20,8 @@ "optionalLiteralFloat": 4.56, "optionalLiteralBool": false, "optionalNullableList": [], - "requiredNullableString": null + "requiredNullableString": null, + "propertyWithSpecialDocs": null }, "intExtensibleEnum": 1, "intExtensibleEnumCollection": [1, 3], diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/RoundTripModel/RoundTripModelWireFormat.json b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/RoundTripModel/RoundTripModelWireFormat.json index 77a02049a01..b73511bd8a9 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/RoundTripModel/RoundTripModelWireFormat.json +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/RoundTripModel/RoundTripModelWireFormat.json @@ -20,7 +20,8 @@ "optionalLiteralFloat": 4.56, "optionalLiteralBool": false, "optionalNullableList": [], - "requiredNullableString": null + "requiredNullableString": null, + "propertyWithSpecialDocs": null }, "intExtensibleEnum": 1, "intExtensibleEnumCollection": [1, 3], diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/Thing/Thing.json b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/Thing/Thing.json index a1d6b2e7073..bb607807244 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/Thing/Thing.json +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/Thing/Thing.json @@ -14,5 +14,6 @@ "optionalLiteralBool": false, "optionalNullableList": [], "requiredNullableString": null, - "extra": "stuff" + "extra": "stuff", + "propertyWithSpecialDocs": "someValue" } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/Thing/ThingWireFormat.json b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/Thing/ThingWireFormat.json index 7e880d81d85..af123750f7e 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/Thing/ThingWireFormat.json +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/Thing/ThingWireFormat.json @@ -13,5 +13,6 @@ "optionalLiteralFloat": 4.56, "optionalLiteralBool": false, "optionalNullableList": [], - "requiredNullableString": null + "requiredNullableString": null, + "propertyWithSpecialDocs": "someValue" } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/Thing/ThingWithNulls.json b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/Thing/ThingWithNulls.json index 1430dd9cdaf..064acc0acd1 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/Thing/ThingWithNulls.json +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/Thing/ThingWithNulls.json @@ -13,5 +13,6 @@ "optionalLiteralFloat": 4.56, "optionalLiteralBool": false, "requiredNullableString": null, - "extra": "stuff" + "extra": "stuff", + "propertyWithSpecialDocs": "someValue" } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/Thing/ThingWithNullsWireFormat.json b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/Thing/ThingWithNullsWireFormat.json index 8b6ee82e76f..f10380260da 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/Thing/ThingWithNullsWireFormat.json +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ModelReaderWriterValidation/TestProjects/Sample_TypeSpec/TestData/Thing/ThingWithNullsWireFormat.json @@ -12,5 +12,6 @@ "optionalLiteralInt": 456, "optionalLiteralFloat": 4.56, "optionalLiteralBool": false, - "requiredNullableString": null + "requiredNullableString": null, + "propertyWithSpecialDocs": "someValue" } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Statements/XmlDocStatement.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Statements/XmlDocStatement.cs index 2baa4239530..333daf24c5e 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Statements/XmlDocStatement.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Statements/XmlDocStatement.cs @@ -205,14 +205,38 @@ public static string EscapeLine(string s) private const string SeeCrefStart = " AllowedXmlDocTags = new HashSet(StringComparer.Ordinal) + { + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + }; + private static bool SkipValidTag(ref ReadOnlySpan span, ref int i) { var slice = span.Slice(i); - if (slice.StartsWith(SeeCrefStart.AsSpan(), StringComparison.Ordinal) || slice.StartsWith(SeeCrefEnd.AsSpan(), StringComparison.Ordinal)) + + // Check if the tag starts with any of the allowed XML doc tags + foreach (var tag in AllowedXmlDocTags) { - i += slice.IndexOf('>'); - return true; + if (slice.StartsWith(tag.AsSpan(), StringComparison.Ordinal)) + { + i += slice.IndexOf('>'); + return true; + } } + return false; } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Utilities/DocHelpers.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Utilities/DocHelpers.cs index 1f9196e2106..8fda4b4cd20 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Utilities/DocHelpers.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Utilities/DocHelpers.cs @@ -2,24 +2,161 @@ // Licensed under the MIT License. using System; +using System.Collections.Generic; +using System.Text; +using System.Text.RegularExpressions; namespace Microsoft.TypeSpec.Generator.Utilities { public class DocHelpers { + // Pre-compiled regex patterns for better performance + private static readonly Regex NumberedListRegex = new Regex(@"^\d+\.\s", RegexOptions.Compiled); + private static readonly Regex NumberedListCaptureRegex = new Regex(@"^\d+\.\s+(.*)", RegexOptions.Compiled); + private static readonly Regex BoldItalicRegex = new Regex(@"\*\*\*([^*]+?)\*\*\*", RegexOptions.Compiled); + private static readonly Regex BoldRegex = new Regex(@"\*\*([^*]+?)\*\*", RegexOptions.Compiled); + private static readonly Regex ItalicRegex = new Regex(@"(? null, (string s, null or "") => s, _ => doc, }; + + return description != null ? ConvertMarkdownToXml(description) : null; } public static FormattableString? GetFormattableDescription(string? summary, string? doc) { return FormattableStringHelpers.FromString(GetDescription(summary, doc)); } + + /// + /// Converts markdown syntax to C# XML documentation syntax. + /// Handles bold (**text**), italic (*text*), bullet lists (- item), and numbered lists (1. item). + /// + internal static string ConvertMarkdownToXml(string markdown) + { + if (string.IsNullOrEmpty(markdown)) + return markdown; + + var lines = markdown.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None); + var result = new StringBuilder(); + var inList = false; + var listType = ""; + var listItems = new List(); + + for (int i = 0; i < lines.Length; i++) + { + var line = lines[i]; + var trimmedLine = line.TrimStart(); + + // Check for bullet list item + if (trimmedLine.StartsWith("- ")) + { + if (!inList || listType != "bullet") + { + // Flush previous list if different type + if (inList) + { + AppendList(result, listType, listItems); + listItems.Clear(); + } + inList = true; + listType = "bullet"; + } + // Remove the "- " prefix and add to list items + listItems.Add(ConvertInlineMarkdown(trimmedLine.Substring(2))); + } + // Check for numbered list item (e.g., "1. ", "2. ") + else if (NumberedListRegex.IsMatch(trimmedLine)) + { + if (!inList || listType != "number") + { + // Flush previous list if different type + if (inList) + { + AppendList(result, listType, listItems); + listItems.Clear(); + } + inList = true; + listType = "number"; + } + // Remove the number prefix and add to list items + var match = NumberedListCaptureRegex.Match(trimmedLine); + listItems.Add(ConvertInlineMarkdown(match.Groups[1].Value)); + } + else + { + // Not a list item, flush any pending list + if (inList) + { + AppendList(result, listType, listItems); + listItems.Clear(); + inList = false; + } + + // Process inline markdown (bold, italic) for regular lines + var processedLine = ConvertInlineMarkdown(line); + + // Add line to result + if (result.Length > 0 && !string.IsNullOrWhiteSpace(processedLine)) + { + result.AppendLine(); + } + result.Append(processedLine); + } + } + + // Flush any remaining list + if (inList) + { + AppendList(result, listType, listItems); + } + + return result.ToString(); + } + + private static void AppendList(StringBuilder result, string listType, List items) + { + if (items.Count == 0) + return; + + if (result.Length > 0) + { + result.AppendLine(); + } + + result.Append($""); + foreach (var item in items) + { + result.Append($"{item}"); + } + result.Append(""); + } + + /// + /// Converts inline markdown (bold and italic) to XML tags. + /// Handles: **bold**, ***bold italic***, *italic* + /// + private static string ConvertInlineMarkdown(string text) + { + if (string.IsNullOrEmpty(text)) + return text; + + // Handle ***bold italic*** (must be done before ** and *) + text = BoldItalicRegex.Replace(text, "$1"); + + // Handle **bold** + text = BoldRegex.Replace(text, "$1"); + + // Handle *italic* (but not already processed bold markers) + text = ItalicRegex.Replace(text, "$1"); + + return text; + } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Utilities/DocHelpersTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Utilities/DocHelpersTests.cs new file mode 100644 index 00000000000..09b4eeac2c4 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Utilities/DocHelpersTests.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Microsoft.TypeSpec.Generator.Utilities; +using NUnit.Framework; + +namespace Microsoft.TypeSpec.Generator.Tests.Utilities +{ + public class DocHelpersTests + { + [Test] + public void TestBoldText() + { + var result = DocHelpers.GetDescription(null, "This is **bold text** in the middle."); + Assert.AreEqual("This is bold text in the middle.", result); + } + + [Test] + public void TestMultipleBold() + { + var result = DocHelpers.GetDescription(null, "This has **multiple bold** sections and **another bold** section."); + Assert.AreEqual("This has multiple bold sections and another bold section.", result); + } + + [Test] + public void TestItalicText() + { + var result = DocHelpers.GetDescription(null, "This is *italic text* in the middle."); + Assert.AreEqual("This is italic text in the middle.", result); + } + + [Test] + public void TestMultipleItalic() + { + var result = DocHelpers.GetDescription(null, "This has *multiple italic* sections and *another italic* section."); + Assert.AreEqual("This has multiple italic sections and another italic section.", result); + } + + [Test] + public void TestBoldItalicCombined() + { + var result = DocHelpers.GetDescription(null, "This has **bold**, *italic*, and ***bold italic*** text."); + Assert.AreEqual("This has bold, italic, and bold italic text.", result); + } + + [Test] + public void TestNestedFormatting() + { + var result = DocHelpers.GetDescription(null, "You can combine them like **bold with *italic inside* bold**."); + // This is a complex case - the current implementation will handle the outermost first + // The expected behavior should convert ** first, then * inside + Assert.IsNotNull(result); + Assert.That(result, Does.Contain("").Or.Contain("")); + } + + [Test] + public void TestBulletList() + { + var markdown = @"This tests: +- First bullet point +- Second bullet point +- Third bullet point"; + var result = DocHelpers.GetDescription(null, markdown); + + Assert.That(result, Does.Contain("")); + Assert.That(result, Does.Contain("First bullet point")); + Assert.That(result, Does.Contain("Second bullet point")); + Assert.That(result, Does.Contain("Third bullet point")); + Assert.That(result, Does.Contain("")); + } + + [Test] + public void TestBulletListWithFormatting() + { + var markdown = @"This tests: +- Simple bullet point +- Bullet with **bold text** +- Bullet with *italic text*"; + var result = DocHelpers.GetDescription(null, markdown); + + Assert.That(result, Does.Contain("")); + Assert.That(result, Does.Contain("Simple bullet point")); + Assert.That(result, Does.Contain("Bullet with bold text")); + Assert.That(result, Does.Contain("Bullet with italic text")); + } + + [Test] + public void TestNumberedList() + { + var markdown = @"Steps to follow: +1. First step +2. Second step +3. Third step"; + var result = DocHelpers.GetDescription(null, markdown); + + Assert.That(result, Does.Contain("")); + Assert.That(result, Does.Contain("First step")); + Assert.That(result, Does.Contain("Second step")); + Assert.That(result, Does.Contain("Third step")); + Assert.That(result, Does.Contain("")); + } + + [Test] + public void TestNumberedListWithFormatting() + { + var markdown = @"Steps: +1. First step with **important** note +2. Second step with *emphasis* +3. Third step combining **bold** and *italic*"; + var result = DocHelpers.GetDescription(null, markdown); + + Assert.That(result, Does.Contain("")); + Assert.That(result, Does.Contain("First step with important note")); + Assert.That(result, Does.Contain("Second step with emphasis")); + } + + [Test] + public void TestMixedContent() + { + var markdown = @"This is a paragraph with **bold** text. +- First bullet +- Second bullet +Another paragraph with *italic* text."; + var result = DocHelpers.GetDescription(null, markdown); + + Assert.That(result, Does.Contain("bold")); + Assert.That(result, Does.Contain("")); + Assert.That(result, Does.Contain("italic")); + } + + [Test] + public void TestEmptyString() + { + var result = DocHelpers.GetDescription(null, ""); + Assert.IsNull(result); + } + + [Test] + public void TestNullString() + { + var result = DocHelpers.GetDescription(null, null); + Assert.IsNull(result); + } + + [Test] + public void TestPlainText() + { + var result = DocHelpers.GetDescription(null, "This is plain text without any markdown."); + Assert.AreEqual("This is plain text without any markdown.", result); + } + + [Test] + public void TestSummaryPreferredOverDoc() + { + var result = DocHelpers.GetDescription("Summary text", "Doc text"); + Assert.AreEqual("Doc text", result); + } + + [Test] + public void TestSummaryUsedWhenDocEmpty() + { + var result = DocHelpers.GetDescription("Summary with **bold**", ""); + Assert.AreEqual("Summary with bold", result); + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Thing.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Thing.Serialization.cs index f57e9d96cb5..cc309d6d3ad 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Thing.Serialization.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Thing.Serialization.cs @@ -127,6 +127,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WriteNull("requiredNullableList"u8); } + writer.WritePropertyName("propertyWithSpecialDocs"u8); + writer.WriteStringValue(PropertyWithSpecialDocs); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -185,6 +187,7 @@ internal static Thing DeserializeThing(JsonElement element, ModelReaderWriterOpt string requiredBadDescription = default; IList optionalNullableList = default; IList requiredNullableList = default; + string propertyWithSpecialDocs = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -318,6 +321,11 @@ internal static Thing DeserializeThing(JsonElement element, ModelReaderWriterOpt requiredNullableList = array; continue; } + if (prop.NameEquals("propertyWithSpecialDocs"u8)) + { + propertyWithSpecialDocs = prop.Value.GetString(); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -340,6 +348,7 @@ internal static Thing DeserializeThing(JsonElement element, ModelReaderWriterOpt requiredBadDescription, optionalNullableList ?? new ChangeTrackingList(), requiredNullableList, + propertyWithSpecialDocs, additionalBinaryDataProperties); } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Thing.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Thing.cs index ef4a9a45c62..96618c816b8 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Thing.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/Models/Thing.cs @@ -25,12 +25,17 @@ public partial class Thing /// required nullable literal string. /// description with xml <|endoftext|>. /// required nullable collection. - /// , or is null. - public Thing(string rename, BinaryData requiredUnion, string requiredNullableString, ThingRequiredNullableLiteralString1? requiredNullableLiteralString, string requiredBadDescription, IEnumerable requiredNullableList) + /// + /// This tests: + /// 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.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.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.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.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.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. + /// + /// , , or is null. + public Thing(string rename, BinaryData requiredUnion, string requiredNullableString, ThingRequiredNullableLiteralString1? requiredNullableLiteralString, string requiredBadDescription, IEnumerable requiredNullableList, string propertyWithSpecialDocs) { Argument.AssertNotNull(rename, nameof(rename)); Argument.AssertNotNull(requiredUnion, nameof(requiredUnion)); Argument.AssertNotNull(requiredBadDescription, nameof(requiredBadDescription)); + Argument.AssertNotNull(propertyWithSpecialDocs, nameof(propertyWithSpecialDocs)); Rename = rename; RequiredUnion = requiredUnion; @@ -39,6 +44,7 @@ public Thing(string rename, BinaryData requiredUnion, string requiredNullableStr RequiredBadDescription = requiredBadDescription; OptionalNullableList = new ChangeTrackingList(); RequiredNullableList = requiredNullableList?.ToList(); + PropertyWithSpecialDocs = propertyWithSpecialDocs; } /// Initializes a new instance of . @@ -58,8 +64,12 @@ public Thing(string rename, BinaryData requiredUnion, string requiredNullableStr /// description with xml <|endoftext|>. /// optional nullable collection. /// required nullable collection. + /// + /// This tests: + /// 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.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.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.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.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.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. + /// /// Keeps track of any properties unknown to the library. - internal Thing(string rename, BinaryData requiredUnion, string requiredLiteralString, string requiredNullableString, string optionalNullableString, int requiredLiteralInt, float requiredLiteralFloat, bool requiredLiteralBool, ThingOptionalLiteralString? optionalLiteralString, ThingRequiredNullableLiteralString1? requiredNullableLiteralString, ThingOptionalLiteralInt? optionalLiteralInt, ThingOptionalLiteralFloat? optionalLiteralFloat, bool? optionalLiteralBool, string requiredBadDescription, IList optionalNullableList, IList requiredNullableList, IDictionary additionalBinaryDataProperties) + internal Thing(string rename, BinaryData requiredUnion, string requiredLiteralString, string requiredNullableString, string optionalNullableString, int requiredLiteralInt, float requiredLiteralFloat, bool requiredLiteralBool, ThingOptionalLiteralString? optionalLiteralString, ThingRequiredNullableLiteralString1? requiredNullableLiteralString, ThingOptionalLiteralInt? optionalLiteralInt, ThingOptionalLiteralFloat? optionalLiteralFloat, bool? optionalLiteralBool, string requiredBadDescription, IList optionalNullableList, IList requiredNullableList, string propertyWithSpecialDocs, IDictionary additionalBinaryDataProperties) { Rename = rename; RequiredUnion = requiredUnion; @@ -77,6 +87,7 @@ internal Thing(string rename, BinaryData requiredUnion, string requiredLiteralSt RequiredBadDescription = requiredBadDescription; OptionalNullableList = optionalNullableList; RequiredNullableList = requiredNullableList; + PropertyWithSpecialDocs = propertyWithSpecialDocs; _additionalBinaryDataProperties = additionalBinaryDataProperties; } @@ -165,5 +176,11 @@ internal Thing(string rename, BinaryData requiredUnion, string requiredLiteralSt /// required nullable collection. public IList RequiredNullableList { get; set; } + + /// + /// This tests: + /// 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.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.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.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.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.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. + /// + public string PropertyWithSpecialDocs { get; set; } } } diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecClient.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecClient.cs index fe4644f654f..83acde20eb0 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecClient.cs @@ -670,6 +670,10 @@ public virtual async Task AnonymousBodyAsync(BinaryContent content /// required nullable literal string. /// description with xml <|endoftext|>. /// required nullable collection. + /// + /// This tests: + /// 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.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.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.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.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.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. + /// /// required optional string. /// optional literal string. /// optional literal int. @@ -677,14 +681,15 @@ public virtual async Task AnonymousBodyAsync(BinaryContent content /// optional literal bool. /// optional nullable collection. /// The cancellation token that can be used to cancel the operation. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. - public virtual ClientResult AnonymousBody(string name, BinaryData requiredUnion, string requiredNullableString, ThingRequiredNullableLiteralString1? requiredNullableLiteralString, string requiredBadDescription, IEnumerable requiredNullableList, string optionalNullableString = default, ThingOptionalLiteralString? optionalLiteralString = default, ThingOptionalLiteralInt? optionalLiteralInt = default, ThingOptionalLiteralFloat? optionalLiteralFloat = default, bool? optionalLiteralBool = default, IEnumerable optionalNullableList = default, CancellationToken cancellationToken = default) + public virtual ClientResult AnonymousBody(string name, BinaryData requiredUnion, string requiredNullableString, ThingRequiredNullableLiteralString1? requiredNullableLiteralString, string requiredBadDescription, IEnumerable requiredNullableList, string propertyWithSpecialDocs, string optionalNullableString = default, ThingOptionalLiteralString? optionalLiteralString = default, ThingOptionalLiteralInt? optionalLiteralInt = default, ThingOptionalLiteralFloat? optionalLiteralFloat = default, bool? optionalLiteralBool = default, IEnumerable optionalNullableList = default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNull(requiredUnion, nameof(requiredUnion)); Argument.AssertNotNullOrEmpty(requiredBadDescription, nameof(requiredBadDescription)); + Argument.AssertNotNullOrEmpty(propertyWithSpecialDocs, nameof(propertyWithSpecialDocs)); Thing spreadModel = new Thing( default, @@ -703,6 +708,7 @@ public virtual ClientResult AnonymousBody(string name, BinaryData require requiredBadDescription, optionalNullableList?.ToList() as IList ?? new ChangeTrackingList(), requiredNullableList?.ToList() as IList ?? new ChangeTrackingList(), + propertyWithSpecialDocs, default); ClientResult result = AnonymousBody(spreadModel, cancellationToken.ToRequestOptions()); return ClientResult.FromValue((Thing)result, result.GetRawResponse()); @@ -715,6 +721,10 @@ public virtual ClientResult AnonymousBody(string name, BinaryData require /// required nullable literal string. /// description with xml <|endoftext|>. /// required nullable collection. + /// + /// This tests: + /// 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.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.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.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.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.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. + /// /// required optional string. /// optional literal string. /// optional literal int. @@ -722,14 +732,15 @@ public virtual ClientResult AnonymousBody(string name, BinaryData require /// optional literal bool. /// optional nullable collection. /// The cancellation token that can be used to cancel the operation. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. - public virtual async Task> AnonymousBodyAsync(string name, BinaryData requiredUnion, string requiredNullableString, ThingRequiredNullableLiteralString1? requiredNullableLiteralString, string requiredBadDescription, IEnumerable requiredNullableList, string optionalNullableString = default, ThingOptionalLiteralString? optionalLiteralString = default, ThingOptionalLiteralInt? optionalLiteralInt = default, ThingOptionalLiteralFloat? optionalLiteralFloat = default, bool? optionalLiteralBool = default, IEnumerable optionalNullableList = default, CancellationToken cancellationToken = default) + public virtual async Task> AnonymousBodyAsync(string name, BinaryData requiredUnion, string requiredNullableString, ThingRequiredNullableLiteralString1? requiredNullableLiteralString, string requiredBadDescription, IEnumerable requiredNullableList, string propertyWithSpecialDocs, string optionalNullableString = default, ThingOptionalLiteralString? optionalLiteralString = default, ThingOptionalLiteralInt? optionalLiteralInt = default, ThingOptionalLiteralFloat? optionalLiteralFloat = default, bool? optionalLiteralBool = default, IEnumerable optionalNullableList = default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(name, nameof(name)); Argument.AssertNotNull(requiredUnion, nameof(requiredUnion)); Argument.AssertNotNullOrEmpty(requiredBadDescription, nameof(requiredBadDescription)); + Argument.AssertNotNullOrEmpty(propertyWithSpecialDocs, nameof(propertyWithSpecialDocs)); Thing spreadModel = new Thing( default, @@ -748,6 +759,7 @@ public virtual async Task> AnonymousBodyAsync(string name, B requiredBadDescription, optionalNullableList?.ToList() as IList ?? new ChangeTrackingList(), requiredNullableList?.ToList() as IList ?? new ChangeTrackingList(), + propertyWithSpecialDocs, default); ClientResult result = await AnonymousBodyAsync(spreadModel, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue((Thing)result, result.GetRawResponse()); diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecModelFactory.cs b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecModelFactory.cs index f16d669f0d6..f8616b3f57e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecModelFactory.cs +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/Generated/SampleTypeSpecModelFactory.cs @@ -28,8 +28,12 @@ public static partial class SampleTypeSpecModelFactory /// description with xml <|endoftext|>. /// optional nullable collection. /// required nullable collection. + /// + /// This tests: + /// 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.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.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.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.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.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. + /// /// A new instance for mocking. - public static Thing Thing(string rename = default, BinaryData requiredUnion = default, string requiredNullableString = default, string optionalNullableString = default, ThingOptionalLiteralString? optionalLiteralString = default, ThingRequiredNullableLiteralString1? requiredNullableLiteralString = default, ThingOptionalLiteralInt? optionalLiteralInt = default, ThingOptionalLiteralFloat? optionalLiteralFloat = default, bool? optionalLiteralBool = default, string requiredBadDescription = default, IEnumerable optionalNullableList = default, IEnumerable requiredNullableList = default) + public static Thing Thing(string rename = default, BinaryData requiredUnion = default, string requiredNullableString = default, string optionalNullableString = default, ThingOptionalLiteralString? optionalLiteralString = default, ThingRequiredNullableLiteralString1? requiredNullableLiteralString = default, ThingOptionalLiteralInt? optionalLiteralInt = default, ThingOptionalLiteralFloat? optionalLiteralFloat = default, bool? optionalLiteralBool = default, string requiredBadDescription = default, IEnumerable optionalNullableList = default, IEnumerable requiredNullableList = default, string propertyWithSpecialDocs = default) { optionalNullableList ??= new ChangeTrackingList(); requiredNullableList ??= new ChangeTrackingList(); @@ -51,6 +55,7 @@ public static Thing Thing(string rename = default, BinaryData requiredUnion = de requiredBadDescription, optionalNullableList.ToList(), requiredNullableList.ToList(), + propertyWithSpecialDocs, additionalBinaryDataProperties: null); } 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 42e9762adf7..2a8575f9aa0 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 @@ -2253,11 +2253,37 @@ } }, "isHttpMetadata": false + }, + { + "$id": "229", + "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": "230", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "SampleTypeSpec.Thing.propertyWithSpecialDocs", + "serializationOptions": { + "json": { + "name": "propertyWithSpecialDocs" + } + }, + "isHttpMetadata": false } ] }, { - "$id": "229", + "$id": "231", "kind": "model", "name": "RoundTripModel", "namespace": "SampleTypeSpec", @@ -2267,13 +2293,13 @@ "decorators": [], "properties": [ { - "$id": "230", + "$id": "232", "kind": "property", "name": "requiredString", "serializedName": "requiredString", "doc": "Required string, illustrating a reference type property.", "type": { - "$id": "231", + "$id": "233", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2293,13 +2319,13 @@ "isHttpMetadata": false }, { - "$id": "232", + "$id": "234", "kind": "property", "name": "requiredInt", "serializedName": "requiredInt", "doc": "Required int, illustrating a value type property.", "type": { - "$id": "233", + "$id": "235", "kind": "int32", "name": "int32", "encode": "string", @@ -2320,13 +2346,13 @@ "isHttpMetadata": false }, { - "$id": "234", + "$id": "236", "kind": "property", "name": "requiredCollection", "serializedName": "requiredCollection", "doc": "Required collection of enums", "type": { - "$id": "235", + "$id": "237", "kind": "array", "name": "ArrayStringFixedEnum", "valueType": { @@ -2349,16 +2375,16 @@ "isHttpMetadata": false }, { - "$id": "236", + "$id": "238", "kind": "property", "name": "requiredDictionary", "serializedName": "requiredDictionary", "doc": "Required dictionary of enums", "type": { - "$id": "237", + "$id": "239", "kind": "dict", "keyType": { - "$id": "238", + "$id": "240", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2383,7 +2409,7 @@ "isHttpMetadata": false }, { - "$id": "239", + "$id": "241", "kind": "property", "name": "requiredModel", "serializedName": "requiredModel", @@ -2405,7 +2431,7 @@ "isHttpMetadata": false }, { - "$id": "240", + "$id": "242", "kind": "property", "name": "intExtensibleEnum", "serializedName": "intExtensibleEnum", @@ -2427,13 +2453,13 @@ "isHttpMetadata": false }, { - "$id": "241", + "$id": "243", "kind": "property", "name": "intExtensibleEnumCollection", "serializedName": "intExtensibleEnumCollection", "doc": "this is a collection of int based extensible enum", "type": { - "$id": "242", + "$id": "244", "kind": "array", "name": "ArrayIntExtensibleEnum", "valueType": { @@ -2456,7 +2482,7 @@ "isHttpMetadata": false }, { - "$id": "243", + "$id": "245", "kind": "property", "name": "floatExtensibleEnum", "serializedName": "floatExtensibleEnum", @@ -2478,7 +2504,7 @@ "isHttpMetadata": false }, { - "$id": "244", + "$id": "246", "kind": "property", "name": "floatExtensibleEnumWithIntValue", "serializedName": "floatExtensibleEnumWithIntValue", @@ -2500,13 +2526,13 @@ "isHttpMetadata": false }, { - "$id": "245", + "$id": "247", "kind": "property", "name": "floatExtensibleEnumCollection", "serializedName": "floatExtensibleEnumCollection", "doc": "this is a collection of float based extensible enum", "type": { - "$id": "246", + "$id": "248", "kind": "array", "name": "ArrayFloatExtensibleEnum", "valueType": { @@ -2529,7 +2555,7 @@ "isHttpMetadata": false }, { - "$id": "247", + "$id": "249", "kind": "property", "name": "floatFixedEnum", "serializedName": "floatFixedEnum", @@ -2551,7 +2577,7 @@ "isHttpMetadata": false }, { - "$id": "248", + "$id": "250", "kind": "property", "name": "floatFixedEnumWithIntValue", "serializedName": "floatFixedEnumWithIntValue", @@ -2573,13 +2599,13 @@ "isHttpMetadata": false }, { - "$id": "249", + "$id": "251", "kind": "property", "name": "floatFixedEnumCollection", "serializedName": "floatFixedEnumCollection", "doc": "this is a collection of float based fixed enum", "type": { - "$id": "250", + "$id": "252", "kind": "array", "name": "ArrayFloatFixedEnum", "valueType": { @@ -2602,7 +2628,7 @@ "isHttpMetadata": false }, { - "$id": "251", + "$id": "253", "kind": "property", "name": "intFixedEnum", "serializedName": "intFixedEnum", @@ -2624,13 +2650,13 @@ "isHttpMetadata": false }, { - "$id": "252", + "$id": "254", "kind": "property", "name": "intFixedEnumCollection", "serializedName": "intFixedEnumCollection", "doc": "this is a collection of int based fixed enum", "type": { - "$id": "253", + "$id": "255", "kind": "array", "name": "ArrayIntFixedEnum", "valueType": { @@ -2653,7 +2679,7 @@ "isHttpMetadata": false }, { - "$id": "254", + "$id": "256", "kind": "property", "name": "stringFixedEnum", "serializedName": "stringFixedEnum", @@ -2675,13 +2701,13 @@ "isHttpMetadata": false }, { - "$id": "255", + "$id": "257", "kind": "property", "name": "requiredUnknown", "serializedName": "requiredUnknown", "doc": "required unknown", "type": { - "$id": "256", + "$id": "258", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2701,13 +2727,13 @@ "isHttpMetadata": false }, { - "$id": "257", + "$id": "259", "kind": "property", "name": "optionalUnknown", "serializedName": "optionalUnknown", "doc": "optional unknown", "type": { - "$id": "258", + "$id": "260", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2727,23 +2753,23 @@ "isHttpMetadata": false }, { - "$id": "259", + "$id": "261", "kind": "property", "name": "requiredRecordUnknown", "serializedName": "requiredRecordUnknown", "doc": "required record of unknown", "type": { - "$id": "260", + "$id": "262", "kind": "dict", "keyType": { - "$id": "261", + "$id": "263", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "262", + "$id": "264", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2765,13 +2791,13 @@ "isHttpMetadata": false }, { - "$id": "263", + "$id": "265", "kind": "property", "name": "optionalRecordUnknown", "serializedName": "optionalRecordUnknown", "doc": "optional record of unknown", "type": { - "$ref": "260" + "$ref": "262" }, "optional": true, "readOnly": false, @@ -2787,13 +2813,13 @@ "isHttpMetadata": false }, { - "$id": "264", + "$id": "266", "kind": "property", "name": "readOnlyRequiredRecordUnknown", "serializedName": "readOnlyRequiredRecordUnknown", "doc": "required readonly record of unknown", "type": { - "$ref": "260" + "$ref": "262" }, "optional": false, "readOnly": true, @@ -2809,13 +2835,13 @@ "isHttpMetadata": false }, { - "$id": "265", + "$id": "267", "kind": "property", "name": "readOnlyOptionalRecordUnknown", "serializedName": "readOnlyOptionalRecordUnknown", "doc": "optional readonly record of unknown", "type": { - "$ref": "260" + "$ref": "262" }, "optional": true, "readOnly": true, @@ -2831,13 +2857,13 @@ "isHttpMetadata": false }, { - "$id": "266", + "$id": "268", "kind": "property", "name": "modelWithRequiredNullable", "serializedName": "modelWithRequiredNullable", "doc": "this is a model with required nullable properties", "type": { - "$id": "267", + "$id": "269", "kind": "model", "name": "ModelWithRequiredNullableProperties", "namespace": "SampleTypeSpec", @@ -2847,16 +2873,16 @@ "decorators": [], "properties": [ { - "$id": "268", + "$id": "270", "kind": "property", "name": "requiredNullablePrimitive", "serializedName": "requiredNullablePrimitive", "doc": "required nullable primitive type", "type": { - "$id": "269", + "$id": "271", "kind": "nullable", "type": { - "$id": "270", + "$id": "272", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -2878,13 +2904,13 @@ "isHttpMetadata": false }, { - "$id": "271", + "$id": "273", "kind": "property", "name": "requiredExtensibleEnum", "serializedName": "requiredExtensibleEnum", "doc": "required nullable extensible enum type", "type": { - "$id": "272", + "$id": "274", "kind": "nullable", "type": { "$ref": "22" @@ -2905,13 +2931,13 @@ "isHttpMetadata": false }, { - "$id": "273", + "$id": "275", "kind": "property", "name": "requiredFixedEnum", "serializedName": "requiredFixedEnum", "doc": "required nullable fixed enum type", "type": { - "$id": "274", + "$id": "276", "kind": "nullable", "type": { "$ref": "17" @@ -2947,13 +2973,13 @@ "isHttpMetadata": false }, { - "$id": "275", + "$id": "277", "kind": "property", "name": "requiredBytes", "serializedName": "requiredBytes", "doc": "Required bytes", "type": { - "$id": "276", + "$id": "278", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -2976,10 +3002,10 @@ ] }, { - "$ref": "267" + "$ref": "269" }, { - "$id": "277", + "$id": "279", "kind": "model", "name": "Friend", "namespace": "SampleTypeSpec", @@ -2989,13 +3015,13 @@ "decorators": [], "properties": [ { - "$id": "278", + "$id": "280", "kind": "property", "name": "name", "serializedName": "name", "doc": "name of the NotFriend", "type": { - "$id": "279", + "$id": "281", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3017,7 +3043,7 @@ ] }, { - "$id": "280", + "$id": "282", "kind": "model", "name": "RenamedModel", "namespace": "SampleTypeSpec", @@ -3027,13 +3053,13 @@ "decorators": [], "properties": [ { - "$id": "281", + "$id": "283", "kind": "property", "name": "otherName", "serializedName": "otherName", "doc": "name of the ModelWithClientName", "type": { - "$id": "282", + "$id": "284", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3055,7 +3081,7 @@ ] }, { - "$id": "283", + "$id": "285", "kind": "model", "name": "ReturnsAnonymousModelResponse", "namespace": "SampleTypeSpec", @@ -3065,7 +3091,7 @@ "properties": [] }, { - "$id": "284", + "$id": "286", "kind": "model", "name": "ListWithNextLinkResponse", "namespace": "SampleTypeSpec", @@ -3074,12 +3100,12 @@ "decorators": [], "properties": [ { - "$id": "285", + "$id": "287", "kind": "property", "name": "things", "serializedName": "things", "type": { - "$id": "286", + "$id": "288", "kind": "array", "name": "ArrayThing", "valueType": { @@ -3102,12 +3128,12 @@ "isHttpMetadata": false }, { - "$id": "287", + "$id": "289", "kind": "property", "name": "next", "serializedName": "next", "type": { - "$id": "288", + "$id": "290", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -3129,7 +3155,7 @@ ] }, { - "$id": "289", + "$id": "291", "kind": "model", "name": "ListWithStringNextLinkResponse", "namespace": "SampleTypeSpec", @@ -3138,12 +3164,12 @@ "decorators": [], "properties": [ { - "$id": "290", + "$id": "292", "kind": "property", "name": "things", "serializedName": "things", "type": { - "$ref": "286" + "$ref": "288" }, "optional": false, "readOnly": false, @@ -3159,12 +3185,12 @@ "isHttpMetadata": false }, { - "$id": "291", + "$id": "293", "kind": "property", "name": "next", "serializedName": "next", "type": { - "$id": "292", + "$id": "294", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3186,7 +3212,7 @@ ] }, { - "$id": "293", + "$id": "295", "kind": "model", "name": "ListWithContinuationTokenResponse", "namespace": "SampleTypeSpec", @@ -3195,12 +3221,12 @@ "decorators": [], "properties": [ { - "$id": "294", + "$id": "296", "kind": "property", "name": "things", "serializedName": "things", "type": { - "$ref": "286" + "$ref": "288" }, "optional": false, "readOnly": false, @@ -3216,12 +3242,12 @@ "isHttpMetadata": false }, { - "$id": "295", + "$id": "297", "kind": "property", "name": "nextToken", "serializedName": "nextToken", "type": { - "$id": "296", + "$id": "298", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3243,7 +3269,7 @@ ] }, { - "$id": "297", + "$id": "299", "kind": "model", "name": "ListWithContinuationTokenHeaderResponseResponse", "namespace": "", @@ -3252,12 +3278,12 @@ "decorators": [], "properties": [ { - "$id": "298", + "$id": "300", "kind": "property", "name": "things", "serializedName": "things", "type": { - "$ref": "286" + "$ref": "288" }, "optional": false, "readOnly": false, @@ -3275,7 +3301,7 @@ ] }, { - "$id": "299", + "$id": "301", "kind": "model", "name": "PageThing", "namespace": "SampleTypeSpec", @@ -3284,12 +3310,12 @@ "decorators": [], "properties": [ { - "$id": "300", + "$id": "302", "kind": "property", "name": "items", "serializedName": "items", "type": { - "$ref": "286" + "$ref": "288" }, "optional": false, "readOnly": false, @@ -3307,7 +3333,7 @@ ] }, { - "$id": "301", + "$id": "303", "kind": "model", "name": "ModelWithEmbeddedNonBodyParameters", "namespace": "SampleTypeSpec", @@ -3316,13 +3342,13 @@ "decorators": [], "properties": [ { - "$id": "302", + "$id": "304", "kind": "property", "name": "name", "serializedName": "name", "doc": "name of the ModelWithEmbeddedNonBodyParameters", "type": { - "$id": "303", + "$id": "305", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3342,13 +3368,13 @@ "isHttpMetadata": false }, { - "$id": "304", + "$id": "306", "kind": "property", "name": "requiredHeader", "serializedName": "requiredHeader", "doc": "required header parameter", "type": { - "$id": "305", + "$id": "307", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3368,13 +3394,13 @@ "isHttpMetadata": true }, { - "$id": "306", + "$id": "308", "kind": "property", "name": "optionalHeader", "serializedName": "optionalHeader", "doc": "optional header parameter", "type": { - "$id": "307", + "$id": "309", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3394,13 +3420,13 @@ "isHttpMetadata": true }, { - "$id": "308", + "$id": "310", "kind": "property", "name": "requiredQuery", "serializedName": "requiredQuery", "doc": "required query parameter", "type": { - "$id": "309", + "$id": "311", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3420,13 +3446,13 @@ "isHttpMetadata": true }, { - "$id": "310", + "$id": "312", "kind": "property", "name": "optionalQuery", "serializedName": "optionalQuery", "doc": "optional query parameter", "type": { - "$id": "311", + "$id": "313", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3448,7 +3474,7 @@ ] }, { - "$id": "312", + "$id": "314", "kind": "model", "name": "DynamicModel", "namespace": "SampleTypeSpec", @@ -3463,12 +3489,12 @@ ], "properties": [ { - "$id": "313", + "$id": "315", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "314", + "$id": "316", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3488,12 +3514,12 @@ "isHttpMetadata": false }, { - "$id": "315", + "$id": "317", "kind": "property", "name": "optionalUnknown", "serializedName": "optionalUnknown", "type": { - "$id": "316", + "$id": "318", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -3513,12 +3539,12 @@ "isHttpMetadata": false }, { - "$id": "317", + "$id": "319", "kind": "property", "name": "optionalInt", "serializedName": "optionalInt", "type": { - "$id": "318", + "$id": "320", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -3538,12 +3564,12 @@ "isHttpMetadata": false }, { - "$id": "319", + "$id": "321", "kind": "property", "name": "optionalNullableList", "serializedName": "optionalNullableList", "type": { - "$id": "320", + "$id": "322", "kind": "nullable", "type": { "$ref": "225" @@ -3564,12 +3590,12 @@ "isHttpMetadata": false }, { - "$id": "321", + "$id": "323", "kind": "property", "name": "requiredNullableList", "serializedName": "requiredNullableList", "type": { - "$id": "322", + "$id": "324", "kind": "nullable", "type": { "$ref": "225" @@ -3590,25 +3616,25 @@ "isHttpMetadata": false }, { - "$id": "323", + "$id": "325", "kind": "property", "name": "optionalNullableDictionary", "serializedName": "optionalNullableDictionary", "type": { - "$id": "324", + "$id": "326", "kind": "nullable", "type": { - "$id": "325", + "$id": "327", "kind": "dict", "keyType": { - "$id": "326", + "$id": "328", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "327", + "$id": "329", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -3632,15 +3658,15 @@ "isHttpMetadata": false }, { - "$id": "328", + "$id": "330", "kind": "property", "name": "requiredNullableDictionary", "serializedName": "requiredNullableDictionary", "type": { - "$id": "329", + "$id": "331", "kind": "nullable", "type": { - "$ref": "325" + "$ref": "327" }, "namespace": "SampleTypeSpec" }, @@ -3658,12 +3684,12 @@ "isHttpMetadata": false }, { - "$id": "330", + "$id": "332", "kind": "property", "name": "primitiveDictionary", "serializedName": "primitiveDictionary", "type": { - "$ref": "325" + "$ref": "327" }, "optional": false, "readOnly": false, @@ -3679,12 +3705,12 @@ "isHttpMetadata": false }, { - "$id": "331", + "$id": "333", "kind": "property", "name": "foo", "serializedName": "foo", "type": { - "$id": "332", + "$id": "334", "kind": "model", "name": "AnotherDynamicModel", "namespace": "SampleTypeSpec", @@ -3699,12 +3725,12 @@ ], "properties": [ { - "$id": "333", + "$id": "335", "kind": "property", "name": "bar", "serializedName": "bar", "type": { - "$id": "334", + "$id": "336", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3739,16 +3765,16 @@ "isHttpMetadata": false }, { - "$id": "335", + "$id": "337", "kind": "property", "name": "listFoo", "serializedName": "listFoo", "type": { - "$id": "336", + "$id": "338", "kind": "array", "name": "ArrayAnotherDynamicModel", "valueType": { - "$ref": "332" + "$ref": "334" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -3767,16 +3793,16 @@ "isHttpMetadata": false }, { - "$id": "337", + "$id": "339", "kind": "property", "name": "listOfListFoo", "serializedName": "listOfListFoo", "type": { - "$id": "338", + "$id": "340", "kind": "array", "name": "ArrayArray", "valueType": { - "$ref": "336" + "$ref": "338" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -3795,22 +3821,22 @@ "isHttpMetadata": false }, { - "$id": "339", + "$id": "341", "kind": "property", "name": "dictionaryFoo", "serializedName": "dictionaryFoo", "type": { - "$id": "340", + "$id": "342", "kind": "dict", "keyType": { - "$id": "341", + "$id": "343", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "332" + "$ref": "334" }, "decorators": [] }, @@ -3828,22 +3854,22 @@ "isHttpMetadata": false }, { - "$id": "342", + "$id": "344", "kind": "property", "name": "dictionaryOfDictionaryFoo", "serializedName": "dictionaryOfDictionaryFoo", "type": { - "$id": "343", + "$id": "345", "kind": "dict", "keyType": { - "$id": "344", + "$id": "346", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "340" + "$ref": "342" }, "decorators": [] }, @@ -3861,22 +3887,22 @@ "isHttpMetadata": false }, { - "$id": "345", + "$id": "347", "kind": "property", "name": "dictionaryListFoo", "serializedName": "dictionaryListFoo", "type": { - "$id": "346", + "$id": "348", "kind": "dict", "keyType": { - "$id": "347", + "$id": "349", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "336" + "$ref": "338" }, "decorators": [] }, @@ -3894,16 +3920,16 @@ "isHttpMetadata": false }, { - "$id": "348", + "$id": "350", "kind": "property", "name": "listOfDictionaryFoo", "serializedName": "listOfDictionaryFoo", "type": { - "$id": "349", + "$id": "351", "kind": "array", "name": "ArrayRecord", "valueType": { - "$ref": "340" + "$ref": "342" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -3924,10 +3950,10 @@ ] }, { - "$ref": "332" + "$ref": "334" }, { - "$id": "350", + "$id": "352", "kind": "model", "name": "Animal", "namespace": "SampleTypeSpec", @@ -3936,13 +3962,13 @@ "doc": "Base animal with discriminator", "decorators": [], "discriminatorProperty": { - "$id": "351", + "$id": "353", "kind": "property", "name": "kind", "serializedName": "kind", "doc": "The kind of animal", "type": { - "$id": "352", + "$id": "354", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3963,16 +3989,16 @@ }, "properties": [ { - "$ref": "351" + "$ref": "353" }, { - "$id": "353", + "$id": "355", "kind": "property", "name": "name", "serializedName": "name", "doc": "Name of the animal", "type": { - "$id": "354", + "$id": "356", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3994,7 +4020,7 @@ ], "discriminatedSubtypes": { "pet": { - "$id": "355", + "$id": "357", "kind": "model", "name": "Pet", "namespace": "SampleTypeSpec", @@ -4004,7 +4030,7 @@ "discriminatorValue": "pet", "decorators": [], "discriminatorProperty": { - "$id": "356", + "$id": "358", "kind": "property", "name": "kind", "serializedName": "kind", @@ -4025,20 +4051,20 @@ "isHttpMetadata": false }, "baseModel": { - "$ref": "350" + "$ref": "352" }, "properties": [ { - "$ref": "356" + "$ref": "358" }, { - "$id": "357", + "$id": "359", "kind": "property", "name": "trained", "serializedName": "trained", "doc": "Whether the pet is trained", "type": { - "$id": "358", + "$id": "360", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -4060,7 +4086,7 @@ ], "discriminatedSubtypes": { "dog": { - "$id": "359", + "$id": "361", "kind": "model", "name": "Dog", "namespace": "SampleTypeSpec", @@ -4070,11 +4096,11 @@ "discriminatorValue": "dog", "decorators": [], "baseModel": { - "$ref": "355" + "$ref": "357" }, "properties": [ { - "$id": "360", + "$id": "362", "kind": "property", "name": "kind", "serializedName": "kind", @@ -4095,13 +4121,13 @@ "isHttpMetadata": false }, { - "$id": "361", + "$id": "363", "kind": "property", "name": "breed", "serializedName": "breed", "doc": "The breed of the dog", "type": { - "$id": "362", + "$id": "364", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4125,18 +4151,18 @@ } }, "dog": { - "$ref": "359" + "$ref": "361" } } }, { - "$ref": "355" + "$ref": "357" }, { - "$ref": "359" + "$ref": "361" }, { - "$id": "363", + "$id": "365", "kind": "model", "name": "GetWidgetMetricsResponse", "namespace": "SampleTypeSpec", @@ -4145,12 +4171,12 @@ "decorators": [], "properties": [ { - "$id": "364", + "$id": "366", "kind": "property", "name": "numSold", "serializedName": "numSold", "type": { - "$id": "365", + "$id": "367", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -4170,12 +4196,12 @@ "isHttpMetadata": false }, { - "$id": "366", + "$id": "368", "kind": "property", "name": "averagePrice", "serializedName": "averagePrice", "type": { - "$id": "367", + "$id": "369", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -4199,14 +4225,14 @@ ], "clients": [ { - "$id": "368", + "$id": "370", "kind": "client", "name": "SampleTypeSpecClient", "namespace": "SampleTypeSpec", "doc": "This is a sample typespec project.", "methods": [ { - "$id": "369", + "$id": "371", "kind": "basic", "name": "sayHi", "accessibility": "public", @@ -4216,19 +4242,19 @@ ], "doc": "Return hi", "operation": { - "$id": "370", + "$id": "372", "name": "sayHi", "resourceName": "SampleTypeSpec", "doc": "Return hi", "accessibility": "public", "parameters": [ { - "$id": "371", + "$id": "373", "kind": "header", "name": "headParameter", "serializedName": "head-parameter", "type": { - "$id": "372", + "$id": "374", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4243,12 +4269,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.sayHi.headParameter" }, { - "$id": "373", + "$id": "375", "kind": "query", "name": "queryParameter", "serializedName": "queryParameter", "type": { - "$id": "374", + "$id": "376", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4263,12 +4289,12 @@ "readOnly": false }, { - "$id": "375", + "$id": "377", "kind": "query", "name": "optionalQuery", "serializedName": "optionalQuery", "type": { - "$id": "376", + "$id": "378", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4283,7 +4309,7 @@ "readOnly": false }, { - "$id": "377", + "$id": "379", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -4325,12 +4351,12 @@ }, "parameters": [ { - "$id": "378", + "$id": "380", "kind": "method", "name": "headParameter", "serializedName": "head-parameter", "type": { - "$id": "379", + "$id": "381", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4346,12 +4372,12 @@ "decorators": [] }, { - "$id": "380", + "$id": "382", "kind": "method", "name": "queryParameter", "serializedName": "queryParameter", "type": { - "$id": "381", + "$id": "383", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4367,12 +4393,12 @@ "decorators": [] }, { - "$id": "382", + "$id": "384", "kind": "method", "name": "optionalQuery", "serializedName": "optionalQuery", "type": { - "$id": "383", + "$id": "385", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4388,7 +4414,7 @@ "decorators": [] }, { - "$id": "384", + "$id": "386", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -4416,7 +4442,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.sayHi" }, { - "$id": "385", + "$id": "387", "kind": "basic", "name": "helloAgain", "accessibility": "public", @@ -4426,19 +4452,19 @@ ], "doc": "Return hi again", "operation": { - "$id": "386", + "$id": "388", "name": "helloAgain", "resourceName": "SampleTypeSpec", "doc": "Return hi again", "accessibility": "public", "parameters": [ { - "$id": "387", + "$id": "389", "kind": "header", "name": "p1", "serializedName": "p1", "type": { - "$id": "388", + "$id": "390", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4453,7 +4479,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain.p1" }, { - "$id": "389", + "$id": "391", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -4469,12 +4495,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain.contentType" }, { - "$id": "390", + "$id": "392", "kind": "path", "name": "p2", "serializedName": "p2", "type": { - "$id": "391", + "$id": "393", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4492,7 +4518,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain.p2" }, { - "$id": "392", + "$id": "394", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -4508,12 +4534,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain.accept" }, { - "$id": "393", + "$id": "395", "kind": "body", "name": "action", "serializedName": "action", "type": { - "$ref": "229" + "$ref": "231" }, "isApiVersion": false, "contentTypes": [ @@ -4533,7 +4559,7 @@ 200 ], "bodyType": { - "$ref": "229" + "$ref": "231" }, "headers": [], "isErrorResponse": false, @@ -4556,12 +4582,12 @@ }, "parameters": [ { - "$id": "394", + "$id": "396", "kind": "method", "name": "p1", "serializedName": "p1", "type": { - "$id": "395", + "$id": "397", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4577,12 +4603,12 @@ "decorators": [] }, { - "$id": "396", + "$id": "398", "kind": "method", "name": "action", "serializedName": "action", "type": { - "$ref": "229" + "$ref": "231" }, "location": "Body", "isApiVersion": false, @@ -4594,7 +4620,7 @@ "decorators": [] }, { - "$id": "397", + "$id": "399", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -4611,12 +4637,12 @@ "decorators": [] }, { - "$id": "398", + "$id": "400", "kind": "method", "name": "p2", "serializedName": "p2", "type": { - "$id": "399", + "$id": "401", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4632,7 +4658,7 @@ "decorators": [] }, { - "$id": "400", + "$id": "402", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -4651,7 +4677,7 @@ ], "response": { "type": { - "$ref": "229" + "$ref": "231" } }, "isOverride": false, @@ -4660,7 +4686,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloAgain" }, { - "$id": "401", + "$id": "403", "kind": "basic", "name": "noContentType", "accessibility": "public", @@ -4670,19 +4696,19 @@ ], "doc": "Return hi again", "operation": { - "$id": "402", + "$id": "404", "name": "noContentType", "resourceName": "SampleTypeSpec", "doc": "Return hi again", "accessibility": "public", "parameters": [ { - "$id": "403", + "$id": "405", "kind": "header", "name": "p1", "serializedName": "p1", "type": { - "$id": "404", + "$id": "406", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4697,12 +4723,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType.p1" }, { - "$id": "405", + "$id": "407", "kind": "path", "name": "p2", "serializedName": "p2", "type": { - "$id": "406", + "$id": "408", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4720,7 +4746,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType.p2" }, { - "$id": "407", + "$id": "409", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -4737,7 +4763,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType.contentType" }, { - "$id": "408", + "$id": "410", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -4753,12 +4779,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType.accept" }, { - "$id": "409", + "$id": "411", "kind": "body", "name": "action", "serializedName": "action", "type": { - "$ref": "229" + "$ref": "231" }, "isApiVersion": false, "contentTypes": [ @@ -4778,7 +4804,7 @@ 200 ], "bodyType": { - "$ref": "229" + "$ref": "231" }, "headers": [], "isErrorResponse": false, @@ -4801,12 +4827,12 @@ }, "parameters": [ { - "$id": "410", + "$id": "412", "kind": "method", "name": "p1", "serializedName": "p1", "type": { - "$id": "411", + "$id": "413", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4822,12 +4848,12 @@ "decorators": [] }, { - "$id": "412", + "$id": "414", "kind": "method", "name": "action", "serializedName": "action", "type": { - "$ref": "229" + "$ref": "231" }, "location": "Body", "isApiVersion": false, @@ -4839,12 +4865,12 @@ "decorators": [] }, { - "$id": "413", + "$id": "415", "kind": "method", "name": "p2", "serializedName": "p2", "type": { - "$id": "414", + "$id": "416", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4860,7 +4886,7 @@ "decorators": [] }, { - "$id": "415", + "$id": "417", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -4878,7 +4904,7 @@ "decorators": [] }, { - "$id": "416", + "$id": "418", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -4897,7 +4923,7 @@ ], "response": { "type": { - "$ref": "229" + "$ref": "231" } }, "isOverride": false, @@ -4906,7 +4932,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.noContentType" }, { - "$id": "417", + "$id": "419", "kind": "basic", "name": "helloDemo2", "accessibility": "public", @@ -4916,14 +4942,14 @@ ], "doc": "Return hi in demo2", "operation": { - "$id": "418", + "$id": "420", "name": "helloDemo2", "resourceName": "SampleTypeSpec", "doc": "Return hi in demo2", "accessibility": "public", "parameters": [ { - "$id": "419", + "$id": "421", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -4965,7 +4991,7 @@ }, "parameters": [ { - "$id": "420", + "$id": "422", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -4993,7 +5019,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloDemo2" }, { - "$id": "421", + "$id": "423", "kind": "basic", "name": "createLiteral", "accessibility": "public", @@ -5003,14 +5029,14 @@ ], "doc": "Create with literal value", "operation": { - "$id": "422", + "$id": "424", "name": "createLiteral", "resourceName": "SampleTypeSpec", "doc": "Create with literal value", "accessibility": "public", "parameters": [ { - "$id": "423", + "$id": "425", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -5027,7 +5053,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.createLiteral.contentType" }, { - "$id": "424", + "$id": "426", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -5043,7 +5069,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.createLiteral.accept" }, { - "$id": "425", + "$id": "427", "kind": "body", "name": "body", "serializedName": "body", @@ -5091,7 +5117,7 @@ }, "parameters": [ { - "$id": "426", + "$id": "428", "kind": "method", "name": "body", "serializedName": "body", @@ -5108,7 +5134,7 @@ "decorators": [] }, { - "$id": "427", + "$id": "429", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -5126,7 +5152,7 @@ "decorators": [] }, { - "$id": "428", + "$id": "430", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -5154,7 +5180,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.createLiteral" }, { - "$id": "429", + "$id": "431", "kind": "basic", "name": "helloLiteral", "accessibility": "public", @@ -5164,14 +5190,14 @@ ], "doc": "Send literal parameters", "operation": { - "$id": "430", + "$id": "432", "name": "helloLiteral", "resourceName": "SampleTypeSpec", "doc": "Send literal parameters", "accessibility": "public", "parameters": [ { - "$id": "431", + "$id": "433", "kind": "header", "name": "p1", "serializedName": "p1", @@ -5187,7 +5213,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloLiteral.p1" }, { - "$id": "432", + "$id": "434", "kind": "path", "name": "p2", "serializedName": "p2", @@ -5206,7 +5232,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloLiteral.p2" }, { - "$id": "433", + "$id": "435", "kind": "query", "name": "p3", "serializedName": "p3", @@ -5222,7 +5248,7 @@ "readOnly": false }, { - "$id": "434", + "$id": "436", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -5264,7 +5290,7 @@ }, "parameters": [ { - "$id": "435", + "$id": "437", "kind": "method", "name": "p1", "serializedName": "p1", @@ -5281,7 +5307,7 @@ "decorators": [] }, { - "$id": "436", + "$id": "438", "kind": "method", "name": "p2", "serializedName": "p2", @@ -5298,7 +5324,7 @@ "decorators": [] }, { - "$id": "437", + "$id": "439", "kind": "method", "name": "p3", "serializedName": "p3", @@ -5315,7 +5341,7 @@ "decorators": [] }, { - "$id": "438", + "$id": "440", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -5343,7 +5369,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.helloLiteral" }, { - "$id": "439", + "$id": "441", "kind": "basic", "name": "topAction", "accessibility": "public", @@ -5353,24 +5379,24 @@ ], "doc": "top level method", "operation": { - "$id": "440", + "$id": "442", "name": "topAction", "resourceName": "SampleTypeSpec", "doc": "top level method", "accessibility": "public", "parameters": [ { - "$id": "441", + "$id": "443", "kind": "path", "name": "action", "serializedName": "action", "type": { - "$id": "442", + "$id": "444", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "443", + "$id": "445", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5391,7 +5417,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.topAction.action" }, { - "$id": "444", + "$id": "446", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -5433,17 +5459,17 @@ }, "parameters": [ { - "$id": "445", + "$id": "447", "kind": "method", "name": "action", "serializedName": "action", "type": { - "$id": "446", + "$id": "448", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "447", + "$id": "449", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5462,7 +5488,7 @@ "decorators": [] }, { - "$id": "448", + "$id": "450", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -5490,7 +5516,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.topAction" }, { - "$id": "449", + "$id": "451", "kind": "basic", "name": "topAction2", "accessibility": "public", @@ -5500,14 +5526,14 @@ ], "doc": "top level method2", "operation": { - "$id": "450", + "$id": "452", "name": "topAction2", "resourceName": "SampleTypeSpec", "doc": "top level method2", "accessibility": "public", "parameters": [ { - "$id": "451", + "$id": "453", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -5549,7 +5575,7 @@ }, "parameters": [ { - "$id": "452", + "$id": "454", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -5577,7 +5603,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.topAction2" }, { - "$id": "453", + "$id": "455", "kind": "basic", "name": "patchAction", "accessibility": "public", @@ -5587,14 +5613,14 @@ ], "doc": "top level patch", "operation": { - "$id": "454", + "$id": "456", "name": "patchAction", "resourceName": "SampleTypeSpec", "doc": "top level patch", "accessibility": "public", "parameters": [ { - "$id": "455", + "$id": "457", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -5611,7 +5637,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.patchAction.contentType" }, { - "$id": "456", + "$id": "458", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -5627,7 +5653,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.patchAction.accept" }, { - "$id": "457", + "$id": "459", "kind": "body", "name": "body", "serializedName": "body", @@ -5675,7 +5701,7 @@ }, "parameters": [ { - "$id": "458", + "$id": "460", "kind": "method", "name": "body", "serializedName": "body", @@ -5692,7 +5718,7 @@ "decorators": [] }, { - "$id": "459", + "$id": "461", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -5710,7 +5736,7 @@ "decorators": [] }, { - "$id": "460", + "$id": "462", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -5738,7 +5764,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.patchAction" }, { - "$id": "461", + "$id": "463", "kind": "basic", "name": "anonymousBody", "accessibility": "public", @@ -5748,14 +5774,14 @@ ], "doc": "body parameter without body decorator", "operation": { - "$id": "462", + "$id": "464", "name": "anonymousBody", "resourceName": "SampleTypeSpec", "doc": "body parameter without body decorator", "accessibility": "public", "parameters": [ { - "$id": "463", + "$id": "465", "kind": "query", "name": "requiredQueryParam", "serializedName": "requiredQueryParam", @@ -5771,7 +5797,7 @@ "readOnly": false }, { - "$id": "464", + "$id": "466", "kind": "header", "name": "requiredHeader", "serializedName": "required-header", @@ -5787,7 +5813,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.anonymousBody.requiredHeader" }, { - "$id": "465", + "$id": "467", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -5804,7 +5830,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.anonymousBody.contentType" }, { - "$id": "466", + "$id": "468", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -5820,7 +5846,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.anonymousBody.accept" }, { - "$id": "467", + "$id": "469", "kind": "body", "name": "thing", "serializedName": "thing", @@ -5868,13 +5894,13 @@ }, "parameters": [ { - "$id": "468", + "$id": "470", "kind": "method", "name": "name", "serializedName": "name", "doc": "name of the Thing", "type": { - "$id": "469", + "$id": "471", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5890,7 +5916,7 @@ "decorators": [] }, { - "$id": "470", + "$id": "472", "kind": "method", "name": "requiredUnion", "serializedName": "requiredUnion", @@ -5908,7 +5934,7 @@ "decorators": [] }, { - "$id": "471", + "$id": "473", "kind": "method", "name": "requiredLiteralString", "serializedName": "requiredLiteralString", @@ -5926,7 +5952,7 @@ "decorators": [] }, { - "$id": "472", + "$id": "474", "kind": "method", "name": "requiredNullableString", "serializedName": "requiredNullableString", @@ -5944,7 +5970,7 @@ "decorators": [] }, { - "$id": "473", + "$id": "475", "kind": "method", "name": "optionalNullableString", "serializedName": "optionalNullableString", @@ -5962,7 +5988,7 @@ "decorators": [] }, { - "$id": "474", + "$id": "476", "kind": "method", "name": "requiredLiteralInt", "serializedName": "requiredLiteralInt", @@ -5980,7 +6006,7 @@ "decorators": [] }, { - "$id": "475", + "$id": "477", "kind": "method", "name": "requiredLiteralFloat", "serializedName": "requiredLiteralFloat", @@ -5998,7 +6024,7 @@ "decorators": [] }, { - "$id": "476", + "$id": "478", "kind": "method", "name": "requiredLiteralBool", "serializedName": "requiredLiteralBool", @@ -6016,18 +6042,18 @@ "decorators": [] }, { - "$id": "477", + "$id": "479", "kind": "method", "name": "optionalLiteralString", "serializedName": "optionalLiteralString", "doc": "optional literal string", "type": { - "$id": "478", + "$id": "480", "kind": "enum", "name": "ThingOptionalLiteralString", "crossLanguageDefinitionId": "", "valueType": { - "$id": "479", + "$id": "481", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6035,12 +6061,12 @@ }, "values": [ { - "$id": "480", + "$id": "482", "kind": "enumvalue", "name": "reject", "value": "reject", "valueType": { - "$id": "481", + "$id": "483", "kind": "string", "decorators": [], "doc": "A sequence of textual characters.", @@ -6048,7 +6074,7 @@ "crossLanguageDefinitionId": "TypeSpec.string" }, "enumType": { - "$ref": "478" + "$ref": "480" }, "decorators": [] } @@ -6069,7 +6095,7 @@ "decorators": [] }, { - "$id": "482", + "$id": "484", "kind": "method", "name": "requiredNullableLiteralString", "serializedName": "requiredNullableLiteralString", @@ -6087,18 +6113,18 @@ "decorators": [] }, { - "$id": "483", + "$id": "485", "kind": "method", "name": "optionalLiteralInt", "serializedName": "optionalLiteralInt", "doc": "optional literal int", "type": { - "$id": "484", + "$id": "486", "kind": "enum", "name": "ThingOptionalLiteralInt", "crossLanguageDefinitionId": "", "valueType": { - "$id": "485", + "$id": "487", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -6106,12 +6132,12 @@ }, "values": [ { - "$id": "486", + "$id": "488", "kind": "enumvalue", "name": "456", "value": 456, "valueType": { - "$id": "487", + "$id": "489", "kind": "int32", "decorators": [], "doc": "A 32-bit integer. (`-2,147,483,648` to `2,147,483,647`)", @@ -6119,7 +6145,7 @@ "crossLanguageDefinitionId": "TypeSpec.int32" }, "enumType": { - "$ref": "484" + "$ref": "486" }, "decorators": [] } @@ -6140,18 +6166,18 @@ "decorators": [] }, { - "$id": "488", + "$id": "490", "kind": "method", "name": "optionalLiteralFloat", "serializedName": "optionalLiteralFloat", "doc": "optional literal float", "type": { - "$id": "489", + "$id": "491", "kind": "enum", "name": "ThingOptionalLiteralFloat", "crossLanguageDefinitionId": "", "valueType": { - "$id": "490", + "$id": "492", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -6159,12 +6185,12 @@ }, "values": [ { - "$id": "491", + "$id": "493", "kind": "enumvalue", "name": "4.56", "value": 4.56, "valueType": { - "$id": "492", + "$id": "494", "kind": "float32", "decorators": [], "doc": "A 32 bit floating point number. (`±1.5 x 10^−45` to `±3.4 x 10^38`)", @@ -6172,7 +6198,7 @@ "crossLanguageDefinitionId": "TypeSpec.float32" }, "enumType": { - "$ref": "489" + "$ref": "491" }, "decorators": [] } @@ -6193,7 +6219,7 @@ "decorators": [] }, { - "$id": "493", + "$id": "495", "kind": "method", "name": "optionalLiteralBool", "serializedName": "optionalLiteralBool", @@ -6211,13 +6237,13 @@ "decorators": [] }, { - "$id": "494", + "$id": "496", "kind": "method", "name": "requiredBadDescription", "serializedName": "requiredBadDescription", "doc": "description with xml <|endoftext|>", "type": { - "$id": "495", + "$id": "497", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6233,7 +6259,7 @@ "decorators": [] }, { - "$id": "496", + "$id": "498", "kind": "method", "name": "optionalNullableList", "serializedName": "optionalNullableList", @@ -6251,7 +6277,7 @@ "decorators": [] }, { - "$id": "497", + "$id": "499", "kind": "method", "name": "requiredNullableList", "serializedName": "requiredNullableList", @@ -6269,7 +6295,29 @@ "decorators": [] }, { - "$id": "498", + "$id": "500", + "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": "501", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "SampleTypeSpec.anonymousBody.propertyWithSpecialDocs", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "502", "kind": "method", "name": "requiredQueryParam", "serializedName": "requiredQueryParam", @@ -6286,7 +6334,7 @@ "decorators": [] }, { - "$id": "499", + "$id": "503", "kind": "method", "name": "requiredHeader", "serializedName": "required-header", @@ -6303,7 +6351,7 @@ "decorators": [] }, { - "$id": "500", + "$id": "504", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -6321,7 +6369,7 @@ "decorators": [] }, { - "$id": "501", + "$id": "505", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -6349,7 +6397,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.anonymousBody" }, { - "$id": "502", + "$id": "506", "kind": "basic", "name": "friendlyModel", "accessibility": "public", @@ -6359,14 +6407,14 @@ ], "doc": "Model can have its friendly name", "operation": { - "$id": "503", + "$id": "507", "name": "friendlyModel", "resourceName": "SampleTypeSpec", "doc": "Model can have its friendly name", "accessibility": "public", "parameters": [ { - "$id": "504", + "$id": "508", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -6383,7 +6431,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.friendlyModel.contentType" }, { - "$id": "505", + "$id": "509", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -6399,12 +6447,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.friendlyModel.accept" }, { - "$id": "506", + "$id": "510", "kind": "body", "name": "friend", "serializedName": "friend", "type": { - "$ref": "277" + "$ref": "279" }, "isApiVersion": false, "contentTypes": [ @@ -6424,7 +6472,7 @@ 200 ], "bodyType": { - "$ref": "277" + "$ref": "279" }, "headers": [], "isErrorResponse": false, @@ -6447,13 +6495,13 @@ }, "parameters": [ { - "$id": "507", + "$id": "511", "kind": "method", "name": "name", "serializedName": "name", "doc": "name of the NotFriend", "type": { - "$id": "508", + "$id": "512", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6469,7 +6517,7 @@ "decorators": [] }, { - "$id": "509", + "$id": "513", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -6487,7 +6535,7 @@ "decorators": [] }, { - "$id": "510", + "$id": "514", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -6506,7 +6554,7 @@ ], "response": { "type": { - "$ref": "277" + "$ref": "279" } }, "isOverride": false, @@ -6515,7 +6563,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.friendlyModel" }, { - "$id": "511", + "$id": "515", "kind": "basic", "name": "addTimeHeader", "accessibility": "public", @@ -6524,23 +6572,23 @@ "2024-08-16-preview" ], "operation": { - "$id": "512", + "$id": "516", "name": "addTimeHeader", "resourceName": "SampleTypeSpec", "accessibility": "public", "parameters": [ { - "$id": "513", + "$id": "517", "kind": "header", "name": "repeatabilityFirstSent", "serializedName": "Repeatability-First-Sent", "type": { - "$id": "514", + "$id": "518", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc7231", "wireType": { - "$id": "515", + "$id": "519", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6578,17 +6626,17 @@ }, "parameters": [ { - "$id": "516", + "$id": "520", "kind": "method", "name": "repeatabilityFirstSent", "serializedName": "Repeatability-First-Sent", "type": { - "$id": "517", + "$id": "521", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc7231", "wireType": { - "$id": "518", + "$id": "522", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6614,7 +6662,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.addTimeHeader" }, { - "$id": "519", + "$id": "523", "kind": "basic", "name": "projectedNameModel", "accessibility": "public", @@ -6624,14 +6672,14 @@ ], "doc": "Model can have its projected name", "operation": { - "$id": "520", + "$id": "524", "name": "projectedNameModel", "resourceName": "SampleTypeSpec", "doc": "Model can have its projected name", "accessibility": "public", "parameters": [ { - "$id": "521", + "$id": "525", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -6648,7 +6696,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.projectedNameModel.contentType" }, { - "$id": "522", + "$id": "526", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -6664,12 +6712,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.projectedNameModel.accept" }, { - "$id": "523", + "$id": "527", "kind": "body", "name": "renamedModel", "serializedName": "renamedModel", "type": { - "$ref": "280" + "$ref": "282" }, "isApiVersion": false, "contentTypes": [ @@ -6689,7 +6737,7 @@ 200 ], "bodyType": { - "$ref": "280" + "$ref": "282" }, "headers": [], "isErrorResponse": false, @@ -6712,13 +6760,13 @@ }, "parameters": [ { - "$id": "524", + "$id": "528", "kind": "method", "name": "otherName", "serializedName": "otherName", "doc": "name of the ModelWithClientName", "type": { - "$id": "525", + "$id": "529", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6734,7 +6782,7 @@ "decorators": [] }, { - "$id": "526", + "$id": "530", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -6752,7 +6800,7 @@ "decorators": [] }, { - "$id": "527", + "$id": "531", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -6771,7 +6819,7 @@ ], "response": { "type": { - "$ref": "280" + "$ref": "282" } }, "isOverride": false, @@ -6780,7 +6828,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.projectedNameModel" }, { - "$id": "528", + "$id": "532", "kind": "basic", "name": "returnsAnonymousModel", "accessibility": "public", @@ -6790,14 +6838,14 @@ ], "doc": "return anonymous model", "operation": { - "$id": "529", + "$id": "533", "name": "returnsAnonymousModel", "resourceName": "SampleTypeSpec", "doc": "return anonymous model", "accessibility": "public", "parameters": [ { - "$id": "530", + "$id": "534", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -6819,7 +6867,7 @@ 200 ], "bodyType": { - "$ref": "283" + "$ref": "285" }, "headers": [], "isErrorResponse": false, @@ -6839,7 +6887,7 @@ }, "parameters": [ { - "$id": "531", + "$id": "535", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -6858,7 +6906,7 @@ ], "response": { "type": { - "$ref": "283" + "$ref": "285" } }, "isOverride": false, @@ -6867,7 +6915,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.returnsAnonymousModel" }, { - "$id": "532", + "$id": "536", "kind": "basic", "name": "getUnknownValue", "accessibility": "public", @@ -6877,19 +6925,19 @@ ], "doc": "get extensible enum", "operation": { - "$id": "533", + "$id": "537", "name": "getUnknownValue", "resourceName": "SampleTypeSpec", "doc": "get extensible enum", "accessibility": "public", "parameters": [ { - "$id": "534", + "$id": "538", "kind": "header", "name": "accept", "serializedName": "Accept", "type": { - "$id": "535", + "$id": "539", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6910,7 +6958,7 @@ 200 ], "bodyType": { - "$id": "536", + "$id": "540", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -6941,12 +6989,12 @@ }, "parameters": [ { - "$id": "537", + "$id": "541", "kind": "method", "name": "accept", "serializedName": "Accept", "type": { - "$ref": "535" + "$ref": "539" }, "location": "Header", "isApiVersion": false, @@ -6960,7 +7008,7 @@ ], "response": { "type": { - "$ref": "536" + "$ref": "540" } }, "isOverride": false, @@ -6969,7 +7017,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.getUnknownValue" }, { - "$id": "538", + "$id": "542", "kind": "basic", "name": "internalProtocol", "accessibility": "public", @@ -6979,14 +7027,14 @@ ], "doc": "When set protocol false and convenient true, then the protocol method should be internal", "operation": { - "$id": "539", + "$id": "543", "name": "internalProtocol", "resourceName": "SampleTypeSpec", "doc": "When set protocol false and convenient true, then the protocol method should be internal", "accessibility": "public", "parameters": [ { - "$id": "540", + "$id": "544", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -7003,7 +7051,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.internalProtocol.contentType" }, { - "$id": "541", + "$id": "545", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -7019,7 +7067,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.internalProtocol.accept" }, { - "$id": "542", + "$id": "546", "kind": "body", "name": "body", "serializedName": "body", @@ -7067,7 +7115,7 @@ }, "parameters": [ { - "$id": "543", + "$id": "547", "kind": "method", "name": "body", "serializedName": "body", @@ -7084,7 +7132,7 @@ "decorators": [] }, { - "$id": "544", + "$id": "548", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -7102,7 +7150,7 @@ "decorators": [] }, { - "$id": "545", + "$id": "549", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -7130,7 +7178,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.internalProtocol" }, { - "$id": "546", + "$id": "550", "kind": "basic", "name": "stillConvenient", "accessibility": "public", @@ -7140,7 +7188,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": "547", + "$id": "551", "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", @@ -7172,7 +7220,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.stillConvenient" }, { - "$id": "548", + "$id": "552", "kind": "basic", "name": "headAsBoolean", "accessibility": "public", @@ -7182,19 +7230,19 @@ ], "doc": "head as boolean.", "operation": { - "$id": "549", + "$id": "553", "name": "headAsBoolean", "resourceName": "SampleTypeSpec", "doc": "head as boolean.", "accessibility": "public", "parameters": [ { - "$id": "550", + "$id": "554", "kind": "path", "name": "id", "serializedName": "id", "type": { - "$id": "551", + "$id": "555", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7232,12 +7280,12 @@ }, "parameters": [ { - "$id": "552", + "$id": "556", "kind": "method", "name": "id", "serializedName": "id", "type": { - "$id": "553", + "$id": "557", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7260,7 +7308,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.headAsBoolean" }, { - "$id": "554", + "$id": "558", "kind": "basic", "name": "WithApiVersion", "accessibility": "public", @@ -7270,19 +7318,19 @@ ], "doc": "Return hi again", "operation": { - "$id": "555", + "$id": "559", "name": "WithApiVersion", "resourceName": "SampleTypeSpec", "doc": "Return hi again", "accessibility": "public", "parameters": [ { - "$id": "556", + "$id": "560", "kind": "header", "name": "p1", "serializedName": "p1", "type": { - "$id": "557", + "$id": "561", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7297,12 +7345,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.WithApiVersion.p1" }, { - "$id": "558", + "$id": "562", "kind": "query", "name": "apiVersion", "serializedName": "apiVersion", "type": { - "$id": "559", + "$id": "563", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7312,7 +7360,7 @@ "explode": false, "defaultValue": { "type": { - "$id": "560", + "$id": "564", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -7346,12 +7394,12 @@ }, "parameters": [ { - "$id": "561", + "$id": "565", "kind": "method", "name": "p1", "serializedName": "p1", "type": { - "$id": "562", + "$id": "566", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7374,7 +7422,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.WithApiVersion" }, { - "$id": "563", + "$id": "567", "kind": "paging", "name": "ListWithNextLink", "accessibility": "public", @@ -7384,14 +7432,14 @@ ], "doc": "List things with nextlink", "operation": { - "$id": "564", + "$id": "568", "name": "ListWithNextLink", "resourceName": "SampleTypeSpec", "doc": "List things with nextlink", "accessibility": "public", "parameters": [ { - "$id": "565", + "$id": "569", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -7413,7 +7461,7 @@ 200 ], "bodyType": { - "$ref": "284" + "$ref": "286" }, "headers": [], "isErrorResponse": false, @@ -7433,7 +7481,7 @@ }, "parameters": [ { - "$id": "566", + "$id": "570", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -7452,7 +7500,7 @@ ], "response": { "type": { - "$ref": "286" + "$ref": "288" }, "resultSegments": [ "things" @@ -7476,7 +7524,7 @@ } }, { - "$id": "567", + "$id": "571", "kind": "paging", "name": "ListWithStringNextLink", "accessibility": "public", @@ -7486,14 +7534,14 @@ ], "doc": "List things with nextlink", "operation": { - "$id": "568", + "$id": "572", "name": "ListWithStringNextLink", "resourceName": "SampleTypeSpec", "doc": "List things with nextlink", "accessibility": "public", "parameters": [ { - "$id": "569", + "$id": "573", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -7515,7 +7563,7 @@ 200 ], "bodyType": { - "$ref": "289" + "$ref": "291" }, "headers": [], "isErrorResponse": false, @@ -7535,7 +7583,7 @@ }, "parameters": [ { - "$id": "570", + "$id": "574", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -7554,7 +7602,7 @@ ], "response": { "type": { - "$ref": "286" + "$ref": "288" }, "resultSegments": [ "things" @@ -7578,7 +7626,7 @@ } }, { - "$id": "571", + "$id": "575", "kind": "paging", "name": "ListWithContinuationToken", "accessibility": "public", @@ -7588,19 +7636,19 @@ ], "doc": "List things with continuation token", "operation": { - "$id": "572", + "$id": "576", "name": "ListWithContinuationToken", "resourceName": "SampleTypeSpec", "doc": "List things with continuation token", "accessibility": "public", "parameters": [ { - "$id": "573", + "$id": "577", "kind": "query", "name": "token", "serializedName": "token", "type": { - "$id": "574", + "$id": "578", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7615,7 +7663,7 @@ "readOnly": false }, { - "$id": "575", + "$id": "579", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -7637,7 +7685,7 @@ 200 ], "bodyType": { - "$ref": "293" + "$ref": "295" }, "headers": [], "isErrorResponse": false, @@ -7657,12 +7705,12 @@ }, "parameters": [ { - "$id": "576", + "$id": "580", "kind": "method", "name": "token", "serializedName": "token", "type": { - "$id": "577", + "$id": "581", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7678,7 +7726,7 @@ "decorators": [] }, { - "$id": "578", + "$id": "582", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -7697,7 +7745,7 @@ ], "response": { "type": { - "$ref": "286" + "$ref": "288" }, "resultSegments": [ "things" @@ -7713,7 +7761,7 @@ ], "continuationToken": { "parameter": { - "$ref": "573" + "$ref": "577" }, "responseSegments": [ "nextToken" @@ -7724,7 +7772,7 @@ } }, { - "$id": "579", + "$id": "583", "kind": "paging", "name": "ListWithContinuationTokenHeaderResponse", "accessibility": "public", @@ -7734,19 +7782,19 @@ ], "doc": "List things with continuation token header response", "operation": { - "$id": "580", + "$id": "584", "name": "ListWithContinuationTokenHeaderResponse", "resourceName": "SampleTypeSpec", "doc": "List things with continuation token header response", "accessibility": "public", "parameters": [ { - "$id": "581", + "$id": "585", "kind": "query", "name": "token", "serializedName": "token", "type": { - "$id": "582", + "$id": "586", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7761,7 +7809,7 @@ "readOnly": false }, { - "$id": "583", + "$id": "587", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -7783,14 +7831,14 @@ 200 ], "bodyType": { - "$ref": "297" + "$ref": "299" }, "headers": [ { "name": "nextToken", "nameInResponse": "next-token", "type": { - "$id": "584", + "$id": "588", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7815,12 +7863,12 @@ }, "parameters": [ { - "$id": "585", + "$id": "589", "kind": "method", "name": "token", "serializedName": "token", "type": { - "$id": "586", + "$id": "590", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -7836,7 +7884,7 @@ "decorators": [] }, { - "$id": "587", + "$id": "591", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -7855,7 +7903,7 @@ ], "response": { "type": { - "$ref": "286" + "$ref": "288" }, "resultSegments": [ "things" @@ -7871,7 +7919,7 @@ ], "continuationToken": { "parameter": { - "$ref": "581" + "$ref": "585" }, "responseSegments": [ "next-token" @@ -7882,7 +7930,7 @@ } }, { - "$id": "588", + "$id": "592", "kind": "paging", "name": "ListWithPaging", "accessibility": "public", @@ -7892,14 +7940,14 @@ ], "doc": "List things with paging", "operation": { - "$id": "589", + "$id": "593", "name": "ListWithPaging", "resourceName": "SampleTypeSpec", "doc": "List things with paging", "accessibility": "public", "parameters": [ { - "$id": "590", + "$id": "594", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -7921,7 +7969,7 @@ 200 ], "bodyType": { - "$ref": "299" + "$ref": "301" }, "headers": [], "isErrorResponse": false, @@ -7941,7 +7989,7 @@ }, "parameters": [ { - "$id": "591", + "$id": "595", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -7960,7 +8008,7 @@ ], "response": { "type": { - "$ref": "286" + "$ref": "288" }, "resultSegments": [ "items" @@ -7978,7 +8026,7 @@ } }, { - "$id": "592", + "$id": "596", "kind": "basic", "name": "EmbeddedParameters", "accessibility": "public", @@ -7988,20 +8036,20 @@ ], "doc": "An operation with embedded parameters within the body", "operation": { - "$id": "593", + "$id": "597", "name": "EmbeddedParameters", "resourceName": "SampleTypeSpec", "doc": "An operation with embedded parameters within the body", "accessibility": "public", "parameters": [ { - "$id": "594", + "$id": "598", "kind": "header", "name": "requiredHeader", "serializedName": "required-header", "doc": "required header parameter", "type": { - "$id": "595", + "$id": "599", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8016,13 +8064,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ModelWithEmbeddedNonBodyParameters.requiredHeader" }, { - "$id": "596", + "$id": "600", "kind": "header", "name": "optionalHeader", "serializedName": "optional-header", "doc": "optional header parameter", "type": { - "$id": "597", + "$id": "601", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8037,13 +8085,13 @@ "crossLanguageDefinitionId": "SampleTypeSpec.ModelWithEmbeddedNonBodyParameters.optionalHeader" }, { - "$id": "598", + "$id": "602", "kind": "query", "name": "requiredQuery", "serializedName": "requiredQuery", "doc": "required query parameter", "type": { - "$id": "599", + "$id": "603", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8058,13 +8106,13 @@ "readOnly": false }, { - "$id": "600", + "$id": "604", "kind": "query", "name": "optionalQuery", "serializedName": "optionalQuery", "doc": "optional query parameter", "type": { - "$id": "601", + "$id": "605", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8079,7 +8127,7 @@ "readOnly": false }, { - "$id": "602", + "$id": "606", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -8096,12 +8144,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.EmbeddedParameters.contentType" }, { - "$id": "603", + "$id": "607", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "301" + "$ref": "303" }, "isApiVersion": false, "contentTypes": [ @@ -8138,12 +8186,12 @@ }, "parameters": [ { - "$id": "604", + "$id": "608", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "301" + "$ref": "303" }, "location": "Body", "isApiVersion": false, @@ -8155,7 +8203,7 @@ "decorators": [] }, { - "$id": "605", + "$id": "609", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -8180,7 +8228,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.EmbeddedParameters" }, { - "$id": "606", + "$id": "610", "kind": "basic", "name": "DynamicModelOperation", "accessibility": "public", @@ -8190,14 +8238,14 @@ ], "doc": "An operation with a dynamic model", "operation": { - "$id": "607", + "$id": "611", "name": "DynamicModelOperation", "resourceName": "SampleTypeSpec", "doc": "An operation with a dynamic model", "accessibility": "public", "parameters": [ { - "$id": "608", + "$id": "612", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -8214,12 +8262,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DynamicModelOperation.contentType" }, { - "$id": "609", + "$id": "613", "kind": "body", "name": "body", "serializedName": "body", "type": { - "$ref": "312" + "$ref": "314" }, "isApiVersion": false, "contentTypes": [ @@ -8256,12 +8304,12 @@ }, "parameters": [ { - "$id": "610", + "$id": "614", "kind": "method", "name": "body", "serializedName": "body", "type": { - "$ref": "312" + "$ref": "314" }, "location": "Body", "isApiVersion": false, @@ -8273,7 +8321,7 @@ "decorators": [] }, { - "$id": "611", + "$id": "615", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -8300,12 +8348,12 @@ ], "parameters": [ { - "$id": "612", + "$id": "616", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "613", + "$id": "617", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -8320,12 +8368,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.sampleTypeSpecUrl" }, { - "$id": "614", + "$id": "618", "kind": "method", "name": "apiVersion", "serializedName": "apiVersion", "type": { - "$id": "615", + "$id": "619", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -8335,7 +8383,7 @@ "isApiVersion": true, "defaultValue": { "type": { - "$id": "616", + "$id": "620", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -8359,13 +8407,13 @@ ], "children": [ { - "$id": "617", + "$id": "621", "kind": "client", "name": "AnimalOperations", "namespace": "SampleTypeSpec", "methods": [ { - "$id": "618", + "$id": "622", "kind": "basic", "name": "updatePetAsAnimal", "accessibility": "public", @@ -8375,14 +8423,14 @@ ], "doc": "Update a pet as an animal", "operation": { - "$id": "619", + "$id": "623", "name": "updatePetAsAnimal", "resourceName": "AnimalOperations", "doc": "Update a pet as an animal", "accessibility": "public", "parameters": [ { - "$id": "620", + "$id": "624", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -8399,7 +8447,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updatePetAsAnimal.contentType" }, { - "$id": "621", + "$id": "625", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -8415,12 +8463,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updatePetAsAnimal.accept" }, { - "$id": "622", + "$id": "626", "kind": "body", "name": "animal", "serializedName": "animal", "type": { - "$ref": "350" + "$ref": "352" }, "isApiVersion": false, "contentTypes": [ @@ -8440,7 +8488,7 @@ 200 ], "bodyType": { - "$ref": "350" + "$ref": "352" }, "headers": [], "isErrorResponse": false, @@ -8463,12 +8511,12 @@ }, "parameters": [ { - "$id": "623", + "$id": "627", "kind": "method", "name": "animal", "serializedName": "animal", "type": { - "$ref": "350" + "$ref": "352" }, "location": "Body", "isApiVersion": false, @@ -8480,7 +8528,7 @@ "decorators": [] }, { - "$id": "624", + "$id": "628", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -8498,7 +8546,7 @@ "decorators": [] }, { - "$id": "625", + "$id": "629", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -8517,7 +8565,7 @@ ], "response": { "type": { - "$ref": "350" + "$ref": "352" } }, "isOverride": false, @@ -8526,7 +8574,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updatePetAsAnimal" }, { - "$id": "626", + "$id": "630", "kind": "basic", "name": "updateDogAsAnimal", "accessibility": "public", @@ -8536,14 +8584,14 @@ ], "doc": "Update a dog as an animal", "operation": { - "$id": "627", + "$id": "631", "name": "updateDogAsAnimal", "resourceName": "AnimalOperations", "doc": "Update a dog as an animal", "accessibility": "public", "parameters": [ { - "$id": "628", + "$id": "632", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -8560,7 +8608,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updateDogAsAnimal.contentType" }, { - "$id": "629", + "$id": "633", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -8576,12 +8624,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.AnimalOperations.updateDogAsAnimal.accept" }, { - "$id": "630", + "$id": "634", "kind": "body", "name": "animal", "serializedName": "animal", "type": { - "$ref": "350" + "$ref": "352" }, "isApiVersion": false, "contentTypes": [ @@ -8601,7 +8649,7 @@ 200 ], "bodyType": { - "$ref": "350" + "$ref": "352" }, "headers": [], "isErrorResponse": false, @@ -8624,12 +8672,12 @@ }, "parameters": [ { - "$id": "631", + "$id": "635", "kind": "method", "name": "animal", "serializedName": "animal", "type": { - "$ref": "350" + "$ref": "352" }, "location": "Body", "isApiVersion": false, @@ -8641,7 +8689,7 @@ "decorators": [] }, { - "$id": "632", + "$id": "636", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -8659,7 +8707,7 @@ "decorators": [] }, { - "$id": "633", + "$id": "637", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -8678,7 +8726,7 @@ ], "response": { "type": { - "$ref": "350" + "$ref": "352" } }, "isOverride": false, @@ -8689,12 +8737,12 @@ ], "parameters": [ { - "$id": "634", + "$id": "638", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "635", + "$id": "639", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -8717,18 +8765,18 @@ "2024-08-16-preview" ], "parent": { - "$ref": "368" + "$ref": "370" }, "isMultiServiceClient": false }, { - "$id": "636", + "$id": "640", "kind": "client", "name": "PetOperations", "namespace": "SampleTypeSpec", "methods": [ { - "$id": "637", + "$id": "641", "kind": "basic", "name": "updatePetAsPet", "accessibility": "public", @@ -8738,14 +8786,14 @@ ], "doc": "Update a pet as a pet", "operation": { - "$id": "638", + "$id": "642", "name": "updatePetAsPet", "resourceName": "PetOperations", "doc": "Update a pet as a pet", "accessibility": "public", "parameters": [ { - "$id": "639", + "$id": "643", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -8762,7 +8810,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updatePetAsPet.contentType" }, { - "$id": "640", + "$id": "644", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -8778,12 +8826,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updatePetAsPet.accept" }, { - "$id": "641", + "$id": "645", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$ref": "355" + "$ref": "357" }, "isApiVersion": false, "contentTypes": [ @@ -8803,7 +8851,7 @@ 200 ], "bodyType": { - "$ref": "355" + "$ref": "357" }, "headers": [], "isErrorResponse": false, @@ -8826,12 +8874,12 @@ }, "parameters": [ { - "$id": "642", + "$id": "646", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "355" + "$ref": "357" }, "location": "Body", "isApiVersion": false, @@ -8843,7 +8891,7 @@ "decorators": [] }, { - "$id": "643", + "$id": "647", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -8861,7 +8909,7 @@ "decorators": [] }, { - "$id": "644", + "$id": "648", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -8880,7 +8928,7 @@ ], "response": { "type": { - "$ref": "355" + "$ref": "357" } }, "isOverride": false, @@ -8889,7 +8937,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updatePetAsPet" }, { - "$id": "645", + "$id": "649", "kind": "basic", "name": "updateDogAsPet", "accessibility": "public", @@ -8899,14 +8947,14 @@ ], "doc": "Update a dog as a pet", "operation": { - "$id": "646", + "$id": "650", "name": "updateDogAsPet", "resourceName": "PetOperations", "doc": "Update a dog as a pet", "accessibility": "public", "parameters": [ { - "$id": "647", + "$id": "651", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -8923,7 +8971,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updateDogAsPet.contentType" }, { - "$id": "648", + "$id": "652", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -8939,12 +8987,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.PetOperations.updateDogAsPet.accept" }, { - "$id": "649", + "$id": "653", "kind": "body", "name": "pet", "serializedName": "pet", "type": { - "$ref": "355" + "$ref": "357" }, "isApiVersion": false, "contentTypes": [ @@ -8964,7 +9012,7 @@ 200 ], "bodyType": { - "$ref": "355" + "$ref": "357" }, "headers": [], "isErrorResponse": false, @@ -8987,12 +9035,12 @@ }, "parameters": [ { - "$id": "650", + "$id": "654", "kind": "method", "name": "pet", "serializedName": "pet", "type": { - "$ref": "355" + "$ref": "357" }, "location": "Body", "isApiVersion": false, @@ -9004,7 +9052,7 @@ "decorators": [] }, { - "$id": "651", + "$id": "655", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -9022,7 +9070,7 @@ "decorators": [] }, { - "$id": "652", + "$id": "656", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -9041,7 +9089,7 @@ ], "response": { "type": { - "$ref": "355" + "$ref": "357" } }, "isOverride": false, @@ -9052,12 +9100,12 @@ ], "parameters": [ { - "$id": "653", + "$id": "657", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "654", + "$id": "658", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -9080,18 +9128,18 @@ "2024-08-16-preview" ], "parent": { - "$ref": "368" + "$ref": "370" }, "isMultiServiceClient": false }, { - "$id": "655", + "$id": "659", "kind": "client", "name": "DogOperations", "namespace": "SampleTypeSpec", "methods": [ { - "$id": "656", + "$id": "660", "kind": "basic", "name": "updateDogAsDog", "accessibility": "public", @@ -9101,14 +9149,14 @@ ], "doc": "Update a dog as a dog", "operation": { - "$id": "657", + "$id": "661", "name": "updateDogAsDog", "resourceName": "DogOperations", "doc": "Update a dog as a dog", "accessibility": "public", "parameters": [ { - "$id": "658", + "$id": "662", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -9125,7 +9173,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DogOperations.updateDogAsDog.contentType" }, { - "$id": "659", + "$id": "663", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -9141,12 +9189,12 @@ "crossLanguageDefinitionId": "SampleTypeSpec.DogOperations.updateDogAsDog.accept" }, { - "$id": "660", + "$id": "664", "kind": "body", "name": "dog", "serializedName": "dog", "type": { - "$ref": "359" + "$ref": "361" }, "isApiVersion": false, "contentTypes": [ @@ -9166,7 +9214,7 @@ 200 ], "bodyType": { - "$ref": "359" + "$ref": "361" }, "headers": [], "isErrorResponse": false, @@ -9189,12 +9237,12 @@ }, "parameters": [ { - "$id": "661", + "$id": "665", "kind": "method", "name": "dog", "serializedName": "dog", "type": { - "$ref": "359" + "$ref": "361" }, "location": "Body", "isApiVersion": false, @@ -9206,7 +9254,7 @@ "decorators": [] }, { - "$id": "662", + "$id": "666", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -9224,7 +9272,7 @@ "decorators": [] }, { - "$id": "663", + "$id": "667", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -9243,7 +9291,7 @@ ], "response": { "type": { - "$ref": "359" + "$ref": "361" } }, "isOverride": false, @@ -9254,12 +9302,12 @@ ], "parameters": [ { - "$id": "664", + "$id": "668", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "665", + "$id": "669", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -9282,18 +9330,18 @@ "2024-08-16-preview" ], "parent": { - "$ref": "368" + "$ref": "370" }, "isMultiServiceClient": false }, { - "$id": "666", + "$id": "670", "kind": "client", "name": "Metrics", "namespace": "SampleTypeSpec", "methods": [ { - "$id": "667", + "$id": "671", "kind": "basic", "name": "getWidgetMetrics", "accessibility": "public", @@ -9303,14 +9351,14 @@ ], "doc": "Get Widget metrics for given day of week", "operation": { - "$id": "668", + "$id": "672", "name": "getWidgetMetrics", "resourceName": "Metrics", "doc": "Get Widget metrics for given day of week", "accessibility": "public", "parameters": [ { - "$id": "669", + "$id": "673", "kind": "path", "name": "day", "serializedName": "day", @@ -9329,7 +9377,7 @@ "crossLanguageDefinitionId": "SampleTypeSpec.Metrics.getWidgetMetrics.day" }, { - "$id": "670", + "$id": "674", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -9351,7 +9399,7 @@ 200 ], "bodyType": { - "$ref": "363" + "$ref": "365" }, "headers": [], "isErrorResponse": false, @@ -9371,7 +9419,7 @@ }, "parameters": [ { - "$id": "671", + "$id": "675", "kind": "method", "name": "day", "serializedName": "day", @@ -9388,7 +9436,7 @@ "decorators": [] }, { - "$id": "672", + "$id": "676", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -9407,7 +9455,7 @@ ], "response": { "type": { - "$ref": "363" + "$ref": "365" } }, "isOverride": false, @@ -9418,12 +9466,12 @@ ], "parameters": [ { - "$id": "673", + "$id": "677", "kind": "endpoint", "name": "sampleTypeSpecUrl", "serializedName": "sampleTypeSpecUrl", "type": { - "$id": "674", + "$id": "678", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -9446,7 +9494,7 @@ "2024-08-16-preview" ], "parent": { - "$ref": "368" + "$ref": "370" }, "isMultiServiceClient": false } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Documentation/DocumentationTests.cs b/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Documentation/DocumentationTests.cs new file mode 100644 index 00000000000..9bade0f2500 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Documentation/DocumentationTests.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Linq; +using System.Reflection; +using System.Threading; +using System.Threading.Tasks; +using System.Xml; +using Documentation; +using Documentation._Lists; +using Documentation._TextFormatting; +using NUnit.Framework; + +namespace TestProjects.Spector.Tests.Http.Documentation +{ + public class DocumentationTests : SpectorTestBase + { + // Lists namespace tests + [SpectorTest] + public Task BulletPointsOp() => Test(async (host) => + { + var client = new DocumentationClient(host, new DocumentationClientOptions()); + var response = await client.GetListsClient().BulletPointsOpAsync(); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [SpectorTest] + [Ignore("https://github.com/microsoft/typespec/issues/9173")] + public Task BulletPointsModel() => Test(async (host) => + { + var client = new DocumentationClient(host, new DocumentationClientOptions()); + var input = new BulletPointsModel(BulletPointsEnum.Simple); + var response = await client.GetListsClient().BulletPointsModelAsync(input); + Assert.AreEqual(200, response.GetRawResponse().Status); + }); + + [SpectorTest] + public Task Numbered() => Test(async (host) => + { + var client = new DocumentationClient(host, new DocumentationClientOptions()); + var response = await client.GetListsClient().NumberedAsync(); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + // TextFormatting namespace tests + [SpectorTest] + public Task BoldText() => Test(async (host) => + { + var client = new DocumentationClient(host, new DocumentationClientOptions()); + var response = await client.GetTextFormattingClient().BoldTextAsync(); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [SpectorTest] + public Task ItalicText() => Test(async (host) => + { + var client = new DocumentationClient(host, new DocumentationClientOptions()); + var response = await client.GetTextFormattingClient().ItalicTextAsync(); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + + [SpectorTest] + public Task CombinedFormatting() => Test(async (host) => + { + var client = new DocumentationClient(host, new DocumentationClientOptions()); + var response = await client.GetTextFormattingClient().CombinedFormattingAsync(); + Assert.AreEqual(204, response.GetRawResponse().Status); + }); + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector.Tests/TestProjects.Spector.Tests.csproj b/packages/http-client-csharp/generator/TestProjects/Spector.Tests/TestProjects.Spector.Tests.csproj index 62e00182caf..467b32720de 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector.Tests/TestProjects.Spector.Tests.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector.Tests/TestProjects.Spector.Tests.csproj @@ -32,6 +32,7 @@ + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/src/Generated/Models/BulletPointsEnum.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/src/Generated/Models/BulletPointsEnum.cs index 1487e435c2e..afed70b8573 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/src/Generated/Models/BulletPointsEnum.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/src/Generated/Models/BulletPointsEnum.cs @@ -8,20 +8,17 @@ public enum BulletPointsEnum { /// /// Simple bullet point. This line is intentionally long to test text wrapping in bullet points within enum documentation comments. It should properly indent the wrapped lines. - /// - One: one. This line is intentionally long to test text wrapping in bullet points within enum documentation comments. It should properly indent the wrapped lines. - /// - Two: two. This line is intentionally long to test text wrapping in bullet points within enum documentation comments. It should properly indent the wrapped lines. + /// One: one. This line is intentionally long to test text wrapping in bullet points within enum documentation comments. It should properly indent the wrapped lines.Two: two. This line is intentionally long to test text wrapping in bullet points within enum documentation comments. It should properly indent the wrapped lines. /// Simple, /// - /// Bullet point with **bold text**. This line is intentionally long to test text wrapping in bullet points within enum documentation comments. It should properly indent the wrapped lines. - /// - **One**: one. This line is intentionally long to test text wrapping in bullet points within enum documentation comments. It should properly indent the wrapped lines. - /// - **Two**: two. This line is intentionally long to test text wrapping in bullet points within enum documentation comments. It should properly indent the wrapped lines. + /// Bullet point with bold text. This line is intentionally long to test text wrapping in bullet points within enum documentation comments. It should properly indent the wrapped lines. + /// One: one. This line is intentionally long to test text wrapping in bullet points within enum documentation comments. It should properly indent the wrapped lines.Two: two. This line is intentionally long to test text wrapping in bullet points within enum documentation comments. It should properly indent the wrapped lines. /// Bold, /// - /// Bullet point with *italic text*. This line is intentionally long to test text wrapping in bullet points within enum documentation comments. It should properly indent the wrapped lines. - /// - *One*: one. This line is intentionally long to test text wrapping in bullet points within enum documentation comments. It should properly indent the wrapped lines. - /// - *Two*: two. This line is intentionally long to test text wrapping in bullet points within enum documentation comments. It should properly indent the wrapped lines. + /// Bullet point with italic text. This line is intentionally long to test text wrapping in bullet points within enum documentation comments. It should properly indent the wrapped lines. + /// One: one. This line is intentionally long to test text wrapping in bullet points within enum documentation comments. It should properly indent the wrapped lines.Two: two. This line is intentionally long to test text wrapping in bullet points within enum documentation comments. It should properly indent the wrapped lines. /// Italic }