From 5616293259ffa23f7945d922ffc27a1645114f78 Mon Sep 17 00:00:00 2001 From: jolov Date: Wed, 9 Sep 2026 17:04:18 -0700 Subject: [PATCH 1/8] chore(http-client-csharp): upgrade HTTP specs for SSE protocol fixtures Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../eng/scripts/Generation.psm1 | 4 + .../src/Properties/launchSettings.json | 5 + .../body-or-no-content/Configuration.json | 3 + .../Response.BodyOrNoContent.NuGet.targets | 6 + .../Response.BodyOrNoContent.slnx | 3 + .../src/Generated/BodyOrNoContentClient.cs | 43 + .../Generated/BodyOrNoContentClientOptions.cs | 18 + .../BodyOrNoContentClientSettings.cs | 29 + .../Models/BlobLayout.Serialization.cs | 36 + .../src/Generated/Models/BlobLayout.cs | 11 + .../Models/ResponseBodyOrNoContentContext.cs | 13 + .../ResponseBodyOrNoContentModelFactory.cs | 11 + .../Generated/schema/ConfigurationSchema.json | 40 + .../src/Response.BodyOrNoContent.csproj | 20 + .../body-or-no-content/tspCodeModel.json | 396 ++++ .../http/streaming/sse/customizations.tsp | 4 + .../Models/ProtocolInfo.Serialization.cs | 33 + .../sse/src/Generated/Models/ProtocolInfo.cs | 11 + .../Generated/Models/StreamingSseContext.cs | 2 + .../streaming/sse/src/Generated/Protocol.cs | 65 + .../sse/src/Generated/ProtocolData.cs | 38 + .../streaming/sse/src/Generated/SseClient.cs | 3 + .../src/Generated/StreamingSseModelFactory.cs | 3 + .../http/streaming/sse/tspCodeModel.json | 1612 +++++++++++++++-- .../generator/docs/spector.md | 2 + packages/http-client-csharp/package-lock.json | 26 +- packages/http-client-csharp/package.json | 2 +- 27 files changed, 2311 insertions(+), 128 deletions(-) create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Configuration.json create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.NuGet.targets create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.slnx create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClient.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientOptions.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientSettings.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/ResponseBodyOrNoContentContext.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/ResponseBodyOrNoContentModelFactory.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/schema/ConfigurationSchema.json create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Response.BodyOrNoContent.csproj create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/tspCodeModel.json create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/customizations.tsp create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Protocol.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/ProtocolData.cs diff --git a/packages/http-client-csharp/eng/scripts/Generation.psm1 b/packages/http-client-csharp/eng/scripts/Generation.psm1 index 35291b6fcaf..29d35bf145d 100644 --- a/packages/http-client-csharp/eng/scripts/Generation.psm1 +++ b/packages/http-client-csharp/eng/scripts/Generation.psm1 @@ -35,6 +35,10 @@ function Get-TspCommand { ) $emitterDir = Resolve-Path (Join-Path $PSScriptRoot '..' '..') $command = "npx tsp compile $specFile" + $customizationsFile = Join-Path $generationDir "customizations.tsp" + if (Test-Path $customizationsFile) { + $command += " --import `"$customizationsFile`"" + } $command += " --trace @typespec/http-client-csharp" $command += " --emit $emitterDir" $configFile = Join-Path $generationDir "tspconfig.yaml" diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Properties/launchSettings.json b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Properties/launchSettings.json index 9427460fad8..1bcac457815 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Properties/launchSettings.json +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Properties/launchSettings.json @@ -160,6 +160,11 @@ "commandName": "Executable", "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.exe" }, + "http-response-body-or-no-content": { + "commandLineArgs": "$(SolutionDir)/TestProjects/Spector/http/response/body-or-no-content -g StubLibraryGenerator", + "commandName": "Executable", + "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.exe" + }, "http-response-status-code-range": { "commandLineArgs": "$(SolutionDir)/TestProjects/Spector/http/response/status-code-range -g StubLibraryGenerator", "commandName": "Executable", diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Configuration.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Configuration.json new file mode 100644 index 00000000000..d31d8ac85ec --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Configuration.json @@ -0,0 +1,3 @@ +{ + "package-name": "Response.BodyOrNoContent" +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.slnx b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.slnx new file mode 100644 index 00000000000..382b2c55d6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.slnx @@ -0,0 +1,3 @@ + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClient.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClient.cs new file mode 100644 index 00000000000..7e06136ebe6 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClient.cs @@ -0,0 +1,43 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Diagnostics.CodeAnalysis; +using System.Threading; +using System.Threading.Tasks; + +namespace Response.BodyOrNoContent +{ + public partial class BodyOrNoContentClient + { + public BodyOrNoContentClient() : this(new Uri("http://localhost:3000"), new BodyOrNoContentClientOptions()) => throw null; + + internal BodyOrNoContentClient(AuthenticationPolicy authenticationPolicy, Uri endpoint, BodyOrNoContentClientOptions options) => throw null; + + public BodyOrNoContentClient(Uri endpoint, BodyOrNoContentClientOptions options) : this(null, endpoint, options) => throw null; + + [Experimental("SCME0002")] + public BodyOrNoContentClient(BodyOrNoContentClientSettings settings) : this(AuthenticationPolicy.Create(settings), settings?.Endpoint, settings?.Options) => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetBody(RequestOptions options) => throw null; + + public virtual Task GetBodyAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetBody(CancellationToken cancellationToken = default) => throw null; + + public virtual Task> GetBodyAsync(CancellationToken cancellationToken = default) => throw null; + + public virtual ClientResult GetNoContent(RequestOptions options) => throw null; + + public virtual Task GetNoContentAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetNoContent(CancellationToken cancellationToken = default) => throw null; + + public virtual Task> GetNoContentAsync(CancellationToken cancellationToken = default) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientOptions.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientOptions.cs new file mode 100644 index 00000000000..29d31ba6a55 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientOptions.cs @@ -0,0 +1,18 @@ +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Diagnostics.CodeAnalysis; +using Microsoft.Extensions.Configuration; + +namespace Response.BodyOrNoContent +{ + public partial class BodyOrNoContentClientOptions : ClientPipelineOptions + { + public BodyOrNoContentClientOptions() => throw null; + + [Experimental("SCME0002")] + internal BodyOrNoContentClientOptions(IConfigurationSection section) : base(section) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientSettings.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientSettings.cs new file mode 100644 index 00000000000..c05c2fa5f98 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientSettings.cs @@ -0,0 +1,29 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Diagnostics.CodeAnalysis; +using Microsoft.Extensions.Configuration; + +namespace Response.BodyOrNoContent +{ + [Experimental("SCME0002")] + public partial class BodyOrNoContentClientSettings : ClientSettings + { + public Uri Endpoint + { + get => throw null; + set => throw null; + } + + public BodyOrNoContentClientOptions Options + { + get => throw null; + set => throw null; + } + + protected override void BindCore(IConfigurationSection section) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.Serialization.cs new file mode 100644 index 00000000000..80fbdd3c5de --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Response.BodyOrNoContent +{ + public partial class BlobLayout : IJsonModel + { + internal BlobLayout() => throw null; + + protected virtual BlobLayout PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + BlobLayout IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static explicit operator BlobLayout(ClientResult result) => throw null; + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + BlobLayout IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual BlobLayout JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.cs new file mode 100644 index 00000000000..3393c6ec295 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.cs @@ -0,0 +1,11 @@ +// + +#nullable disable + +namespace Response.BodyOrNoContent +{ + public partial class BlobLayout + { + public string Content => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/ResponseBodyOrNoContentContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/ResponseBodyOrNoContentContext.cs new file mode 100644 index 00000000000..35e55d83662 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/ResponseBodyOrNoContentContext.cs @@ -0,0 +1,13 @@ +// + +#nullable disable + +using System.ClientModel.Primitives; + +namespace Response.BodyOrNoContent +{ + [ModelReaderWriterBuildable(typeof(BlobLayout))] + public partial class ResponseBodyOrNoContentContext : ModelReaderWriterContext + { + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/ResponseBodyOrNoContentModelFactory.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/ResponseBodyOrNoContentModelFactory.cs new file mode 100644 index 00000000000..7ac0d608a85 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/ResponseBodyOrNoContentModelFactory.cs @@ -0,0 +1,11 @@ +// + +#nullable disable + +namespace Response.BodyOrNoContent +{ + public static partial class ResponseBodyOrNoContentModelFactory + { + public static BlobLayout BlobLayout(string content = default) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..580d55fad54 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "BodyOrNoContentClient": { + "type": "object", + "description": "Configuration for BodyOrNoContentClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/bodyOrNoContentClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "bodyOrNoContentClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Response.BodyOrNoContent.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Response.BodyOrNoContent.csproj new file mode 100644 index 00000000000..a9176222465 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Response.BodyOrNoContent.csproj @@ -0,0 +1,20 @@ + + + This is the Response.BodyOrNoContent client library for developing .NET applications with rich experience. + SDK Code Generation Response.BodyOrNoContent + 1.0.0-beta.1 + Response.BodyOrNoContent + netstandard2.0;net8.0 + latest + true + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/tspCodeModel.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/tspCodeModel.json new file mode 100644 index 00000000000..4fd2882cc98 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/tspCodeModel.json @@ -0,0 +1,396 @@ +{ + "name": "Response.BodyOrNoContent", + "apiVersions": [], + "enums": [], + "constants": [ + { + "$id": "1", + "kind": "constant", + "name": "GetBodyAccept", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "2", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [], + "isExactName": false + }, + { + "$id": "3", + "kind": "constant", + "name": "GetBodyAccept1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "4", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [], + "isExactName": false + } + ], + "models": [ + { + "$id": "5", + "kind": "model", + "name": "BlobLayout", + "apiVersions": [], + "namespace": "Response.BodyOrNoContent", + "crossLanguageDefinitionId": "Response.BodyOrNoContent.BlobLayout", + "usage": "Output,Json", + "decorators": [], + "serializationOptions": { + "json": { + "name": "BlobLayout" + } + }, + "isExactName": false, + "properties": [ + { + "$id": "6", + "kind": "property", + "name": "content", + "apiVersions": [], + "serializedName": "content", + "type": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Response.BodyOrNoContent.BlobLayout.content", + "serializationOptions": { + "json": { + "name": "content" + } + }, + "isHttpMetadata": false, + "isExactName": false + } + ] + } + ], + "clients": [ + { + "$id": "8", + "kind": "client", + "name": "BodyOrNoContentClient", + "isExactName": false, + "namespace": "Response.BodyOrNoContent", + "doc": "Test for operations whose successful response is either a model body (200) or no content (204).", + "methods": [ + { + "$id": "9", + "kind": "basic", + "name": "getBody", + "isExactName": false, + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "10", + "name": "getBody", + "isExactName": false, + "resourceName": "BodyOrNoContent", + "accessibility": "public", + "parameters": [ + { + "$id": "11", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "1" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Response.BodyOrNoContent.getBody.accept", + "methodParameterSegments": [ + { + "$id": "12", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "1" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Response.BodyOrNoContent.getBody.accept", + "readOnly": false, + "access": "public", + "decorators": [], + "isExactName": false + } + ], + "isExactName": false + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "5" + }, + "headers": [ + { + "name": "requestId", + "nameInResponse": "x-ms-request-id", + "type": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ], + "serializationOptions": { + "json": { + "name": "" + } + } + }, + { + "statusCodes": [ + 204 + ], + "headers": [ + { + "name": "requestId", + "nameInResponse": "x-ms-request-id", + "type": { + "$id": "14", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "serializationOptions": {} + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/response/body-or-no-content/body", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Response.BodyOrNoContent.getBody", + "decorators": [], + "namespace": "Response.BodyOrNoContent" + }, + "parameters": [ + { + "$ref": "12" + } + ], + "response": { + "type": { + "$ref": "5" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Response.BodyOrNoContent.getBody" + }, + { + "$id": "15", + "kind": "basic", + "name": "getNoContent", + "isExactName": false, + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "16", + "name": "getNoContent", + "isExactName": false, + "resourceName": "BodyOrNoContent", + "accessibility": "public", + "parameters": [ + { + "$id": "17", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "3" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Response.BodyOrNoContent.getNoContent.accept", + "methodParameterSegments": [ + { + "$id": "18", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "3" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Response.BodyOrNoContent.getNoContent.accept", + "readOnly": false, + "access": "public", + "decorators": [], + "isExactName": false + } + ], + "isExactName": false + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "5" + }, + "headers": [ + { + "name": "requestId", + "nameInResponse": "x-ms-request-id", + "type": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ], + "serializationOptions": { + "json": { + "name": "" + } + } + }, + { + "statusCodes": [ + 204 + ], + "headers": [ + { + "name": "requestId", + "nameInResponse": "x-ms-request-id", + "type": { + "$id": "20", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "serializationOptions": {} + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/response/body-or-no-content/no-content", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Response.BodyOrNoContent.getNoContent", + "decorators": [], + "namespace": "Response.BodyOrNoContent" + }, + "parameters": [ + { + "$ref": "18" + } + ], + "response": { + "type": { + "$ref": "5" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Response.BodyOrNoContent.getNoContent" + } + ], + "parameters": [ + { + "$id": "21", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "22", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Response.BodyOrNoContent.endpoint", + "isExactName": false + } + ], + "initializedBy": 1, + "decorators": [], + "crossLanguageDefinitionId": "Response.BodyOrNoContent", + "apiVersions": [], + "isMultiServiceClient": false + } + ] +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/customizations.tsp b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/customizations.tsp new file mode 100644 index 00000000000..3a3c112f50b --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/customizations.tsp @@ -0,0 +1,4 @@ +import "@azure-tools/typespec-client-generator-core"; + +// Avoid colliding with the Info model in the Unnamed operation group. +@@Azure.ClientGenerator.Core.clientName(Streaming.Sse.Protocol.Info, "ProtocolInfo", "csharp"); diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.Serialization.cs new file mode 100644 index 00000000000..b6cff986cdb --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.Serialization.cs @@ -0,0 +1,33 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Streaming.Sse._Protocol +{ + public partial class ProtocolInfo : IJsonModel + { + internal ProtocolInfo() => throw null; + + protected virtual ProtocolInfo PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + ProtocolInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + ProtocolInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual ProtocolInfo JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.cs new file mode 100644 index 00000000000..1612588a909 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.cs @@ -0,0 +1,11 @@ +// + +#nullable disable + +namespace Streaming.Sse._Protocol +{ + public partial class ProtocolInfo + { + public string Message => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/StreamingSseContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/StreamingSseContext.cs index 9f2a25d8a49..818a6b5e81d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/StreamingSseContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/StreamingSseContext.cs @@ -3,12 +3,14 @@ #nullable disable using System.ClientModel.Primitives; +using Streaming.Sse._Protocol; using Streaming.Sse._Retrieve; using Streaming.Sse._Unnamed; namespace Streaming.Sse { [ModelReaderWriterBuildable(typeof(Info))] + [ModelReaderWriterBuildable(typeof(ProtocolInfo))] [ModelReaderWriterBuildable(typeof(RetrievalRequest))] public partial class StreamingSseContext : ModelReaderWriterContext { diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Protocol.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Protocol.cs new file mode 100644 index 00000000000..e2a0b6cacbb --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Protocol.cs @@ -0,0 +1,65 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Net.ServerSentEvents; +using System.Threading; +using System.Threading.Tasks; +using Streaming.Sse._Protocol.Data; + +namespace Streaming.Sse._Protocol +{ + public partial class Protocol + { + protected Protocol() => throw null; + + internal Protocol(ClientPipeline pipeline, Uri endpoint) => throw null; + + public ClientPipeline Pipeline => throw null; + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> IdAsync(RequestOptions options) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> IdAsync(CancellationToken cancellationToken = default) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> InvalidIdAsync(RequestOptions options) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> InvalidIdAsync(CancellationToken cancellationToken = default) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> RetryAsync(RequestOptions options) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> RetryAsync(CancellationToken cancellationToken = default) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> InvalidRetryAsync(RequestOptions options) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> InvalidRetryAsync(CancellationToken cancellationToken = default) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> ReconnectAsync(RequestOptions options) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> ReconnectAsync(CancellationToken cancellationToken = default) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + + public virtual ProtocolData GetProtocolDataClient() => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/ProtocolData.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/ProtocolData.cs new file mode 100644 index 00000000000..711f9b89e36 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/ProtocolData.cs @@ -0,0 +1,38 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Net.ServerSentEvents; +using System.Threading; +using System.Threading.Tasks; + +namespace Streaming.Sse._Protocol.Data +{ + public partial class ProtocolData + { + protected ProtocolData() => throw null; + + internal ProtocolData(ClientPipeline pipeline, Uri endpoint) => throw null; + + public ClientPipeline Pipeline => throw null; + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> WithEnvelopeAsync(RequestOptions options) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> WithEnvelopeAsync(CancellationToken cancellationToken = default) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> WithoutEnvelopeAsync(RequestOptions options) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> WithoutEnvelopeAsync(CancellationToken cancellationToken = default) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/SseClient.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/SseClient.cs index ad7867309e0..f711396d936 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/SseClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/SseClient.cs @@ -6,6 +6,7 @@ using System.ClientModel.Primitives; using System.Diagnostics.CodeAnalysis; using Streaming.Sse._Named; +using Streaming.Sse._Protocol; using Streaming.Sse._Retrieve; using Streaming.Sse._Unnamed; @@ -29,5 +30,7 @@ public partial class SseClient public virtual Named GetNamedClient() => throw null; public virtual Retrieve GetRetrieveClient() => throw null; + + public virtual Protocol GetProtocolClient() => throw null; } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/StreamingSseModelFactory.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/StreamingSseModelFactory.cs index 323ddf4742d..9b9c241cd33 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/StreamingSseModelFactory.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/StreamingSseModelFactory.cs @@ -2,6 +2,7 @@ #nullable disable +using Streaming.Sse._Protocol; using Streaming.Sse._Retrieve; using Streaming.Sse._Unnamed; @@ -12,5 +13,7 @@ public static partial class StreamingSseModelFactory public static Info Info(string desc = default) => throw null; public static RetrievalRequest RetrievalRequest(string query = default) => throw null; + + public static ProtocolInfo ProtocolInfo(string message = default) => throw null; } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/tspCodeModel.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/tspCodeModel.json index 3ad7984785f..91266b50940 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/tspCodeModel.json +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/tspCodeModel.json @@ -155,11 +155,249 @@ "value": "text/event-stream", "decorators": [], "isExactName": false + }, + { + "$id": "19", + "kind": "constant", + "name": "ReceiveResponseContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "20", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "21", + "kind": "constant", + "name": "ReceiveResponseContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "22", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "23", + "kind": "constant", + "name": "ReceiveResponseContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "24", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "25", + "kind": "constant", + "name": "ReceiveResponseContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "26", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "27", + "kind": "constant", + "name": "ReceiveResponseContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "28", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "29", + "kind": "constant", + "name": "ReceiveResponseContentType11", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "30", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "31", + "kind": "constant", + "name": "ReceiveResponseContentType12", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "32", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "33", + "kind": "constant", + "name": "ReceiveResponseContentType13", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "34", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "35", + "kind": "constant", + "name": "ReceiveResponseContentType14", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "36", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "37", + "kind": "constant", + "name": "ReceiveResponseContentType15", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "38", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "39", + "kind": "constant", + "name": "ReceiveResponseContentType16", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "40", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "41", + "kind": "constant", + "name": "ReceiveResponseContentType17", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "42", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "43", + "kind": "constant", + "name": "ReceiveResponseContentType18", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "44", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "45", + "kind": "constant", + "name": "ReceiveResponseContentType19", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "46", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false } ], "models": [ { - "$id": "19", + "$id": "47", "kind": "model", "name": "Info", "apiVersions": [], @@ -175,13 +413,13 @@ "isExactName": false, "properties": [ { - "$id": "20", + "$id": "48", "kind": "property", "name": "desc", "apiVersions": [], "serializedName": "desc", "type": { - "$id": "21", + "$id": "49", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -204,7 +442,7 @@ ] }, { - "$id": "22", + "$id": "50", "kind": "model", "name": "ResponseCreated", "apiVersions": [], @@ -220,13 +458,13 @@ "isExactName": false, "properties": [ { - "$id": "23", + "$id": "51", "kind": "property", "name": "id", "apiVersions": [], "serializedName": "id", "type": { - "$id": "24", + "$id": "52", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -249,7 +487,7 @@ ] }, { - "$id": "25", + "$id": "53", "kind": "model", "name": "ResponseDelta", "apiVersions": [], @@ -265,13 +503,13 @@ "isExactName": false, "properties": [ { - "$id": "26", + "$id": "54", "kind": "property", "name": "delta", "apiVersions": [], "serializedName": "delta", "type": { - "$id": "27", + "$id": "55", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -294,7 +532,7 @@ ] }, { - "$id": "28", + "$id": "56", "kind": "model", "name": "RetrievalRequest", "apiVersions": [], @@ -310,13 +548,13 @@ "isExactName": false, "properties": [ { - "$id": "29", + "$id": "57", "kind": "property", "name": "query", "apiVersions": [], "serializedName": "query", "type": { - "$id": "30", + "$id": "58", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -339,7 +577,7 @@ ] }, { - "$id": "31", + "$id": "59", "kind": "model", "name": "PartialResult", "apiVersions": [], @@ -355,13 +593,13 @@ "isExactName": false, "properties": [ { - "$id": "32", + "$id": "60", "kind": "property", "name": "text", "apiVersions": [], "serializedName": "text", "type": { - "$id": "33", + "$id": "61", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -384,7 +622,7 @@ ] }, { - "$id": "34", + "$id": "62", "kind": "model", "name": "FinalResult", "apiVersions": [], @@ -400,17 +638,17 @@ "isExactName": false, "properties": [ { - "$id": "35", + "$id": "63", "kind": "property", "name": "references", "apiVersions": [], "serializedName": "references", "type": { - "$id": "36", + "$id": "64", "kind": "array", "name": "Array", "valueType": { - "$id": "37", + "$id": "65", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -434,78 +672,252 @@ "isExactName": false } ] - } - ], - "clients": [ + }, { - "$id": "38", - "kind": "client", - "name": "SseClient", + "$id": "66", + "kind": "model", + "name": "ProtocolInfo", + "apiVersions": [], + "namespace": "Streaming.Sse.Protocol", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Info", + "usage": "Output,Json", + "decorators": [], + "serializationOptions": { + "json": { + "name": "Info" + } + }, "isExactName": false, - "namespace": "Streaming.Sse", - "doc": "Test of server-sent events (SSE) streaming.", - "methods": [], - "parameters": [ + "properties": [ { - "$id": "39", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", + "$id": "67", + "kind": "property", + "name": "message", + "apiVersions": [], + "serializedName": "message", "type": { - "$id": "40", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" + "$id": "68", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "isApiVersion": false, "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "41", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "http://localhost:3000" - }, - "serverUrlTemplate": "{endpoint}", - "skipUrlEncoding": false, "readOnly": false, - "crossLanguageDefinitionId": "Streaming.Sse.endpoint", - "isExactName": false - } - ], - "initializedBy": 1, - "decorators": [], - "crossLanguageDefinitionId": "Streaming.Sse", + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Info.message", + "serializationOptions": { + "json": { + "name": "message" + } + }, + "isHttpMetadata": false, + "isExactName": false + } + ] + }, + { + "$id": "69", + "kind": "model", + "name": "WithEnvelope", + "apiVersions": [], + "namespace": "Streaming.Sse.Protocol.Data", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.anonymous", + "usage": "Output,Json", + "decorators": [], + "serializationOptions": { + "json": { + "name": "" + } + }, + "isExactName": false, + "properties": [ + { + "$id": "70", + "kind": "property", + "name": "contents", + "apiVersions": [], + "serializedName": "contents", + "type": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.anonymous.contents", + "serializationOptions": { + "json": { + "name": "contents" + } + }, + "isHttpMetadata": false, + "isExactName": false + } + ] + }, + { + "$id": "72", + "kind": "model", + "name": "WithEnvelope1", + "apiVersions": [], + "namespace": "Streaming.Sse.Protocol.Data", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.anonymous", + "usage": "Output,Json", + "decorators": [], + "serializationOptions": { + "json": { + "name": "" + } + }, + "isExactName": false, + "properties": [ + { + "$id": "73", + "kind": "property", + "name": "metadata", + "apiVersions": [], + "serializedName": "metadata", + "type": { + "$id": "74", + "kind": "dict", + "keyType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "76", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.anonymous.metadata", + "serializationOptions": { + "json": { + "name": "metadata" + } + }, + "isHttpMetadata": false, + "isExactName": false + }, + { + "$id": "77", + "kind": "property", + "name": "contents", + "apiVersions": [], + "serializedName": "contents", + "type": { + "$id": "78", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.anonymous.contents", + "serializationOptions": { + "json": { + "name": "contents" + } + }, + "isHttpMetadata": false, + "isExactName": false + } + ] + } + ], + "clients": [ + { + "$id": "79", + "kind": "client", + "name": "SseClient", + "isExactName": false, + "namespace": "Streaming.Sse", + "doc": "Test of server-sent events (SSE) streaming.", + "methods": [], + "parameters": [ + { + "$id": "80", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "81", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "82", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Streaming.Sse.endpoint", + "isExactName": false + } + ], + "initializedBy": 1, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse", "apiVersions": [], "children": [ { - "$id": "42", + "$id": "83", "kind": "client", "name": "Unnamed", "isExactName": false, "namespace": "Streaming.Sse.Unnamed", "methods": [ { - "$id": "43", + "$id": "84", "kind": "basic", "name": "receive", "isExactName": false, "accessibility": "public", "apiVersions": [], "operation": { - "$id": "44", + "$id": "85", "name": "receive", "isExactName": false, "resourceName": "Unnamed", "accessibility": "public", "parameters": [ { - "$id": "45", + "$id": "86", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -521,7 +933,7 @@ "crossLanguageDefinitionId": "Streaming.Sse.Unnamed.receive.accept", "methodParameterSegments": [ { - "$id": "46", + "$id": "87", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -548,16 +960,16 @@ 200 ], "bodyType": { - "$id": "47", + "$id": "88", "kind": "streaming", "name": "SSEStreamUnnamedEvents", "valueType": { - "$id": "48", + "$id": "89", "kind": "union", "name": "UnnamedEvents", "variantTypes": [ { - "$ref": "19" + "$ref": "47" } ], "namespace": "Streaming.Sse.Unnamed", @@ -598,16 +1010,16 @@ }, "parameters": [ { - "$ref": "46" + "$ref": "87" } ], "response": { "type": { - "$id": "49", + "$id": "90", "kind": "streaming", "name": "SSEStreamUnnamedEvents", "valueType": { - "$ref": "48" + "$ref": "89" }, "streamKind": "sse", "contentTypes": [ @@ -624,13 +1036,13 @@ ], "parameters": [ { - "$id": "50", + "$id": "91", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "51", + "$id": "92", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -641,7 +1053,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "52", + "$id": "93", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -660,33 +1072,33 @@ "crossLanguageDefinitionId": "Streaming.Sse.Unnamed", "apiVersions": [], "parent": { - "$ref": "38" + "$ref": "79" }, "isMultiServiceClient": false }, { - "$id": "53", + "$id": "94", "kind": "client", "name": "Named", "isExactName": false, "namespace": "Streaming.Sse.Named", "methods": [ { - "$id": "54", + "$id": "95", "kind": "basic", "name": "receive", "isExactName": false, "accessibility": "public", "apiVersions": [], "operation": { - "$id": "55", + "$id": "96", "name": "receive", "isExactName": false, "resourceName": "Named", "accessibility": "public", "parameters": [ { - "$id": "56", + "$id": "97", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -702,7 +1114,7 @@ "crossLanguageDefinitionId": "Streaming.Sse.Named.receive.accept", "methodParameterSegments": [ { - "$id": "57", + "$id": "98", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -729,19 +1141,19 @@ 200 ], "bodyType": { - "$id": "58", + "$id": "99", "kind": "streaming", "name": "SSEStreamResponseEvents", "valueType": { - "$id": "59", + "$id": "100", "kind": "union", "name": "ResponseEvents", "variantTypes": [ { - "$ref": "22" + "$ref": "50" }, { - "$ref": "25" + "$ref": "53" }, { "$ref": "7" @@ -786,16 +1198,16 @@ }, "parameters": [ { - "$ref": "57" + "$ref": "98" } ], "response": { "type": { - "$id": "60", + "$id": "101", "kind": "streaming", "name": "SSEStreamResponseEvents", "valueType": { - "$ref": "59" + "$ref": "100" }, "streamKind": "sse", "contentTypes": [ @@ -813,13 +1225,13 @@ ], "parameters": [ { - "$id": "61", + "$id": "102", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "62", + "$id": "103", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -830,7 +1242,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "63", + "$id": "104", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -849,33 +1261,33 @@ "crossLanguageDefinitionId": "Streaming.Sse.Named", "apiVersions": [], "parent": { - "$ref": "38" + "$ref": "79" }, "isMultiServiceClient": false }, { - "$id": "64", + "$id": "105", "kind": "client", "name": "Retrieve", "isExactName": false, "namespace": "Streaming.Sse.Retrieve", "methods": [ { - "$id": "65", + "$id": "106", "kind": "basic", "name": "stream", "isExactName": false, "accessibility": "public", "apiVersions": [], "operation": { - "$id": "66", + "$id": "107", "name": "stream", "isExactName": false, "resourceName": "Retrieve", "accessibility": "public", "parameters": [ { - "$id": "67", + "$id": "108", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -892,7 +1304,7 @@ "crossLanguageDefinitionId": "Streaming.Sse.Retrieve.stream.contentType", "methodParameterSegments": [ { - "$id": "68", + "$id": "109", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -914,7 +1326,7 @@ "isExactName": false }, { - "$id": "69", + "$id": "110", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -930,7 +1342,7 @@ "crossLanguageDefinitionId": "Streaming.Sse.Retrieve.stream.accept", "methodParameterSegments": [ { - "$id": "70", + "$id": "111", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -951,12 +1363,12 @@ "isExactName": false }, { - "$id": "71", + "$id": "112", "kind": "body", "name": "request", "serializedName": "request", "type": { - "$ref": "28" + "$ref": "56" }, "isApiVersion": false, "contentTypes": [ @@ -970,12 +1382,12 @@ "crossLanguageDefinitionId": "Streaming.Sse.Retrieve.stream.request", "methodParameterSegments": [ { - "$id": "72", + "$id": "113", "kind": "method", "name": "request", "serializedName": "request", "type": { - "$ref": "28" + "$ref": "56" }, "location": "Body", "isApiVersion": false, @@ -1002,19 +1414,19 @@ 200 ], "bodyType": { - "$id": "73", + "$id": "114", "kind": "streaming", "name": "SSEStreamRetrievalEvents", "valueType": { - "$id": "74", + "$id": "115", "kind": "union", "name": "RetrievalEvents", "variantTypes": [ { - "$ref": "31" + "$ref": "59" }, { - "$ref": "34" + "$ref": "62" }, { "$ref": "15" @@ -1062,22 +1474,22 @@ }, "parameters": [ { - "$ref": "72" + "$ref": "113" }, { - "$ref": "68" + "$ref": "109" }, { - "$ref": "70" + "$ref": "111" } ], "response": { "type": { - "$id": "75", + "$id": "116", "kind": "streaming", "name": "SSEStreamRetrievalEvents", "valueType": { - "$ref": "74" + "$ref": "115" }, "streamKind": "sse", "contentTypes": [ @@ -1095,13 +1507,13 @@ ], "parameters": [ { - "$id": "76", + "$id": "117", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "77", + "$id": "118", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1112,7 +1524,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "78", + "$id": "119", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1131,9 +1543,981 @@ "crossLanguageDefinitionId": "Streaming.Sse.Retrieve", "apiVersions": [], "parent": { - "$ref": "38" + "$ref": "79" }, "isMultiServiceClient": false + }, + { + "$id": "120", + "kind": "client", + "name": "Protocol", + "isExactName": false, + "namespace": "Streaming.Sse.Protocol", + "methods": [ + { + "$id": "121", + "kind": "basic", + "name": "id", + "isExactName": false, + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "122", + "name": "id", + "isExactName": false, + "resourceName": "Protocol", + "accessibility": "public", + "parameters": [ + { + "$id": "123", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "19" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.id.accept", + "methodParameterSegments": [ + { + "$id": "124", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "19" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.id.accept", + "readOnly": false, + "access": "public", + "decorators": [], + "isExactName": false + } + ], + "isExactName": false + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$id": "125", + "kind": "streaming", + "name": "SSEStreamProtocolEvents", + "valueType": { + "$id": "126", + "kind": "union", + "name": "ProtocolEvents", + "variantTypes": [ + { + "$ref": "66" + } + ], + "namespace": "Streaming.Sse.Protocol", + "decorators": [], + "isExactName": false + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "21" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "text/event-stream" + ], + "serializationOptions": {} + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/streaming/sse/protocol/id", + "bufferResponse": false, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.id", + "decorators": [], + "namespace": "Streaming.Sse.Protocol" + }, + "parameters": [ + { + "$ref": "124" + } + ], + "response": { + "type": { + "$id": "127", + "kind": "streaming", + "name": "SSEStreamProtocolEvents", + "valueType": { + "$ref": "126" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.id" + }, + { + "$id": "128", + "kind": "basic", + "name": "invalidId", + "isExactName": false, + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "129", + "name": "invalidId", + "isExactName": false, + "resourceName": "Protocol", + "accessibility": "public", + "parameters": [ + { + "$id": "130", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "23" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidId.accept", + "methodParameterSegments": [ + { + "$id": "131", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "23" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidId.accept", + "readOnly": false, + "access": "public", + "decorators": [], + "isExactName": false + } + ], + "isExactName": false + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$id": "132", + "kind": "streaming", + "name": "SSEStreamProtocolEvents", + "valueType": { + "$ref": "126" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "25" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "text/event-stream" + ], + "serializationOptions": {} + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/streaming/sse/protocol/invalid-id", + "bufferResponse": false, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidId", + "decorators": [], + "namespace": "Streaming.Sse.Protocol" + }, + "parameters": [ + { + "$ref": "131" + } + ], + "response": { + "type": { + "$id": "133", + "kind": "streaming", + "name": "SSEStreamProtocolEvents", + "valueType": { + "$ref": "126" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidId" + }, + { + "$id": "134", + "kind": "basic", + "name": "retry", + "isExactName": false, + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "135", + "name": "retry", + "isExactName": false, + "resourceName": "Protocol", + "accessibility": "public", + "parameters": [ + { + "$id": "136", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "27" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.retry.accept", + "methodParameterSegments": [ + { + "$id": "137", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "27" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.retry.accept", + "readOnly": false, + "access": "public", + "decorators": [], + "isExactName": false + } + ], + "isExactName": false + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$id": "138", + "kind": "streaming", + "name": "SSEStreamProtocolEvents", + "valueType": { + "$ref": "126" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "29" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "text/event-stream" + ], + "serializationOptions": {} + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/streaming/sse/protocol/retry", + "bufferResponse": false, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.retry", + "decorators": [], + "namespace": "Streaming.Sse.Protocol" + }, + "parameters": [ + { + "$ref": "137" + } + ], + "response": { + "type": { + "$id": "139", + "kind": "streaming", + "name": "SSEStreamProtocolEvents", + "valueType": { + "$ref": "126" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.retry" + }, + { + "$id": "140", + "kind": "basic", + "name": "invalidRetry", + "isExactName": false, + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "141", + "name": "invalidRetry", + "isExactName": false, + "resourceName": "Protocol", + "accessibility": "public", + "parameters": [ + { + "$id": "142", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "31" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidRetry.accept", + "methodParameterSegments": [ + { + "$id": "143", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "31" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidRetry.accept", + "readOnly": false, + "access": "public", + "decorators": [], + "isExactName": false + } + ], + "isExactName": false + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$id": "144", + "kind": "streaming", + "name": "SSEStreamProtocolEvents", + "valueType": { + "$ref": "126" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "33" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "text/event-stream" + ], + "serializationOptions": {} + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/streaming/sse/protocol/invalid-retry", + "bufferResponse": false, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidRetry", + "decorators": [], + "namespace": "Streaming.Sse.Protocol" + }, + "parameters": [ + { + "$ref": "143" + } + ], + "response": { + "type": { + "$id": "145", + "kind": "streaming", + "name": "SSEStreamProtocolEvents", + "valueType": { + "$ref": "126" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidRetry" + }, + { + "$id": "146", + "kind": "basic", + "name": "reconnect", + "isExactName": false, + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "147", + "name": "reconnect", + "isExactName": false, + "resourceName": "Protocol", + "accessibility": "public", + "parameters": [ + { + "$id": "148", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "35" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.reconnect.accept", + "methodParameterSegments": [ + { + "$id": "149", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "35" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.reconnect.accept", + "readOnly": false, + "access": "public", + "decorators": [], + "isExactName": false + } + ], + "isExactName": false + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$id": "150", + "kind": "streaming", + "name": "SSEStreamProtocolEvents", + "valueType": { + "$ref": "126" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "37" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "text/event-stream" + ], + "serializationOptions": {} + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/streaming/sse/protocol/reconnect", + "bufferResponse": false, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.reconnect", + "decorators": [], + "namespace": "Streaming.Sse.Protocol" + }, + "parameters": [ + { + "$ref": "149" + } + ], + "response": { + "type": { + "$id": "151", + "kind": "streaming", + "name": "SSEStreamProtocolEvents", + "valueType": { + "$ref": "126" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.reconnect" + } + ], + "parameters": [ + { + "$id": "152", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "153", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "154", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.endpoint", + "isExactName": false + } + ], + "initializedBy": 0, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol", + "apiVersions": [], + "parent": { + "$ref": "79" + }, + "children": [ + { + "$id": "155", + "kind": "client", + "name": "Data", + "isExactName": false, + "namespace": "Streaming.Sse.Protocol.Data", + "methods": [ + { + "$id": "156", + "kind": "basic", + "name": "withEnvelope", + "isExactName": false, + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "157", + "name": "withEnvelope", + "isExactName": false, + "resourceName": "Data", + "accessibility": "public", + "parameters": [ + { + "$id": "158", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "39" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.accept", + "methodParameterSegments": [ + { + "$id": "159", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "39" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.accept", + "readOnly": false, + "access": "public", + "decorators": [], + "isExactName": false + } + ], + "isExactName": false + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$id": "160", + "kind": "streaming", + "name": "SSEStreamDataEvents", + "valueType": { + "$id": "161", + "kind": "union", + "name": "DataEvents", + "variantTypes": [ + { + "$ref": "69" + }, + { + "$ref": "72" + } + ], + "namespace": "Streaming.Sse.Protocol.Data", + "decorators": [], + "isExactName": false + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "41" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "text/event-stream" + ], + "serializationOptions": {} + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/streaming/sse/protocol/data/with-envelope", + "bufferResponse": false, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope", + "decorators": [], + "namespace": "Streaming.Sse.Protocol.Data" + }, + "parameters": [ + { + "$ref": "159" + } + ], + "response": { + "type": { + "$id": "162", + "kind": "streaming", + "name": "SSEStreamDataEvents", + "valueType": { + "$ref": "161" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope" + }, + { + "$id": "163", + "kind": "basic", + "name": "withoutEnvelope", + "isExactName": false, + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "164", + "name": "withoutEnvelope", + "isExactName": false, + "resourceName": "Data", + "accessibility": "public", + "parameters": [ + { + "$id": "165", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "43" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withoutEnvelope.accept", + "methodParameterSegments": [ + { + "$id": "166", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "43" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withoutEnvelope.accept", + "readOnly": false, + "access": "public", + "decorators": [], + "isExactName": false + } + ], + "isExactName": false + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$id": "167", + "kind": "streaming", + "name": "SSEStreamDataEvents", + "valueType": { + "$ref": "161" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "45" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "text/event-stream" + ], + "serializationOptions": {} + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/streaming/sse/protocol/data/without-envelope", + "bufferResponse": false, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withoutEnvelope", + "decorators": [], + "namespace": "Streaming.Sse.Protocol.Data" + }, + "parameters": [ + { + "$ref": "166" + } + ], + "response": { + "type": { + "$id": "168", + "kind": "streaming", + "name": "SSEStreamDataEvents", + "valueType": { + "$ref": "161" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withoutEnvelope" + } + ], + "parameters": [ + { + "$id": "169", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "170", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.endpoint", + "isExactName": false + } + ], + "initializedBy": 0, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data", + "apiVersions": [], + "parent": { + "$ref": "120" + }, + "isMultiServiceClient": false + } + ], + "isMultiServiceClient": false } ], "isMultiServiceClient": false diff --git a/packages/http-client-csharp/generator/docs/spector.md b/packages/http-client-csharp/generator/docs/spector.md index 7b8aa3303bc..34db2fc8ef0 100644 --- a/packages/http-client-csharp/generator/docs/spector.md +++ b/packages/http-client-csharp/generator/docs/spector.md @@ -18,6 +18,8 @@ For example if you want to generate the non stubbed version of `http/authenticat ./eng/scripts/Generate.ps1 http/authentication/api-key -Stubbed $false ``` +For C#-specific TypeSpec customizations, add a `customizations.tsp` file at the root of the generated test project, alongside `tspCodeModel.json`. The generation and Spector test scripts import this file in addition to the original spec. This allows scoped decorators such as `@clientName` to resolve naming conflicts without modifying the installed specs or their wire contracts. See the SSE streaming project's `customizations.tsp` for an example. + ## Writing Spector tests Generating the stubs allows us write tests against the public API surface that will compile. To do this we add a test class in same folder structure although this time we will modify the casing slightly to match dotnet standards. diff --git a/packages/http-client-csharp/package-lock.json b/packages/http-client-csharp/package-lock.json index 89db5a2b467..54f34acd583 100644 --- a/packages/http-client-csharp/package-lock.json +++ b/packages/http-client-csharp/package-lock.json @@ -20,7 +20,7 @@ "@typespec/compiler": "1.15.0", "@typespec/events": "0.85.0", "@typespec/http": "1.15.0", - "@typespec/http-specs": "0.1.0-alpha.41", + "@typespec/http-specs": "0.1.0-alpha.42-dev.3", "@typespec/json-schema": "1.15.0", "@typespec/library-linter": "0.85.0", "@typespec/openapi": "1.15.0", @@ -1510,26 +1510,26 @@ } }, "node_modules/@typespec/http-specs": { - "version": "0.1.0-alpha.41", - "resolved": "https://registry.npmjs.org/@typespec/http-specs/-/http-specs-0.1.0-alpha.41.tgz", - "integrity": "sha512-/2S4irzCLOz7agQcARQuG5135oS1rV8X2QKXSczI4QewxQ9ZaeFnlQ12uEnNj2dd7wXX3iZz004sDQKXMhxGqA==", + "version": "0.1.0-alpha.42-dev.3", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@typespec/http-specs/-/http-specs-0.1.0-alpha.42-dev.3.tgz", + "integrity": "sha1-p0c6Oj6Ma+lfrfeuEJccxDCA150=", "dev": true, "license": "MIT", "dependencies": { - "@typespec/spec-api": "^0.1.0-alpha.16", - "@typespec/spector": "^0.1.0-alpha.28" + "@typespec/spec-api": "^0.1.0-alpha.16 || >= 0.1.0-alpha.17-dev.1", + "@typespec/spector": "^0.1.0-alpha.28 || >= 0.1.0-alpha.29-dev.1" }, "engines": { "node": ">=22.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.15.0", - "@typespec/events": "^0.85.0", - "@typespec/http": "^1.15.0", - "@typespec/rest": "^0.85.0", - "@typespec/sse": "^0.85.0", - "@typespec/versioning": "^0.85.0", - "@typespec/xml": "^0.85.0" + "@typespec/compiler": "^1.15.0 || >= 1.16.0-dev.5", + "@typespec/events": "^0.85.0 || >= 0.86.0-dev.0", + "@typespec/http": "^1.15.0 || >= 1.16.0-dev.1", + "@typespec/rest": "^0.85.0 || >= 0.86.0-dev.0", + "@typespec/sse": "^0.85.0 || >= 0.86.0-dev.0", + "@typespec/versioning": "^0.85.0 || >= 0.86.0-dev.0", + "@typespec/xml": "^0.85.0 || >= 0.86.0-dev.0" } }, "node_modules/@typespec/json-schema": { diff --git a/packages/http-client-csharp/package.json b/packages/http-client-csharp/package.json index 967dfa66ef7..32197bbd41d 100644 --- a/packages/http-client-csharp/package.json +++ b/packages/http-client-csharp/package.json @@ -78,7 +78,7 @@ "@typespec/compiler": "1.15.0", "@typespec/events": "0.85.0", "@typespec/http": "1.15.0", - "@typespec/http-specs": "0.1.0-alpha.41", + "@typespec/http-specs": "0.1.0-alpha.42-dev.3", "@typespec/json-schema": "1.15.0", "@typespec/library-linter": "0.85.0", "@typespec/openapi": "1.15.0", From 9e64e749090445ecd13ee23787494369a0dc56b1 Mon Sep 17 00:00:00 2001 From: jolov Date: Wed, 9 Sep 2026 17:23:31 -0700 Subject: [PATCH 2/8] chore(http-client-csharp): upgrade complete TypeSpec toolchain Upgrade all TypeSpec and Azure toolchain dependencies and matching peer declarations to the stable September releases. Keep SSE customizations and scenario generation out of the dependency PR. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../eng/scripts/Generation.psm1 | 4 - .../src/Properties/launchSettings.json | 5 - .../body-or-no-content/Configuration.json | 3 - .../Response.BodyOrNoContent.NuGet.targets | 6 - .../Response.BodyOrNoContent.slnx | 3 - .../src/Generated/BodyOrNoContentClient.cs | 43 - .../Generated/BodyOrNoContentClientOptions.cs | 18 - .../BodyOrNoContentClientSettings.cs | 29 - .../Models/BlobLayout.Serialization.cs | 36 - .../src/Generated/Models/BlobLayout.cs | 11 - .../Models/ResponseBodyOrNoContentContext.cs | 13 - .../ResponseBodyOrNoContentModelFactory.cs | 11 - .../Generated/schema/ConfigurationSchema.json | 40 - .../src/Response.BodyOrNoContent.csproj | 20 - .../body-or-no-content/tspCodeModel.json | 396 ---- .../http/streaming/sse/customizations.tsp | 4 - .../Models/ProtocolInfo.Serialization.cs | 33 - .../sse/src/Generated/Models/ProtocolInfo.cs | 11 - .../Generated/Models/StreamingSseContext.cs | 2 - .../streaming/sse/src/Generated/Protocol.cs | 65 - .../sse/src/Generated/ProtocolData.cs | 38 - .../streaming/sse/src/Generated/SseClient.cs | 3 - .../src/Generated/StreamingSseModelFactory.cs | 3 - .../http/streaming/sse/tspCodeModel.json | 1592 ++--------------- .../generator/docs/spector.md | 2 - packages/http-client-csharp/package-lock.json | 1265 +++++++------ packages/http-client-csharp/package.json | 56 +- 27 files changed, 889 insertions(+), 2823 deletions(-) delete mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Configuration.json delete mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.NuGet.targets delete mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.slnx delete mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClient.cs delete mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientOptions.cs delete mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientSettings.cs delete mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.Serialization.cs delete mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.cs delete mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/ResponseBodyOrNoContentContext.cs delete mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/ResponseBodyOrNoContentModelFactory.cs delete mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/schema/ConfigurationSchema.json delete mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Response.BodyOrNoContent.csproj delete mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/tspCodeModel.json delete mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/customizations.tsp delete mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.Serialization.cs delete mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.cs delete mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Protocol.cs delete mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/ProtocolData.cs diff --git a/packages/http-client-csharp/eng/scripts/Generation.psm1 b/packages/http-client-csharp/eng/scripts/Generation.psm1 index 29d35bf145d..35291b6fcaf 100644 --- a/packages/http-client-csharp/eng/scripts/Generation.psm1 +++ b/packages/http-client-csharp/eng/scripts/Generation.psm1 @@ -35,10 +35,6 @@ function Get-TspCommand { ) $emitterDir = Resolve-Path (Join-Path $PSScriptRoot '..' '..') $command = "npx tsp compile $specFile" - $customizationsFile = Join-Path $generationDir "customizations.tsp" - if (Test-Path $customizationsFile) { - $command += " --import `"$customizationsFile`"" - } $command += " --trace @typespec/http-client-csharp" $command += " --emit $emitterDir" $configFile = Join-Path $generationDir "tspconfig.yaml" diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Properties/launchSettings.json b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Properties/launchSettings.json index 1bcac457815..9427460fad8 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Properties/launchSettings.json +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Properties/launchSettings.json @@ -160,11 +160,6 @@ "commandName": "Executable", "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.exe" }, - "http-response-body-or-no-content": { - "commandLineArgs": "$(SolutionDir)/TestProjects/Spector/http/response/body-or-no-content -g StubLibraryGenerator", - "commandName": "Executable", - "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.exe" - }, "http-response-status-code-range": { "commandLineArgs": "$(SolutionDir)/TestProjects/Spector/http/response/status-code-range -g StubLibraryGenerator", "commandName": "Executable", diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Configuration.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Configuration.json deleted file mode 100644 index d31d8ac85ec..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Configuration.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "package-name": "Response.BodyOrNoContent" -} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.NuGet.targets deleted file mode 100644 index 9df53f09f6f..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.NuGet.targets +++ /dev/null @@ -1,6 +0,0 @@ - - - - - diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.slnx b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.slnx deleted file mode 100644 index 382b2c55d6f..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.slnx +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClient.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClient.cs deleted file mode 100644 index 7e06136ebe6..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClient.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Diagnostics.CodeAnalysis; -using System.Threading; -using System.Threading.Tasks; - -namespace Response.BodyOrNoContent -{ - public partial class BodyOrNoContentClient - { - public BodyOrNoContentClient() : this(new Uri("http://localhost:3000"), new BodyOrNoContentClientOptions()) => throw null; - - internal BodyOrNoContentClient(AuthenticationPolicy authenticationPolicy, Uri endpoint, BodyOrNoContentClientOptions options) => throw null; - - public BodyOrNoContentClient(Uri endpoint, BodyOrNoContentClientOptions options) : this(null, endpoint, options) => throw null; - - [Experimental("SCME0002")] - public BodyOrNoContentClient(BodyOrNoContentClientSettings settings) : this(AuthenticationPolicy.Create(settings), settings?.Endpoint, settings?.Options) => throw null; - - public ClientPipeline Pipeline => throw null; - - public virtual ClientResult GetBody(RequestOptions options) => throw null; - - public virtual Task GetBodyAsync(RequestOptions options) => throw null; - - public virtual ClientResult GetBody(CancellationToken cancellationToken = default) => throw null; - - public virtual Task> GetBodyAsync(CancellationToken cancellationToken = default) => throw null; - - public virtual ClientResult GetNoContent(RequestOptions options) => throw null; - - public virtual Task GetNoContentAsync(RequestOptions options) => throw null; - - public virtual ClientResult GetNoContent(CancellationToken cancellationToken = default) => throw null; - - public virtual Task> GetNoContentAsync(CancellationToken cancellationToken = default) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientOptions.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientOptions.cs deleted file mode 100644 index 29d31ba6a55..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientOptions.cs +++ /dev/null @@ -1,18 +0,0 @@ -// - -#nullable disable - -using System.ClientModel.Primitives; -using System.Diagnostics.CodeAnalysis; -using Microsoft.Extensions.Configuration; - -namespace Response.BodyOrNoContent -{ - public partial class BodyOrNoContentClientOptions : ClientPipelineOptions - { - public BodyOrNoContentClientOptions() => throw null; - - [Experimental("SCME0002")] - internal BodyOrNoContentClientOptions(IConfigurationSection section) : base(section) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientSettings.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientSettings.cs deleted file mode 100644 index c05c2fa5f98..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientSettings.cs +++ /dev/null @@ -1,29 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Diagnostics.CodeAnalysis; -using Microsoft.Extensions.Configuration; - -namespace Response.BodyOrNoContent -{ - [Experimental("SCME0002")] - public partial class BodyOrNoContentClientSettings : ClientSettings - { - public Uri Endpoint - { - get => throw null; - set => throw null; - } - - public BodyOrNoContentClientOptions Options - { - get => throw null; - set => throw null; - } - - protected override void BindCore(IConfigurationSection section) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.Serialization.cs deleted file mode 100644 index 80fbdd3c5de..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Response.BodyOrNoContent -{ - public partial class BlobLayout : IJsonModel - { - internal BlobLayout() => throw null; - - protected virtual BlobLayout PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; - - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; - - BlobLayout IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; - - public static explicit operator BlobLayout(ClientResult result) => throw null; - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - BlobLayout IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - protected virtual BlobLayout JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.cs deleted file mode 100644 index 3393c6ec295..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.cs +++ /dev/null @@ -1,11 +0,0 @@ -// - -#nullable disable - -namespace Response.BodyOrNoContent -{ - public partial class BlobLayout - { - public string Content => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/ResponseBodyOrNoContentContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/ResponseBodyOrNoContentContext.cs deleted file mode 100644 index 35e55d83662..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/ResponseBodyOrNoContentContext.cs +++ /dev/null @@ -1,13 +0,0 @@ -// - -#nullable disable - -using System.ClientModel.Primitives; - -namespace Response.BodyOrNoContent -{ - [ModelReaderWriterBuildable(typeof(BlobLayout))] - public partial class ResponseBodyOrNoContentContext : ModelReaderWriterContext - { - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/ResponseBodyOrNoContentModelFactory.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/ResponseBodyOrNoContentModelFactory.cs deleted file mode 100644 index 7ac0d608a85..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/ResponseBodyOrNoContentModelFactory.cs +++ /dev/null @@ -1,11 +0,0 @@ -// - -#nullable disable - -namespace Response.BodyOrNoContent -{ - public static partial class ResponseBodyOrNoContentModelFactory - { - public static BlobLayout BlobLayout(string content = default) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/schema/ConfigurationSchema.json deleted file mode 100644 index 580d55fad54..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/schema/ConfigurationSchema.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "type": "object", - "properties": { - "Clients": { - "type": "object", - "properties": { - "BodyOrNoContentClient": { - "type": "object", - "description": "Configuration for BodyOrNoContentClient.", - "properties": { - "Endpoint": { - "type": "string", - "format": "uri", - "description": "Gets or sets the Endpoint." - }, - "Credential": { - "$ref": "#/definitions/credential" - }, - "Options": { - "$ref": "#/definitions/bodyOrNoContentClientOptions" - } - } - } - }, - "additionalProperties": { - "type": "object", - "description": "Configuration for a named client instance." - } - } - }, - "definitions": { - "bodyOrNoContentClientOptions": { - "allOf": [ - { - "$ref": "#/definitions/options" - } - ] - } - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Response.BodyOrNoContent.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Response.BodyOrNoContent.csproj deleted file mode 100644 index a9176222465..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Response.BodyOrNoContent.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - This is the Response.BodyOrNoContent client library for developing .NET applications with rich experience. - SDK Code Generation Response.BodyOrNoContent - 1.0.0-beta.1 - Response.BodyOrNoContent - netstandard2.0;net8.0 - latest - true - - - - - - - - - - - diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/tspCodeModel.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/tspCodeModel.json deleted file mode 100644 index 4fd2882cc98..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/tspCodeModel.json +++ /dev/null @@ -1,396 +0,0 @@ -{ - "name": "Response.BodyOrNoContent", - "apiVersions": [], - "enums": [], - "constants": [ - { - "$id": "1", - "kind": "constant", - "name": "GetBodyAccept", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "2", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [], - "isExactName": false - }, - { - "$id": "3", - "kind": "constant", - "name": "GetBodyAccept1", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "4", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [], - "isExactName": false - } - ], - "models": [ - { - "$id": "5", - "kind": "model", - "name": "BlobLayout", - "apiVersions": [], - "namespace": "Response.BodyOrNoContent", - "crossLanguageDefinitionId": "Response.BodyOrNoContent.BlobLayout", - "usage": "Output,Json", - "decorators": [], - "serializationOptions": { - "json": { - "name": "BlobLayout" - } - }, - "isExactName": false, - "properties": [ - { - "$id": "6", - "kind": "property", - "name": "content", - "apiVersions": [], - "serializedName": "content", - "type": { - "$id": "7", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Response.BodyOrNoContent.BlobLayout.content", - "serializationOptions": { - "json": { - "name": "content" - } - }, - "isHttpMetadata": false, - "isExactName": false - } - ] - } - ], - "clients": [ - { - "$id": "8", - "kind": "client", - "name": "BodyOrNoContentClient", - "isExactName": false, - "namespace": "Response.BodyOrNoContent", - "doc": "Test for operations whose successful response is either a model body (200) or no content (204).", - "methods": [ - { - "$id": "9", - "kind": "basic", - "name": "getBody", - "isExactName": false, - "accessibility": "public", - "apiVersions": [], - "operation": { - "$id": "10", - "name": "getBody", - "isExactName": false, - "resourceName": "BodyOrNoContent", - "accessibility": "public", - "parameters": [ - { - "$id": "11", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "1" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Response.BodyOrNoContent.getBody.accept", - "methodParameterSegments": [ - { - "$id": "12", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "1" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Response.BodyOrNoContent.getBody.accept", - "readOnly": false, - "access": "public", - "decorators": [], - "isExactName": false - } - ], - "isExactName": false - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "5" - }, - "headers": [ - { - "name": "requestId", - "nameInResponse": "x-ms-request-id", - "type": { - "$id": "13", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ], - "serializationOptions": { - "json": { - "name": "" - } - } - }, - { - "statusCodes": [ - 204 - ], - "headers": [ - { - "name": "requestId", - "nameInResponse": "x-ms-request-id", - "type": { - "$id": "14", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - } - ], - "isErrorResponse": false, - "serializationOptions": {} - } - ], - "httpMethod": "GET", - "uri": "{endpoint}", - "path": "/response/body-or-no-content/body", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Response.BodyOrNoContent.getBody", - "decorators": [], - "namespace": "Response.BodyOrNoContent" - }, - "parameters": [ - { - "$ref": "12" - } - ], - "response": { - "type": { - "$ref": "5" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Response.BodyOrNoContent.getBody" - }, - { - "$id": "15", - "kind": "basic", - "name": "getNoContent", - "isExactName": false, - "accessibility": "public", - "apiVersions": [], - "operation": { - "$id": "16", - "name": "getNoContent", - "isExactName": false, - "resourceName": "BodyOrNoContent", - "accessibility": "public", - "parameters": [ - { - "$id": "17", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "3" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Response.BodyOrNoContent.getNoContent.accept", - "methodParameterSegments": [ - { - "$id": "18", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "3" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Response.BodyOrNoContent.getNoContent.accept", - "readOnly": false, - "access": "public", - "decorators": [], - "isExactName": false - } - ], - "isExactName": false - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "5" - }, - "headers": [ - { - "name": "requestId", - "nameInResponse": "x-ms-request-id", - "type": { - "$id": "19", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ], - "serializationOptions": { - "json": { - "name": "" - } - } - }, - { - "statusCodes": [ - 204 - ], - "headers": [ - { - "name": "requestId", - "nameInResponse": "x-ms-request-id", - "type": { - "$id": "20", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - } - ], - "isErrorResponse": false, - "serializationOptions": {} - } - ], - "httpMethod": "GET", - "uri": "{endpoint}", - "path": "/response/body-or-no-content/no-content", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Response.BodyOrNoContent.getNoContent", - "decorators": [], - "namespace": "Response.BodyOrNoContent" - }, - "parameters": [ - { - "$ref": "18" - } - ], - "response": { - "type": { - "$ref": "5" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Response.BodyOrNoContent.getNoContent" - } - ], - "parameters": [ - { - "$id": "21", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", - "type": { - "$id": "22", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "isApiVersion": false, - "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "23", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "http://localhost:3000" - }, - "serverUrlTemplate": "{endpoint}", - "skipUrlEncoding": false, - "readOnly": false, - "crossLanguageDefinitionId": "Response.BodyOrNoContent.endpoint", - "isExactName": false - } - ], - "initializedBy": 1, - "decorators": [], - "crossLanguageDefinitionId": "Response.BodyOrNoContent", - "apiVersions": [], - "isMultiServiceClient": false - } - ] -} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/customizations.tsp b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/customizations.tsp deleted file mode 100644 index 3a3c112f50b..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/customizations.tsp +++ /dev/null @@ -1,4 +0,0 @@ -import "@azure-tools/typespec-client-generator-core"; - -// Avoid colliding with the Info model in the Unnamed operation group. -@@Azure.ClientGenerator.Core.clientName(Streaming.Sse.Protocol.Info, "ProtocolInfo", "csharp"); diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.Serialization.cs deleted file mode 100644 index b6cff986cdb..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.Serialization.cs +++ /dev/null @@ -1,33 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Streaming.Sse._Protocol -{ - public partial class ProtocolInfo : IJsonModel - { - internal ProtocolInfo() => throw null; - - protected virtual ProtocolInfo PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; - - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; - - ProtocolInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - ProtocolInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - protected virtual ProtocolInfo JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.cs deleted file mode 100644 index 1612588a909..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.cs +++ /dev/null @@ -1,11 +0,0 @@ -// - -#nullable disable - -namespace Streaming.Sse._Protocol -{ - public partial class ProtocolInfo - { - public string Message => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/StreamingSseContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/StreamingSseContext.cs index 818a6b5e81d..9f2a25d8a49 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/StreamingSseContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/StreamingSseContext.cs @@ -3,14 +3,12 @@ #nullable disable using System.ClientModel.Primitives; -using Streaming.Sse._Protocol; using Streaming.Sse._Retrieve; using Streaming.Sse._Unnamed; namespace Streaming.Sse { [ModelReaderWriterBuildable(typeof(Info))] - [ModelReaderWriterBuildable(typeof(ProtocolInfo))] [ModelReaderWriterBuildable(typeof(RetrievalRequest))] public partial class StreamingSseContext : ModelReaderWriterContext { diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Protocol.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Protocol.cs deleted file mode 100644 index e2a0b6cacbb..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Protocol.cs +++ /dev/null @@ -1,65 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Net.ServerSentEvents; -using System.Threading; -using System.Threading.Tasks; -using Streaming.Sse._Protocol.Data; - -namespace Streaming.Sse._Protocol -{ - public partial class Protocol - { - protected Protocol() => throw null; - - internal Protocol(ClientPipeline pipeline, Uri endpoint) => throw null; - - public ClientPipeline Pipeline => throw null; - -#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - public virtual Task>> IdAsync(RequestOptions options) => throw null; -#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - -#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - public virtual Task>> IdAsync(CancellationToken cancellationToken = default) => throw null; -#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - -#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - public virtual Task>> InvalidIdAsync(RequestOptions options) => throw null; -#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - -#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - public virtual Task>> InvalidIdAsync(CancellationToken cancellationToken = default) => throw null; -#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - -#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - public virtual Task>> RetryAsync(RequestOptions options) => throw null; -#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - -#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - public virtual Task>> RetryAsync(CancellationToken cancellationToken = default) => throw null; -#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - -#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - public virtual Task>> InvalidRetryAsync(RequestOptions options) => throw null; -#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - -#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - public virtual Task>> InvalidRetryAsync(CancellationToken cancellationToken = default) => throw null; -#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - -#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - public virtual Task>> ReconnectAsync(RequestOptions options) => throw null; -#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - -#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - public virtual Task>> ReconnectAsync(CancellationToken cancellationToken = default) => throw null; -#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - - public virtual ProtocolData GetProtocolDataClient() => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/ProtocolData.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/ProtocolData.cs deleted file mode 100644 index 711f9b89e36..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/ProtocolData.cs +++ /dev/null @@ -1,38 +0,0 @@ -// - -#nullable disable - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Net.ServerSentEvents; -using System.Threading; -using System.Threading.Tasks; - -namespace Streaming.Sse._Protocol.Data -{ - public partial class ProtocolData - { - protected ProtocolData() => throw null; - - internal ProtocolData(ClientPipeline pipeline, Uri endpoint) => throw null; - - public ClientPipeline Pipeline => throw null; - -#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - public virtual Task>> WithEnvelopeAsync(RequestOptions options) => throw null; -#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - -#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - public virtual Task>> WithEnvelopeAsync(CancellationToken cancellationToken = default) => throw null; -#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - -#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - public virtual Task>> WithoutEnvelopeAsync(RequestOptions options) => throw null; -#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - -#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - public virtual Task>> WithoutEnvelopeAsync(CancellationToken cancellationToken = default) => throw null; -#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/SseClient.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/SseClient.cs index f711396d936..ad7867309e0 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/SseClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/SseClient.cs @@ -6,7 +6,6 @@ using System.ClientModel.Primitives; using System.Diagnostics.CodeAnalysis; using Streaming.Sse._Named; -using Streaming.Sse._Protocol; using Streaming.Sse._Retrieve; using Streaming.Sse._Unnamed; @@ -30,7 +29,5 @@ public partial class SseClient public virtual Named GetNamedClient() => throw null; public virtual Retrieve GetRetrieveClient() => throw null; - - public virtual Protocol GetProtocolClient() => throw null; } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/StreamingSseModelFactory.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/StreamingSseModelFactory.cs index 9b9c241cd33..323ddf4742d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/StreamingSseModelFactory.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/StreamingSseModelFactory.cs @@ -2,7 +2,6 @@ #nullable disable -using Streaming.Sse._Protocol; using Streaming.Sse._Retrieve; using Streaming.Sse._Unnamed; @@ -13,7 +12,5 @@ public static partial class StreamingSseModelFactory public static Info Info(string desc = default) => throw null; public static RetrievalRequest RetrievalRequest(string query = default) => throw null; - - public static ProtocolInfo ProtocolInfo(string message = default) => throw null; } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/tspCodeModel.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/tspCodeModel.json index 91266b50940..3ad7984785f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/tspCodeModel.json +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/tspCodeModel.json @@ -155,249 +155,11 @@ "value": "text/event-stream", "decorators": [], "isExactName": false - }, - { - "$id": "19", - "kind": "constant", - "name": "ReceiveResponseContentType6", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "20", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/event-stream", - "decorators": [], - "isExactName": false - }, - { - "$id": "21", - "kind": "constant", - "name": "ReceiveResponseContentType7", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "22", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/event-stream", - "decorators": [], - "isExactName": false - }, - { - "$id": "23", - "kind": "constant", - "name": "ReceiveResponseContentType8", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "24", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/event-stream", - "decorators": [], - "isExactName": false - }, - { - "$id": "25", - "kind": "constant", - "name": "ReceiveResponseContentType9", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "26", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/event-stream", - "decorators": [], - "isExactName": false - }, - { - "$id": "27", - "kind": "constant", - "name": "ReceiveResponseContentType10", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "28", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/event-stream", - "decorators": [], - "isExactName": false - }, - { - "$id": "29", - "kind": "constant", - "name": "ReceiveResponseContentType11", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "30", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/event-stream", - "decorators": [], - "isExactName": false - }, - { - "$id": "31", - "kind": "constant", - "name": "ReceiveResponseContentType12", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "32", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/event-stream", - "decorators": [], - "isExactName": false - }, - { - "$id": "33", - "kind": "constant", - "name": "ReceiveResponseContentType13", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "34", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/event-stream", - "decorators": [], - "isExactName": false - }, - { - "$id": "35", - "kind": "constant", - "name": "ReceiveResponseContentType14", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "36", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/event-stream", - "decorators": [], - "isExactName": false - }, - { - "$id": "37", - "kind": "constant", - "name": "ReceiveResponseContentType15", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "38", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/event-stream", - "decorators": [], - "isExactName": false - }, - { - "$id": "39", - "kind": "constant", - "name": "ReceiveResponseContentType16", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "40", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/event-stream", - "decorators": [], - "isExactName": false - }, - { - "$id": "41", - "kind": "constant", - "name": "ReceiveResponseContentType17", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "42", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/event-stream", - "decorators": [], - "isExactName": false - }, - { - "$id": "43", - "kind": "constant", - "name": "ReceiveResponseContentType18", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "44", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/event-stream", - "decorators": [], - "isExactName": false - }, - { - "$id": "45", - "kind": "constant", - "name": "ReceiveResponseContentType19", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "46", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/event-stream", - "decorators": [], - "isExactName": false } ], "models": [ { - "$id": "47", + "$id": "19", "kind": "model", "name": "Info", "apiVersions": [], @@ -413,13 +175,13 @@ "isExactName": false, "properties": [ { - "$id": "48", + "$id": "20", "kind": "property", "name": "desc", "apiVersions": [], "serializedName": "desc", "type": { - "$id": "49", + "$id": "21", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -442,7 +204,7 @@ ] }, { - "$id": "50", + "$id": "22", "kind": "model", "name": "ResponseCreated", "apiVersions": [], @@ -458,13 +220,13 @@ "isExactName": false, "properties": [ { - "$id": "51", + "$id": "23", "kind": "property", "name": "id", "apiVersions": [], "serializedName": "id", "type": { - "$id": "52", + "$id": "24", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -487,7 +249,7 @@ ] }, { - "$id": "53", + "$id": "25", "kind": "model", "name": "ResponseDelta", "apiVersions": [], @@ -503,13 +265,13 @@ "isExactName": false, "properties": [ { - "$id": "54", + "$id": "26", "kind": "property", "name": "delta", "apiVersions": [], "serializedName": "delta", "type": { - "$id": "55", + "$id": "27", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -532,7 +294,7 @@ ] }, { - "$id": "56", + "$id": "28", "kind": "model", "name": "RetrievalRequest", "apiVersions": [], @@ -548,13 +310,13 @@ "isExactName": false, "properties": [ { - "$id": "57", + "$id": "29", "kind": "property", "name": "query", "apiVersions": [], "serializedName": "query", "type": { - "$id": "58", + "$id": "30", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -577,7 +339,7 @@ ] }, { - "$id": "59", + "$id": "31", "kind": "model", "name": "PartialResult", "apiVersions": [], @@ -593,13 +355,13 @@ "isExactName": false, "properties": [ { - "$id": "60", + "$id": "32", "kind": "property", "name": "text", "apiVersions": [], "serializedName": "text", "type": { - "$id": "61", + "$id": "33", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -622,7 +384,7 @@ ] }, { - "$id": "62", + "$id": "34", "kind": "model", "name": "FinalResult", "apiVersions": [], @@ -638,17 +400,17 @@ "isExactName": false, "properties": [ { - "$id": "63", + "$id": "35", "kind": "property", "name": "references", "apiVersions": [], "serializedName": "references", "type": { - "$id": "64", + "$id": "36", "kind": "array", "name": "Array", "valueType": { - "$id": "65", + "$id": "37", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -672,216 +434,42 @@ "isExactName": false } ] - }, + } + ], + "clients": [ { - "$id": "66", - "kind": "model", - "name": "ProtocolInfo", - "apiVersions": [], - "namespace": "Streaming.Sse.Protocol", - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Info", - "usage": "Output,Json", - "decorators": [], - "serializationOptions": { - "json": { - "name": "Info" - } - }, + "$id": "38", + "kind": "client", + "name": "SseClient", "isExactName": false, - "properties": [ + "namespace": "Streaming.Sse", + "doc": "Test of server-sent events (SSE) streaming.", + "methods": [], + "parameters": [ { - "$id": "67", - "kind": "property", - "name": "message", - "apiVersions": [], - "serializedName": "message", + "$id": "39", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", "type": { - "$id": "68", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] + "$id": "40", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" }, + "isApiVersion": false, "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Info.message", - "serializationOptions": { - "json": { - "name": "message" - } - }, - "isHttpMetadata": false, - "isExactName": false - } - ] - }, - { - "$id": "69", - "kind": "model", - "name": "WithEnvelope", - "apiVersions": [], - "namespace": "Streaming.Sse.Protocol.Data", - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.anonymous", - "usage": "Output,Json", - "decorators": [], - "serializationOptions": { - "json": { - "name": "" - } - }, - "isExactName": false, - "properties": [ - { - "$id": "70", - "kind": "property", - "name": "contents", - "apiVersions": [], - "serializedName": "contents", - "type": { - "$id": "71", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.anonymous.contents", - "serializationOptions": { - "json": { - "name": "contents" - } - }, - "isHttpMetadata": false, - "isExactName": false - } - ] - }, - { - "$id": "72", - "kind": "model", - "name": "WithEnvelope1", - "apiVersions": [], - "namespace": "Streaming.Sse.Protocol.Data", - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.anonymous", - "usage": "Output,Json", - "decorators": [], - "serializationOptions": { - "json": { - "name": "" - } - }, - "isExactName": false, - "properties": [ - { - "$id": "73", - "kind": "property", - "name": "metadata", - "apiVersions": [], - "serializedName": "metadata", - "type": { - "$id": "74", - "kind": "dict", - "keyType": { - "$id": "75", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "76", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.anonymous.metadata", - "serializationOptions": { - "json": { - "name": "metadata" - } - }, - "isHttpMetadata": false, - "isExactName": false - }, - { - "$id": "77", - "kind": "property", - "name": "contents", - "apiVersions": [], - "serializedName": "contents", - "type": { - "$id": "78", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.anonymous.contents", - "serializationOptions": { - "json": { - "name": "contents" - } - }, - "isHttpMetadata": false, - "isExactName": false - } - ] - } - ], - "clients": [ - { - "$id": "79", - "kind": "client", - "name": "SseClient", - "isExactName": false, - "namespace": "Streaming.Sse", - "doc": "Test of server-sent events (SSE) streaming.", - "methods": [], - "parameters": [ - { - "$id": "80", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", - "type": { - "$id": "81", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "isApiVersion": false, - "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "82", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "http://localhost:3000" + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" }, "serverUrlTemplate": "{endpoint}", "skipUrlEncoding": false, @@ -896,28 +484,28 @@ "apiVersions": [], "children": [ { - "$id": "83", + "$id": "42", "kind": "client", "name": "Unnamed", "isExactName": false, "namespace": "Streaming.Sse.Unnamed", "methods": [ { - "$id": "84", + "$id": "43", "kind": "basic", "name": "receive", "isExactName": false, "accessibility": "public", "apiVersions": [], "operation": { - "$id": "85", + "$id": "44", "name": "receive", "isExactName": false, "resourceName": "Unnamed", "accessibility": "public", "parameters": [ { - "$id": "86", + "$id": "45", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -933,7 +521,7 @@ "crossLanguageDefinitionId": "Streaming.Sse.Unnamed.receive.accept", "methodParameterSegments": [ { - "$id": "87", + "$id": "46", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -960,16 +548,16 @@ 200 ], "bodyType": { - "$id": "88", + "$id": "47", "kind": "streaming", "name": "SSEStreamUnnamedEvents", "valueType": { - "$id": "89", + "$id": "48", "kind": "union", "name": "UnnamedEvents", "variantTypes": [ { - "$ref": "47" + "$ref": "19" } ], "namespace": "Streaming.Sse.Unnamed", @@ -1010,16 +598,16 @@ }, "parameters": [ { - "$ref": "87" + "$ref": "46" } ], "response": { "type": { - "$id": "90", + "$id": "49", "kind": "streaming", "name": "SSEStreamUnnamedEvents", "valueType": { - "$ref": "89" + "$ref": "48" }, "streamKind": "sse", "contentTypes": [ @@ -1036,13 +624,13 @@ ], "parameters": [ { - "$id": "91", + "$id": "50", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "92", + "$id": "51", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1053,7 +641,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "93", + "$id": "52", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1072,33 +660,33 @@ "crossLanguageDefinitionId": "Streaming.Sse.Unnamed", "apiVersions": [], "parent": { - "$ref": "79" + "$ref": "38" }, "isMultiServiceClient": false }, { - "$id": "94", + "$id": "53", "kind": "client", "name": "Named", "isExactName": false, "namespace": "Streaming.Sse.Named", "methods": [ { - "$id": "95", + "$id": "54", "kind": "basic", "name": "receive", "isExactName": false, "accessibility": "public", "apiVersions": [], "operation": { - "$id": "96", + "$id": "55", "name": "receive", "isExactName": false, "resourceName": "Named", "accessibility": "public", "parameters": [ { - "$id": "97", + "$id": "56", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -1114,7 +702,7 @@ "crossLanguageDefinitionId": "Streaming.Sse.Named.receive.accept", "methodParameterSegments": [ { - "$id": "98", + "$id": "57", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -1141,19 +729,19 @@ 200 ], "bodyType": { - "$id": "99", + "$id": "58", "kind": "streaming", "name": "SSEStreamResponseEvents", "valueType": { - "$id": "100", + "$id": "59", "kind": "union", "name": "ResponseEvents", "variantTypes": [ { - "$ref": "50" + "$ref": "22" }, { - "$ref": "53" + "$ref": "25" }, { "$ref": "7" @@ -1198,16 +786,16 @@ }, "parameters": [ { - "$ref": "98" + "$ref": "57" } ], "response": { "type": { - "$id": "101", + "$id": "60", "kind": "streaming", "name": "SSEStreamResponseEvents", "valueType": { - "$ref": "100" + "$ref": "59" }, "streamKind": "sse", "contentTypes": [ @@ -1225,13 +813,13 @@ ], "parameters": [ { - "$id": "102", + "$id": "61", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "103", + "$id": "62", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1242,7 +830,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "104", + "$id": "63", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1261,33 +849,33 @@ "crossLanguageDefinitionId": "Streaming.Sse.Named", "apiVersions": [], "parent": { - "$ref": "79" + "$ref": "38" }, "isMultiServiceClient": false }, { - "$id": "105", + "$id": "64", "kind": "client", "name": "Retrieve", "isExactName": false, "namespace": "Streaming.Sse.Retrieve", "methods": [ { - "$id": "106", + "$id": "65", "kind": "basic", "name": "stream", "isExactName": false, "accessibility": "public", "apiVersions": [], "operation": { - "$id": "107", + "$id": "66", "name": "stream", "isExactName": false, "resourceName": "Retrieve", "accessibility": "public", "parameters": [ { - "$id": "108", + "$id": "67", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -1304,7 +892,7 @@ "crossLanguageDefinitionId": "Streaming.Sse.Retrieve.stream.contentType", "methodParameterSegments": [ { - "$id": "109", + "$id": "68", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -1326,7 +914,7 @@ "isExactName": false }, { - "$id": "110", + "$id": "69", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -1342,7 +930,7 @@ "crossLanguageDefinitionId": "Streaming.Sse.Retrieve.stream.accept", "methodParameterSegments": [ { - "$id": "111", + "$id": "70", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -1363,12 +951,12 @@ "isExactName": false }, { - "$id": "112", + "$id": "71", "kind": "body", "name": "request", "serializedName": "request", "type": { - "$ref": "56" + "$ref": "28" }, "isApiVersion": false, "contentTypes": [ @@ -1382,12 +970,12 @@ "crossLanguageDefinitionId": "Streaming.Sse.Retrieve.stream.request", "methodParameterSegments": [ { - "$id": "113", + "$id": "72", "kind": "method", "name": "request", "serializedName": "request", "type": { - "$ref": "56" + "$ref": "28" }, "location": "Body", "isApiVersion": false, @@ -1414,19 +1002,19 @@ 200 ], "bodyType": { - "$id": "114", + "$id": "73", "kind": "streaming", "name": "SSEStreamRetrievalEvents", "valueType": { - "$id": "115", + "$id": "74", "kind": "union", "name": "RetrievalEvents", "variantTypes": [ { - "$ref": "59" + "$ref": "31" }, { - "$ref": "62" + "$ref": "34" }, { "$ref": "15" @@ -1474,22 +1062,22 @@ }, "parameters": [ { - "$ref": "113" + "$ref": "72" }, { - "$ref": "109" + "$ref": "68" }, { - "$ref": "111" + "$ref": "70" } ], "response": { "type": { - "$id": "116", + "$id": "75", "kind": "streaming", "name": "SSEStreamRetrievalEvents", "valueType": { - "$ref": "115" + "$ref": "74" }, "streamKind": "sse", "contentTypes": [ @@ -1507,13 +1095,13 @@ ], "parameters": [ { - "$id": "117", + "$id": "76", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "118", + "$id": "77", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1524,7 +1112,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "119", + "$id": "78", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1543,981 +1131,9 @@ "crossLanguageDefinitionId": "Streaming.Sse.Retrieve", "apiVersions": [], "parent": { - "$ref": "79" + "$ref": "38" }, "isMultiServiceClient": false - }, - { - "$id": "120", - "kind": "client", - "name": "Protocol", - "isExactName": false, - "namespace": "Streaming.Sse.Protocol", - "methods": [ - { - "$id": "121", - "kind": "basic", - "name": "id", - "isExactName": false, - "accessibility": "public", - "apiVersions": [], - "operation": { - "$id": "122", - "name": "id", - "isExactName": false, - "resourceName": "Protocol", - "accessibility": "public", - "parameters": [ - { - "$id": "123", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "19" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.id.accept", - "methodParameterSegments": [ - { - "$id": "124", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "19" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.id.accept", - "readOnly": false, - "access": "public", - "decorators": [], - "isExactName": false - } - ], - "isExactName": false - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$id": "125", - "kind": "streaming", - "name": "SSEStreamProtocolEvents", - "valueType": { - "$id": "126", - "kind": "union", - "name": "ProtocolEvents", - "variantTypes": [ - { - "$ref": "66" - } - ], - "namespace": "Streaming.Sse.Protocol", - "decorators": [], - "isExactName": false - }, - "streamKind": "sse", - "contentTypes": [ - "text/event-stream" - ], - "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" - }, - "headers": [ - { - "name": "contentType", - "nameInResponse": "content-type", - "type": { - "$ref": "21" - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "text/event-stream" - ], - "serializationOptions": {} - } - ], - "httpMethod": "GET", - "uri": "{endpoint}", - "path": "/streaming/sse/protocol/id", - "bufferResponse": false, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.id", - "decorators": [], - "namespace": "Streaming.Sse.Protocol" - }, - "parameters": [ - { - "$ref": "124" - } - ], - "response": { - "type": { - "$id": "127", - "kind": "streaming", - "name": "SSEStreamProtocolEvents", - "valueType": { - "$ref": "126" - }, - "streamKind": "sse", - "contentTypes": [ - "text/event-stream" - ], - "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.id" - }, - { - "$id": "128", - "kind": "basic", - "name": "invalidId", - "isExactName": false, - "accessibility": "public", - "apiVersions": [], - "operation": { - "$id": "129", - "name": "invalidId", - "isExactName": false, - "resourceName": "Protocol", - "accessibility": "public", - "parameters": [ - { - "$id": "130", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "23" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidId.accept", - "methodParameterSegments": [ - { - "$id": "131", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "23" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidId.accept", - "readOnly": false, - "access": "public", - "decorators": [], - "isExactName": false - } - ], - "isExactName": false - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$id": "132", - "kind": "streaming", - "name": "SSEStreamProtocolEvents", - "valueType": { - "$ref": "126" - }, - "streamKind": "sse", - "contentTypes": [ - "text/event-stream" - ], - "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" - }, - "headers": [ - { - "name": "contentType", - "nameInResponse": "content-type", - "type": { - "$ref": "25" - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "text/event-stream" - ], - "serializationOptions": {} - } - ], - "httpMethod": "GET", - "uri": "{endpoint}", - "path": "/streaming/sse/protocol/invalid-id", - "bufferResponse": false, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidId", - "decorators": [], - "namespace": "Streaming.Sse.Protocol" - }, - "parameters": [ - { - "$ref": "131" - } - ], - "response": { - "type": { - "$id": "133", - "kind": "streaming", - "name": "SSEStreamProtocolEvents", - "valueType": { - "$ref": "126" - }, - "streamKind": "sse", - "contentTypes": [ - "text/event-stream" - ], - "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidId" - }, - { - "$id": "134", - "kind": "basic", - "name": "retry", - "isExactName": false, - "accessibility": "public", - "apiVersions": [], - "operation": { - "$id": "135", - "name": "retry", - "isExactName": false, - "resourceName": "Protocol", - "accessibility": "public", - "parameters": [ - { - "$id": "136", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "27" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.retry.accept", - "methodParameterSegments": [ - { - "$id": "137", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "27" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.retry.accept", - "readOnly": false, - "access": "public", - "decorators": [], - "isExactName": false - } - ], - "isExactName": false - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$id": "138", - "kind": "streaming", - "name": "SSEStreamProtocolEvents", - "valueType": { - "$ref": "126" - }, - "streamKind": "sse", - "contentTypes": [ - "text/event-stream" - ], - "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" - }, - "headers": [ - { - "name": "contentType", - "nameInResponse": "content-type", - "type": { - "$ref": "29" - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "text/event-stream" - ], - "serializationOptions": {} - } - ], - "httpMethod": "GET", - "uri": "{endpoint}", - "path": "/streaming/sse/protocol/retry", - "bufferResponse": false, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.retry", - "decorators": [], - "namespace": "Streaming.Sse.Protocol" - }, - "parameters": [ - { - "$ref": "137" - } - ], - "response": { - "type": { - "$id": "139", - "kind": "streaming", - "name": "SSEStreamProtocolEvents", - "valueType": { - "$ref": "126" - }, - "streamKind": "sse", - "contentTypes": [ - "text/event-stream" - ], - "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.retry" - }, - { - "$id": "140", - "kind": "basic", - "name": "invalidRetry", - "isExactName": false, - "accessibility": "public", - "apiVersions": [], - "operation": { - "$id": "141", - "name": "invalidRetry", - "isExactName": false, - "resourceName": "Protocol", - "accessibility": "public", - "parameters": [ - { - "$id": "142", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "31" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidRetry.accept", - "methodParameterSegments": [ - { - "$id": "143", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "31" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidRetry.accept", - "readOnly": false, - "access": "public", - "decorators": [], - "isExactName": false - } - ], - "isExactName": false - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$id": "144", - "kind": "streaming", - "name": "SSEStreamProtocolEvents", - "valueType": { - "$ref": "126" - }, - "streamKind": "sse", - "contentTypes": [ - "text/event-stream" - ], - "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" - }, - "headers": [ - { - "name": "contentType", - "nameInResponse": "content-type", - "type": { - "$ref": "33" - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "text/event-stream" - ], - "serializationOptions": {} - } - ], - "httpMethod": "GET", - "uri": "{endpoint}", - "path": "/streaming/sse/protocol/invalid-retry", - "bufferResponse": false, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidRetry", - "decorators": [], - "namespace": "Streaming.Sse.Protocol" - }, - "parameters": [ - { - "$ref": "143" - } - ], - "response": { - "type": { - "$id": "145", - "kind": "streaming", - "name": "SSEStreamProtocolEvents", - "valueType": { - "$ref": "126" - }, - "streamKind": "sse", - "contentTypes": [ - "text/event-stream" - ], - "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidRetry" - }, - { - "$id": "146", - "kind": "basic", - "name": "reconnect", - "isExactName": false, - "accessibility": "public", - "apiVersions": [], - "operation": { - "$id": "147", - "name": "reconnect", - "isExactName": false, - "resourceName": "Protocol", - "accessibility": "public", - "parameters": [ - { - "$id": "148", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "35" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.reconnect.accept", - "methodParameterSegments": [ - { - "$id": "149", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "35" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.reconnect.accept", - "readOnly": false, - "access": "public", - "decorators": [], - "isExactName": false - } - ], - "isExactName": false - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$id": "150", - "kind": "streaming", - "name": "SSEStreamProtocolEvents", - "valueType": { - "$ref": "126" - }, - "streamKind": "sse", - "contentTypes": [ - "text/event-stream" - ], - "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" - }, - "headers": [ - { - "name": "contentType", - "nameInResponse": "content-type", - "type": { - "$ref": "37" - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "text/event-stream" - ], - "serializationOptions": {} - } - ], - "httpMethod": "GET", - "uri": "{endpoint}", - "path": "/streaming/sse/protocol/reconnect", - "bufferResponse": false, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.reconnect", - "decorators": [], - "namespace": "Streaming.Sse.Protocol" - }, - "parameters": [ - { - "$ref": "149" - } - ], - "response": { - "type": { - "$id": "151", - "kind": "streaming", - "name": "SSEStreamProtocolEvents", - "valueType": { - "$ref": "126" - }, - "streamKind": "sse", - "contentTypes": [ - "text/event-stream" - ], - "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.reconnect" - } - ], - "parameters": [ - { - "$id": "152", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", - "type": { - "$id": "153", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "isApiVersion": false, - "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "154", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "http://localhost:3000" - }, - "serverUrlTemplate": "{endpoint}", - "skipUrlEncoding": false, - "readOnly": false, - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.endpoint", - "isExactName": false - } - ], - "initializedBy": 0, - "decorators": [], - "crossLanguageDefinitionId": "Streaming.Sse.Protocol", - "apiVersions": [], - "parent": { - "$ref": "79" - }, - "children": [ - { - "$id": "155", - "kind": "client", - "name": "Data", - "isExactName": false, - "namespace": "Streaming.Sse.Protocol.Data", - "methods": [ - { - "$id": "156", - "kind": "basic", - "name": "withEnvelope", - "isExactName": false, - "accessibility": "public", - "apiVersions": [], - "operation": { - "$id": "157", - "name": "withEnvelope", - "isExactName": false, - "resourceName": "Data", - "accessibility": "public", - "parameters": [ - { - "$id": "158", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "39" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.accept", - "methodParameterSegments": [ - { - "$id": "159", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "39" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.accept", - "readOnly": false, - "access": "public", - "decorators": [], - "isExactName": false - } - ], - "isExactName": false - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$id": "160", - "kind": "streaming", - "name": "SSEStreamDataEvents", - "valueType": { - "$id": "161", - "kind": "union", - "name": "DataEvents", - "variantTypes": [ - { - "$ref": "69" - }, - { - "$ref": "72" - } - ], - "namespace": "Streaming.Sse.Protocol.Data", - "decorators": [], - "isExactName": false - }, - "streamKind": "sse", - "contentTypes": [ - "text/event-stream" - ], - "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" - }, - "headers": [ - { - "name": "contentType", - "nameInResponse": "content-type", - "type": { - "$ref": "41" - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "text/event-stream" - ], - "serializationOptions": {} - } - ], - "httpMethod": "GET", - "uri": "{endpoint}", - "path": "/streaming/sse/protocol/data/with-envelope", - "bufferResponse": false, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope", - "decorators": [], - "namespace": "Streaming.Sse.Protocol.Data" - }, - "parameters": [ - { - "$ref": "159" - } - ], - "response": { - "type": { - "$id": "162", - "kind": "streaming", - "name": "SSEStreamDataEvents", - "valueType": { - "$ref": "161" - }, - "streamKind": "sse", - "contentTypes": [ - "text/event-stream" - ], - "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope" - }, - { - "$id": "163", - "kind": "basic", - "name": "withoutEnvelope", - "isExactName": false, - "accessibility": "public", - "apiVersions": [], - "operation": { - "$id": "164", - "name": "withoutEnvelope", - "isExactName": false, - "resourceName": "Data", - "accessibility": "public", - "parameters": [ - { - "$id": "165", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "43" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withoutEnvelope.accept", - "methodParameterSegments": [ - { - "$id": "166", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "43" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withoutEnvelope.accept", - "readOnly": false, - "access": "public", - "decorators": [], - "isExactName": false - } - ], - "isExactName": false - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$id": "167", - "kind": "streaming", - "name": "SSEStreamDataEvents", - "valueType": { - "$ref": "161" - }, - "streamKind": "sse", - "contentTypes": [ - "text/event-stream" - ], - "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" - }, - "headers": [ - { - "name": "contentType", - "nameInResponse": "content-type", - "type": { - "$ref": "45" - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "text/event-stream" - ], - "serializationOptions": {} - } - ], - "httpMethod": "GET", - "uri": "{endpoint}", - "path": "/streaming/sse/protocol/data/without-envelope", - "bufferResponse": false, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withoutEnvelope", - "decorators": [], - "namespace": "Streaming.Sse.Protocol.Data" - }, - "parameters": [ - { - "$ref": "166" - } - ], - "response": { - "type": { - "$id": "168", - "kind": "streaming", - "name": "SSEStreamDataEvents", - "valueType": { - "$ref": "161" - }, - "streamKind": "sse", - "contentTypes": [ - "text/event-stream" - ], - "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withoutEnvelope" - } - ], - "parameters": [ - { - "$id": "169", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", - "type": { - "$id": "170", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "isApiVersion": false, - "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "171", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "http://localhost:3000" - }, - "serverUrlTemplate": "{endpoint}", - "skipUrlEncoding": false, - "readOnly": false, - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.endpoint", - "isExactName": false - } - ], - "initializedBy": 0, - "decorators": [], - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data", - "apiVersions": [], - "parent": { - "$ref": "120" - }, - "isMultiServiceClient": false - } - ], - "isMultiServiceClient": false } ], "isMultiServiceClient": false diff --git a/packages/http-client-csharp/generator/docs/spector.md b/packages/http-client-csharp/generator/docs/spector.md index 34db2fc8ef0..7b8aa3303bc 100644 --- a/packages/http-client-csharp/generator/docs/spector.md +++ b/packages/http-client-csharp/generator/docs/spector.md @@ -18,8 +18,6 @@ For example if you want to generate the non stubbed version of `http/authenticat ./eng/scripts/Generate.ps1 http/authentication/api-key -Stubbed $false ``` -For C#-specific TypeSpec customizations, add a `customizations.tsp` file at the root of the generated test project, alongside `tspCodeModel.json`. The generation and Spector test scripts import this file in addition to the original spec. This allows scoped decorators such as `@clientName` to resolve naming conflicts without modifying the installed specs or their wire contracts. See the SSE streaming project's `customizations.tsp` for an example. - ## Writing Spector tests Generating the stubs allows us write tests against the public API surface that will compile. To do this we add a test class in same folder structure although this time we will modify the casing slightly to match dotnet standards. diff --git a/packages/http-client-csharp/package-lock.json b/packages/http-client-csharp/package-lock.json index 54f34acd583..a0ed978edd1 100644 --- a/packages/http-client-csharp/package-lock.json +++ b/packages/http-client-csharp/package-lock.json @@ -12,26 +12,26 @@ "@azure/identity": "^4.13.0" }, "devDependencies": { - "@azure-tools/azure-http-specs": "0.1.0-alpha.44", - "@azure-tools/typespec-azure-core": "0.71.0", - "@azure-tools/typespec-client-generator-core": "0.71.2", + "@azure-tools/azure-http-specs": "0.1.0-alpha.45", + "@azure-tools/typespec-azure-core": "0.72.0", + "@azure-tools/typespec-client-generator-core": "0.72.0", "@microsoft/api-extractor": "^7.52.2", "@types/node": "~22.12.0", - "@typespec/compiler": "1.15.0", - "@typespec/events": "0.85.0", - "@typespec/http": "1.15.0", - "@typespec/http-specs": "0.1.0-alpha.42-dev.3", - "@typespec/json-schema": "1.15.0", - "@typespec/library-linter": "0.85.0", - "@typespec/openapi": "1.15.0", - "@typespec/rest": "0.85.0", - "@typespec/spec-api": "0.1.0-alpha.16", - "@typespec/spector": "0.1.0-alpha.28", - "@typespec/sse": "0.85.0", - "@typespec/streams": "0.85.0", - "@typespec/tspd": "0.77.0", - "@typespec/versioning": "0.85.0", - "@typespec/xml": "0.85.0", + "@typespec/compiler": "1.16.0", + "@typespec/events": "0.86.0", + "@typespec/http": "1.16.0", + "@typespec/http-specs": "0.1.0-alpha.42", + "@typespec/json-schema": "1.16.0", + "@typespec/library-linter": "0.86.0", + "@typespec/openapi": "1.16.0", + "@typespec/rest": "0.86.0", + "@typespec/spec-api": "0.1.0-alpha.17", + "@typespec/spector": "0.1.0-alpha.29", + "@typespec/sse": "0.86.0", + "@typespec/streams": "0.86.0", + "@typespec/tspd": "0.77.1", + "@typespec/versioning": "0.86.0", + "@typespec/xml": "0.86.0", "@vitest/coverage-v8": "^4.1.8", "@vitest/ui": "^4.1.8", "c8": "^12.0.0", @@ -40,16 +40,16 @@ "vitest": "^4.1.8" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": ">=0.71.0 <0.72.0 || ~0.72.0-0", - "@azure-tools/typespec-client-generator-core": ">=0.71.2 <0.72.0 || ~0.72.0-0", - "@typespec/compiler": "^1.15.0", - "@typespec/events": ">=0.85.0 <0.86.0 || ~0.86.0-0", - "@typespec/http": "^1.15.0", - "@typespec/openapi": "^1.15.0", - "@typespec/rest": ">=0.85.0 <0.86.0 || ~0.86.0-0", - "@typespec/sse": ">=0.85.0 <0.86.0 || ~0.86.0-0", - "@typespec/streams": ">=0.85.0 <0.86.0 || ~0.86.0-0", - "@typespec/versioning": ">=0.85.0 <0.86.0 || ~0.86.0-0" + "@azure-tools/typespec-azure-core": ">=0.72.0 <0.73.0 || ~0.73.0-0", + "@azure-tools/typespec-client-generator-core": ">=0.72.0 <0.73.0 || ~0.73.0-0", + "@typespec/compiler": "^1.16.0", + "@typespec/events": ">=0.86.0 <0.87.0 || ~0.87.0-0", + "@typespec/http": "^1.16.0", + "@typespec/openapi": "^1.16.0", + "@typespec/rest": ">=0.86.0 <0.87.0 || ~0.87.0-0", + "@typespec/sse": ">=0.86.0 <0.87.0 || ~0.87.0-0", + "@typespec/streams": ">=0.86.0 <0.87.0 || ~0.87.0-0", + "@typespec/versioning": ">=0.86.0 <0.87.0 || ~0.87.0-0" } }, "node_modules/@alloy-js/core": { @@ -86,67 +86,67 @@ } }, "node_modules/@azure-tools/azure-http-specs": { - "version": "0.1.0-alpha.44", - "resolved": "https://registry.npmjs.org/@azure-tools/azure-http-specs/-/azure-http-specs-0.1.0-alpha.44.tgz", - "integrity": "sha512-WPsMAFJ2wdnGX6R26ujz65nodUE/JfAMsQH8FpSt6eJ9exyHfbNoqJIwmLKe123ksKp/TMxVnDpqP+ZIwuXqQA==", + "version": "0.1.0-alpha.45", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@azure-tools/azure-http-specs/-/azure-http-specs-0.1.0-alpha.45.tgz", + "integrity": "sha1-nxpqhlpgMEwA2O+fVIWLtweSELU=", "dev": true, "license": "MIT", "dependencies": { - "@typespec/spec-api": "^0.1.0-alpha.16", - "@typespec/spector": "^0.1.0-alpha.28" + "@typespec/spec-api": "^0.1.0-alpha.17", + "@typespec/spector": "^0.1.0-alpha.29" }, "engines": { "node": ">=22.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.71.0", - "@typespec/compiler": "^1.15.0", - "@typespec/http": "^1.15.0", - "@typespec/rest": "^0.85.0", - "@typespec/versioning": "^0.85.0", - "@typespec/xml": "^0.85.0" + "@azure-tools/typespec-azure-core": "^0.72.0", + "@typespec/compiler": "^1.16.0", + "@typespec/http": "^1.16.0", + "@typespec/rest": "^0.86.0", + "@typespec/versioning": "^0.86.0", + "@typespec/xml": "^0.86.0" } }, "node_modules/@azure-tools/typespec-azure-core": { - "version": "0.71.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.71.0.tgz", - "integrity": "sha512-T/8y9A+33BenWgma6P7JrD9UeM9HakkBHEiQv8dQl67JXSFGOOvUZRHzCsmrCIE1VutmXJfS+LHiPCACGQVisg==", + "version": "0.72.0", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.72.0.tgz", + "integrity": "sha1-m60NyHLixcYhSbllLaNf9HtpyZo=", "dev": true, "license": "MIT", "engines": { "node": ">=22.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.15.0", - "@typespec/http": "^1.15.0", - "@typespec/rest": "^0.85.0" + "@typespec/compiler": "^1.16.0", + "@typespec/http": "^1.16.0", + "@typespec/rest": "^0.86.0" } }, "node_modules/@azure-tools/typespec-client-generator-core": { - "version": "0.71.2", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.71.2.tgz", - "integrity": "sha512-/HOH9tPXczcue6t1FHVFRXjTU1/S27dZQd85akgs+KlK1jkA8blgPndB51jSYwn8V+D+9XmHRSRtcQLAW582UA==", + "version": "0.72.0", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@azure-tools/typespec-client-generator-core/-/typespec-client-generator-core-0.72.0.tgz", + "integrity": "sha1-IR38UekOb2cJZ54THxVkV49/pCM=", "dev": true, "license": "MIT", "dependencies": { "change-case": "^5.4.4", "pluralize": "^8.0.0", - "yaml": "^2.8.3" + "yaml": "^2.9.0" }, "engines": { "node": ">=22.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "^0.71.0", - "@typespec/compiler": "^1.15.0", - "@typespec/events": "^0.85.0", - "@typespec/http": "^1.15.0", - "@typespec/openapi": "^1.15.0", - "@typespec/rest": "^0.85.0", - "@typespec/sse": "^0.85.0", - "@typespec/streams": "^0.85.0", - "@typespec/versioning": "^0.85.0", - "@typespec/xml": "^0.85.0" + "@azure-tools/typespec-azure-core": "^0.72.0", + "@typespec/compiler": "^1.16.0", + "@typespec/events": "^0.86.0", + "@typespec/http": "^1.16.0", + "@typespec/openapi": "^1.16.0", + "@typespec/rest": "^0.86.0", + "@typespec/sse": "^0.86.0", + "@typespec/streams": "^0.86.0", + "@typespec/versioning": "^0.86.0", + "@typespec/xml": "^0.86.0" } }, "node_modules/@azure/abort-controller": { @@ -189,8 +189,8 @@ }, "node_modules/@azure/core-http-compat": { "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@azure/core-http-compat/-/core-http-compat-2.5.0.tgz", - "integrity": "sha512-BoSmXPx2er1Ai+wKlDvj29jIQespCNBwEmKyZVHO2kEFsWbGjAjwMCGzug3DJM5/QYIV3vej0S1zcU5bq9fa8w==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@azure/core-http-compat/-/core-http-compat-2.5.0.tgz", + "integrity": "sha1-14BmGln4pDL+yyt8b6LVgi3KHeo=", "dev": true, "license": "MIT", "dependencies": { @@ -206,8 +206,8 @@ }, "node_modules/@azure/core-lro": { "version": "2.7.2", - "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.7.2.tgz", - "integrity": "sha512-0YIpccoX8m/k00O7mDDMdJpbr6mf1yWo2dfmxt5A8XVZVVMz2SSKaEbMCeJRvgQ0IaSlqhjT47p4hVIRRy90xw==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@azure/core-lro/-/core-lro-2.7.2.tgz", + "integrity": "sha1-eHEFAnog5Fx3ZRqYsBpNOwG3Wgg=", "dev": true, "license": "MIT", "dependencies": { @@ -222,8 +222,8 @@ }, "node_modules/@azure/core-paging": { "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.7.0.tgz", - "integrity": "sha512-7GEAoIsaoBr6KELNRb8nypowCqvk8dnCHFCYg4XD4lOQGY2GqjQg5IhkRjyBFRO18CGSMq05PaNqSOE9GQro3g==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@azure/core-paging/-/core-paging-1.7.0.tgz", + "integrity": "sha1-WVl6L1Q4ujxsh4n8hw9p4OeFMag=", "dev": true, "license": "MIT", "dependencies": { @@ -233,6 +233,15 @@ "node": ">=22.0.0" } }, + "node_modules/@azure/core-process": { + "version": "1.0.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@azure/core-process/-/core-process-1.0.0.tgz", + "integrity": "sha1-w68cFyI9ZTjhs2ln3clM2uUyy4M=", + "license": "MIT", + "engines": { + "node": ">=22.0.0" + } + }, "node_modules/@azure/core-rest-pipeline": { "version": "1.25.0", "license": "MIT", @@ -273,8 +282,8 @@ }, "node_modules/@azure/core-xml": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@azure/core-xml/-/core-xml-1.6.0.tgz", - "integrity": "sha512-e7lX/dk//F6Qf7BB6PTY4+p2yuOQtyOeHGyapYHNwqSp2OnYpwQt49A/Nin2XmKBQ69pwagR4k/lQBq8lbHQkA==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@azure/core-xml/-/core-xml-1.6.0.tgz", + "integrity": "sha1-EI8JIOG834owuffoh5ibOhIIK9k=", "dev": true, "license": "MIT", "dependencies": { @@ -286,23 +295,26 @@ } }, "node_modules/@azure/identity": { - "version": "4.13.1", + "version": "4.13.2", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@azure/identity/-/identity-4.13.2.tgz", + "integrity": "sha1-zq1+af9YbcKL67rqIgG2u2lguE8=", "license": "MIT", "dependencies": { "@azure/abort-controller": "^2.0.0", "@azure/core-auth": "^1.9.0", "@azure/core-client": "^1.9.2", + "@azure/core-process": "^1.0.0", "@azure/core-rest-pipeline": "^1.17.0", "@azure/core-tracing": "^1.0.0", "@azure/core-util": "^1.11.0", "@azure/logger": "^1.0.0", "@azure/msal-browser": "^5.5.0", - "@azure/msal-node": "^5.1.0", + "@azure/msal-node": "^5.1.5", "open": "^10.1.0", "tslib": "^2.2.0" }, "engines": { - "node": ">=20.0.0" + "node": ">=22.0.0" } }, "node_modules/@azure/logger": { @@ -345,9 +357,9 @@ } }, "node_modules/@azure/storage-blob": { - "version": "12.31.0", - "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.31.0.tgz", - "integrity": "sha512-DBgNv10aCSxopt92DkTDD0o9xScXeBqPKGmR50FPZQaEcH4JLQ+GEOGEDv19V5BMkB7kxr+m4h6il/cCDPvmHg==", + "version": "12.33.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@azure/storage-blob/-/storage-blob-12.33.0.tgz", + "integrity": "sha1-EK1FhvSSJzG4t5zIa+ytp1Z6H6s=", "dev": true, "license": "MIT", "dependencies": { @@ -362,18 +374,18 @@ "@azure/core-util": "^1.11.0", "@azure/core-xml": "^1.4.5", "@azure/logger": "^1.1.4", - "@azure/storage-common": "^12.3.0", + "@azure/storage-common": "^12.4.1", "events": "^3.0.0", "tslib": "^2.8.1" }, "engines": { - "node": ">=20.0.0" + "node": ">=22.0.0" } }, "node_modules/@azure/storage-common": { "version": "12.5.0", - "resolved": "https://registry.npmjs.org/@azure/storage-common/-/storage-common-12.5.0.tgz", - "integrity": "sha512-bttzuhQiCIwrkzjPDA+AtAR7dg19L/CC6ztcqJ5LfvWpXuys9mHp0UQ0udYnoUvv9SCT9KTR5kqFvFr0e6k0lQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@azure/storage-common/-/storage-common-12.5.0.tgz", + "integrity": "sha1-nbHWmPJu9LVqVKYABGp2XqG7oxY=", "dev": true, "license": "MIT", "dependencies": { @@ -499,6 +511,8 @@ }, "node_modules/@gerrit0/mini-shiki": { "version": "3.23.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@gerrit0/mini-shiki/-/mini-shiki-3.23.0.tgz", + "integrity": "sha1-2UFPMIC4gwOxjzoxGEbjfkJNgAw=", "dev": true, "license": "MIT", "dependencies": { @@ -510,25 +524,29 @@ } }, "node_modules/@inquirer/ansi": { - "version": "2.0.5", + "version": "2.0.8", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@inquirer/ansi/-/ansi-2.0.8.tgz", + "integrity": "sha1-Awjz7XkN+pYPDx9gBF+mfoBN444=", "dev": true, "license": "MIT", "engines": { - "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" } }, "node_modules/@inquirer/checkbox": { - "version": "5.1.5", + "version": "5.2.4", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@inquirer/checkbox/-/checkbox-5.2.4.tgz", + "integrity": "sha1-C8aWWYLaBLghhiR5cz2bKHW0tXk=", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/ansi": "^2.0.5", - "@inquirer/core": "^11.1.10", - "@inquirer/figures": "^2.0.5", - "@inquirer/type": "^4.0.5" + "@inquirer/ansi": "^2.0.8", + "@inquirer/core": "^12.0.2", + "@inquirer/figures": "^2.0.9", + "@inquirer/type": "4.1.1" }, "engines": { - "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" }, "peerDependencies": { "@types/node": ">=18" @@ -540,15 +558,17 @@ } }, "node_modules/@inquirer/confirm": { - "version": "6.0.13", + "version": "6.3.1", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@inquirer/confirm/-/confirm-6.3.1.tgz", + "integrity": "sha1-iyJvpTeDglECj3dnD1KAkyoOV4M=", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.1.10", - "@inquirer/type": "^4.0.5" + "@inquirer/core": "^12.0.2", + "@inquirer/type": "4.1.1" }, "engines": { - "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" }, "peerDependencies": { "@types/node": ">=18" @@ -560,20 +580,22 @@ } }, "node_modules/@inquirer/core": { - "version": "11.1.10", + "version": "12.0.2", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@inquirer/core/-/core-12.0.2.tgz", + "integrity": "sha1-91+/XGBxUHiubEx2AnZDNaWB4rA=", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/ansi": "^2.0.5", - "@inquirer/figures": "^2.0.5", - "@inquirer/type": "^4.0.5", + "@inquirer/ansi": "^2.0.8", + "@inquirer/figures": "^2.0.9", + "@inquirer/type": "4.1.1", "cli-width": "^4.1.0", "fast-wrap-ansi": "^0.2.0", "mute-stream": "^3.0.0", "signal-exit": "^4.1.0" }, "engines": { - "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" }, "peerDependencies": { "@types/node": ">=18" @@ -585,16 +607,18 @@ } }, "node_modules/@inquirer/editor": { - "version": "5.1.2", + "version": "5.3.2", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@inquirer/editor/-/editor-5.3.2.tgz", + "integrity": "sha1-IC8n3jEfYkwOUpjhxLzwwL2Tr2M=", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.1.10", - "@inquirer/external-editor": "^3.0.0", - "@inquirer/type": "^4.0.5" + "@inquirer/core": "^12.0.2", + "@inquirer/external-editor": "^3.0.5", + "@inquirer/type": "4.1.1" }, "engines": { - "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" }, "peerDependencies": { "@types/node": ">=18" @@ -606,15 +630,17 @@ } }, "node_modules/@inquirer/expand": { - "version": "5.0.14", + "version": "5.1.4", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@inquirer/expand/-/expand-5.1.4.tgz", + "integrity": "sha1-J+Gyc1q3+n/FtCg+bGmfK9/G6IA=", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.1.10", - "@inquirer/type": "^4.0.5" + "@inquirer/core": "^12.0.2", + "@inquirer/type": "4.1.1" }, "engines": { - "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" }, "peerDependencies": { "@types/node": ">=18" @@ -626,7 +652,9 @@ } }, "node_modules/@inquirer/external-editor": { - "version": "3.0.0", + "version": "3.0.5", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@inquirer/external-editor/-/external-editor-3.0.5.tgz", + "integrity": "sha1-4FGYttXch6iZP+rW2bz5LNSGNyY=", "dev": true, "license": "MIT", "dependencies": { @@ -634,7 +662,7 @@ "iconv-lite": "^0.7.2" }, "engines": { - "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" }, "peerDependencies": { "@types/node": ">=18" @@ -646,23 +674,27 @@ } }, "node_modules/@inquirer/figures": { - "version": "2.0.5", + "version": "2.0.9", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@inquirer/figures/-/figures-2.0.9.tgz", + "integrity": "sha1-jAT9ujp4rw5XwLMSfL0xnOYEscE=", "dev": true, "license": "MIT", "engines": { - "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" } }, "node_modules/@inquirer/input": { - "version": "5.0.13", + "version": "5.1.5", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@inquirer/input/-/input-5.1.5.tgz", + "integrity": "sha1-YtE4BmZq4NbdKysG87k02pgpqos=", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.1.10", - "@inquirer/type": "^4.0.5" + "@inquirer/core": "^12.0.2", + "@inquirer/type": "4.1.1" }, "engines": { - "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" }, "peerDependencies": { "@types/node": ">=18" @@ -674,15 +706,17 @@ } }, "node_modules/@inquirer/number": { - "version": "4.0.13", + "version": "4.2.2", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@inquirer/number/-/number-4.2.2.tgz", + "integrity": "sha1-5++T/C/evw49H2XAMOuE7pLfOcU=", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.1.10", - "@inquirer/type": "^4.0.5" + "@inquirer/core": "^12.0.2", + "@inquirer/type": "4.1.1" }, "engines": { - "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" }, "peerDependencies": { "@types/node": ">=18" @@ -694,16 +728,18 @@ } }, "node_modules/@inquirer/password": { - "version": "5.0.13", + "version": "5.2.1", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@inquirer/password/-/password-5.2.1.tgz", + "integrity": "sha1-oZF/UmmnxM+/KcQIWtYRkxeG+vY=", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/ansi": "^2.0.5", - "@inquirer/core": "^11.1.10", - "@inquirer/type": "^4.0.5" + "@inquirer/ansi": "^2.0.8", + "@inquirer/core": "^12.0.2", + "@inquirer/type": "4.1.1" }, "engines": { - "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" }, "peerDependencies": { "@types/node": ">=18" @@ -715,23 +751,25 @@ } }, "node_modules/@inquirer/prompts": { - "version": "8.4.3", + "version": "8.7.1", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@inquirer/prompts/-/prompts-8.7.1.tgz", + "integrity": "sha1-xs2HDMWf/dmGm41gv9zMPE294YI=", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/checkbox": "^5.1.5", - "@inquirer/confirm": "^6.0.13", - "@inquirer/editor": "^5.1.2", - "@inquirer/expand": "^5.0.14", - "@inquirer/input": "^5.0.13", - "@inquirer/number": "^4.0.13", - "@inquirer/password": "^5.0.13", - "@inquirer/rawlist": "^5.2.9", - "@inquirer/search": "^4.1.9", - "@inquirer/select": "^5.1.5" + "@inquirer/checkbox": "^5.2.4", + "@inquirer/confirm": "^6.3.1", + "@inquirer/editor": "^5.3.2", + "@inquirer/expand": "^5.1.4", + "@inquirer/input": "^5.1.5", + "@inquirer/number": "^4.2.2", + "@inquirer/password": "^5.2.1", + "@inquirer/rawlist": "^5.3.4", + "@inquirer/search": "^4.3.2", + "@inquirer/select": "^5.2.4" }, "engines": { - "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" }, "peerDependencies": { "@types/node": ">=18" @@ -743,15 +781,17 @@ } }, "node_modules/@inquirer/rawlist": { - "version": "5.2.9", + "version": "5.3.4", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@inquirer/rawlist/-/rawlist-5.3.4.tgz", + "integrity": "sha1-wYUJtdYpzBNArSJCksexCflsy/Q=", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.1.10", - "@inquirer/type": "^4.0.5" + "@inquirer/core": "^12.0.2", + "@inquirer/type": "4.1.1" }, "engines": { - "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" }, "peerDependencies": { "@types/node": ">=18" @@ -763,16 +803,18 @@ } }, "node_modules/@inquirer/search": { - "version": "4.1.9", + "version": "4.3.2", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@inquirer/search/-/search-4.3.2.tgz", + "integrity": "sha1-6KA1XjGa9i2TA++DFqI8PthEDvs=", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.1.10", - "@inquirer/figures": "^2.0.5", - "@inquirer/type": "^4.0.5" + "@inquirer/core": "^12.0.2", + "@inquirer/figures": "^2.0.9", + "@inquirer/type": "4.1.1" }, "engines": { - "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" }, "peerDependencies": { "@types/node": ">=18" @@ -784,17 +826,19 @@ } }, "node_modules/@inquirer/select": { - "version": "5.1.5", + "version": "5.2.4", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@inquirer/select/-/select-5.2.4.tgz", + "integrity": "sha1-DoCuVZWpdUZxYLfxucoGf91wDy8=", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/ansi": "^2.0.5", - "@inquirer/core": "^11.1.10", - "@inquirer/figures": "^2.0.5", - "@inquirer/type": "^4.0.5" + "@inquirer/ansi": "^2.0.8", + "@inquirer/core": "^12.0.2", + "@inquirer/figures": "^2.0.9", + "@inquirer/type": "4.1.1" }, "engines": { - "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" }, "peerDependencies": { "@types/node": ">=18" @@ -806,11 +850,13 @@ } }, "node_modules/@inquirer/type": { - "version": "4.0.5", + "version": "4.1.1", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@inquirer/type/-/type-4.1.1.tgz", + "integrity": "sha1-+GXumfOeCVGgJ5+cRa0dJgwM4N0=", "dev": true, "license": "MIT", "engines": { - "node": ">=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0" + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" }, "peerDependencies": { "@types/node": ">=18" @@ -956,8 +1002,8 @@ }, "node_modules/@nodable/entities": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-3.0.0.tgz", - "integrity": "sha512-8L9xFeTYKhm49xfIypoe2W5wV1m/3Z58kT+7kR9A8OyFxcPduI4VmxaUMQyKYrRjUoLLSXv6EKKID5Tvj9cUVw==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@nodable/entities/-/entities-3.0.0.tgz", + "integrity": "sha1-aUcDvIZNMOrtVcLj3vANvWFJNnA=", "dev": true, "funding": [ { @@ -1316,6 +1362,8 @@ }, "node_modules/@shikijs/engine-oniguruma": { "version": "3.23.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@shikijs/engine-oniguruma/-/engine-oniguruma-3.23.0.tgz", + "integrity": "sha1-eJQhBI1mrBszYTFp1tGLnMbjQO0=", "dev": true, "license": "MIT", "dependencies": { @@ -1325,6 +1373,8 @@ }, "node_modules/@shikijs/langs": { "version": "3.23.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@shikijs/langs/-/langs-3.23.0.tgz", + "integrity": "sha1-AJWdixbH9nEiGuebOtjN5+alwRI=", "dev": true, "license": "MIT", "dependencies": { @@ -1333,6 +1383,8 @@ }, "node_modules/@shikijs/themes": { "version": "3.23.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@shikijs/themes/-/themes-3.23.0.tgz", + "integrity": "sha1-/ZbKWtUmOQV5lbwgk2gohOGEbyc=", "dev": true, "license": "MIT", "dependencies": { @@ -1341,6 +1393,8 @@ }, "node_modules/@shikijs/types": { "version": "3.23.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@shikijs/types/-/types-3.23.0.tgz", + "integrity": "sha1-1EFXGgWGQZJgGK496Zhm855bvfI=", "dev": true, "license": "MIT", "dependencies": { @@ -1350,6 +1404,8 @@ }, "node_modules/@shikijs/vscode-textmate": { "version": "10.0.2", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", + "integrity": "sha1-qQqzHQzB37VMZqaeUVv2JPp7IiQ=", "dev": true, "license": "MIT" }, @@ -1394,7 +1450,9 @@ "license": "MIT" }, "node_modules/@types/hast": { - "version": "3.0.4", + "version": "3.0.5", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@types/hast/-/hast-3.0.5.tgz", + "integrity": "sha1-SAIN5MDmNJL0yp20IGjBCPaLf48=", "dev": true, "license": "MIT", "dependencies": { @@ -1416,13 +1474,15 @@ }, "node_modules/@types/semver": { "version": "7.8.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.8.0.tgz", - "integrity": "sha512-1mAINjtQCXXeLkJ9ehXkwOcBpqtLxiVtKhpUf83DdRNdQKV0iXZpaHYqRr7nj+wvxuJzoAmAwXI+sCNMv1CzLQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@types/semver/-/semver-7.8.0.tgz", + "integrity": "sha1-C/4+xR9elhW8MXF0zVuI6gi3/C8=", "dev": true, "license": "MIT" }, "node_modules/@types/unist": { "version": "3.0.3", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha1-rKqw+RnOaczmKcLU7S60rcG2wgw=", "dev": true, "license": "MIT" }, @@ -1435,39 +1495,41 @@ } }, "node_modules/@typespec/asset-emitter": { - "version": "0.79.1", + "version": "0.79.2", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/asset-emitter/-/asset-emitter-0.79.2.tgz", + "integrity": "sha1-LfhgfN+MQXkuw3aTu/TlZvl7o/E=", "dev": true, "license": "MIT", "engines": { - "node": ">=20.0.0" + "node": ">=22.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.10.0" + "@typespec/compiler": "^1.16.0" } }, "node_modules/@typespec/compiler": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/@typespec/compiler/-/compiler-1.15.0.tgz", - "integrity": "sha512-NbCIRAIzyozchlSaGPVuyV43bC+y+OpXYCuT+8M8kt35Ln9zWzLFcIt7irofQ5QUXBZrHsBFpI5fTOFdCGeWCA==", + "version": "1.16.0", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/compiler/-/compiler-1.16.0.tgz", + "integrity": "sha1-CoFHbX/Cq9deanySjG4Rpa4xOjA=", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.29.0", - "@inquirer/prompts": "^8.4.1", - "ajv": "^8.18.0", + "@inquirer/prompts": "^8.6.0", + "ajv": "^8.20.0", "change-case": "^5.4.4", "env-paths": "^4.0.0", "is-unicode-supported": "^2.1.0", "mustache": "^4.2.0", "picocolors": "^1.1.1", - "prettier": "^3.9.5", - "semver": "^7.7.4", - "tar": "^7.5.21", - "temporal-polyfill": "^1.0.1", - "vscode-languageserver": "^10.0.0", - "vscode-languageserver-textdocument": "^1.0.12", - "yaml": "^2.8.3", - "yargs": "^18.0.0" + "prettier": "^3.9.6", + "semver": "^7.8.5", + "tar": "^7.5.22", + "temporal-polyfill": "^1.0.4", + "vscode-languageserver": "^10.1.0", + "vscode-languageserver-textdocument": "^1.0.13", + "yaml": "^2.9.0", + "yargs": "^18.1.0" }, "bin": { "tsp": "cmd/tsp.js", @@ -1477,31 +1539,61 @@ "node": ">=22.0.0" } }, + "node_modules/@typespec/compiler/node_modules/ajv": { + "version": "8.20.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha1-MEs2Nq3Yi6fZNnYN1Q7OAG3qlfk=", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@typespec/compiler/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/semver/-/semver-7.8.5.tgz", + "integrity": "sha1-ObZGA33VDBT7RR5+TKxY7YuGP2k=", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@typespec/events": { - "version": "0.85.0", - "resolved": "https://registry.npmjs.org/@typespec/events/-/events-0.85.0.tgz", - "integrity": "sha512-oFLsJ3EK3SGmVNR3kyON6SAVpj5ek0PWxz4Y2OrvsaD39ONswRnIVPolnr2P0KK/BV67Uo49VLISXPo5Wrkk3Q==", + "version": "0.86.0", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/events/-/events-0.86.0.tgz", + "integrity": "sha1-RTSpL9J0s+1Et4rYVC/3NMLCpSM=", "dev": true, "license": "MIT", "engines": { "node": ">=22.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.15.0" + "@typespec/compiler": "^1.16.0" } }, "node_modules/@typespec/http": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/@typespec/http/-/http-1.15.0.tgz", - "integrity": "sha512-LNyzYHyX3C0xyQQ262jhvIaVzTn7DqiDB2gz45w1m6ngJH9ArGU8XjO3o7PaZkl/nuB5MTpImnsXpHIV1rbi4Q==", + "version": "1.16.0", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/http/-/http-1.16.0.tgz", + "integrity": "sha1-sj5orGOv4jC2qHbKAWBQrdJQG6I=", "dev": true, "license": "MIT", "engines": { "node": ">=22.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.15.0", - "@typespec/streams": "^0.85.0" + "@typespec/compiler": "^1.16.0", + "@typespec/streams": "^0.86.0" }, "peerDependenciesMeta": { "@typespec/streams": { @@ -1510,156 +1602,169 @@ } }, "node_modules/@typespec/http-specs": { - "version": "0.1.0-alpha.42-dev.3", - "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@typespec/http-specs/-/http-specs-0.1.0-alpha.42-dev.3.tgz", - "integrity": "sha1-p0c6Oj6Ma+lfrfeuEJccxDCA150=", + "version": "0.1.0-alpha.42", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/http-specs/-/http-specs-0.1.0-alpha.42.tgz", + "integrity": "sha1-JIAe4TRV5fAlto13GXdBpgA0elw=", "dev": true, "license": "MIT", "dependencies": { - "@typespec/spec-api": "^0.1.0-alpha.16 || >= 0.1.0-alpha.17-dev.1", - "@typespec/spector": "^0.1.0-alpha.28 || >= 0.1.0-alpha.29-dev.1" + "@typespec/spec-api": "^0.1.0-alpha.17", + "@typespec/spector": "^0.1.0-alpha.29" }, "engines": { "node": ">=22.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.15.0 || >= 1.16.0-dev.5", - "@typespec/events": "^0.85.0 || >= 0.86.0-dev.0", - "@typespec/http": "^1.15.0 || >= 1.16.0-dev.1", - "@typespec/rest": "^0.85.0 || >= 0.86.0-dev.0", - "@typespec/sse": "^0.85.0 || >= 0.86.0-dev.0", - "@typespec/versioning": "^0.85.0 || >= 0.86.0-dev.0", - "@typespec/xml": "^0.85.0 || >= 0.86.0-dev.0" + "@typespec/compiler": "^1.16.0", + "@typespec/events": "^0.86.0", + "@typespec/http": "^1.16.0", + "@typespec/rest": "^0.86.0", + "@typespec/sse": "^0.86.0", + "@typespec/versioning": "^0.86.0", + "@typespec/xml": "^0.86.0" } }, "node_modules/@typespec/json-schema": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/@typespec/json-schema/-/json-schema-1.15.0.tgz", - "integrity": "sha512-sq27AxnzVRX5mrPlncsqQLi2aE34CLDALaqbY2HmnMiYmS70wY1zJH3I4hWT4AUxiZYokln9sf0FZ4ukT6ZJ+Q==", + "version": "1.16.0", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/json-schema/-/json-schema-1.16.0.tgz", + "integrity": "sha1-t8ZQX2RmDIibczP5iJ3dTHfG9mI=", "dev": true, "license": "MIT", "dependencies": { - "@typespec/asset-emitter": "^0.79.1", - "yaml": "^2.8.3" + "@typespec/asset-emitter": "^0.79.2", + "yaml": "^2.9.0" }, "engines": { "node": ">=22.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.15.0" + "@typespec/compiler": "^1.16.0" } }, "node_modules/@typespec/library-linter": { - "version": "0.85.0", - "resolved": "https://registry.npmjs.org/@typespec/library-linter/-/library-linter-0.85.0.tgz", - "integrity": "sha512-n+Bjm/t4nj/yNmXdlQrhc0CLq154jdZEWzjm7JFskIVYQs0At4lr9l4/dbSZszb11zJ/gFJwoRcAGzMhT3CmYQ==", + "version": "0.86.0", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/library-linter/-/library-linter-0.86.0.tgz", + "integrity": "sha1-/ih/dme3Gtaob+KcPQ83EpAGa68=", "dev": true, "license": "MIT", "engines": { "node": ">=22.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.15.0" + "@typespec/compiler": "^1.16.0" } }, "node_modules/@typespec/openapi": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/@typespec/openapi/-/openapi-1.15.0.tgz", - "integrity": "sha512-lHd3H5W23KOIGKyBPKpBLPHVOxcxuvqOBXGqlyPvGmHDgmD74mrUtHWxNoGx+QQESjx4tS8Tu6URNQBU6y6Q1Q==", + "version": "1.16.0", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/openapi/-/openapi-1.16.0.tgz", + "integrity": "sha1-kkBE9vcxWlGUEcn8Mz6o45GMcKY=", "dev": true, "license": "MIT", "engines": { "node": ">=22.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.15.0", - "@typespec/http": "^1.15.0" + "@typespec/compiler": "^1.16.0", + "@typespec/http": "^1.16.0" } }, "node_modules/@typespec/rest": { - "version": "0.85.0", - "resolved": "https://registry.npmjs.org/@typespec/rest/-/rest-0.85.0.tgz", - "integrity": "sha512-ogbot1wp8jLn0rSOzwHjMjgDot+1u7WFZOWluRHL3cuRw9l8+ZjlixBrkXZ84dKP54RoYUN3buBjfOZ7qyHeyg==", + "version": "0.86.0", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/rest/-/rest-0.86.0.tgz", + "integrity": "sha1-CCKtPuq87TAfHn3WXxKOEtG3DhU=", "dev": true, "license": "MIT", "engines": { "node": ">=22.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.15.0", - "@typespec/http": "^1.15.0" + "@typespec/compiler": "^1.16.0", + "@typespec/http": "^1.16.0" } }, "node_modules/@typespec/spec-api": { - "version": "0.1.0-alpha.16", - "resolved": "https://registry.npmjs.org/@typespec/spec-api/-/spec-api-0.1.0-alpha.16.tgz", - "integrity": "sha512-vo3XynVQjDUFulLC1z1OikjzQI+GQ54QtI8U/sgYvg5YrseJ2GN/h6vD5Z2T2Cg2TfQu27uitOAJwqpS9R4M5Q==", + "version": "0.1.0-alpha.17", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/spec-api/-/spec-api-0.1.0-alpha.17.tgz", + "integrity": "sha1-ACEiTVqHvv3OSg459qO22xoqoF4=", "dev": true, "license": "MIT", "dependencies": { "express": "^5.2.1", - "fast-xml-parser": "^5.10.1" + "fast-xml-parser": "^5.11.0" }, "engines": { "node": ">=22.0.0" } }, "node_modules/@typespec/spec-coverage-sdk": { - "version": "0.1.0-alpha.16", - "resolved": "https://registry.npmjs.org/@typespec/spec-coverage-sdk/-/spec-coverage-sdk-0.1.0-alpha.16.tgz", - "integrity": "sha512-qwSnuE+CXjv4mn2uhioTVlaO4GjypR4ZtbkSoLmWA677ggYmoAjIDpyNgT1tjsc1lDKVtSiPvGhM9XFKExVmbQ==", + "version": "0.1.0-alpha.17", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/spec-coverage-sdk/-/spec-coverage-sdk-0.1.0-alpha.17.tgz", + "integrity": "sha1-czrt7+QxiT5czrKrCs7NiAoFmXI=", "dev": true, "license": "MIT", "dependencies": { - "@azure/identity": "~4.13.0", - "@azure/storage-blob": "~12.31.0", - "@types/node": "~25.3.0", - "@types/semver": "^7.5.8", - "semver": "^7.7.1" + "@azure/identity": "^4.13.2", + "@azure/storage-blob": "^12.33.0", + "@types/node": "^26.3.0", + "@types/semver": "^7.8.0", + "semver": "^7.8.5" }, "engines": { - "node": ">=16.0.0" + "node": ">=22.0.0" } }, "node_modules/@typespec/spec-coverage-sdk/node_modules/@types/node": { - "version": "25.3.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.3.5.tgz", - "integrity": "sha512-oX8xrhvpiyRCQkG1MFchB09f+cXftgIXb3a7UUa4Y3wpmZPw5tyZGTLWhlESOLq1Rq6oDlc8npVU2/9xiCuXMA==", + "version": "26.4.1", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@types/node/-/node-26.4.1.tgz", + "integrity": "sha1-PY3IBRWJSVhEjuJmz11rw+UgW9U=", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~7.18.0" + "undici-types": "~8.3.0" + } + }, + "node_modules/@typespec/spec-coverage-sdk/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/semver/-/semver-7.8.5.tgz", + "integrity": "sha1-ObZGA33VDBT7RR5+TKxY7YuGP2k=", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/@typespec/spec-coverage-sdk/node_modules/undici-types": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", - "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", + "version": "8.3.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/undici-types/-/undici-types-8.3.0.tgz", + "integrity": "sha1-ROn8nzJEZIzeo15Pm7LWgelBCAk=", "dev": true, "license": "MIT" }, "node_modules/@typespec/spector": { - "version": "0.1.0-alpha.28", - "resolved": "https://registry.npmjs.org/@typespec/spector/-/spector-0.1.0-alpha.28.tgz", - "integrity": "sha512-ngffqlDFEKNxvZZ3oQbboi7RMO5YP6BOT5qZiQYMwUx3L35CalmkIlxR1heUMbsstv5FVMgNNEF87/0jIBFZEw==", + "version": "0.1.0-alpha.29", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/spector/-/spector-0.1.0-alpha.29.tgz", + "integrity": "sha1-0insMTXx7dtFqoQ4oV3CVHI6KP0=", "dev": true, "license": "MIT", "dependencies": { - "@azure/identity": "^4.13.1", - "@typespec/compiler": "^1.15.0", - "@typespec/http": "^1.15.0", - "@typespec/rest": "^0.85.0", - "@typespec/spec-api": "^0.1.0-alpha.16", - "@typespec/spec-coverage-sdk": "^0.1.0-alpha.16", - "@typespec/versioning": "^0.85.0", - "ajv": "^8.18.0", + "@azure/identity": "^4.13.2", + "@typespec/compiler": "^1.16.0", + "@typespec/http": "^1.16.0", + "@typespec/rest": "^0.86.0", + "@typespec/spec-api": "^0.1.0-alpha.17", + "@typespec/spec-coverage-sdk": "^0.1.0-alpha.17", + "@typespec/versioning": "^0.86.0", + "ajv": "^8.20.0", "express": "^5.2.1", "micromatch": "^4.0.8", - "morgan": "^1.10.1", + "morgan": "^1.11.0", "multer": "^2.2.0", "picocolors": "^1.1.1", - "yaml": "^2.8.3", - "yargs": "^18.0.0" + "yaml": "^2.9.0", + "yargs": "^18.1.0" }, "bin": { "tsp-spector": "cmd/cli.mjs" @@ -1668,33 +1773,50 @@ "node": ">=22.0.0" } }, + "node_modules/@typespec/spector/node_modules/ajv": { + "version": "8.20.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha1-MEs2Nq3Yi6fZNnYN1Q7OAG3qlfk=", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/@typespec/sse": { - "version": "0.85.0", - "resolved": "https://registry.npmjs.org/@typespec/sse/-/sse-0.85.0.tgz", - "integrity": "sha512-mi0CiZxod5pRYOM6PTGnioH5CJ2F9KpXvChuFr6ITx2TQiokDVzGTST8PiiU/TfnMP+4JE91fUWzJWkm0HLGUA==", + "version": "0.86.0", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/sse/-/sse-0.86.0.tgz", + "integrity": "sha1-WIAR64uImWrPROU3MhQLTm/NSy8=", "dev": true, "license": "MIT", "engines": { "node": ">=22.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.15.0", - "@typespec/events": "^0.85.0", - "@typespec/http": "^1.15.0", - "@typespec/streams": "^0.85.0" + "@typespec/compiler": "^1.16.0", + "@typespec/events": "^0.86.0", + "@typespec/http": "^1.16.0", + "@typespec/streams": "^0.86.0" } }, "node_modules/@typespec/streams": { - "version": "0.85.0", - "resolved": "https://registry.npmjs.org/@typespec/streams/-/streams-0.85.0.tgz", - "integrity": "sha512-okmKXZ0JMCC24DeQOJnKLhgf53619XsfSiJ73Q/QCL7KqFwWtuo+vzS6q760t05GyyDs546bYWcUwyO+4TMURQ==", + "version": "0.86.0", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/streams/-/streams-0.86.0.tgz", + "integrity": "sha1-kvP4804VN31phPoALkYXwY9EWB4=", "dev": true, "license": "MIT", "engines": { "node": ">=22.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.15.0" + "@typespec/compiler": "^1.16.0" } }, "node_modules/@typespec/ts-http-runtime": { @@ -1710,26 +1832,26 @@ } }, "node_modules/@typespec/tspd": { - "version": "0.77.0", - "resolved": "https://registry.npmjs.org/@typespec/tspd/-/tspd-0.77.0.tgz", - "integrity": "sha512-ZuGcdtLYwfiYIJqQaH35y3Ft8k3UqORaNbnMLkprdil25I6lL5ebQYq7Xn+NyPuc6rMXUBz+Zb76Hig97R7VWw==", + "version": "0.77.1", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/tspd/-/tspd-0.77.1.tgz", + "integrity": "sha1-uFraxnbzgUFu0P+2cKO4KQYqZfI=", "dev": true, "license": "MIT", "dependencies": { "@alloy-js/core": "^0.24.1", "@alloy-js/markdown": "^0.24.0", "@alloy-js/typescript": "^0.24.0", - "@microsoft/api-extractor": "^7.58.1", - "@microsoft/api-extractor-model": "^7.33.5", + "@microsoft/api-extractor": "~7.58.1", + "@microsoft/api-extractor-model": "^7.33.11", "@microsoft/tsdoc": "^0.16.0", "@microsoft/tsdoc-config": "^0.18.1", - "@typespec/compiler": "^1.15.0", + "@typespec/compiler": "^1.16.0", "picocolors": "^1.1.1", - "prettier": "^3.9.5", - "typedoc": "^0.28.19", - "typedoc-plugin-markdown": "^4.11.0", - "yaml": "^2.8.3", - "yargs": "^18.0.0" + "prettier": "^3.9.6", + "typedoc": "^0.28.20", + "typedoc-plugin-markdown": "^4.12.0", + "yaml": "^2.9.0", + "yargs": "^18.1.0" }, "bin": { "tspd": "cmd/tspd.js" @@ -1738,30 +1860,90 @@ "node": ">=22.0.0" } }, + "node_modules/@typespec/tspd/node_modules/@microsoft/api-extractor-model": { + "version": "7.33.12", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@microsoft/api-extractor-model/-/api-extractor-model-7.33.12.tgz", + "integrity": "sha1-5zTsD9/+rwZBGzqjEZxQ2EPqcb8=", + "dev": true, + "license": "MIT", + "dependencies": { + "@microsoft/tsdoc": "~0.16.0", + "@microsoft/tsdoc-config": "~0.18.1", + "@rushstack/node-core-library": "5.24.1" + }, + "engines": { + "node": ">=20.9.0" + } + }, + "node_modules/@typespec/tspd/node_modules/@rushstack/node-core-library": { + "version": "5.24.1", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/@rushstack/node-core-library/-/node-core-library-5.24.1.tgz", + "integrity": "sha1-liVjrLQfS2T9TeRWr+VSr8T2khk=", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "~8.20.0", + "ajv-draft-04": "~1.0.0", + "ajv-formats": "~3.0.1", + "fs-extra": "~11.3.0", + "import-lazy": "~4.0.0", + "jju": "~1.4.0", + "resolve": "~1.22.1", + "semver": "~7.7.4" + }, + "engines": { + "node": ">=20.9.0" + }, + "peerDependencies": { + "@types/node": "*" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@typespec/tspd/node_modules/ajv": { + "version": "8.20.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha1-MEs2Nq3Yi6fZNnYN1Q7OAG3qlfk=", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/@typespec/versioning": { - "version": "0.85.0", - "resolved": "https://registry.npmjs.org/@typespec/versioning/-/versioning-0.85.0.tgz", - "integrity": "sha512-8qIbWBnIWor3p9DFzcVz4xU4YK6PFgMia4+IDczhb5G4J9bYquK9gJSFNPfoF86Foq9nHad83swX25kxRiS6Jw==", + "version": "0.86.0", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/versioning/-/versioning-0.86.0.tgz", + "integrity": "sha1-gLvu6h31gppZDN7JeE9aKW1HNoU=", "dev": true, "license": "MIT", "engines": { "node": ">=22.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.15.0" + "@typespec/compiler": "^1.16.0" } }, "node_modules/@typespec/xml": { - "version": "0.85.0", - "resolved": "https://registry.npmjs.org/@typespec/xml/-/xml-0.85.0.tgz", - "integrity": "sha512-N9MU5azHtZVbx9dApIdGkK9aAESj2icKk3jLpwgnVqD5Fg4OuE1RrtRX7Q1fcxBGo3fxpnMphIE18WAZGGLwlQ==", + "version": "0.86.0", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/xml/-/xml-0.86.0.tgz", + "integrity": "sha1-sqdN1ND8DHZXOLOPmyjjYhERpA4=", "dev": true, "license": "MIT", "engines": { "node": ">=22.0.0" }, "peerDependencies": { - "@typespec/compiler": "^1.15.0" + "@typespec/compiler": "^1.16.0" } }, "node_modules/@vitest/coverage-v8": { @@ -1927,8 +2109,8 @@ }, "node_modules/accepts": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", - "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/accepts/-/accepts-2.0.0.tgz", + "integrity": "sha1-u89LpQdUZ/PyEx6rPP/HPC9deJU=", "dev": true, "license": "MIT", "dependencies": { @@ -2011,8 +2193,8 @@ }, "node_modules/anynum": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/anynum/-/anynum-1.0.1.tgz", - "integrity": "sha512-N6//FLET/tXYNM/F6ABca1oH6fWB+KlTt909Le28WMDBk8oaT4vY17DCrwg2MvmuqUKt3Ni4N5dGJ/EoBgcO6A==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/anynum/-/anynum-1.0.1.tgz", + "integrity": "sha1-KqwA4I3603JsHUYuYNvC+DFlmkQ=", "dev": true, "funding": [ { @@ -2024,8 +2206,8 @@ }, "node_modules/append-field": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz", - "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/append-field/-/append-field-1.0.0.tgz", + "integrity": "sha1-HjRA6RXwsSA9I3SOeO3XubW0PlY=", "dev": true, "license": "MIT" }, @@ -2070,8 +2252,8 @@ }, "node_modules/basic-auth": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", - "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha1-uZgnm/R844NEtPPPkW1Gebv1Hjo=", "dev": true, "license": "MIT", "dependencies": { @@ -2083,15 +2265,15 @@ }, "node_modules/basic-auth/node_modules/safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=", "dev": true, "license": "MIT" }, "node_modules/body-parser": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.3.0.tgz", - "integrity": "sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/body-parser/-/body-parser-2.3.0.tgz", + "integrity": "sha1-bYZi9NjDNgKLismqJCUbDKZLpDc=", "dev": true, "license": "MIT", "dependencies": { @@ -2114,9 +2296,9 @@ } }, "node_modules/body-parser/node_modules/content-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.0.0.tgz", - "integrity": "sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==", + "version": "2.1.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/content-type/-/content-type-2.1.0.tgz", + "integrity": "sha1-2TicQ8Coz2o1XbRk0h4HCSpASTo=", "dev": true, "license": "MIT", "engines": { @@ -2142,8 +2324,8 @@ }, "node_modules/braces": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/braces/-/braces-3.0.3.tgz", + "integrity": "sha1-SQMy9AkZRSJy1VqEgK3AxEE1h4k=", "dev": true, "license": "MIT", "dependencies": { @@ -2159,8 +2341,8 @@ }, "node_modules/buffer-from": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha1-KxRqb9cugLT1XSVfNe1Zo6mkG9U=", "dev": true, "license": "MIT" }, @@ -2179,8 +2361,8 @@ }, "node_modules/busboy": { "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha1-lm6japUC5DzbkUaWJSO5L1MfaJM=", "dev": true, "dependencies": { "streamsearch": "^1.1.0" @@ -2191,8 +2373,8 @@ }, "node_modules/bytes": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha1-iwvuuYYFrfGxKPpDhkA8AJ4CIaU=", "dev": true, "license": "MIT", "engines": { @@ -2235,8 +2417,8 @@ }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha1-S1QowiK+mF15w9gmV0edvgtZstY=", "dev": true, "license": "MIT", "dependencies": { @@ -2249,8 +2431,8 @@ }, "node_modules/call-bound": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", - "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha1-I43pNdKippKSjFOMfM+pEGf9Bio=", "dev": true, "license": "MIT", "dependencies": { @@ -2278,7 +2460,9 @@ "license": "MIT" }, "node_modules/chardet": { - "version": "2.1.1", + "version": "2.2.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/chardet/-/chardet-2.2.0.tgz", + "integrity": "sha1-AF1mTyy9SWGIjS4sMsWmnlnY7sQ=", "dev": true, "license": "MIT" }, @@ -2308,6 +2492,8 @@ }, "node_modules/cli-width": { "version": "4.1.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha1-QtqsQdPCVO84rYrAN2chMBc2kcU=", "dev": true, "license": "ISC", "engines": { @@ -2375,8 +2561,8 @@ }, "node_modules/concat-stream": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", - "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha1-QUz1r3kKSMYKub5FJ9VtXkETPLE=", "dev": true, "engines": [ "node >= 6.0" @@ -2391,8 +2577,8 @@ }, "node_modules/content-disposition": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.1.0.tgz", - "integrity": "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/content-disposition/-/content-disposition-1.1.0.tgz", + "integrity": "sha1-89t4nHUtRVZMx+nh4LMXkNSjjhc=", "dev": true, "license": "MIT", "engines": { @@ -2405,8 +2591,8 @@ }, "node_modules/content-type": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha1-i3cxYmVtHRCGeEyPI6VM5tc9eRg=", "dev": true, "license": "MIT", "engines": { @@ -2420,8 +2606,8 @@ }, "node_modules/cookie": { "version": "0.7.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", - "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha1-VWNpxHKiupEPKXmJG1JrNDYjftc=", "dev": true, "license": "MIT", "engines": { @@ -2430,8 +2616,8 @@ }, "node_modules/cookie-signature": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", - "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/cookie-signature/-/cookie-signature-1.2.2.tgz", + "integrity": "sha1-V8f8PMKTrKuf7FTXPhVpDr5KF5M=", "dev": true, "license": "MIT", "engines": { @@ -2502,8 +2688,8 @@ }, "node_modules/depd": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/depd/-/depd-2.0.0.tgz", + "integrity": "sha1-tpYWPMdXVg0JzyLMj60Vcbeedt8=", "dev": true, "license": "MIT", "engines": { @@ -2533,8 +2719,8 @@ }, "node_modules/dunder-proto": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha1-165mfh3INIL4tw/Q9u78UNow9Yo=", "dev": true, "license": "MIT", "dependencies": { @@ -2555,8 +2741,8 @@ }, "node_modules/ee-first": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", "dev": true, "license": "MIT" }, @@ -2567,8 +2753,8 @@ }, "node_modules/encodeurl": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", - "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha1-e46omAd9fkCdOsRUdOo46vCFelg=", "dev": true, "license": "MIT", "engines": { @@ -2577,6 +2763,8 @@ }, "node_modules/entities": { "version": "4.5.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/entities/-/entities-4.5.0.tgz", + "integrity": "sha1-XSaOpecRPsdMTQM7eepaNaSI+0g=", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -2602,8 +2790,8 @@ }, "node_modules/es-define-property": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha1-mD6y+aZyTpMD9hrd8BHHLgngsPo=", "dev": true, "license": "MIT", "engines": { @@ -2625,8 +2813,8 @@ }, "node_modules/es-object-atoms": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", - "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha1-otCzcyBXJN+lJdI7DD4bHKWCyZs=", "dev": true, "license": "MIT", "dependencies": { @@ -2646,8 +2834,8 @@ }, "node_modules/escape-html": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", "dev": true, "license": "MIT" }, @@ -2661,8 +2849,8 @@ }, "node_modules/etag": { "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", "dev": true, "license": "MIT", "engines": { @@ -2671,8 +2859,8 @@ }, "node_modules/events": { "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/events/-/events-3.3.0.tgz", + "integrity": "sha1-Mala0Kkk4tLEGagTrrLE6HjqdAA=", "dev": true, "license": "MIT", "engines": { @@ -2689,8 +2877,8 @@ }, "node_modules/express": { "version": "5.2.1", - "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz", - "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/express/-/express-5.2.1.tgz", + "integrity": "sha1-jyHRW20yf5K0eU7PjLCKcvlWrAQ=", "dev": true, "license": "MIT", "dependencies": { @@ -2738,11 +2926,15 @@ }, "node_modules/fast-string-truncated-width": { "version": "3.0.3", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/fast-string-truncated-width/-/fast-string-truncated-width-3.0.3.tgz", + "integrity": "sha1-I6/g2mfXUsoHJ1OPHmlndZcozkk=", "dev": true, "license": "MIT" }, "node_modules/fast-string-width": { "version": "3.0.2", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/fast-string-width/-/fast-string-width-3.0.2.tgz", + "integrity": "sha1-FturtJHOVYW17LZ1tlwWXXFojus=", "dev": true, "license": "MIT", "dependencies": { @@ -2768,6 +2960,8 @@ }, "node_modules/fast-wrap-ansi": { "version": "0.2.2", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/fast-wrap-ansi/-/fast-wrap-ansi-0.2.2.tgz", + "integrity": "sha1-lelSoBRbzj9ZrVbhefhMSNQHKTU=", "dev": true, "license": "MIT", "dependencies": { @@ -2775,9 +2969,9 @@ } }, "node_modules/fast-xml-builder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.3.0.tgz", - "integrity": "sha512-F74cZEdCvuw9P41GAC3rod4X04jjWGM1JPEv/GWSqFTWLsdyMSBMBMlm9Hk3GLBgLBbdBNY8yee0pQh2RBVESQ==", + "version": "1.3.1", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/fast-xml-builder/-/fast-xml-builder-1.3.1.tgz", + "integrity": "sha1-7wWzU7RVl0g9+wnUUKBiorrsOoI=", "dev": true, "funding": [ { @@ -2792,9 +2986,9 @@ } }, "node_modules/fast-xml-parser": { - "version": "5.10.1", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.10.1.tgz", - "integrity": "sha512-IEMIf7298kXuZSRFoGfMYrl7is8LpavODgbNz1cwIudv7KwVFnuU+UsMporfq6PD6aXSlawZlARiA3UywCTfMw==", + "version": "5.11.1", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/fast-xml-parser/-/fast-xml-parser-5.11.1.tgz", + "integrity": "sha1-DuZy/M4XEMOBhbgpDXfpiAb/C/s=", "dev": true, "funding": [ { @@ -2808,7 +3002,7 @@ "fast-xml-builder": "^1.2.0", "is-unsafe": "^2.0.0", "path-expression-matcher": "^1.6.2", - "strnum": "^2.4.1", + "strnum": "^2.4.2", "xml-naming": "^0.3.0" }, "bin": { @@ -2822,8 +3016,8 @@ }, "node_modules/fill-range": { "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha1-RCZdPKwH4+p9wkdRY4BkN1SgUpI=", "dev": true, "license": "MIT", "dependencies": { @@ -2835,8 +3029,8 @@ }, "node_modules/finalhandler": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz", - "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/finalhandler/-/finalhandler-2.1.1.tgz", + "integrity": "sha1-osUXplWYUrzbBtH4vX9Rto+tgJk=", "dev": true, "license": "MIT", "dependencies": { @@ -2892,8 +3086,8 @@ }, "node_modules/forwarded": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha1-ImmTZCiq1MFcfr6XeahL8LKoGBE=", "dev": true, "license": "MIT", "engines": { @@ -2902,8 +3096,8 @@ }, "node_modules/fresh": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", - "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/fresh/-/fresh-2.0.0.tgz", + "integrity": "sha1-jdffahs6Gzpc8YbAWl3SZ2ImNaQ=", "dev": true, "license": "MIT", "engines": { @@ -2967,8 +3161,8 @@ }, "node_modules/get-intrinsic": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha1-dD8OO2lkqTpUke0b/6rgVNf5jQE=", "dev": true, "license": "MIT", "dependencies": { @@ -2992,8 +3186,8 @@ }, "node_modules/get-proto": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha1-FQs/J0OGnvPoUewMSdFbHRTQDuE=", "dev": true, "license": "MIT", "dependencies": { @@ -3028,8 +3222,8 @@ }, "node_modules/gopd": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha1-ifVrghe9vIgCvSmd9tfxCB1+UaE=", "dev": true, "license": "MIT", "engines": { @@ -3054,8 +3248,8 @@ }, "node_modules/has-symbols": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha1-/JxqeDoISVHQuXH+EBjegTcHozg=", "dev": true, "license": "MIT", "engines": { @@ -3083,8 +3277,8 @@ }, "node_modules/http-errors": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", - "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha1-NtL2W8kJyHkAGN02+02T2myq4Gs=", "dev": true, "license": "MIT", "dependencies": { @@ -3125,7 +3319,9 @@ } }, "node_modules/iconv-lite": { - "version": "0.7.2", + "version": "0.7.3", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/iconv-lite/-/iconv-lite-0.7.3.tgz", + "integrity": "sha1-hO4S+WPn3lC8AaE+FgoHizsPQV8=", "dev": true, "license": "MIT", "dependencies": { @@ -3149,15 +3345,15 @@ }, "node_modules/inherits": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=", "dev": true, "license": "ISC" }, "node_modules/ipaddr.js": { "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha1-v/OFQ+64mEglB5/zoqjmy9RngbM=", "dev": true, "license": "MIT", "engines": { @@ -3217,8 +3413,8 @@ }, "node_modules/is-number": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha1-dTU0W4lnNNX4DE0GxQlVUnoU8Ss=", "dev": true, "license": "MIT", "engines": { @@ -3227,8 +3423,8 @@ }, "node_modules/is-promise": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", - "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/is-promise/-/is-promise-4.0.0.tgz", + "integrity": "sha1-Qv+fhCBsGZHSbev1IN1cAQQt0vM=", "dev": true, "license": "MIT" }, @@ -3255,9 +3451,9 @@ } }, "node_modules/is-unsafe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-unsafe/-/is-unsafe-2.0.0.tgz", - "integrity": "sha512-2LdV822R+wmI86unXA93WCFpL6g+av8ynWk0nrHyJqGop5VoocYsSLFgN8jrfalT6iGeLNM4KXuVSsULP53kEA==", + "version": "2.0.2", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/is-unsafe/-/is-unsafe-2.0.2.tgz", + "integrity": "sha1-ux6tF/GqaI9kMyWLVh6YsaRaGvw=", "dev": true, "funding": [ { @@ -3665,8 +3861,8 @@ }, "node_modules/linkify-it": { "version": "5.0.2", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.2.tgz", - "integrity": "sha512-ONTm2jCMAVZjgQa/Fy1kScXsuOoF5NPTsoFBdE1KVIZ2vAh/r9+Bqo+0jINCBYnavTPQZz38QzFTme79ENoN3Q==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/linkify-it/-/linkify-it-5.0.2.tgz", + "integrity": "sha1-074KaTrz2p3ziD8eNGoOl0YajBk=", "dev": true, "funding": [ { @@ -3735,6 +3931,8 @@ }, "node_modules/lunr": { "version": "2.3.9", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha1-GLEjFCgyM33W6WTfGlp3B7JdNeE=", "dev": true, "license": "MIT" }, @@ -3771,7 +3969,9 @@ } }, "node_modules/markdown-it": { - "version": "14.2.0", + "version": "14.3.1", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/markdown-it/-/markdown-it-14.3.1.tgz", + "integrity": "sha1-iXTiRzd5Nj7VaC6jd/MVZO5R4pI=", "dev": true, "funding": [ { @@ -3786,8 +3986,8 @@ "license": "MIT", "dependencies": { "argparse": "^2.0.1", - "entities": "^4.4.0", - "linkify-it": "^5.0.1", + "entities": "^4.5.0", + "linkify-it": "^5.0.2", "mdurl": "^2.0.0", "punycode.js": "^2.3.1", "uc.micro": "^2.1.0" @@ -3798,13 +3998,15 @@ }, "node_modules/markdown-it/node_modules/argparse": { "version": "2.0.1", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha1-JG9Q88p4oyQPbJl+ipvR6sSeSzg=", "dev": true, "license": "Python-2.0" }, "node_modules/math-intrinsics": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha1-oN10voHiqlwvJ+Zc4oNgXuTit/k=", "dev": true, "license": "MIT", "engines": { @@ -3812,14 +4014,16 @@ } }, "node_modules/mdurl": { - "version": "2.0.0", + "version": "2.1.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/mdurl/-/mdurl-2.1.0.tgz", + "integrity": "sha1-1xHT97zn8ixIfJG+eFRfNW+pZXM=", "dev": true, "license": "MIT" }, "node_modules/media-typer": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.1.tgz", - "integrity": "sha512-yz3xRaG20c6/BOzvYoDaGtPmGscs7YivItZEEqe6GbwNfHuxu9YNmvnEkMzKldAGY4/80pRcQRZSEnhquk9XuQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/media-typer/-/media-typer-1.1.1.tgz", + "integrity": "sha1-bwNUAN/jq51WB7x3VGzjDML5xrg=", "dev": true, "license": "MIT", "engines": { @@ -3832,8 +4036,8 @@ }, "node_modules/merge-descriptors": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", - "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/merge-descriptors/-/merge-descriptors-2.0.0.tgz", + "integrity": "sha1-6pIvZgY1oiSe5WXgRJ+VHmtgOAg=", "dev": true, "license": "MIT", "engines": { @@ -3845,8 +4049,8 @@ }, "node_modules/micromatch": { "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha1-1m+hjzpHB2eJMgubGvMr2G2fogI=", "dev": true, "license": "MIT", "dependencies": { @@ -3859,8 +4063,8 @@ }, "node_modules/mime-db": { "version": "1.54.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", - "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha1-zds+5PnGRTDf9kAjZmHULLajFPU=", "dev": true, "license": "MIT", "engines": { @@ -3869,8 +4073,8 @@ }, "node_modules/mime-types": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", - "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha1-OQAtQYJXXVrwNv+hGBAPJSSy4qs=", "dev": true, "license": "MIT", "dependencies": { @@ -3920,9 +4124,9 @@ } }, "node_modules/morgan": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.11.0.tgz", - "integrity": "sha512-zSkVu3t18r39pw4ixfBKvfZi3y2UOqr7d4WYwcj3m8nXpEQK4rPO6GLzs/CExoRgmX3y9EjmmcXqv6jq0SK46g==", + "version": "1.12.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/morgan/-/morgan-1.12.0.tgz", + "integrity": "sha1-V0XtlyzoojRDom/BKgQbU8+LDSI=", "dev": true, "license": "MIT", "dependencies": { @@ -3942,8 +4146,8 @@ }, "node_modules/morgan/node_modules/debug": { "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/debug/-/debug-2.6.9.tgz", + "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", "dev": true, "license": "MIT", "dependencies": { @@ -3952,8 +4156,8 @@ }, "node_modules/morgan/node_modules/ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true, "license": "MIT" }, @@ -3970,9 +4174,9 @@ "license": "MIT" }, "node_modules/multer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/multer/-/multer-2.2.0.tgz", - "integrity": "sha512-6rdyFg2kLrMh9Jee7/BMPuV9lEAd7lLW2YUpF9/YxR7njyoUwwQ0ZPh3TaIY50Sw6vlyD2HW3wGOkTS4P79xrQ==", + "version": "2.3.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/multer/-/multer-2.3.0.tgz", + "integrity": "sha1-RvWpjDTglmH/CJ+kmuSHhGvVtP0=", "dev": true, "license": "MIT", "dependencies": { @@ -3991,8 +4195,8 @@ }, "node_modules/multer/node_modules/media-typer": { "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", "dev": true, "license": "MIT", "engines": { @@ -4001,8 +4205,8 @@ }, "node_modules/multer/node_modules/mime-db": { "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha1-u6vNwChZ9JhzAchW4zh85exDv3A=", "dev": true, "license": "MIT", "engines": { @@ -4011,8 +4215,8 @@ }, "node_modules/multer/node_modules/mime-types": { "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha1-OBqHG2KnNEUGYK497uRIE/cNlZo=", "dev": true, "license": "MIT", "dependencies": { @@ -4024,8 +4228,8 @@ }, "node_modules/multer/node_modules/type-is": { "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha1-TlUs0F3wlGfcvE73Od6J8s83wTE=", "dev": true, "license": "MIT", "dependencies": { @@ -4046,6 +4250,8 @@ }, "node_modules/mute-stream": { "version": "3.0.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/mute-stream/-/mute-stream-3.0.0.tgz", + "integrity": "sha1-zYAU3SrLcuHpG7Z8dPABnmILotE=", "dev": true, "license": "ISC", "engines": { @@ -4072,19 +4278,40 @@ } }, "node_modules/negotiator": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", - "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", + "version": "1.1.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/negotiator/-/negotiator-1.1.0.tgz", + "integrity": "sha1-FuAD0NtKwk/Z3xaO34cWJd7q498=", "dev": true, "license": "MIT", + "dependencies": { + "content-type": "^2.1.0" + }, "engines": { - "node": ">= 0.6" + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/negotiator/node_modules/content-type": { + "version": "2.1.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/content-type/-/content-type-2.1.0.tgz", + "integrity": "sha1-2TicQ8Coz2o1XbRk0h4HCSpASTo=", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/object-inspect": { "version": "1.13.4", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", - "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha1-g3UmXiG8IND6WCwi4bE0hdbgAhM=", "dev": true, "license": "MIT", "engines": { @@ -4105,8 +4332,8 @@ }, "node_modules/on-finished": { "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha1-WMjEQRblSEWtV/FKsQsDUzGErD8=", "dev": true, "license": "MIT", "dependencies": { @@ -4118,8 +4345,8 @@ }, "node_modules/on-headers": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz", - "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/on-headers/-/on-headers-1.1.0.tgz", + "integrity": "sha1-WdpPkcRfX5icbkvO3Fo7Cu1w/2U=", "dev": true, "license": "MIT", "engines": { @@ -4128,8 +4355,8 @@ }, "node_modules/once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "license": "ISC", "dependencies": { @@ -4187,8 +4414,8 @@ }, "node_modules/parseurl": { "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ=", "dev": true, "license": "MIT", "engines": { @@ -4205,8 +4432,8 @@ }, "node_modules/path-expression-matcher": { "version": "1.6.2", - "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.6.2.tgz", - "integrity": "sha512-enSlaiat05iasnzmgNxRj8reFdj3puY2QpNgP1aPIaVfT6nn9ICuPoFlKHk8EN22HcwewshO+mN2DGbkCEOtqQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/path-expression-matcher/-/path-expression-matcher-1.6.2.tgz", + "integrity": "sha1-VnxzwHGX6dzvJOkO3NxXEFZZkWg=", "dev": true, "funding": [ { @@ -4249,8 +4476,8 @@ }, "node_modules/path-to-regexp": { "version": "8.4.2", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz", - "integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/path-to-regexp/-/path-to-regexp-8.4.2.tgz", + "integrity": "sha1-eVxCDE98pFxbiHNm9iLuDJhSzM0=", "dev": true, "license": "MIT", "funding": { @@ -4270,8 +4497,8 @@ }, "node_modules/picomatch": { "version": "2.3.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", - "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha1-WpQpFeJrNy3A8OZ1MUmhbmscVgE=", "dev": true, "license": "MIT", "engines": { @@ -4336,8 +4563,8 @@ }, "node_modules/proxy-addr": { "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha1-8Z/mnOqzEe65S0LnDowgcPm6ECU=", "dev": true, "license": "MIT", "dependencies": { @@ -4350,6 +4577,8 @@ }, "node_modules/punycode.js": { "version": "2.3.1", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha1-a1PlatdViCNOefSv+pCXLH3Yzbc=", "dev": true, "license": "MIT", "engines": { @@ -4357,9 +4586,9 @@ } }, "node_modules/qs": { - "version": "6.15.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.3.tgz", - "integrity": "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==", + "version": "6.16.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/qs/-/qs-6.16.0.tgz", + "integrity": "sha1-wixyOiipIPOqzc6Cifq9Q+zLef0=", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -4375,8 +4604,8 @@ }, "node_modules/range-parser": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.3.0.tgz", - "integrity": "sha512-hek2mFQpPuI4E1BBKrSto+BU3e3x4xuarsbiwr3+lf7p44juvFMV0XFWQAP3xUyqXA4RrXLIoaSUGbSt056ZMw==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/range-parser/-/range-parser-1.3.0.tgz", + "integrity": "sha1-1/Gb6BK7YnIUcrRdO+IZ7wlXK0c=", "dev": true, "license": "MIT", "engines": { @@ -4389,8 +4618,8 @@ }, "node_modules/raw-body": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz", - "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/raw-body/-/raw-body-3.0.2.tgz", + "integrity": "sha1-PjraWuVWj5CV2EN2/TpJuPsAClE=", "dev": true, "license": "MIT", "dependencies": { @@ -4405,8 +4634,8 @@ }, "node_modules/readable-stream": { "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha1-VqmzbqllwAxak+8x6xEaDxEFaWc=", "dev": true, "license": "MIT", "dependencies": { @@ -4498,8 +4727,8 @@ }, "node_modules/router": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", - "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/router/-/router-2.2.0.tgz", + "integrity": "sha1-AZvmILcRyHZBFnzHm5kJDwCxRu8=", "dev": true, "license": "MIT", "dependencies": { @@ -4543,6 +4772,8 @@ }, "node_modules/safer-buffer": { "version": "2.1.2", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=", "dev": true, "license": "MIT" }, @@ -4558,8 +4789,8 @@ }, "node_modules/send": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz", - "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/send/-/send-1.2.1.tgz", + "integrity": "sha1-nqt0O4dPNVD0CiaGe/KGrWDT8+0=", "dev": true, "license": "MIT", "dependencies": { @@ -4585,8 +4816,8 @@ }, "node_modules/serve-static": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz", - "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/serve-static/-/serve-static-2.2.1.tgz", + "integrity": "sha1-fxhqSk5fW2Y616QpT/G/N88OmKk=", "dev": true, "license": "MIT", "dependencies": { @@ -4605,8 +4836,8 @@ }, "node_modules/setprototypeof": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha1-ZsmiSnP5/CjL5msJ/tPTPcrxtCQ=", "dev": true, "license": "ISC" }, @@ -4631,8 +4862,8 @@ }, "node_modules/side-channel": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz", - "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/side-channel/-/side-channel-1.1.1.tgz", + "integrity": "sha1-6gLGLgXcS+pn1EQvD7ce4ZL44Ks=", "dev": true, "license": "MIT", "dependencies": { @@ -4651,8 +4882,8 @@ }, "node_modules/side-channel-list": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz", - "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/side-channel-list/-/side-channel-list-1.0.1.tgz", + "integrity": "sha1-wuC1oUpUCuvuO7xsP4ZmzJtQkSc=", "dev": true, "license": "MIT", "dependencies": { @@ -4668,8 +4899,8 @@ }, "node_modules/side-channel-map": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", - "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha1-1rtrN5Asb+9RdOX1M/q0xzKib0I=", "dev": true, "license": "MIT", "dependencies": { @@ -4687,8 +4918,8 @@ }, "node_modules/side-channel-weakmap": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", - "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha1-Ed2hnVNo5Azp7CvcH7DsvAeQ7Oo=", "dev": true, "license": "MIT", "dependencies": { @@ -4762,8 +4993,8 @@ }, "node_modules/statuses": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", - "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha1-j3XuzvdlteHPzcCA2llAntQk44I=", "dev": true, "license": "MIT", "engines": { @@ -4777,8 +5008,8 @@ }, "node_modules/streamsearch": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha1-QE3R4iR8qUr1VOhBqO8OqiONp2Q=", "dev": true, "engines": { "node": ">=10.0.0" @@ -4786,8 +5017,8 @@ }, "node_modules/string_decoder": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha1-QvEUWUpGzxqOMLCoT1bHjD7awh4=", "dev": true, "license": "MIT", "dependencies": { @@ -4827,9 +5058,9 @@ } }, "node_modules/strnum": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.4.1.tgz", - "integrity": "sha512-M9eUSMT2dCB2cTNPG7UYj6KuK7RJR2SN2+yCV/fTW3xzTCS6EaGZ5pSMgDIjB7r8zSfTGk+dvvn9rTjpVS9Mwg==", + "version": "2.4.2", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/strnum/-/strnum-2.4.2.tgz", + "integrity": "sha1-r0OrUaBtBCJwI/wuQsoikhTsEPA=", "dev": true, "funding": [ { @@ -4885,21 +5116,27 @@ } }, "node_modules/temporal-polyfill": { - "version": "1.0.1", + "version": "1.0.4", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/temporal-polyfill/-/temporal-polyfill-1.0.4.tgz", + "integrity": "sha1-qKuWbLfBDwyUkKpStLZpuhgq7GQ=", "dev": true, "license": "MIT", "dependencies": { - "temporal-spec": "1.0.0", - "temporal-utils": "1.0.1" + "temporal-spec": "1.0.1", + "temporal-utils": "1.0.2" } }, "node_modules/temporal-spec": { - "version": "1.0.0", + "version": "1.0.1", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/temporal-spec/-/temporal-spec-1.0.1.tgz", + "integrity": "sha1-VnnOLdAImGWv6A4Ki9IqkDPBZxc=", "dev": true, "license": "Apache-2.0" }, "node_modules/temporal-utils": { - "version": "1.0.1", + "version": "1.0.2", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/temporal-utils/-/temporal-utils-1.0.2.tgz", + "integrity": "sha1-qfJ7ZF/fUD5GnftN+MQh1pcHnb0=", "dev": true, "license": "MIT" }, @@ -5001,8 +5238,8 @@ }, "node_modules/to-regex-range": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha1-FkjESq58jZiKMmAY7XL1tN0DkuQ=", "dev": true, "license": "MIT", "dependencies": { @@ -5014,8 +5251,8 @@ }, "node_modules/toidentifier": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha1-O+NDIaiKgg7RvYDfqjPkefu43TU=", "dev": true, "license": "MIT", "engines": { @@ -5036,8 +5273,8 @@ }, "node_modules/type-is": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.1.0.tgz", - "integrity": "sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/type-is/-/type-is-2.1.0.tgz", + "integrity": "sha1-cdGnBTKTWC4WrJ8+uvGrmqSeVXA=", "dev": true, "license": "MIT", "dependencies": { @@ -5054,9 +5291,9 @@ } }, "node_modules/type-is/node_modules/content-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.0.0.tgz", - "integrity": "sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==", + "version": "2.1.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/content-type/-/content-type-2.1.0.tgz", + "integrity": "sha1-2TicQ8Coz2o1XbRk0h4HCSpASTo=", "dev": true, "license": "MIT", "engines": { @@ -5069,21 +5306,23 @@ }, "node_modules/typedarray": { "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true, "license": "MIT" }, "node_modules/typedoc": { - "version": "0.28.19", + "version": "0.28.20", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/typedoc/-/typedoc-0.28.20.tgz", + "integrity": "sha1-I8nIQVh8UotWz5wNAXynF3RbsNk=", "dev": true, "license": "Apache-2.0", "dependencies": { "@gerrit0/mini-shiki": "^3.23.0", "lunr": "^2.3.9", - "markdown-it": "^14.1.1", + "markdown-it": "^14.3.0", "minimatch": "^10.2.5", - "yaml": "^2.8.3" + "yaml": "^2.9.0" }, "bin": { "typedoc": "bin/typedoc" @@ -5097,7 +5336,9 @@ } }, "node_modules/typedoc-plugin-markdown": { - "version": "4.11.0", + "version": "4.13.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.13.0.tgz", + "integrity": "sha1-o3V8VyB+Ts7oXwDpcWNtBLnTNZ8=", "dev": true, "license": "MIT", "engines": { @@ -5108,11 +5349,13 @@ } }, "node_modules/typedoc/node_modules/minimatch": { - "version": "10.2.5", + "version": "10.2.6", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha1-/ZVrvgt3JB6fFaxdzLHGOAYJaO8=", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^5.0.5" + "brace-expansion": "^5.0.8" }, "engines": { "node": "18 || 20 || >=22" @@ -5135,6 +5378,8 @@ }, "node_modules/uc.micro": { "version": "2.1.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha1-+NP30OxMPeo1p+PI76TLi0XJ5+4=", "dev": true, "license": "MIT" }, @@ -5153,8 +5398,8 @@ }, "node_modules/unpipe": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", "dev": true, "license": "MIT", "engines": { @@ -5163,8 +5408,8 @@ }, "node_modules/util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true, "license": "MIT" }, @@ -5183,8 +5428,8 @@ }, "node_modules/vary": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", "dev": true, "license": "MIT", "engines": { @@ -5406,7 +5651,9 @@ } }, "node_modules/vscode-languageserver-textdocument": { - "version": "1.0.12", + "version": "1.0.14", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.14.tgz", + "integrity": "sha1-dzG4CLoakH41YNXkMXvNFLr4Gc4=", "dev": true, "license": "MIT" }, @@ -5508,8 +5755,8 @@ }, "node_modules/wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true, "license": "ISC" }, @@ -5548,8 +5795,8 @@ }, "node_modules/xml-naming": { "version": "0.3.0", - "resolved": "https://registry.npmjs.org/xml-naming/-/xml-naming-0.3.0.tgz", - "integrity": "sha512-ghig2TBE/H11aOVgmahA3MhimvkBr6JIYknH/Dhdk10nXwdbIqBJsbfMxpvFPG8bAw77gN29aQWvKpmVoPlvPQ==", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/xml-naming/-/xml-naming-0.3.0.tgz", + "integrity": "sha1-RsHhi/4oWEeZgt0qzPNNFudJ7aI=", "dev": true, "funding": [ { @@ -5595,14 +5842,16 @@ } }, "node_modules/yargs": { - "version": "18.0.0", + "version": "18.1.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/yargs/-/yargs-18.1.0.tgz", + "integrity": "sha1-zX6YxwPvUWlbu/Bi7VjyjpQpG1Y=", "dev": true, "license": "MIT", "dependencies": { "cliui": "^9.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", - "string-width": "^7.2.0", + "string-width": "^8.2.1", "y18n": "^5.0.5", "yargs-parser": "^22.0.0" }, @@ -5621,7 +5870,9 @@ } }, "node_modules/yargs/node_modules/ansi-regex": { - "version": "6.2.2", + "version": "6.3.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/ansi-regex/-/ansi-regex-6.3.0.tgz", + "integrity": "sha1-JHyOe3ChpDsQzhTAIm/L9Y6IFdU=", "dev": true, "license": "MIT", "engines": { @@ -5631,22 +5882,18 @@ "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/yargs/node_modules/emoji-regex": { - "version": "10.6.0", - "dev": true, - "license": "MIT" - }, "node_modules/yargs/node_modules/string-width": { - "version": "7.2.0", + "version": "8.2.2", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/string-width/-/string-width-8.2.2.tgz", + "integrity": "sha1-cxBRZJPfV1dC/pivb66H2F1e0Kw=", "dev": true, "license": "MIT", "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" + "get-east-asian-width": "^1.5.0", + "strip-ansi": "^7.1.2" }, "engines": { - "node": ">=18" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5654,6 +5901,8 @@ }, "node_modules/yargs/node_modules/strip-ansi": { "version": "7.2.0", + "resolved": "https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha1-0iomlSKDamJ6+NBLXD/Sx/o+MuM=", "dev": true, "license": "MIT", "dependencies": { diff --git a/packages/http-client-csharp/package.json b/packages/http-client-csharp/package.json index 32197bbd41d..5a6b29a76e2 100644 --- a/packages/http-client-csharp/package.json +++ b/packages/http-client-csharp/package.json @@ -58,38 +58,38 @@ "emitter/lib/*.tsp" ], "peerDependencies": { - "@azure-tools/typespec-azure-core": ">=0.71.0 <0.72.0 || ~0.72.0-0", - "@azure-tools/typespec-client-generator-core": ">=0.71.2 <0.72.0 || ~0.72.0-0", - "@typespec/compiler": "^1.15.0", - "@typespec/events": ">=0.85.0 <0.86.0 || ~0.86.0-0", - "@typespec/http": "^1.15.0", - "@typespec/openapi": "^1.15.0", - "@typespec/rest": ">=0.85.0 <0.86.0 || ~0.86.0-0", - "@typespec/sse": ">=0.85.0 <0.86.0 || ~0.86.0-0", - "@typespec/streams": ">=0.85.0 <0.86.0 || ~0.86.0-0", - "@typespec/versioning": ">=0.85.0 <0.86.0 || ~0.86.0-0" + "@azure-tools/typespec-azure-core": ">=0.72.0 <0.73.0 || ~0.73.0-0", + "@azure-tools/typespec-client-generator-core": ">=0.72.0 <0.73.0 || ~0.73.0-0", + "@typespec/compiler": "^1.16.0", + "@typespec/events": ">=0.86.0 <0.87.0 || ~0.87.0-0", + "@typespec/http": "^1.16.0", + "@typespec/openapi": "^1.16.0", + "@typespec/rest": ">=0.86.0 <0.87.0 || ~0.87.0-0", + "@typespec/sse": ">=0.86.0 <0.87.0 || ~0.87.0-0", + "@typespec/streams": ">=0.86.0 <0.87.0 || ~0.87.0-0", + "@typespec/versioning": ">=0.86.0 <0.87.0 || ~0.87.0-0" }, "devDependencies": { - "@azure-tools/azure-http-specs": "0.1.0-alpha.44", - "@azure-tools/typespec-azure-core": "0.71.0", - "@azure-tools/typespec-client-generator-core": "0.71.2", + "@azure-tools/azure-http-specs": "0.1.0-alpha.45", + "@azure-tools/typespec-azure-core": "0.72.0", + "@azure-tools/typespec-client-generator-core": "0.72.0", "@microsoft/api-extractor": "^7.52.2", "@types/node": "~22.12.0", - "@typespec/compiler": "1.15.0", - "@typespec/events": "0.85.0", - "@typespec/http": "1.15.0", - "@typespec/http-specs": "0.1.0-alpha.42-dev.3", - "@typespec/json-schema": "1.15.0", - "@typespec/library-linter": "0.85.0", - "@typespec/openapi": "1.15.0", - "@typespec/rest": "0.85.0", - "@typespec/spec-api": "0.1.0-alpha.16", - "@typespec/spector": "0.1.0-alpha.28", - "@typespec/sse": "0.85.0", - "@typespec/streams": "0.85.0", - "@typespec/tspd": "0.77.0", - "@typespec/versioning": "0.85.0", - "@typespec/xml": "0.85.0", + "@typespec/compiler": "1.16.0", + "@typespec/events": "0.86.0", + "@typespec/http": "1.16.0", + "@typespec/http-specs": "0.1.0-alpha.42", + "@typespec/json-schema": "1.16.0", + "@typespec/library-linter": "0.86.0", + "@typespec/openapi": "1.16.0", + "@typespec/rest": "0.86.0", + "@typespec/spec-api": "0.1.0-alpha.17", + "@typespec/spector": "0.1.0-alpha.29", + "@typespec/sse": "0.86.0", + "@typespec/streams": "0.86.0", + "@typespec/tspd": "0.77.1", + "@typespec/versioning": "0.86.0", + "@typespec/xml": "0.86.0", "@vitest/coverage-v8": "^4.1.8", "@vitest/ui": "^4.1.8", "c8": "^12.0.0", From 922b9475a841c247a8d553f569828058d9dc1fe0 Mon Sep 17 00:00:00 2001 From: jolov Date: Wed, 9 Sep 2026 18:18:18 -0700 Subject: [PATCH 3/8] fix(http-client-csharp): disambiguate customized SSE models Support namespace-qualified CodeGenType mappings, preserve used customization attributes in stubs, and regenerate fixtures for the full TypeSpec upgrade. Keep streaming scenario tests in their separate PR. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../src/StubLibraryVisitor.cs | 31 + .../test/InputLibraryVisitorTests.cs | 45 + ...ypeSpec.Generator.ClientModel.Tests.csproj | 1 + .../Model.cs | 18 + .../Model.cs | 13 + .../src/Properties/launchSettings.json | 5 + .../src/SourceInput/SourceInputModel.cs | 5 +- .../ModelProviders/ModelCustomizationTests.cs | 77 +- .../FirstStatus.cs | 11 + .../ProtocolInfo.cs | 11 + .../CustomModels.cs | 16 + .../CustomModels.cs | 16 + .../body-or-no-content/Configuration.json | 3 + .../Response.BodyOrNoContent.NuGet.targets | 6 + .../Response.BodyOrNoContent.slnx | 3 + .../src/Generated/BodyOrNoContentClient.cs | 43 + .../Generated/BodyOrNoContentClientOptions.cs | 18 + .../BodyOrNoContentClientSettings.cs | 29 + .../Models/BlobLayout.Serialization.cs | 36 + .../src/Generated/Models/BlobLayout.cs | 11 + .../Models/ResponseBodyOrNoContentContext.cs | 13 + .../ResponseBodyOrNoContentModelFactory.cs | 11 + .../Generated/schema/ConfigurationSchema.json | 40 + .../src/Response.BodyOrNoContent.csproj | 20 + .../body-or-no-content/tspCodeModel.json | 396 ++++ .../streaming/sse/src/Custom/ProtocolInfo.cs | 12 + .../Internal/CodeGenTypeAttribute.cs | 16 + .../Models/ProtocolInfo.Serialization.cs | 33 + .../sse/src/Generated/Models/ProtocolInfo.cs | 11 + .../Generated/Models/StreamingSseContext.cs | 2 + .../streaming/sse/src/Generated/Protocol.cs | 65 + .../sse/src/Generated/ProtocolData.cs | 38 + .../streaming/sse/src/Generated/SseClient.cs | 3 + .../src/Generated/StreamingSseModelFactory.cs | 3 + .../http/streaming/sse/tspCodeModel.json | 1610 +++++++++++++++-- .../generator/docs/architecture.md | 4 +- 36 files changed, 2556 insertions(+), 119 deletions(-) create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/InputLibraryVisitorTests/StubKeepsInheritedCustomizationAttributes/Model.cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/InputLibraryVisitorTests/StubKeepsUsedCustomizationAttributes/Model.cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameEnumByQualifiedName/FirstStatus.cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameModelByQualifiedName/ProtocolInfo.cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameModelsByQualifiedNames/CustomModels.cs create mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/QualifiedNameOverridesSimpleName/CustomModels.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Configuration.json create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.NuGet.targets create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.slnx create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClient.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientOptions.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientSettings.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/ResponseBodyOrNoContentContext.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/ResponseBodyOrNoContentModelFactory.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/schema/ConfigurationSchema.json create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Response.BodyOrNoContent.csproj create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/tspCodeModel.json create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Custom/ProtocolInfo.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Internal/CodeGenTypeAttribute.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.Serialization.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Protocol.cs create mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/ProtocolData.cs diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel.StubLibrary/src/StubLibraryVisitor.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel.StubLibrary/src/StubLibraryVisitor.cs index fb41de57dcc..9a88666da69 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel.StubLibrary/src/StubLibraryVisitor.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel.StubLibrary/src/StubLibraryVisitor.cs @@ -3,7 +3,10 @@ using System; using System.ClientModel.Primitives; +using System.Collections.Generic; using System.Linq; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.TypeSpec.Generator.ClientModel.Providers; using Microsoft.TypeSpec.Generator.Expressions; using Microsoft.TypeSpec.Generator.Primitives; @@ -15,10 +18,38 @@ namespace Microsoft.TypeSpec.Generator.ClientModel.StubLibrary internal class StubLibraryVisitor : ScmLibraryVisitor { private readonly ValueExpression _throwNull = ThrowExpression(Null); + private readonly Lazy> _usedCustomizationAttributes = new(GetUsedCustomizationAttributes); + + private static HashSet GetUsedCustomizationAttributes() + { + var names = new HashSet(StringComparer.Ordinal); + var compilation = CodeModelGenerator.Instance.SourceInputModel.Customization; + if (compilation is not null) + { + foreach (var syntaxTree in compilation.SyntaxTrees) + { + var semanticModel = compilation.GetSemanticModel(syntaxTree); + foreach (var attribute in syntaxTree.GetRoot().DescendantNodes().OfType()) + { + for (var type = semanticModel.GetTypeInfo(attribute).Type as INamedTypeSymbol; + type is not null; + type = type.BaseType) + { + names.Add(type.ToDisplayString()); + } + } + } + } + + return names; + } protected override TypeProvider? VisitType(TypeProvider type) { + var isUsedCustomizationAttribute = type is CustomCodeAttributeDefinition && + _usedCustomizationAttributes.Value.Contains($"{type.Type.Namespace}.{type.Name}"); if (!type.DeclarationModifiers.HasFlag(TypeSignatureModifiers.Public) && + !isUsedCustomizationAttribute && !type.Name.StartsWith("Unknown", StringComparison.Ordinal) && !type.Name.Equals("MultiPartFormDataBinaryContent", StringComparison.Ordinal)) { diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/InputLibraryVisitorTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/InputLibraryVisitorTests.cs index c330959a947..1b1fdf10021 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/InputLibraryVisitorTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/InputLibraryVisitorTests.cs @@ -1,7 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; using Microsoft.TypeSpec.Generator.ClientModel.Providers; +using Microsoft.TypeSpec.Generator.ClientModel.StubLibrary; using Microsoft.TypeSpec.Generator.Input; using Microsoft.TypeSpec.Generator.Providers; using Microsoft.TypeSpec.Generator.Tests.Common; @@ -30,6 +34,47 @@ public void Setup() _mockVisitor = new Mock { CallBase = true }; } + [Test] + public void StubDropsUnusedCustomizationAttributes() + { + Assert.IsEmpty(VisitStubCustomizationAttributes(_mockGenerator.Object)); + } + + [Test] + public async Task StubKeepsUsedCustomizationAttributes() + { + var generator = await MockHelpers.LoadMockGeneratorAsync( + compilation: async () => await Helpers.GetCompilationFromDirectoryAsync()); + + var attributes = VisitStubCustomizationAttributes(generator.Object); + + Assert.That(attributes.Select(attribute => attribute.Name), + Is.EquivalentTo(new[] { "CodeGenTypeAttribute", "CodeGenMemberAttribute" })); + } + + [Test] + public async Task StubKeepsInheritedCustomizationAttributes() + { + var generator = await MockHelpers.LoadMockGeneratorAsync( + compilation: async () => await Helpers.GetCompilationFromDirectoryAsync()); + + var attributes = VisitStubCustomizationAttributes(generator.Object); + + Assert.That(attributes.Select(attribute => attribute.Name), + Is.EquivalentTo(new[] { "CodeGenTypeAttribute" })); + } + + private static IReadOnlyList VisitStubCustomizationAttributes(ScmCodeModelGenerator generator) + { + CodeModelGenerator stubGenerator = new StubLibraryGenerator(new GeneratorContext(generator.Configuration)); + stubGenerator.Configure(); + var library = new OutputLibrary { TypeProviders = generator.CustomCodeAttributeProviders }; + + stubGenerator.Visitors.Last().VisitLibrary(library); + + return library.TypeProviders; + } + [Test] public void PreVisitsMethods() { diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Microsoft.TypeSpec.Generator.ClientModel.Tests.csproj b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Microsoft.TypeSpec.Generator.ClientModel.Tests.csproj index 94476387728..989562ac0ca 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Microsoft.TypeSpec.Generator.ClientModel.Tests.csproj +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Microsoft.TypeSpec.Generator.ClientModel.Tests.csproj @@ -3,6 +3,7 @@ + diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/InputLibraryVisitorTests/StubKeepsInheritedCustomizationAttributes/Model.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/InputLibraryVisitorTests/StubKeepsInheritedCustomizationAttributes/Model.cs new file mode 100644 index 00000000000..55893c38495 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/InputLibraryVisitorTests/StubKeepsInheritedCustomizationAttributes/Model.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Microsoft.TypeSpec.Generator.Customizations; + +namespace Sample; + +internal class CustomCodeGenTypeAttribute : CodeGenTypeAttribute +{ + public CustomCodeGenTypeAttribute(string originalName) : base(originalName) + { + } +} + +[CustomCodeGenType("Info")] +public partial class Model +{ +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/InputLibraryVisitorTests/StubKeepsUsedCustomizationAttributes/Model.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/InputLibraryVisitorTests/StubKeepsUsedCustomizationAttributes/Model.cs new file mode 100644 index 00000000000..dbfa359bde2 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/InputLibraryVisitorTests/StubKeepsUsedCustomizationAttributes/Model.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Microsoft.TypeSpec.Generator.Customizations; + +namespace Sample; + +[CodeGenType("Info")] +public partial class Model +{ + [CodeGenMember("message")] + public string Message { get; } +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Properties/launchSettings.json b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Properties/launchSettings.json index 9427460fad8..1bcac457815 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Properties/launchSettings.json +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Properties/launchSettings.json @@ -160,6 +160,11 @@ "commandName": "Executable", "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.exe" }, + "http-response-body-or-no-content": { + "commandLineArgs": "$(SolutionDir)/TestProjects/Spector/http/response/body-or-no-content -g StubLibraryGenerator", + "commandName": "Executable", + "executablePath": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.exe" + }, "http-response-status-code-range": { "commandLineArgs": "$(SolutionDir)/TestProjects/Spector/http/response/status-code-range -g StubLibraryGenerator", "commandName": "Executable", diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/SourceInput/SourceInputModel.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/SourceInput/SourceInputModel.cs index 18ed06828ff..1be31d11829 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/SourceInput/SourceInputModel.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/SourceInput/SourceInputModel.cs @@ -121,10 +121,11 @@ private static string GetFullyQualifiedMetadataName(string ns, string name, stri var fullyQualifiedMetadataName = GetFullyQualifiedMetadataName(ns, name, declaringTypeName); - // Either find by the CodeGenType attribute in customization or by the actual type name. + // Qualified CodeGenType names take precedence so same-named types can be customized independently. INamedTypeSymbol? type = null; if (ReferenceEquals(compilation, Customization) && - _nameMap.Value.TryGetValue(name, out var mappedType) && + (_nameMap.Value.TryGetValue(fullyQualifiedMetadataName, out var mappedType) || + _nameMap.Value.TryGetValue(name, out mappedType)) && IsContainingTypeMatch(mappedType, ns, declaringTypeName)) { type = mappedType; diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/ModelCustomizationTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/ModelCustomizationTests.cs index cefa2e2685f..55cfcec65c2 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/ModelCustomizationTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/ModelCustomizationTests.cs @@ -34,6 +34,81 @@ public async Task CanChangeModelName() AssertCommon(modelTypeProvider, "NewNamespace.Models", "CustomizedModel"); } + [Test] + public async Task CanRenameModelByQualifiedName() + { + var unnamed = InputFactory.Model("Info", @namespace: "Sample.Unnamed"); + var protocol = InputFactory.Model("Info", @namespace: "Sample.Protocol"); + var mockGenerator = await MockHelpers.LoadMockGeneratorAsync( + inputModelTypes: [unnamed, protocol], + compilation: async () => await Helpers.GetCompilationFromDirectoryAsync()); + + var providers = mockGenerator.Object.OutputLibrary.TypeProviders; + var models = providers.OfType().ToArray(); + var unnamedProvider = models.Single(model => model.Type.Namespace == "Sample.Unnamed"); + var protocolProvider = models.Single(model => model.Type.Namespace == "Sample.Protocol"); + + Assert.IsNull(unnamedProvider.CustomCodeView); + Assert.AreEqual("Info", unnamedProvider.Name); + AssertCommon(protocolProvider, "Sample.Protocol", "ProtocolInfo"); + Assert.AreNotEqual(unnamedProvider.RelativeFilePath, protocolProvider.RelativeFilePath); + + var factory = providers.Single(provider => provider is ModelFactoryProvider); + Assert.That(factory.Methods.Select(method => method.Signature.Name), + Is.EquivalentTo(new[] { "Info", "ProtocolInfo" })); + Assert.That(factory.Methods.Select(method => method.Signature.ReturnType), + Is.EquivalentTo(new[] { unnamedProvider.Type, protocolProvider.Type })); + + Assert.IsNull(mockGenerator.Object.SourceInputModel.FindForTypeInCurrentCompilation("Sample.protocol", "Info")); + var differentName = new ModelProvider(InputFactory.Model("Other", @namespace: "Sample.Protocol")); + Assert.IsNull(differentName.CustomCodeView); + Assert.AreEqual("Other", differentName.Name); + } + + [Test] + public async Task CanRenameModelsByQualifiedNames() + { + await MockHelpers.LoadMockGeneratorAsync( + compilation: async () => await Helpers.GetCompilationFromDirectoryAsync()); + + var unnamed = new ModelProvider(InputFactory.Model("Info", @namespace: "Sample.Unnamed")); + var protocol = new ModelProvider(InputFactory.Model("Info", @namespace: "Sample.Protocol")); + + AssertCommon(unnamed, "Customized.Models", "UnnamedInfo"); + AssertCommon(protocol, "Customized.Models", "ProtocolInfo"); + Assert.AreNotEqual(unnamed.RelativeFilePath, protocol.RelativeFilePath); + } + + [Test] + public async Task QualifiedNameOverridesSimpleName() + { + await MockHelpers.LoadMockGeneratorAsync( + compilation: async () => await Helpers.GetCompilationFromDirectoryAsync()); + + var unnamed = new ModelProvider(InputFactory.Model("Info", @namespace: "Sample.Unnamed")); + var protocol = new ModelProvider(InputFactory.Model("Info", @namespace: "Sample.Protocol")); + + AssertCommon(unnamed, "Customized.Models", "DefaultInfo"); + AssertCommon(protocol, "Customized.Models", "ProtocolInfo"); + } + + [Test] + public async Task CanRenameEnumByQualifiedName() + { + await MockHelpers.LoadMockGeneratorAsync( + compilation: async () => await Helpers.GetCompilationFromDirectoryAsync()); + + var first = new FixedEnumProvider( + InputFactory.StringEnum("Status", [("ready", "ready")], clientNamespace: "Sample.First"), null); + var second = new FixedEnumProvider( + InputFactory.StringEnum("Status", [("ready", "ready")], clientNamespace: "Sample.Second"), null); + + AssertCommon(first, "Customized.Models", "FirstStatus"); + Assert.IsNull(second.CustomCodeView); + Assert.AreEqual("Status", second.Name); + Assert.AreEqual("Sample.Second", second.Type.Namespace); + } + [Test] public async Task CanChangeEnumName() { @@ -69,7 +144,7 @@ public async Task CanChangePropertyName() Assert.AreEqual("Prop2", modelTypeProvider.CustomCodeView.Properties[0].Name); var wireInfo = modelTypeProvider.CustomCodeView.Properties[0].WireInfo; Assert.IsNotNull(wireInfo); - Assert.AreEqual( "prop1", wireInfo!.SerializedName); + Assert.AreEqual("prop1", wireInfo!.SerializedName); Assert.AreEqual(0, modelTypeProvider.Properties.Count); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameEnumByQualifiedName/FirstStatus.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameEnumByQualifiedName/FirstStatus.cs new file mode 100644 index 00000000000..0e149009221 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameEnumByQualifiedName/FirstStatus.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Microsoft.TypeSpec.Generator.Customizations; + +namespace Customized.Models; + +[CodeGenType("Sample.First.Status")] +public enum FirstStatus +{ +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameModelByQualifiedName/ProtocolInfo.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameModelByQualifiedName/ProtocolInfo.cs new file mode 100644 index 00000000000..e18d1ab1b32 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameModelByQualifiedName/ProtocolInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Microsoft.TypeSpec.Generator.Customizations; + +namespace Sample.Protocol; + +[CodeGenType("Sample.Protocol.Info")] +public partial class ProtocolInfo +{ +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameModelsByQualifiedNames/CustomModels.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameModelsByQualifiedNames/CustomModels.cs new file mode 100644 index 00000000000..7fdedfc86aa --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameModelsByQualifiedNames/CustomModels.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Microsoft.TypeSpec.Generator.Customizations; + +namespace Customized.Models; + +[CodeGenType("Sample.Unnamed.Info")] +public partial class UnnamedInfo +{ +} + +[CodeGenType("Sample.Protocol.Info")] +public partial class ProtocolInfo +{ +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/QualifiedNameOverridesSimpleName/CustomModels.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/QualifiedNameOverridesSimpleName/CustomModels.cs new file mode 100644 index 00000000000..969da7d06ec --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/QualifiedNameOverridesSimpleName/CustomModels.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Microsoft.TypeSpec.Generator.Customizations; + +namespace Customized.Models; + +[CodeGenType("Info")] +public partial class DefaultInfo +{ +} + +[CodeGenType("Sample.Protocol.Info")] +public partial class ProtocolInfo +{ +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Configuration.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Configuration.json new file mode 100644 index 00000000000..d31d8ac85ec --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Configuration.json @@ -0,0 +1,3 @@ +{ + "package-name": "Response.BodyOrNoContent" +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.slnx b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.slnx new file mode 100644 index 00000000000..382b2c55d6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/Response.BodyOrNoContent.slnx @@ -0,0 +1,3 @@ + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClient.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClient.cs new file mode 100644 index 00000000000..7e06136ebe6 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClient.cs @@ -0,0 +1,43 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Diagnostics.CodeAnalysis; +using System.Threading; +using System.Threading.Tasks; + +namespace Response.BodyOrNoContent +{ + public partial class BodyOrNoContentClient + { + public BodyOrNoContentClient() : this(new Uri("http://localhost:3000"), new BodyOrNoContentClientOptions()) => throw null; + + internal BodyOrNoContentClient(AuthenticationPolicy authenticationPolicy, Uri endpoint, BodyOrNoContentClientOptions options) => throw null; + + public BodyOrNoContentClient(Uri endpoint, BodyOrNoContentClientOptions options) : this(null, endpoint, options) => throw null; + + [Experimental("SCME0002")] + public BodyOrNoContentClient(BodyOrNoContentClientSettings settings) : this(AuthenticationPolicy.Create(settings), settings?.Endpoint, settings?.Options) => throw null; + + public ClientPipeline Pipeline => throw null; + + public virtual ClientResult GetBody(RequestOptions options) => throw null; + + public virtual Task GetBodyAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetBody(CancellationToken cancellationToken = default) => throw null; + + public virtual Task> GetBodyAsync(CancellationToken cancellationToken = default) => throw null; + + public virtual ClientResult GetNoContent(RequestOptions options) => throw null; + + public virtual Task GetNoContentAsync(RequestOptions options) => throw null; + + public virtual ClientResult GetNoContent(CancellationToken cancellationToken = default) => throw null; + + public virtual Task> GetNoContentAsync(CancellationToken cancellationToken = default) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientOptions.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientOptions.cs new file mode 100644 index 00000000000..29d31ba6a55 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientOptions.cs @@ -0,0 +1,18 @@ +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Diagnostics.CodeAnalysis; +using Microsoft.Extensions.Configuration; + +namespace Response.BodyOrNoContent +{ + public partial class BodyOrNoContentClientOptions : ClientPipelineOptions + { + public BodyOrNoContentClientOptions() => throw null; + + [Experimental("SCME0002")] + internal BodyOrNoContentClientOptions(IConfigurationSection section) : base(section) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientSettings.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientSettings.cs new file mode 100644 index 00000000000..c05c2fa5f98 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/BodyOrNoContentClientSettings.cs @@ -0,0 +1,29 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Diagnostics.CodeAnalysis; +using Microsoft.Extensions.Configuration; + +namespace Response.BodyOrNoContent +{ + [Experimental("SCME0002")] + public partial class BodyOrNoContentClientSettings : ClientSettings + { + public Uri Endpoint + { + get => throw null; + set => throw null; + } + + public BodyOrNoContentClientOptions Options + { + get => throw null; + set => throw null; + } + + protected override void BindCore(IConfigurationSection section) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.Serialization.cs new file mode 100644 index 00000000000..80fbdd3c5de --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.Serialization.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Response.BodyOrNoContent +{ + public partial class BlobLayout : IJsonModel + { + internal BlobLayout() => throw null; + + protected virtual BlobLayout PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + BlobLayout IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + public static explicit operator BlobLayout(ClientResult result) => throw null; + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + BlobLayout IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual BlobLayout JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.cs new file mode 100644 index 00000000000..3393c6ec295 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/BlobLayout.cs @@ -0,0 +1,11 @@ +// + +#nullable disable + +namespace Response.BodyOrNoContent +{ + public partial class BlobLayout + { + public string Content => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/ResponseBodyOrNoContentContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/ResponseBodyOrNoContentContext.cs new file mode 100644 index 00000000000..35e55d83662 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/Models/ResponseBodyOrNoContentContext.cs @@ -0,0 +1,13 @@ +// + +#nullable disable + +using System.ClientModel.Primitives; + +namespace Response.BodyOrNoContent +{ + [ModelReaderWriterBuildable(typeof(BlobLayout))] + public partial class ResponseBodyOrNoContentContext : ModelReaderWriterContext + { + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/ResponseBodyOrNoContentModelFactory.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/ResponseBodyOrNoContentModelFactory.cs new file mode 100644 index 00000000000..7ac0d608a85 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/ResponseBodyOrNoContentModelFactory.cs @@ -0,0 +1,11 @@ +// + +#nullable disable + +namespace Response.BodyOrNoContent +{ + public static partial class ResponseBodyOrNoContentModelFactory + { + public static BlobLayout BlobLayout(string content = default) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..580d55fad54 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Generated/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "BodyOrNoContentClient": { + "type": "object", + "description": "Configuration for BodyOrNoContentClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/bodyOrNoContentClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "bodyOrNoContentClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Response.BodyOrNoContent.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Response.BodyOrNoContent.csproj new file mode 100644 index 00000000000..a9176222465 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/src/Response.BodyOrNoContent.csproj @@ -0,0 +1,20 @@ + + + This is the Response.BodyOrNoContent client library for developing .NET applications with rich experience. + SDK Code Generation Response.BodyOrNoContent + 1.0.0-beta.1 + Response.BodyOrNoContent + netstandard2.0;net8.0 + latest + true + + + + + + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/tspCodeModel.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/tspCodeModel.json new file mode 100644 index 00000000000..4fd2882cc98 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/body-or-no-content/tspCodeModel.json @@ -0,0 +1,396 @@ +{ + "name": "Response.BodyOrNoContent", + "apiVersions": [], + "enums": [], + "constants": [ + { + "$id": "1", + "kind": "constant", + "name": "GetBodyAccept", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "2", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [], + "isExactName": false + }, + { + "$id": "3", + "kind": "constant", + "name": "GetBodyAccept1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "4", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [], + "isExactName": false + } + ], + "models": [ + { + "$id": "5", + "kind": "model", + "name": "BlobLayout", + "apiVersions": [], + "namespace": "Response.BodyOrNoContent", + "crossLanguageDefinitionId": "Response.BodyOrNoContent.BlobLayout", + "usage": "Output,Json", + "decorators": [], + "serializationOptions": { + "json": { + "name": "BlobLayout" + } + }, + "isExactName": false, + "properties": [ + { + "$id": "6", + "kind": "property", + "name": "content", + "apiVersions": [], + "serializedName": "content", + "type": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Response.BodyOrNoContent.BlobLayout.content", + "serializationOptions": { + "json": { + "name": "content" + } + }, + "isHttpMetadata": false, + "isExactName": false + } + ] + } + ], + "clients": [ + { + "$id": "8", + "kind": "client", + "name": "BodyOrNoContentClient", + "isExactName": false, + "namespace": "Response.BodyOrNoContent", + "doc": "Test for operations whose successful response is either a model body (200) or no content (204).", + "methods": [ + { + "$id": "9", + "kind": "basic", + "name": "getBody", + "isExactName": false, + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "10", + "name": "getBody", + "isExactName": false, + "resourceName": "BodyOrNoContent", + "accessibility": "public", + "parameters": [ + { + "$id": "11", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "1" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Response.BodyOrNoContent.getBody.accept", + "methodParameterSegments": [ + { + "$id": "12", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "1" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Response.BodyOrNoContent.getBody.accept", + "readOnly": false, + "access": "public", + "decorators": [], + "isExactName": false + } + ], + "isExactName": false + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "5" + }, + "headers": [ + { + "name": "requestId", + "nameInResponse": "x-ms-request-id", + "type": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ], + "serializationOptions": { + "json": { + "name": "" + } + } + }, + { + "statusCodes": [ + 204 + ], + "headers": [ + { + "name": "requestId", + "nameInResponse": "x-ms-request-id", + "type": { + "$id": "14", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "serializationOptions": {} + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/response/body-or-no-content/body", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Response.BodyOrNoContent.getBody", + "decorators": [], + "namespace": "Response.BodyOrNoContent" + }, + "parameters": [ + { + "$ref": "12" + } + ], + "response": { + "type": { + "$ref": "5" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Response.BodyOrNoContent.getBody" + }, + { + "$id": "15", + "kind": "basic", + "name": "getNoContent", + "isExactName": false, + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "16", + "name": "getNoContent", + "isExactName": false, + "resourceName": "BodyOrNoContent", + "accessibility": "public", + "parameters": [ + { + "$id": "17", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "3" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Response.BodyOrNoContent.getNoContent.accept", + "methodParameterSegments": [ + { + "$id": "18", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "3" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Response.BodyOrNoContent.getNoContent.accept", + "readOnly": false, + "access": "public", + "decorators": [], + "isExactName": false + } + ], + "isExactName": false + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "5" + }, + "headers": [ + { + "name": "requestId", + "nameInResponse": "x-ms-request-id", + "type": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ], + "serializationOptions": { + "json": { + "name": "" + } + } + }, + { + "statusCodes": [ + 204 + ], + "headers": [ + { + "name": "requestId", + "nameInResponse": "x-ms-request-id", + "type": { + "$id": "20", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "serializationOptions": {} + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/response/body-or-no-content/no-content", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Response.BodyOrNoContent.getNoContent", + "decorators": [], + "namespace": "Response.BodyOrNoContent" + }, + "parameters": [ + { + "$ref": "18" + } + ], + "response": { + "type": { + "$ref": "5" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Response.BodyOrNoContent.getNoContent" + } + ], + "parameters": [ + { + "$id": "21", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "22", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Response.BodyOrNoContent.endpoint", + "isExactName": false + } + ], + "initializedBy": 1, + "decorators": [], + "crossLanguageDefinitionId": "Response.BodyOrNoContent", + "apiVersions": [], + "isMultiServiceClient": false + } + ] +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Custom/ProtocolInfo.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Custom/ProtocolInfo.cs new file mode 100644 index 00000000000..ddb965c26ed --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Custom/ProtocolInfo.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Microsoft.TypeSpec.Generator.Customizations; + +namespace Streaming.Sse._Protocol +{ + [CodeGenType("Streaming.Sse._Protocol.Info")] + public partial class ProtocolInfo + { + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Internal/CodeGenTypeAttribute.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Internal/CodeGenTypeAttribute.cs new file mode 100644 index 00000000000..514d9661ed8 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Internal/CodeGenTypeAttribute.cs @@ -0,0 +1,16 @@ +// + +#nullable disable + +using System; + +namespace Microsoft.TypeSpec.Generator.Customizations +{ + [AttributeUsage((AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Struct))] + internal partial class CodeGenTypeAttribute : Attribute + { + public CodeGenTypeAttribute(string originalName) => throw null; + + public string OriginalName => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.Serialization.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.Serialization.cs new file mode 100644 index 00000000000..b6cff986cdb --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.Serialization.cs @@ -0,0 +1,33 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Streaming.Sse._Protocol +{ + public partial class ProtocolInfo : IJsonModel + { + internal ProtocolInfo() => throw null; + + protected virtual ProtocolInfo PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + ProtocolInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + ProtocolInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual ProtocolInfo JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.cs new file mode 100644 index 00000000000..1612588a909 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/ProtocolInfo.cs @@ -0,0 +1,11 @@ +// + +#nullable disable + +namespace Streaming.Sse._Protocol +{ + public partial class ProtocolInfo + { + public string Message => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/StreamingSseContext.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/StreamingSseContext.cs index 9f2a25d8a49..818a6b5e81d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/StreamingSseContext.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Models/StreamingSseContext.cs @@ -3,12 +3,14 @@ #nullable disable using System.ClientModel.Primitives; +using Streaming.Sse._Protocol; using Streaming.Sse._Retrieve; using Streaming.Sse._Unnamed; namespace Streaming.Sse { [ModelReaderWriterBuildable(typeof(Info))] + [ModelReaderWriterBuildable(typeof(ProtocolInfo))] [ModelReaderWriterBuildable(typeof(RetrievalRequest))] public partial class StreamingSseContext : ModelReaderWriterContext { diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Protocol.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Protocol.cs new file mode 100644 index 00000000000..e2a0b6cacbb --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Protocol.cs @@ -0,0 +1,65 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Net.ServerSentEvents; +using System.Threading; +using System.Threading.Tasks; +using Streaming.Sse._Protocol.Data; + +namespace Streaming.Sse._Protocol +{ + public partial class Protocol + { + protected Protocol() => throw null; + + internal Protocol(ClientPipeline pipeline, Uri endpoint) => throw null; + + public ClientPipeline Pipeline => throw null; + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> IdAsync(RequestOptions options) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> IdAsync(CancellationToken cancellationToken = default) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> InvalidIdAsync(RequestOptions options) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> InvalidIdAsync(CancellationToken cancellationToken = default) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> RetryAsync(RequestOptions options) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> RetryAsync(CancellationToken cancellationToken = default) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> InvalidRetryAsync(RequestOptions options) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> InvalidRetryAsync(CancellationToken cancellationToken = default) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> ReconnectAsync(RequestOptions options) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> ReconnectAsync(CancellationToken cancellationToken = default) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + + public virtual ProtocolData GetProtocolDataClient() => throw null; + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/ProtocolData.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/ProtocolData.cs new file mode 100644 index 00000000000..711f9b89e36 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/ProtocolData.cs @@ -0,0 +1,38 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Net.ServerSentEvents; +using System.Threading; +using System.Threading.Tasks; + +namespace Streaming.Sse._Protocol.Data +{ + public partial class ProtocolData + { + protected ProtocolData() => throw null; + + internal ProtocolData(ClientPipeline pipeline, Uri endpoint) => throw null; + + public ClientPipeline Pipeline => throw null; + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> WithEnvelopeAsync(RequestOptions options) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> WithEnvelopeAsync(CancellationToken cancellationToken = default) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> WithoutEnvelopeAsync(RequestOptions options) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + +#pragma warning disable SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + public virtual Task>> WithoutEnvelopeAsync(CancellationToken cancellationToken = default) => throw null; +#pragma warning restore SCME0005 // Type is for evaluation purposes only and is subject to change or removal in future updates. + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/SseClient.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/SseClient.cs index ad7867309e0..f711396d936 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/SseClient.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/SseClient.cs @@ -6,6 +6,7 @@ using System.ClientModel.Primitives; using System.Diagnostics.CodeAnalysis; using Streaming.Sse._Named; +using Streaming.Sse._Protocol; using Streaming.Sse._Retrieve; using Streaming.Sse._Unnamed; @@ -29,5 +30,7 @@ public partial class SseClient public virtual Named GetNamedClient() => throw null; public virtual Retrieve GetRetrieveClient() => throw null; + + public virtual Protocol GetProtocolClient() => throw null; } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/StreamingSseModelFactory.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/StreamingSseModelFactory.cs index 323ddf4742d..9b9c241cd33 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/StreamingSseModelFactory.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/StreamingSseModelFactory.cs @@ -2,6 +2,7 @@ #nullable disable +using Streaming.Sse._Protocol; using Streaming.Sse._Retrieve; using Streaming.Sse._Unnamed; @@ -12,5 +13,7 @@ public static partial class StreamingSseModelFactory public static Info Info(string desc = default) => throw null; public static RetrievalRequest RetrievalRequest(string query = default) => throw null; + + public static ProtocolInfo ProtocolInfo(string message = default) => throw null; } } diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/tspCodeModel.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/tspCodeModel.json index 3ad7984785f..6a0326d0de0 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/tspCodeModel.json +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/tspCodeModel.json @@ -155,11 +155,249 @@ "value": "text/event-stream", "decorators": [], "isExactName": false + }, + { + "$id": "19", + "kind": "constant", + "name": "ReceiveResponseContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "20", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "21", + "kind": "constant", + "name": "ReceiveResponseContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "22", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "23", + "kind": "constant", + "name": "ReceiveResponseContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "24", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "25", + "kind": "constant", + "name": "ReceiveResponseContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "26", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "27", + "kind": "constant", + "name": "ReceiveResponseContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "28", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "29", + "kind": "constant", + "name": "ReceiveResponseContentType11", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "30", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "31", + "kind": "constant", + "name": "ReceiveResponseContentType12", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "32", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "33", + "kind": "constant", + "name": "ReceiveResponseContentType13", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "34", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "35", + "kind": "constant", + "name": "ReceiveResponseContentType14", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "36", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "37", + "kind": "constant", + "name": "ReceiveResponseContentType15", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "38", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "39", + "kind": "constant", + "name": "ReceiveResponseContentType16", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "40", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "41", + "kind": "constant", + "name": "ReceiveResponseContentType17", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "42", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "43", + "kind": "constant", + "name": "ReceiveResponseContentType18", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "44", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false + }, + { + "$id": "45", + "kind": "constant", + "name": "ReceiveResponseContentType19", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "46", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/event-stream", + "decorators": [], + "isExactName": false } ], "models": [ { - "$id": "19", + "$id": "47", "kind": "model", "name": "Info", "apiVersions": [], @@ -175,13 +413,13 @@ "isExactName": false, "properties": [ { - "$id": "20", + "$id": "48", "kind": "property", "name": "desc", "apiVersions": [], "serializedName": "desc", "type": { - "$id": "21", + "$id": "49", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -204,7 +442,7 @@ ] }, { - "$id": "22", + "$id": "50", "kind": "model", "name": "ResponseCreated", "apiVersions": [], @@ -220,13 +458,13 @@ "isExactName": false, "properties": [ { - "$id": "23", + "$id": "51", "kind": "property", "name": "id", "apiVersions": [], "serializedName": "id", "type": { - "$id": "24", + "$id": "52", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -249,7 +487,7 @@ ] }, { - "$id": "25", + "$id": "53", "kind": "model", "name": "ResponseDelta", "apiVersions": [], @@ -265,13 +503,13 @@ "isExactName": false, "properties": [ { - "$id": "26", + "$id": "54", "kind": "property", "name": "delta", "apiVersions": [], "serializedName": "delta", "type": { - "$id": "27", + "$id": "55", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -294,7 +532,7 @@ ] }, { - "$id": "28", + "$id": "56", "kind": "model", "name": "RetrievalRequest", "apiVersions": [], @@ -310,13 +548,13 @@ "isExactName": false, "properties": [ { - "$id": "29", + "$id": "57", "kind": "property", "name": "query", "apiVersions": [], "serializedName": "query", "type": { - "$id": "30", + "$id": "58", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -339,7 +577,7 @@ ] }, { - "$id": "31", + "$id": "59", "kind": "model", "name": "PartialResult", "apiVersions": [], @@ -355,13 +593,13 @@ "isExactName": false, "properties": [ { - "$id": "32", + "$id": "60", "kind": "property", "name": "text", "apiVersions": [], "serializedName": "text", "type": { - "$id": "33", + "$id": "61", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -384,7 +622,7 @@ ] }, { - "$id": "34", + "$id": "62", "kind": "model", "name": "FinalResult", "apiVersions": [], @@ -400,17 +638,17 @@ "isExactName": false, "properties": [ { - "$id": "35", + "$id": "63", "kind": "property", "name": "references", "apiVersions": [], "serializedName": "references", "type": { - "$id": "36", + "$id": "64", "kind": "array", "name": "Array", "valueType": { - "$id": "37", + "$id": "65", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -434,78 +672,252 @@ "isExactName": false } ] - } - ], - "clients": [ + }, { - "$id": "38", - "kind": "client", - "name": "SseClient", + "$id": "66", + "kind": "model", + "name": "Info", + "apiVersions": [], + "namespace": "Streaming.Sse.Protocol", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Info", + "usage": "Output,Json", + "decorators": [], + "serializationOptions": { + "json": { + "name": "Info" + } + }, "isExactName": false, - "namespace": "Streaming.Sse", - "doc": "Test of server-sent events (SSE) streaming.", - "methods": [], - "parameters": [ + "properties": [ { - "$id": "39", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", + "$id": "67", + "kind": "property", + "name": "message", + "apiVersions": [], + "serializedName": "message", "type": { - "$id": "40", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" + "$id": "68", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, - "isApiVersion": false, "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "41", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "http://localhost:3000" - }, - "serverUrlTemplate": "{endpoint}", - "skipUrlEncoding": false, "readOnly": false, - "crossLanguageDefinitionId": "Streaming.Sse.endpoint", - "isExactName": false - } - ], - "initializedBy": 1, - "decorators": [], + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Info.message", + "serializationOptions": { + "json": { + "name": "message" + } + }, + "isHttpMetadata": false, + "isExactName": false + } + ] + }, + { + "$id": "69", + "kind": "model", + "name": "WithEnvelope", + "apiVersions": [], + "namespace": "Streaming.Sse.Protocol.Data", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.anonymous", + "usage": "Output,Json", + "decorators": [], + "serializationOptions": { + "json": { + "name": "" + } + }, + "isExactName": false, + "properties": [ + { + "$id": "70", + "kind": "property", + "name": "contents", + "apiVersions": [], + "serializedName": "contents", + "type": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.anonymous.contents", + "serializationOptions": { + "json": { + "name": "contents" + } + }, + "isHttpMetadata": false, + "isExactName": false + } + ] + }, + { + "$id": "72", + "kind": "model", + "name": "WithEnvelope1", + "apiVersions": [], + "namespace": "Streaming.Sse.Protocol.Data", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.anonymous", + "usage": "Output,Json", + "decorators": [], + "serializationOptions": { + "json": { + "name": "" + } + }, + "isExactName": false, + "properties": [ + { + "$id": "73", + "kind": "property", + "name": "metadata", + "apiVersions": [], + "serializedName": "metadata", + "type": { + "$id": "74", + "kind": "dict", + "keyType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "76", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.anonymous.metadata", + "serializationOptions": { + "json": { + "name": "metadata" + } + }, + "isHttpMetadata": false, + "isExactName": false + }, + { + "$id": "77", + "kind": "property", + "name": "contents", + "apiVersions": [], + "serializedName": "contents", + "type": { + "$id": "78", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.anonymous.contents", + "serializationOptions": { + "json": { + "name": "contents" + } + }, + "isHttpMetadata": false, + "isExactName": false + } + ] + } + ], + "clients": [ + { + "$id": "79", + "kind": "client", + "name": "SseClient", + "isExactName": false, + "namespace": "Streaming.Sse", + "doc": "Test of server-sent events (SSE) streaming.", + "methods": [], + "parameters": [ + { + "$id": "80", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "81", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "82", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Streaming.Sse.endpoint", + "isExactName": false + } + ], + "initializedBy": 1, + "decorators": [], "crossLanguageDefinitionId": "Streaming.Sse", "apiVersions": [], "children": [ { - "$id": "42", + "$id": "83", "kind": "client", "name": "Unnamed", "isExactName": false, "namespace": "Streaming.Sse.Unnamed", "methods": [ { - "$id": "43", + "$id": "84", "kind": "basic", "name": "receive", "isExactName": false, "accessibility": "public", "apiVersions": [], "operation": { - "$id": "44", + "$id": "85", "name": "receive", "isExactName": false, "resourceName": "Unnamed", "accessibility": "public", "parameters": [ { - "$id": "45", + "$id": "86", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -521,7 +933,7 @@ "crossLanguageDefinitionId": "Streaming.Sse.Unnamed.receive.accept", "methodParameterSegments": [ { - "$id": "46", + "$id": "87", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -548,16 +960,16 @@ 200 ], "bodyType": { - "$id": "47", + "$id": "88", "kind": "streaming", "name": "SSEStreamUnnamedEvents", "valueType": { - "$id": "48", + "$id": "89", "kind": "union", "name": "UnnamedEvents", "variantTypes": [ { - "$ref": "19" + "$ref": "47" } ], "namespace": "Streaming.Sse.Unnamed", @@ -598,16 +1010,16 @@ }, "parameters": [ { - "$ref": "46" + "$ref": "87" } ], "response": { "type": { - "$id": "49", + "$id": "90", "kind": "streaming", "name": "SSEStreamUnnamedEvents", "valueType": { - "$ref": "48" + "$ref": "89" }, "streamKind": "sse", "contentTypes": [ @@ -624,13 +1036,13 @@ ], "parameters": [ { - "$id": "50", + "$id": "91", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "51", + "$id": "92", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -641,7 +1053,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "52", + "$id": "93", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -660,33 +1072,33 @@ "crossLanguageDefinitionId": "Streaming.Sse.Unnamed", "apiVersions": [], "parent": { - "$ref": "38" + "$ref": "79" }, "isMultiServiceClient": false }, { - "$id": "53", + "$id": "94", "kind": "client", "name": "Named", "isExactName": false, "namespace": "Streaming.Sse.Named", "methods": [ { - "$id": "54", + "$id": "95", "kind": "basic", "name": "receive", "isExactName": false, "accessibility": "public", "apiVersions": [], "operation": { - "$id": "55", + "$id": "96", "name": "receive", "isExactName": false, "resourceName": "Named", "accessibility": "public", "parameters": [ { - "$id": "56", + "$id": "97", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -702,7 +1114,7 @@ "crossLanguageDefinitionId": "Streaming.Sse.Named.receive.accept", "methodParameterSegments": [ { - "$id": "57", + "$id": "98", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -729,19 +1141,19 @@ 200 ], "bodyType": { - "$id": "58", + "$id": "99", "kind": "streaming", "name": "SSEStreamResponseEvents", "valueType": { - "$id": "59", + "$id": "100", "kind": "union", "name": "ResponseEvents", "variantTypes": [ { - "$ref": "22" + "$ref": "50" }, { - "$ref": "25" + "$ref": "53" }, { "$ref": "7" @@ -786,16 +1198,16 @@ }, "parameters": [ { - "$ref": "57" + "$ref": "98" } ], "response": { "type": { - "$id": "60", + "$id": "101", "kind": "streaming", "name": "SSEStreamResponseEvents", "valueType": { - "$ref": "59" + "$ref": "100" }, "streamKind": "sse", "contentTypes": [ @@ -813,13 +1225,13 @@ ], "parameters": [ { - "$id": "61", + "$id": "102", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "62", + "$id": "103", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -830,7 +1242,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "63", + "$id": "104", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -849,33 +1261,33 @@ "crossLanguageDefinitionId": "Streaming.Sse.Named", "apiVersions": [], "parent": { - "$ref": "38" + "$ref": "79" }, "isMultiServiceClient": false }, { - "$id": "64", + "$id": "105", "kind": "client", "name": "Retrieve", "isExactName": false, "namespace": "Streaming.Sse.Retrieve", "methods": [ { - "$id": "65", + "$id": "106", "kind": "basic", "name": "stream", "isExactName": false, "accessibility": "public", "apiVersions": [], "operation": { - "$id": "66", + "$id": "107", "name": "stream", "isExactName": false, "resourceName": "Retrieve", "accessibility": "public", "parameters": [ { - "$id": "67", + "$id": "108", "kind": "header", "name": "contentType", "serializedName": "Content-Type", @@ -892,7 +1304,7 @@ "crossLanguageDefinitionId": "Streaming.Sse.Retrieve.stream.contentType", "methodParameterSegments": [ { - "$id": "68", + "$id": "109", "kind": "method", "name": "contentType", "serializedName": "Content-Type", @@ -914,7 +1326,7 @@ "isExactName": false }, { - "$id": "69", + "$id": "110", "kind": "header", "name": "accept", "serializedName": "Accept", @@ -930,7 +1342,7 @@ "crossLanguageDefinitionId": "Streaming.Sse.Retrieve.stream.accept", "methodParameterSegments": [ { - "$id": "70", + "$id": "111", "kind": "method", "name": "accept", "serializedName": "Accept", @@ -951,12 +1363,12 @@ "isExactName": false }, { - "$id": "71", + "$id": "112", "kind": "body", "name": "request", "serializedName": "request", "type": { - "$ref": "28" + "$ref": "56" }, "isApiVersion": false, "contentTypes": [ @@ -970,12 +1382,12 @@ "crossLanguageDefinitionId": "Streaming.Sse.Retrieve.stream.request", "methodParameterSegments": [ { - "$id": "72", + "$id": "113", "kind": "method", "name": "request", "serializedName": "request", "type": { - "$ref": "28" + "$ref": "56" }, "location": "Body", "isApiVersion": false, @@ -1002,19 +1414,19 @@ 200 ], "bodyType": { - "$id": "73", + "$id": "114", "kind": "streaming", "name": "SSEStreamRetrievalEvents", "valueType": { - "$id": "74", + "$id": "115", "kind": "union", "name": "RetrievalEvents", "variantTypes": [ { - "$ref": "31" + "$ref": "59" }, { - "$ref": "34" + "$ref": "62" }, { "$ref": "15" @@ -1062,22 +1474,22 @@ }, "parameters": [ { - "$ref": "72" + "$ref": "113" }, { - "$ref": "68" + "$ref": "109" }, { - "$ref": "70" + "$ref": "111" } ], "response": { "type": { - "$id": "75", + "$id": "116", "kind": "streaming", "name": "SSEStreamRetrievalEvents", "valueType": { - "$ref": "74" + "$ref": "115" }, "streamKind": "sse", "contentTypes": [ @@ -1095,13 +1507,13 @@ ], "parameters": [ { - "$id": "76", + "$id": "117", "kind": "endpoint", "name": "endpoint", "serializedName": "endpoint", "doc": "Service host", "type": { - "$id": "77", + "$id": "118", "kind": "url", "name": "endpoint", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1112,7 +1524,7 @@ "isEndpoint": true, "defaultValue": { "type": { - "$id": "78", + "$id": "119", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1131,9 +1543,981 @@ "crossLanguageDefinitionId": "Streaming.Sse.Retrieve", "apiVersions": [], "parent": { - "$ref": "38" + "$ref": "79" }, "isMultiServiceClient": false + }, + { + "$id": "120", + "kind": "client", + "name": "Protocol", + "isExactName": false, + "namespace": "Streaming.Sse.Protocol", + "methods": [ + { + "$id": "121", + "kind": "basic", + "name": "id", + "isExactName": false, + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "122", + "name": "id", + "isExactName": false, + "resourceName": "Protocol", + "accessibility": "public", + "parameters": [ + { + "$id": "123", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "19" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.id.accept", + "methodParameterSegments": [ + { + "$id": "124", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "19" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.id.accept", + "readOnly": false, + "access": "public", + "decorators": [], + "isExactName": false + } + ], + "isExactName": false + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$id": "125", + "kind": "streaming", + "name": "SSEStreamProtocolEvents", + "valueType": { + "$id": "126", + "kind": "union", + "name": "ProtocolEvents", + "variantTypes": [ + { + "$ref": "66" + } + ], + "namespace": "Streaming.Sse.Protocol", + "decorators": [], + "isExactName": false + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "21" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "text/event-stream" + ], + "serializationOptions": {} + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/streaming/sse/protocol/id", + "bufferResponse": false, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.id", + "decorators": [], + "namespace": "Streaming.Sse.Protocol" + }, + "parameters": [ + { + "$ref": "124" + } + ], + "response": { + "type": { + "$id": "127", + "kind": "streaming", + "name": "SSEStreamProtocolEvents", + "valueType": { + "$ref": "126" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.id" + }, + { + "$id": "128", + "kind": "basic", + "name": "invalidId", + "isExactName": false, + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "129", + "name": "invalidId", + "isExactName": false, + "resourceName": "Protocol", + "accessibility": "public", + "parameters": [ + { + "$id": "130", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "23" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidId.accept", + "methodParameterSegments": [ + { + "$id": "131", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "23" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidId.accept", + "readOnly": false, + "access": "public", + "decorators": [], + "isExactName": false + } + ], + "isExactName": false + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$id": "132", + "kind": "streaming", + "name": "SSEStreamProtocolEvents", + "valueType": { + "$ref": "126" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "25" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "text/event-stream" + ], + "serializationOptions": {} + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/streaming/sse/protocol/invalid-id", + "bufferResponse": false, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidId", + "decorators": [], + "namespace": "Streaming.Sse.Protocol" + }, + "parameters": [ + { + "$ref": "131" + } + ], + "response": { + "type": { + "$id": "133", + "kind": "streaming", + "name": "SSEStreamProtocolEvents", + "valueType": { + "$ref": "126" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidId" + }, + { + "$id": "134", + "kind": "basic", + "name": "retry", + "isExactName": false, + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "135", + "name": "retry", + "isExactName": false, + "resourceName": "Protocol", + "accessibility": "public", + "parameters": [ + { + "$id": "136", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "27" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.retry.accept", + "methodParameterSegments": [ + { + "$id": "137", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "27" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.retry.accept", + "readOnly": false, + "access": "public", + "decorators": [], + "isExactName": false + } + ], + "isExactName": false + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$id": "138", + "kind": "streaming", + "name": "SSEStreamProtocolEvents", + "valueType": { + "$ref": "126" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "29" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "text/event-stream" + ], + "serializationOptions": {} + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/streaming/sse/protocol/retry", + "bufferResponse": false, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.retry", + "decorators": [], + "namespace": "Streaming.Sse.Protocol" + }, + "parameters": [ + { + "$ref": "137" + } + ], + "response": { + "type": { + "$id": "139", + "kind": "streaming", + "name": "SSEStreamProtocolEvents", + "valueType": { + "$ref": "126" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.retry" + }, + { + "$id": "140", + "kind": "basic", + "name": "invalidRetry", + "isExactName": false, + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "141", + "name": "invalidRetry", + "isExactName": false, + "resourceName": "Protocol", + "accessibility": "public", + "parameters": [ + { + "$id": "142", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "31" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidRetry.accept", + "methodParameterSegments": [ + { + "$id": "143", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "31" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidRetry.accept", + "readOnly": false, + "access": "public", + "decorators": [], + "isExactName": false + } + ], + "isExactName": false + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$id": "144", + "kind": "streaming", + "name": "SSEStreamProtocolEvents", + "valueType": { + "$ref": "126" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "33" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "text/event-stream" + ], + "serializationOptions": {} + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/streaming/sse/protocol/invalid-retry", + "bufferResponse": false, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidRetry", + "decorators": [], + "namespace": "Streaming.Sse.Protocol" + }, + "parameters": [ + { + "$ref": "143" + } + ], + "response": { + "type": { + "$id": "145", + "kind": "streaming", + "name": "SSEStreamProtocolEvents", + "valueType": { + "$ref": "126" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.invalidRetry" + }, + { + "$id": "146", + "kind": "basic", + "name": "reconnect", + "isExactName": false, + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "147", + "name": "reconnect", + "isExactName": false, + "resourceName": "Protocol", + "accessibility": "public", + "parameters": [ + { + "$id": "148", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "35" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.reconnect.accept", + "methodParameterSegments": [ + { + "$id": "149", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "35" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.reconnect.accept", + "readOnly": false, + "access": "public", + "decorators": [], + "isExactName": false + } + ], + "isExactName": false + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$id": "150", + "kind": "streaming", + "name": "SSEStreamProtocolEvents", + "valueType": { + "$ref": "126" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "37" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "text/event-stream" + ], + "serializationOptions": {} + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/streaming/sse/protocol/reconnect", + "bufferResponse": false, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.reconnect", + "decorators": [], + "namespace": "Streaming.Sse.Protocol" + }, + "parameters": [ + { + "$ref": "149" + } + ], + "response": { + "type": { + "$id": "151", + "kind": "streaming", + "name": "SSEStreamProtocolEvents", + "valueType": { + "$ref": "126" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.reconnect" + } + ], + "parameters": [ + { + "$id": "152", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "153", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "154", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.endpoint", + "isExactName": false + } + ], + "initializedBy": 0, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol", + "apiVersions": [], + "parent": { + "$ref": "79" + }, + "children": [ + { + "$id": "155", + "kind": "client", + "name": "Data", + "isExactName": false, + "namespace": "Streaming.Sse.Protocol.Data", + "methods": [ + { + "$id": "156", + "kind": "basic", + "name": "withEnvelope", + "isExactName": false, + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "157", + "name": "withEnvelope", + "isExactName": false, + "resourceName": "Data", + "accessibility": "public", + "parameters": [ + { + "$id": "158", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "39" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.accept", + "methodParameterSegments": [ + { + "$id": "159", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "39" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope.accept", + "readOnly": false, + "access": "public", + "decorators": [], + "isExactName": false + } + ], + "isExactName": false + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$id": "160", + "kind": "streaming", + "name": "SSEStreamDataEvents", + "valueType": { + "$id": "161", + "kind": "union", + "name": "DataEvents", + "variantTypes": [ + { + "$ref": "69" + }, + { + "$ref": "72" + } + ], + "namespace": "Streaming.Sse.Protocol.Data", + "decorators": [], + "isExactName": false + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "41" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "text/event-stream" + ], + "serializationOptions": {} + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/streaming/sse/protocol/data/with-envelope", + "bufferResponse": false, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope", + "decorators": [], + "namespace": "Streaming.Sse.Protocol.Data" + }, + "parameters": [ + { + "$ref": "159" + } + ], + "response": { + "type": { + "$id": "162", + "kind": "streaming", + "name": "SSEStreamDataEvents", + "valueType": { + "$ref": "161" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withEnvelope" + }, + { + "$id": "163", + "kind": "basic", + "name": "withoutEnvelope", + "isExactName": false, + "accessibility": "public", + "apiVersions": [], + "operation": { + "$id": "164", + "name": "withoutEnvelope", + "isExactName": false, + "resourceName": "Data", + "accessibility": "public", + "parameters": [ + { + "$id": "165", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "43" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withoutEnvelope.accept", + "methodParameterSegments": [ + { + "$id": "166", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "43" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withoutEnvelope.accept", + "readOnly": false, + "access": "public", + "decorators": [], + "isExactName": false + } + ], + "isExactName": false + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$id": "167", + "kind": "streaming", + "name": "SSEStreamDataEvents", + "valueType": { + "$ref": "161" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + }, + "headers": [ + { + "name": "contentType", + "nameInResponse": "content-type", + "type": { + "$ref": "45" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "text/event-stream" + ], + "serializationOptions": {} + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/streaming/sse/protocol/data/without-envelope", + "bufferResponse": false, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withoutEnvelope", + "decorators": [], + "namespace": "Streaming.Sse.Protocol.Data" + }, + "parameters": [ + { + "$ref": "166" + } + ], + "response": { + "type": { + "$id": "168", + "kind": "streaming", + "name": "SSEStreamDataEvents", + "valueType": { + "$ref": "161" + }, + "streamKind": "sse", + "contentTypes": [ + "text/event-stream" + ], + "crossLanguageDefinitionId": "TypeSpec.SSE.SSEStream" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.withoutEnvelope" + } + ], + "parameters": [ + { + "$id": "169", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "170", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data.endpoint", + "isExactName": false + } + ], + "initializedBy": 0, + "decorators": [], + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Data", + "apiVersions": [], + "parent": { + "$ref": "120" + }, + "isMultiServiceClient": false + } + ], + "isMultiServiceClient": false } ], "isMultiServiceClient": false diff --git a/packages/http-client-csharp/generator/docs/architecture.md b/packages/http-client-csharp/generator/docs/architecture.md index 93df5452275..0b997440cbb 100644 --- a/packages/http-client-csharp/generator/docs/architecture.md +++ b/packages/http-client-csharp/generator/docs/architecture.md @@ -113,7 +113,7 @@ The TypeSpec Generator follows a layered architecture designed for extensibility - **`Configuration`**: Centralized configuration management from JSON input - **`GeneratorContext`**: Runtime context and dependency injection container -- **`SourceInputModel`**: Integration with existing custom code via Roslyn analysis +- **`SourceInputModel`**: Integration with existing custom code via Roslyn analysis. `CodeGenType` accepts an original type's simple name or namespace-qualified name; qualified names take precedence and allow same-named models in different namespaces to be customized independently. ### 8. **Emitter Communication Layer** @@ -145,7 +145,6 @@ The generation process follows a well-defined pipeline: - Apply generator-specific customizations - Build method signatures and type hierarchies - 4. **Source Integration** - Analyze existing custom code using Roslyn @@ -158,7 +157,6 @@ The generation process follows a well-defined pipeline: - Apply transformations, validations, and enhancements - Support for both built-in and plugin-provided visitors - 6. **Code Generation** - Write providers to CodeFiles containing C# source code From 3d9a0816b43b848fbb8693f379abaa7d27257556 Mon Sep 17 00:00:00 2001 From: jolov Date: Wed, 9 Sep 2026 18:31:33 -0700 Subject: [PATCH 4/8] docs(http-client-csharp): revert architecture documentation changes Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- packages/http-client-csharp/generator/docs/architecture.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/http-client-csharp/generator/docs/architecture.md b/packages/http-client-csharp/generator/docs/architecture.md index 0b997440cbb..93df5452275 100644 --- a/packages/http-client-csharp/generator/docs/architecture.md +++ b/packages/http-client-csharp/generator/docs/architecture.md @@ -113,7 +113,7 @@ The TypeSpec Generator follows a layered architecture designed for extensibility - **`Configuration`**: Centralized configuration management from JSON input - **`GeneratorContext`**: Runtime context and dependency injection container -- **`SourceInputModel`**: Integration with existing custom code via Roslyn analysis. `CodeGenType` accepts an original type's simple name or namespace-qualified name; qualified names take precedence and allow same-named models in different namespaces to be customized independently. +- **`SourceInputModel`**: Integration with existing custom code via Roslyn analysis ### 8. **Emitter Communication Layer** @@ -145,6 +145,7 @@ The generation process follows a well-defined pipeline: - Apply generator-specific customizations - Build method signatures and type hierarchies + 4. **Source Integration** - Analyze existing custom code using Roslyn @@ -157,6 +158,7 @@ The generation process follows a well-defined pipeline: - Apply transformations, validations, and enhancements - Support for both built-in and plugin-provided visitors + 6. **Code Generation** - Write providers to CodeFiles containing C# source code From 422b45ecf22348b8c3719631e83fd2b3024e929f Mon Sep 17 00:00:00 2001 From: jolov Date: Wed, 9 Sep 2026 19:31:14 -0700 Subject: [PATCH 5/8] fix(http-specs): use a unique SSE protocol model name Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .chronus/changes/sse-unique-protocol-model-name.md | 7 +++++++ packages/http-specs/specs/streaming/sse/main.tsp | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .chronus/changes/sse-unique-protocol-model-name.md diff --git a/.chronus/changes/sse-unique-protocol-model-name.md b/.chronus/changes/sse-unique-protocol-model-name.md new file mode 100644 index 00000000000..3381a45baee --- /dev/null +++ b/.chronus/changes/sse-unique-protocol-model-name.md @@ -0,0 +1,7 @@ +--- +changeKind: fix +packages: + - "@typespec/http-specs" +--- + +Use a unique `ProtocolInfo` model name in the SSE protocol scenarios to avoid model-name collisions in generated clients. diff --git a/packages/http-specs/specs/streaming/sse/main.tsp b/packages/http-specs/specs/streaming/sse/main.tsp index 2293746ff09..96aa7a9c65b 100644 --- a/packages/http-specs/specs/streaming/sse/main.tsp +++ b/packages/http-specs/specs/streaming/sse/main.tsp @@ -154,14 +154,14 @@ namespace Retrieve { @route("protocol") namespace Protocol { - model Info { + model ProtocolInfo { message: string; } @events union ProtocolEvents { @Events.contentType("application/json") - message: Info, + message: ProtocolInfo, } @route("data") From f724bfe77aec9b10116406b9e5ae42898e8cbf3e Mon Sep 17 00:00:00 2001 From: jolov Date: Wed, 9 Sep 2026 19:45:09 -0700 Subject: [PATCH 6/8] test(http-client-csharp): cover SSE protocol scenarios Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../Http/Streaming/Sse/SseTests.cs | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Streaming/Sse/SseTests.cs b/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Streaming/Sse/SseTests.cs index bb06e9d5aeb..ee76f6b65b4 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Streaming/Sse/SseTests.cs +++ b/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Streaming/Sse/SseTests.cs @@ -1,8 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; +using System.ClientModel.Primitives; using System.Collections.Generic; using System.Linq; +using System.Net.ServerSentEvents; using System.Text.Json; using System.Threading.Tasks; using NUnit.Framework; @@ -82,5 +85,111 @@ public Task Retrieve() => Test(async (host) => }, events); }); + + [SpectorTest] + public Task WithEnvelope() => Test(async (host) => + { + var client = new SseClient(host, null).GetProtocolClient().GetProtocolDataClient(); + await using var response = await client.WithEnvelopeAsync(); + var item = await ReadSingleEventAsync(response); + + Assert.AreEqual("withEnvelope", item.EventType); + Assert.AreEqual("hello", item.Data.ToString()); + }); + + [SpectorTest] + public Task WithoutEnvelope() => Test(async (host) => + { + var client = new SseClient(host, null).GetProtocolClient().GetProtocolDataClient(); + await using var response = await client.WithoutEnvelopeAsync(); + var item = await ReadSingleEventAsync(response); + + Assert.AreEqual("withoutEnvelope", item.EventType); + using var document = JsonDocument.Parse(item.Data.ToMemory()); + Assert.AreEqual("world", document.RootElement.GetProperty("contents").GetString()); + Assert.AreEqual("test", document.RootElement.GetProperty("metadata").GetProperty("source").GetString()); + }); + + [SpectorTest] + public Task Id() => Test(async (host) => + { + var client = new SseClient(host, null).GetProtocolClient(); + await using var response = await client.IdAsync(); + var item = await ReadSingleEventAsync(response); + + Assert.AreEqual("message", item.EventType); + Assert.AreEqual("event-1", item.EventId); + Assert.AreEqual("hello", item.Data.Message); + }); + + [SpectorTest] + public Task InvalidId() => Test(async (host) => + { + var client = new SseClient(host, null).GetProtocolClient(); + await using var response = await client.InvalidIdAsync(); + var item = await ReadSingleEventAsync(response); + + Assert.AreEqual("message", item.EventType); + Assert.IsNull(item.EventId); + Assert.AreEqual("hello", item.Data.Message); + }); + + [SpectorTest] + public Task Retry() => Test(async (host) => + { + var client = new SseClient(host, null).GetProtocolClient(); + await using var response = await client.RetryAsync(); + var item = await ReadSingleEventAsync(response); + + Assert.AreEqual("message", item.EventType); + Assert.AreEqual(TimeSpan.FromMilliseconds(1000), item.ReconnectionInterval); + Assert.AreEqual("hello", item.Data.Message); + }); + + [SpectorTest] + public Task InvalidRetry() => Test(async (host) => + { + var client = new SseClient(host, null).GetProtocolClient(); + await using var response = await client.InvalidRetryAsync(); + var item = await ReadSingleEventAsync(response); + + Assert.AreEqual("message", item.EventType); + Assert.IsNull(item.ReconnectionInterval); + Assert.AreEqual("hello", item.Data.Message); + }); + + [SpectorTest] + public Task Reconnect() => Test(async (host) => + { + var client = new SseClient(host, null).GetProtocolClient(); + string lastEventId; + await using (var response = await client.ReconnectAsync()) + { + var item = await ReadSingleEventAsync(response); + Assert.AreEqual("message", item.EventType); + Assert.AreEqual("event-1", item.EventId); + Assert.AreEqual("hello", item.Data.Message); + lastEventId = item.EventId!; + } + + var options = new RequestOptions(); + options.SetHeader("Last-Event-ID", lastEventId); + await using var reconnectedResponse = await client.ReconnectAsync(options); + var reconnectedItem = await ReadSingleEventAsync(reconnectedResponse); + + Assert.AreEqual("message", reconnectedItem.EventType); + Assert.AreEqual("event-2", reconnectedItem.EventId); + using var document = JsonDocument.Parse(reconnectedItem.Data.ToMemory()); + Assert.AreEqual("world", document.RootElement.GetProperty("message").GetString()); + }); + + private static async Task> ReadSingleEventAsync(IAsyncEnumerable> response) + { + await using var enumerator = response.GetAsyncEnumerator(); + Assert.IsTrue(await enumerator.MoveNextAsync(), "Expected one SSE event."); + var item = enumerator.Current; + Assert.IsFalse(await enumerator.MoveNextAsync(), "Expected the SSE stream to end after one event."); + return item; + } } } From 84aadf8ef3edead5b1564249dfcffd7a2db40e73 Mon Sep 17 00:00:00 2001 From: jolov Date: Wed, 9 Sep 2026 19:45:23 -0700 Subject: [PATCH 7/8] chore(http-specs): keep SSE model rename in separate PR Revert 422b45ecf22348b8c3719631e83fd2b3024e929f from this branch; the shared model rename is maintained independently in #11920. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .chronus/changes/sse-unique-protocol-model-name.md | 7 ------- packages/http-specs/specs/streaming/sse/main.tsp | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 .chronus/changes/sse-unique-protocol-model-name.md diff --git a/.chronus/changes/sse-unique-protocol-model-name.md b/.chronus/changes/sse-unique-protocol-model-name.md deleted file mode 100644 index 3381a45baee..00000000000 --- a/.chronus/changes/sse-unique-protocol-model-name.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -changeKind: fix -packages: - - "@typespec/http-specs" ---- - -Use a unique `ProtocolInfo` model name in the SSE protocol scenarios to avoid model-name collisions in generated clients. diff --git a/packages/http-specs/specs/streaming/sse/main.tsp b/packages/http-specs/specs/streaming/sse/main.tsp index 96aa7a9c65b..2293746ff09 100644 --- a/packages/http-specs/specs/streaming/sse/main.tsp +++ b/packages/http-specs/specs/streaming/sse/main.tsp @@ -154,14 +154,14 @@ namespace Retrieve { @route("protocol") namespace Protocol { - model ProtocolInfo { + model Info { message: string; } @events union ProtocolEvents { @Events.contentType("application/json") - message: ProtocolInfo, + message: Info, } @route("data") From 40d04f4d0ffbffb0206daab4b46483202d1c8da2 Mon Sep 17 00:00:00 2001 From: jolov Date: Thu, 10 Sep 2026 12:39:15 -0700 Subject: [PATCH 8/8] chore(http-client-csharp): adopt latest HTTP specs and remove collision workaround Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../src/StubLibraryVisitor.cs | 31 -------- .../test/InputLibraryVisitorTests.cs | 45 ----------- ...ypeSpec.Generator.ClientModel.Tests.csproj | 1 - .../Model.cs | 18 ----- .../Model.cs | 13 ---- .../src/SourceInput/SourceInputModel.cs | 5 +- .../ModelProviders/ModelCustomizationTests.cs | 77 +------------------ .../FirstStatus.cs | 11 --- .../ProtocolInfo.cs | 11 --- .../CustomModels.cs | 16 ---- .../CustomModels.cs | 16 ---- .../streaming/sse/src/Custom/ProtocolInfo.cs | 12 --- .../Internal/CodeGenTypeAttribute.cs | 16 ---- .../http/streaming/sse/tspCodeModel.json | 8 +- packages/http-client-csharp/package-lock.json | 8 +- packages/http-client-csharp/package.json | 2 +- 16 files changed, 12 insertions(+), 278 deletions(-) delete mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/InputLibraryVisitorTests/StubKeepsInheritedCustomizationAttributes/Model.cs delete mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/InputLibraryVisitorTests/StubKeepsUsedCustomizationAttributes/Model.cs delete mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameEnumByQualifiedName/FirstStatus.cs delete mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameModelByQualifiedName/ProtocolInfo.cs delete mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameModelsByQualifiedNames/CustomModels.cs delete mode 100644 packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/QualifiedNameOverridesSimpleName/CustomModels.cs delete mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Custom/ProtocolInfo.cs delete mode 100644 packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Internal/CodeGenTypeAttribute.cs diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel.StubLibrary/src/StubLibraryVisitor.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel.StubLibrary/src/StubLibraryVisitor.cs index 9a88666da69..fb41de57dcc 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel.StubLibrary/src/StubLibraryVisitor.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel.StubLibrary/src/StubLibraryVisitor.cs @@ -3,10 +3,7 @@ using System; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Linq; -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.TypeSpec.Generator.ClientModel.Providers; using Microsoft.TypeSpec.Generator.Expressions; using Microsoft.TypeSpec.Generator.Primitives; @@ -18,38 +15,10 @@ namespace Microsoft.TypeSpec.Generator.ClientModel.StubLibrary internal class StubLibraryVisitor : ScmLibraryVisitor { private readonly ValueExpression _throwNull = ThrowExpression(Null); - private readonly Lazy> _usedCustomizationAttributes = new(GetUsedCustomizationAttributes); - - private static HashSet GetUsedCustomizationAttributes() - { - var names = new HashSet(StringComparer.Ordinal); - var compilation = CodeModelGenerator.Instance.SourceInputModel.Customization; - if (compilation is not null) - { - foreach (var syntaxTree in compilation.SyntaxTrees) - { - var semanticModel = compilation.GetSemanticModel(syntaxTree); - foreach (var attribute in syntaxTree.GetRoot().DescendantNodes().OfType()) - { - for (var type = semanticModel.GetTypeInfo(attribute).Type as INamedTypeSymbol; - type is not null; - type = type.BaseType) - { - names.Add(type.ToDisplayString()); - } - } - } - } - - return names; - } protected override TypeProvider? VisitType(TypeProvider type) { - var isUsedCustomizationAttribute = type is CustomCodeAttributeDefinition && - _usedCustomizationAttributes.Value.Contains($"{type.Type.Namespace}.{type.Name}"); if (!type.DeclarationModifiers.HasFlag(TypeSignatureModifiers.Public) && - !isUsedCustomizationAttribute && !type.Name.StartsWith("Unknown", StringComparison.Ordinal) && !type.Name.Equals("MultiPartFormDataBinaryContent", StringComparison.Ordinal)) { diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/InputLibraryVisitorTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/InputLibraryVisitorTests.cs index 1b1fdf10021..c330959a947 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/InputLibraryVisitorTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/InputLibraryVisitorTests.cs @@ -1,11 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.TypeSpec.Generator.ClientModel.Providers; -using Microsoft.TypeSpec.Generator.ClientModel.StubLibrary; using Microsoft.TypeSpec.Generator.Input; using Microsoft.TypeSpec.Generator.Providers; using Microsoft.TypeSpec.Generator.Tests.Common; @@ -34,47 +30,6 @@ public void Setup() _mockVisitor = new Mock { CallBase = true }; } - [Test] - public void StubDropsUnusedCustomizationAttributes() - { - Assert.IsEmpty(VisitStubCustomizationAttributes(_mockGenerator.Object)); - } - - [Test] - public async Task StubKeepsUsedCustomizationAttributes() - { - var generator = await MockHelpers.LoadMockGeneratorAsync( - compilation: async () => await Helpers.GetCompilationFromDirectoryAsync()); - - var attributes = VisitStubCustomizationAttributes(generator.Object); - - Assert.That(attributes.Select(attribute => attribute.Name), - Is.EquivalentTo(new[] { "CodeGenTypeAttribute", "CodeGenMemberAttribute" })); - } - - [Test] - public async Task StubKeepsInheritedCustomizationAttributes() - { - var generator = await MockHelpers.LoadMockGeneratorAsync( - compilation: async () => await Helpers.GetCompilationFromDirectoryAsync()); - - var attributes = VisitStubCustomizationAttributes(generator.Object); - - Assert.That(attributes.Select(attribute => attribute.Name), - Is.EquivalentTo(new[] { "CodeGenTypeAttribute" })); - } - - private static IReadOnlyList VisitStubCustomizationAttributes(ScmCodeModelGenerator generator) - { - CodeModelGenerator stubGenerator = new StubLibraryGenerator(new GeneratorContext(generator.Configuration)); - stubGenerator.Configure(); - var library = new OutputLibrary { TypeProviders = generator.CustomCodeAttributeProviders }; - - stubGenerator.Visitors.Last().VisitLibrary(library); - - return library.TypeProviders; - } - [Test] public void PreVisitsMethods() { diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Microsoft.TypeSpec.Generator.ClientModel.Tests.csproj b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Microsoft.TypeSpec.Generator.ClientModel.Tests.csproj index 989562ac0ca..94476387728 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Microsoft.TypeSpec.Generator.ClientModel.Tests.csproj +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/Microsoft.TypeSpec.Generator.ClientModel.Tests.csproj @@ -3,7 +3,6 @@ - diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/InputLibraryVisitorTests/StubKeepsInheritedCustomizationAttributes/Model.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/InputLibraryVisitorTests/StubKeepsInheritedCustomizationAttributes/Model.cs deleted file mode 100644 index 55893c38495..00000000000 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/InputLibraryVisitorTests/StubKeepsInheritedCustomizationAttributes/Model.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.TypeSpec.Generator.Customizations; - -namespace Sample; - -internal class CustomCodeGenTypeAttribute : CodeGenTypeAttribute -{ - public CustomCodeGenTypeAttribute(string originalName) : base(originalName) - { - } -} - -[CustomCodeGenType("Info")] -public partial class Model -{ -} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/InputLibraryVisitorTests/StubKeepsUsedCustomizationAttributes/Model.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/InputLibraryVisitorTests/StubKeepsUsedCustomizationAttributes/Model.cs deleted file mode 100644 index dbfa359bde2..00000000000 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/InputLibraryVisitorTests/StubKeepsUsedCustomizationAttributes/Model.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.TypeSpec.Generator.Customizations; - -namespace Sample; - -[CodeGenType("Info")] -public partial class Model -{ - [CodeGenMember("message")] - public string Message { get; } -} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/SourceInput/SourceInputModel.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/SourceInput/SourceInputModel.cs index 1be31d11829..18ed06828ff 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/SourceInput/SourceInputModel.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/SourceInput/SourceInputModel.cs @@ -121,11 +121,10 @@ private static string GetFullyQualifiedMetadataName(string ns, string name, stri var fullyQualifiedMetadataName = GetFullyQualifiedMetadataName(ns, name, declaringTypeName); - // Qualified CodeGenType names take precedence so same-named types can be customized independently. + // Either find by the CodeGenType attribute in customization or by the actual type name. INamedTypeSymbol? type = null; if (ReferenceEquals(compilation, Customization) && - (_nameMap.Value.TryGetValue(fullyQualifiedMetadataName, out var mappedType) || - _nameMap.Value.TryGetValue(name, out mappedType)) && + _nameMap.Value.TryGetValue(name, out var mappedType) && IsContainingTypeMatch(mappedType, ns, declaringTypeName)) { type = mappedType; diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/ModelCustomizationTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/ModelCustomizationTests.cs index 55cfcec65c2..cefa2e2685f 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/ModelCustomizationTests.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/ModelCustomizationTests.cs @@ -34,81 +34,6 @@ public async Task CanChangeModelName() AssertCommon(modelTypeProvider, "NewNamespace.Models", "CustomizedModel"); } - [Test] - public async Task CanRenameModelByQualifiedName() - { - var unnamed = InputFactory.Model("Info", @namespace: "Sample.Unnamed"); - var protocol = InputFactory.Model("Info", @namespace: "Sample.Protocol"); - var mockGenerator = await MockHelpers.LoadMockGeneratorAsync( - inputModelTypes: [unnamed, protocol], - compilation: async () => await Helpers.GetCompilationFromDirectoryAsync()); - - var providers = mockGenerator.Object.OutputLibrary.TypeProviders; - var models = providers.OfType().ToArray(); - var unnamedProvider = models.Single(model => model.Type.Namespace == "Sample.Unnamed"); - var protocolProvider = models.Single(model => model.Type.Namespace == "Sample.Protocol"); - - Assert.IsNull(unnamedProvider.CustomCodeView); - Assert.AreEqual("Info", unnamedProvider.Name); - AssertCommon(protocolProvider, "Sample.Protocol", "ProtocolInfo"); - Assert.AreNotEqual(unnamedProvider.RelativeFilePath, protocolProvider.RelativeFilePath); - - var factory = providers.Single(provider => provider is ModelFactoryProvider); - Assert.That(factory.Methods.Select(method => method.Signature.Name), - Is.EquivalentTo(new[] { "Info", "ProtocolInfo" })); - Assert.That(factory.Methods.Select(method => method.Signature.ReturnType), - Is.EquivalentTo(new[] { unnamedProvider.Type, protocolProvider.Type })); - - Assert.IsNull(mockGenerator.Object.SourceInputModel.FindForTypeInCurrentCompilation("Sample.protocol", "Info")); - var differentName = new ModelProvider(InputFactory.Model("Other", @namespace: "Sample.Protocol")); - Assert.IsNull(differentName.CustomCodeView); - Assert.AreEqual("Other", differentName.Name); - } - - [Test] - public async Task CanRenameModelsByQualifiedNames() - { - await MockHelpers.LoadMockGeneratorAsync( - compilation: async () => await Helpers.GetCompilationFromDirectoryAsync()); - - var unnamed = new ModelProvider(InputFactory.Model("Info", @namespace: "Sample.Unnamed")); - var protocol = new ModelProvider(InputFactory.Model("Info", @namespace: "Sample.Protocol")); - - AssertCommon(unnamed, "Customized.Models", "UnnamedInfo"); - AssertCommon(protocol, "Customized.Models", "ProtocolInfo"); - Assert.AreNotEqual(unnamed.RelativeFilePath, protocol.RelativeFilePath); - } - - [Test] - public async Task QualifiedNameOverridesSimpleName() - { - await MockHelpers.LoadMockGeneratorAsync( - compilation: async () => await Helpers.GetCompilationFromDirectoryAsync()); - - var unnamed = new ModelProvider(InputFactory.Model("Info", @namespace: "Sample.Unnamed")); - var protocol = new ModelProvider(InputFactory.Model("Info", @namespace: "Sample.Protocol")); - - AssertCommon(unnamed, "Customized.Models", "DefaultInfo"); - AssertCommon(protocol, "Customized.Models", "ProtocolInfo"); - } - - [Test] - public async Task CanRenameEnumByQualifiedName() - { - await MockHelpers.LoadMockGeneratorAsync( - compilation: async () => await Helpers.GetCompilationFromDirectoryAsync()); - - var first = new FixedEnumProvider( - InputFactory.StringEnum("Status", [("ready", "ready")], clientNamespace: "Sample.First"), null); - var second = new FixedEnumProvider( - InputFactory.StringEnum("Status", [("ready", "ready")], clientNamespace: "Sample.Second"), null); - - AssertCommon(first, "Customized.Models", "FirstStatus"); - Assert.IsNull(second.CustomCodeView); - Assert.AreEqual("Status", second.Name); - Assert.AreEqual("Sample.Second", second.Type.Namespace); - } - [Test] public async Task CanChangeEnumName() { @@ -144,7 +69,7 @@ public async Task CanChangePropertyName() Assert.AreEqual("Prop2", modelTypeProvider.CustomCodeView.Properties[0].Name); var wireInfo = modelTypeProvider.CustomCodeView.Properties[0].WireInfo; Assert.IsNotNull(wireInfo); - Assert.AreEqual("prop1", wireInfo!.SerializedName); + Assert.AreEqual( "prop1", wireInfo!.SerializedName); Assert.AreEqual(0, modelTypeProvider.Properties.Count); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameEnumByQualifiedName/FirstStatus.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameEnumByQualifiedName/FirstStatus.cs deleted file mode 100644 index 0e149009221..00000000000 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameEnumByQualifiedName/FirstStatus.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.TypeSpec.Generator.Customizations; - -namespace Customized.Models; - -[CodeGenType("Sample.First.Status")] -public enum FirstStatus -{ -} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameModelByQualifiedName/ProtocolInfo.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameModelByQualifiedName/ProtocolInfo.cs deleted file mode 100644 index e18d1ab1b32..00000000000 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameModelByQualifiedName/ProtocolInfo.cs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.TypeSpec.Generator.Customizations; - -namespace Sample.Protocol; - -[CodeGenType("Sample.Protocol.Info")] -public partial class ProtocolInfo -{ -} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameModelsByQualifiedNames/CustomModels.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameModelsByQualifiedNames/CustomModels.cs deleted file mode 100644 index 7fdedfc86aa..00000000000 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/CanRenameModelsByQualifiedNames/CustomModels.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.TypeSpec.Generator.Customizations; - -namespace Customized.Models; - -[CodeGenType("Sample.Unnamed.Info")] -public partial class UnnamedInfo -{ -} - -[CodeGenType("Sample.Protocol.Info")] -public partial class ProtocolInfo -{ -} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/QualifiedNameOverridesSimpleName/CustomModels.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/QualifiedNameOverridesSimpleName/CustomModels.cs deleted file mode 100644 index 969da7d06ec..00000000000 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/test/Providers/ModelProviders/TestData/ModelCustomizationTests/QualifiedNameOverridesSimpleName/CustomModels.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.TypeSpec.Generator.Customizations; - -namespace Customized.Models; - -[CodeGenType("Info")] -public partial class DefaultInfo -{ -} - -[CodeGenType("Sample.Protocol.Info")] -public partial class ProtocolInfo -{ -} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Custom/ProtocolInfo.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Custom/ProtocolInfo.cs deleted file mode 100644 index ddb965c26ed..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Custom/ProtocolInfo.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.TypeSpec.Generator.Customizations; - -namespace Streaming.Sse._Protocol -{ - [CodeGenType("Streaming.Sse._Protocol.Info")] - public partial class ProtocolInfo - { - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Internal/CodeGenTypeAttribute.cs b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Internal/CodeGenTypeAttribute.cs deleted file mode 100644 index 514d9661ed8..00000000000 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/src/Generated/Internal/CodeGenTypeAttribute.cs +++ /dev/null @@ -1,16 +0,0 @@ -// - -#nullable disable - -using System; - -namespace Microsoft.TypeSpec.Generator.Customizations -{ - [AttributeUsage((AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Struct))] - internal partial class CodeGenTypeAttribute : Attribute - { - public CodeGenTypeAttribute(string originalName) => throw null; - - public string OriginalName => throw null; - } -} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/tspCodeModel.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/tspCodeModel.json index 6a0326d0de0..524623bf559 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/tspCodeModel.json +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/sse/tspCodeModel.json @@ -676,15 +676,15 @@ { "$id": "66", "kind": "model", - "name": "Info", + "name": "ProtocolInfo", "apiVersions": [], "namespace": "Streaming.Sse.Protocol", - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Info", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.ProtocolInfo", "usage": "Output,Json", "decorators": [], "serializationOptions": { "json": { - "name": "Info" + "name": "ProtocolInfo" } }, "isExactName": false, @@ -707,7 +707,7 @@ "discriminator": false, "flatten": false, "decorators": [], - "crossLanguageDefinitionId": "Streaming.Sse.Protocol.Info.message", + "crossLanguageDefinitionId": "Streaming.Sse.Protocol.ProtocolInfo.message", "serializationOptions": { "json": { "name": "message" diff --git a/packages/http-client-csharp/package-lock.json b/packages/http-client-csharp/package-lock.json index a0ed978edd1..2ed7106a39b 100644 --- a/packages/http-client-csharp/package-lock.json +++ b/packages/http-client-csharp/package-lock.json @@ -20,7 +20,7 @@ "@typespec/compiler": "1.16.0", "@typespec/events": "0.86.0", "@typespec/http": "1.16.0", - "@typespec/http-specs": "0.1.0-alpha.42", + "@typespec/http-specs": "0.1.0-alpha.43", "@typespec/json-schema": "1.16.0", "@typespec/library-linter": "0.86.0", "@typespec/openapi": "1.16.0", @@ -1602,9 +1602,9 @@ } }, "node_modules/@typespec/http-specs": { - "version": "0.1.0-alpha.42", - "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/http-specs/-/http-specs-0.1.0-alpha.42.tgz", - "integrity": "sha1-JIAe4TRV5fAlto13GXdBpgA0elw=", + "version": "0.1.0-alpha.43", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js/npm/registry/@typespec/http-specs/-/http-specs-0.1.0-alpha.43.tgz", + "integrity": "sha1-AjZYjodquNOsBqU9pHTMOqTio+g=", "dev": true, "license": "MIT", "dependencies": { diff --git a/packages/http-client-csharp/package.json b/packages/http-client-csharp/package.json index 5a6b29a76e2..9f6356ef0f6 100644 --- a/packages/http-client-csharp/package.json +++ b/packages/http-client-csharp/package.json @@ -78,7 +78,7 @@ "@typespec/compiler": "1.16.0", "@typespec/events": "0.86.0", "@typespec/http": "1.16.0", - "@typespec/http-specs": "0.1.0-alpha.42", + "@typespec/http-specs": "0.1.0-alpha.43", "@typespec/json-schema": "1.16.0", "@typespec/library-linter": "0.86.0", "@typespec/openapi": "1.16.0",