diff --git a/packages/http-client-csharp/eng/scripts/Check-GitChanges.ps1 b/packages/http-client-csharp/eng/scripts/Check-GitChanges.ps1 index c4bde91a49e..9c7190758cb 100644 --- a/packages/http-client-csharp/eng/scripts/Check-GitChanges.ps1 +++ b/packages/http-client-csharp/eng/scripts/Check-GitChanges.ps1 @@ -20,3 +20,12 @@ Invoke-LoggedCommand "git -c core.safecrlf=false diff --ignore-space-at-eol --ex if($LastExitCode -ne 0) { throw "Changes detected" } + +# Check for untracked files that should have been committed (e.g. newly generated files) +$generatorRoot = "$packageRoot/generator" +$untrackedOutput = Invoke-LoggedCommand "git ls-files --others --exclude-standard -- $generatorRoot" +if ($untrackedOutput) { + Write-Host "Untracked files detected:" + Write-Host $untrackedOutput + throw "Untracked files detected" +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/ConfigurationSchemaGenerator.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/ConfigurationSchemaGenerator.cs new file mode 100644 index 00000000000..72245c0305a --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/ConfigurationSchemaGenerator.cs @@ -0,0 +1,376 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; +using System.Text.Json.Nodes; +using Microsoft.TypeSpec.Generator.ClientModel.Providers; +using Microsoft.TypeSpec.Generator.Input.Extensions; +using Microsoft.TypeSpec.Generator.Primitives; +using Microsoft.TypeSpec.Generator.Providers; + +namespace Microsoft.TypeSpec.Generator.ClientModel +{ + /// + /// Generates a ConfigurationSchema.json file for JSON IntelliSense support in appsettings.json. + /// The schema defines well-known client names and their configuration properties. + /// Common definitions (credential, options) are inherited from the System.ClientModel base schema + /// and not duplicated here. Only additional types specific to the generated client (e.g., enums, + /// custom models) are defined locally. + /// + internal static class ConfigurationSchemaGenerator + { + internal const string DefaultSectionName = "Clients"; + internal const string DefaultOptionsRef = "options"; + + private static readonly JsonSerializerOptions s_jsonOptions = new() + { + WriteIndented = true + }; + + /// + /// Generates the ConfigurationSchema.json content based on the output library's type providers. + /// Returns null if no clients with are found. + /// + internal static string? Generate(OutputLibrary output, string sectionName = DefaultSectionName, string optionsRef = DefaultOptionsRef) + { + var clientsWithSettings = output.TypeProviders + .OfType() + .Where(c => c.ClientSettings != null) + .ToList(); + + if (clientsWithSettings.Count == 0) + { + return null; + } + + var schema = BuildSchema(clientsWithSettings, sectionName, optionsRef); + return JsonSerializer.Serialize(schema, s_jsonOptions).ReplaceLineEndings("\n") + "\n"; + } + + private static JsonObject BuildSchema( + List clients, + string sectionName, + string optionsRef) + { + // Collect local definitions for non-base types during schema generation + var localDefinitions = new Dictionary(); + var clientProperties = new JsonObject(); + + foreach (var client in clients) + { + var clientEntry = BuildClientEntry(client, optionsRef, localDefinitions); + clientProperties[client.Name] = clientEntry; + } + + var schema = new JsonObject + { + ["type"] = "object", + ["properties"] = new JsonObject + { + [sectionName] = new JsonObject + { + ["type"] = "object", + ["properties"] = clientProperties, + ["additionalProperties"] = new JsonObject + { + ["type"] = "object", + ["description"] = "Configuration for a named client instance." + } + } + } + }; + + // Add local definitions only for types not covered by the base schema + if (localDefinitions.Count > 0) + { + var definitions = new JsonObject(); + foreach (var (name, definition) in localDefinitions.OrderBy(kvp => kvp.Key)) + { + definitions[name] = definition; + } + schema["definitions"] = definitions; + } + + return schema; + } + + private static JsonObject BuildClientEntry(ClientProvider client, string optionsRef, Dictionary localDefinitions) + { + var settings = client.ClientSettings!; + var properties = new JsonObject(); + + // Add endpoint property (Name is already transformed by PropertyProvider construction) + if (settings.EndpointProperty != null) + { + properties[settings.EndpointProperty.Name] = BuildPropertySchema(settings.EndpointProperty, localDefinitions); + } + + // Add other required parameters (raw param names need ToIdentifierName() for PascalCase) + foreach (var param in settings.OtherRequiredParams) + { + var propName = param.Name.ToIdentifierName(); + properties[propName] = GetJsonSchemaForType(param.Type, localDefinitions); + } + + // Add credential reference (defined in System.ClientModel base schema) + properties["Credential"] = new JsonObject + { + ["$ref"] = "#/definitions/credential" + }; + + // Add options + properties["Options"] = BuildOptionsSchema(client, optionsRef, localDefinitions); + + return new JsonObject + { + ["type"] = "object", + ["description"] = $"Configuration for {client.Name}.", + ["properties"] = properties + }; + } + + private static JsonObject BuildOptionsSchema(ClientProvider client, string optionsRef, Dictionary localDefinitions) + { + var clientOptions = client.EffectiveClientOptions; + if (clientOptions == null) + { + return new JsonObject + { + ["$ref"] = $"#/definitions/{optionsRef}" + }; + } + + // Build a named local definition for this client's options type that inherits from the base options. + // This follows the same pattern used in the Azure emitter where client options types extend the + // core options type using allOf. + var optionsTypeName = clientOptions.Name; + var definitionName = optionsTypeName.Length > 1 + ? char.ToLowerInvariant(optionsTypeName[0]) + optionsTypeName.Substring(1) + : optionsTypeName.ToLowerInvariant(); + + if (!localDefinitions.ContainsKey(definitionName)) + { + // Get client-specific option properties (public, non-version properties) + var customProperties = clientOptions.Properties + .Where(p => p.Modifiers.HasFlag(MethodSignatureModifiers.Public)) + .ToList(); + + var allOfArray = new JsonArray + { + new JsonObject { ["$ref"] = $"#/definitions/{optionsRef}" } + }; + + if (customProperties.Count > 0) + { + var extensionProperties = new JsonObject(); + foreach (var prop in customProperties) + { + extensionProperties[prop.Name] = GetJsonSchemaForType(prop.Type, localDefinitions); + } + + allOfArray.Add(new JsonObject + { + ["type"] = "object", + ["properties"] = extensionProperties + }); + } + + localDefinitions[definitionName] = new JsonObject + { + ["allOf"] = allOfArray + }; + } + + return new JsonObject + { + ["$ref"] = $"#/definitions/{definitionName}" + }; + } + + private static JsonObject BuildPropertySchema(PropertyProvider property, Dictionary localDefinitions) + { + var schema = GetJsonSchemaForType(property.Type, localDefinitions); + + if (property.Description != null) + { + var descriptionText = property.Description.ToString(); + if (!string.IsNullOrEmpty(descriptionText)) + { + schema["description"] = descriptionText; + } + } + + return schema; + } + + internal static JsonObject GetJsonSchemaForType(CSharpType type, Dictionary? localDefinitions = null) + { + // Unwrap nullable types + var effectiveType = type.IsNullable ? type.WithNullable(false) : type; + + // Handle non-framework types + if (!effectiveType.IsFrameworkType) + { + if (effectiveType.IsEnum) + { + return GetJsonSchemaForEnum(effectiveType, localDefinitions); + } + + return GetJsonSchemaForModel(effectiveType, localDefinitions); + } + + // Handle collection types + if (effectiveType.IsList) + { + return BuildArraySchema(effectiveType, localDefinitions); + } + + var frameworkType = effectiveType.FrameworkType; + + if (frameworkType == typeof(string)) + { + return new JsonObject { ["type"] = "string" }; + } + if (frameworkType == typeof(bool)) + { + return new JsonObject { ["type"] = "boolean" }; + } + if (frameworkType == typeof(int) || frameworkType == typeof(long)) + { + return new JsonObject { ["type"] = "integer" }; + } + if (frameworkType == typeof(float) || frameworkType == typeof(double)) + { + return new JsonObject { ["type"] = "number" }; + } + if (frameworkType == typeof(Uri)) + { + return new JsonObject { ["type"] = "string", ["format"] = "uri" }; + } + if (frameworkType == typeof(TimeSpan)) + { + return new JsonObject { ["type"] = "string" }; + } + + return new JsonObject { ["type"] = "object" }; + } + + private static JsonObject GetJsonSchemaForEnum(CSharpType enumType, Dictionary? localDefinitions) + { + // Search both top-level and nested types (e.g., service version enums nested in options) in a single pass + var enumProvider = CodeModelGenerator.Instance.OutputLibrary.TypeProviders + .SelectMany(t => new[] { t }.Concat(t.NestedTypes)) + .OfType() + .FirstOrDefault(e => e.Type.Equals(enumType)); + + if (enumProvider != null) + { + var values = new JsonArray(); + foreach (var member in enumProvider.EnumValues) + { + values.Add(JsonValue.Create(member.Value?.ToString())); + } + + JsonObject enumSchema; + if (enumType.IsStruct) + { + // Extensible enum — use anyOf to allow known values + custom strings + enumSchema = new JsonObject + { + ["anyOf"] = new JsonArray + { + new JsonObject { ["enum"] = values }, + new JsonObject { ["type"] = "string" } + } + }; + } + else + { + // Fixed enum + enumSchema = new JsonObject { ["enum"] = values }; + } + + // Register as a local definition if we're collecting them + if (localDefinitions != null) + { + var name = enumProvider.Name; + var definitionName = name.Length > 1 + ? char.ToLowerInvariant(name[0]) + name.Substring(1) + : name.ToLowerInvariant(); + if (!localDefinitions.ContainsKey(definitionName)) + { + localDefinitions[definitionName] = enumSchema; + } + return new JsonObject { ["$ref"] = $"#/definitions/{definitionName}" }; + } + + return enumSchema; + } + + // Fallback: just string + return new JsonObject { ["type"] = "string" }; + } + + private static JsonObject GetJsonSchemaForModel(CSharpType modelType, Dictionary? localDefinitions) + { + // Search for the model provider in the output library + var modelProvider = CodeModelGenerator.Instance.OutputLibrary.TypeProviders + .SelectMany(t => new[] { t }.Concat(t.NestedTypes)) + .FirstOrDefault(m => m is ModelProvider && m.Type.Equals(modelType)); + + if (modelProvider != null) + { + var name = modelProvider.Name; + var definitionName = name.Length > 1 + ? char.ToLowerInvariant(name[0]) + name.Substring(1) + : name.ToLowerInvariant(); + + if (localDefinitions != null && !localDefinitions.ContainsKey(definitionName)) + { + var modelProperties = new JsonObject(); + foreach (var prop in modelProvider.Properties + .Where(p => p.Modifiers.HasFlag(MethodSignatureModifiers.Public))) + { + modelProperties[prop.Name] = GetJsonSchemaForType(prop.Type, localDefinitions); + } + + var modelSchema = new JsonObject { ["type"] = "object" }; + if (modelProperties.Count > 0) + { + modelSchema["properties"] = modelProperties; + } + + localDefinitions[definitionName] = modelSchema; + } + + if (localDefinitions != null) + { + return new JsonObject { ["$ref"] = $"#/definitions/{definitionName}" }; + } + } + + return new JsonObject { ["type"] = "object" }; + } + + private static JsonObject BuildArraySchema(CSharpType listType, Dictionary? localDefinitions) + { + if (listType.Arguments.Count > 0) + { + return new JsonObject + { + ["type"] = "array", + ["items"] = GetJsonSchemaForType(listType.Arguments[0], localDefinitions) + }; + } + + return new JsonObject + { + ["type"] = "array", + ["items"] = new JsonObject { ["type"] = "string" } + }; + } + } +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientOptionsProvider.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientOptionsProvider.cs index 2751a397773..a2420740832 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientOptionsProvider.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Providers/ClientOptionsProvider.cs @@ -10,9 +10,9 @@ using Microsoft.TypeSpec.Generator.Input.Extensions; using Microsoft.TypeSpec.Generator.Primitives; using Microsoft.TypeSpec.Generator.Providers; +using Microsoft.TypeSpec.Generator.Shared; using Microsoft.TypeSpec.Generator.Snippets; using Microsoft.TypeSpec.Generator.Statements; -using Microsoft.TypeSpec.Generator.Shared; using Microsoft.TypeSpec.Generator.Utilities; using static Microsoft.TypeSpec.Generator.Snippets.Snippet; @@ -20,7 +20,6 @@ namespace Microsoft.TypeSpec.Generator.ClientModel.Providers { public class ClientOptionsProvider : TypeProvider { - private const string ServicePrefix = "Service"; private const string VersionSuffix = "Version"; private const string ApiVersionSuffix = "ApiVersion"; private const string LatestPrefix = "Latest"; @@ -124,7 +123,7 @@ private static bool UseSingletonInstance(InputClient inputClient) internal IReadOnlyDictionary? VersionProperties => field ??= BuildVersionProperties(); - private Dictionary? BuildVersionProperties() + private Dictionary? BuildVersionProperties() { if (_serviceVersionsEnums is null) { diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/ScmCodeModelGenerator.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/ScmCodeModelGenerator.cs index 0d9f0b3a36e..880545ed93c 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/ScmCodeModelGenerator.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/ScmCodeModelGenerator.cs @@ -4,7 +4,9 @@ using System; using System.ClientModel; using System.ComponentModel.Composition; +using System.IO; using System.Text.Json; +using System.Threading.Tasks; using Microsoft.CodeAnalysis; using Microsoft.TypeSpec.Generator.ClientModel.Providers; @@ -44,5 +46,38 @@ protected override void Configure() AddMetadataReference(MetadataReference.CreateFromFile(typeof(JsonSerializer).Assembly.Location)); AddTypeToKeep(ModelReaderWriterContextDefinition.s_name, isRoot: false); } + + public override async Task WriteAdditionalFiles(string outputPath) + { + var schemaContent = ConfigurationSchemaGenerator.Generate(OutputLibrary); + if (schemaContent != null) + { + var schemaPath = Path.Combine(outputPath, "schema", "ConfigurationSchema.json"); + var schemaDir = Path.GetDirectoryName(schemaPath); + if (schemaDir != null) + { + Directory.CreateDirectory(schemaDir); + } + Emitter.Info($"Writing {Path.GetFullPath(schemaPath)}"); + await File.WriteAllTextAsync(schemaPath, schemaContent); + + // Generate the .targets file for JsonSchemaSegment registration + var packageName = Configuration.PackageName; + var targetsPath = Path.Combine(outputPath, $"{packageName}.NuGet.targets"); + var targetsContent = GenerateTargetsFile(); + Emitter.Info($"Writing {Path.GetFullPath(targetsPath)}"); + await File.WriteAllTextAsync(targetsPath, targetsContent); + } + } + + private static string GenerateTargetsFile() + { + return "\n" + + " \n" + + " \n" + + " \n" + + "\n"; + } } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ConfigurationSchemaGeneratorTests.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ConfigurationSchemaGeneratorTests.cs new file mode 100644 index 00000000000..e118f3fd6dd --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/ConfigurationSchemaGeneratorTests.cs @@ -0,0 +1,767 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Text.Json; +using System.Text.Json.Nodes; +using Microsoft.TypeSpec.Generator.ClientModel.Providers; +using Microsoft.TypeSpec.Generator.Input; +using Microsoft.TypeSpec.Generator.Primitives; +using Microsoft.TypeSpec.Generator.Providers; +using Microsoft.TypeSpec.Generator.Tests.Common; +using NUnit.Framework; + +namespace Microsoft.TypeSpec.Generator.ClientModel.Tests +{ + public class ConfigurationSchemaGeneratorTests + { + [SetUp] + public void SetUp() + { + // Reset the singleton instance before each test + var singletonField = typeof(ClientOptionsProvider).GetField("_singletonInstance", BindingFlags.Static | BindingFlags.NonPublic); + singletonField?.SetValue(null, null); + + MockHelpers.LoadMockGenerator(); + } + + private static string GetExpectedJsonFromFile([CallerMemberName] string method = "", [CallerFilePath] string filePath = "") + { + var callingClass = Path.GetFileName(filePath).Split('.').First(); + var path = Path.Combine(Path.GetDirectoryName(filePath)!, "TestData", callingClass, $"{method}.json"); + return File.ReadAllText(path); + } + + [Test] + public void Generate_ReturnsNull_WhenNoClientsWithSettings() + { + var output = new TestOutputLibrary([]); + var result = ConfigurationSchemaGenerator.Generate(output); + Assert.IsNull(result); + } + + [Test] + public void Generate_ReturnsSchema_ForClientWithSettings() + { + var client = InputFactory.Client("TestService"); + var clientProvider = new ClientProvider(client); + + Assert.IsNotNull(clientProvider.ClientSettings, "ClientSettings should not be null for individually-initialized client"); + + var output = new TestOutputLibrary([clientProvider]); + var result = ConfigurationSchemaGenerator.Generate(output); + + Assert.IsNotNull(result); + + var doc = JsonNode.Parse(result!)!; + Assert.AreEqual("object", doc["type"]?.GetValue()); + + // Since the default generator uses SCM (System.ClientModel), the section should be "Clients" + var clients = doc["properties"]?["Clients"]; + Assert.IsNotNull(clients, "Schema should have a 'Clients' section for SCM clients"); + Assert.AreEqual("object", clients!["type"]?.GetValue()); + + var testClient = clients["properties"]?["TestService"]; + Assert.IsNotNull(testClient, "Schema should have a well-known 'TestService' entry"); + Assert.AreEqual("object", testClient!["type"]?.GetValue()); + + var expected = GetExpectedJsonFromFile(); + Assert.AreEqual(expected, result); + } + + [Test] + public void Generate_IncludesCredentialReference() + { + var client = InputFactory.Client("TestService"); + var clientProvider = new ClientProvider(client); + + var output = new TestOutputLibrary([clientProvider]); + var result = ConfigurationSchemaGenerator.Generate(output); + + Assert.IsNotNull(result); + var doc = JsonNode.Parse(result!)!; + + var clientEntry = doc["properties"]?["Clients"]?["properties"]?["TestService"]; + var credential = clientEntry?["properties"]?["Credential"]; + Assert.IsNotNull(credential, "Client entry should have a Credential property"); + Assert.AreEqual("#/definitions/credential", credential!["$ref"]?.GetValue()); + } + + [Test] + public void Generate_IncludesOptionsReference() + { + var client = InputFactory.Client("TestService"); + var clientProvider = new ClientProvider(client); + + var output = new TestOutputLibrary([clientProvider]); + var result = ConfigurationSchemaGenerator.Generate(output); + + Assert.IsNotNull(result); + var doc = JsonNode.Parse(result!)!; + + var clientEntry = doc["properties"]?["Clients"]?["properties"]?["TestService"]; + var options = clientEntry?["properties"]?["Options"]; + Assert.IsNotNull(options, "Client entry should have an Options property"); + + // Options should reference a local named definition that inherits from the base options + var optionsRef = options!["$ref"]?.GetValue(); + Assert.IsNotNull(optionsRef, "Options should be a $ref"); + Assert.That(optionsRef, Does.StartWith("#/definitions/"), "Options $ref should point to a local definition"); + + // Verify the local definition exists and inherits from base options via allOf + var defName = optionsRef!.Replace("#/definitions/", ""); + var optionsDef = doc["definitions"]?[defName]; + Assert.IsNotNull(optionsDef, $"Local definition '{defName}' should exist"); + + var allOf = optionsDef!["allOf"]; + Assert.IsNotNull(allOf, "Options definition should use allOf to inherit from base options"); + Assert.AreEqual("#/definitions/options", allOf!.AsArray()[0]?["$ref"]?.GetValue()); + } + + [Test] + public void Generate_IncludesOptionsDefinition_InheritingFromBase() + { + var client = InputFactory.Client("TestService"); + var clientProvider = new ClientProvider(client); + + var output = new TestOutputLibrary([clientProvider]); + var result = ConfigurationSchemaGenerator.Generate(output); + + Assert.IsNotNull(result); + var doc = JsonNode.Parse(result!)!; + + // The options type should always be defined as a local definition that inherits from base options. + // Common definitions (credential, base options) are provided by System.ClientModel base schema. + var definitions = doc["definitions"]; + Assert.IsNotNull(definitions, "Schema should include local definitions for the options type"); + + // Find the options definition and verify it inherits from the base options + var clientEntry = doc["properties"]?["Clients"]?["properties"]?["TestService"]; + var optionsRef = clientEntry?["properties"]?["Options"]?["$ref"]?.GetValue(); + Assert.IsNotNull(optionsRef, "Options should reference a local definition"); + var defName = optionsRef!.Replace("#/definitions/", ""); + var optionsDef = definitions![defName]; + Assert.IsNotNull(optionsDef, $"Options definition '{defName}' should exist"); + + var allOf = optionsDef!["allOf"]; + Assert.IsNotNull(allOf, "Options definition should use allOf to inherit from base options"); + Assert.AreEqual("#/definitions/options", allOf!.AsArray()[0]?["$ref"]?.GetValue(), + "First allOf element should reference the base options type"); + } + + [Test] + public void Generate_IncludesLocalDefinitions_ForEnumTypes() + { + // Create a non-api-version enum type + var retryModeEnum = InputFactory.StringEnum( + "RetryMode", + [("Fixed", "Fixed"), ("Exponential", "Exponential")], + isExtensible: false); + + // Reset and reload mock with the enum registered + var singletonField = typeof(ClientOptionsProvider).GetField("_singletonInstance", BindingFlags.Static | BindingFlags.NonPublic); + singletonField?.SetValue(null, null); + MockHelpers.LoadMockGenerator(inputEnums: () => [retryModeEnum]); + + InputParameter[] inputParameters = + [ + InputFactory.EndpointParameter( + "endpoint", + InputPrimitiveType.String, + defaultValue: InputFactory.Constant.String("https://default.endpoint.io"), + scope: InputParameterScope.Client, + isEndpoint: true), + InputFactory.QueryParameter( + "retryMode", + retryModeEnum, + isRequired: false, + defaultValue: new InputConstant("Exponential", retryModeEnum), + scope: InputParameterScope.Client, + isApiVersion: false) + ]; + var client = InputFactory.Client("TestService", parameters: inputParameters); + var clientProvider = new ClientProvider(client); + + var output = new TestOutputLibrary([clientProvider]); + var result = ConfigurationSchemaGenerator.Generate(output); + + Assert.IsNotNull(result); + var doc = JsonNode.Parse(result!)!; + + // Verify local definitions contain the enum + var definitions = doc["definitions"]; + Assert.IsNotNull(definitions, "Schema should include local definitions for non-base types"); + + var retryModeDef = definitions!["retryMode"]; + Assert.IsNotNull(retryModeDef, "Definitions should include 'retryMode' enum"); + + // Fixed enum should have enum values + var enumValues = retryModeDef!["enum"]; + Assert.IsNotNull(enumValues, "Enum definition should have 'enum' values"); + + // Verify the option property references the local definition via $ref + var clientEntry = doc["properties"]?["Clients"]?["properties"]?["TestService"]; + var options = clientEntry?["properties"]?["Options"]; + var optionsRef = options?["$ref"]?.GetValue(); + Assert.IsNotNull(optionsRef, "Options should reference a local definition"); + var optionsDefName = optionsRef!.Replace("#/definitions/", ""); + + // The options definition should use allOf with custom properties + var optionsDef = definitions![optionsDefName]; + Assert.IsNotNull(optionsDef, $"Options definition '{optionsDefName}' should exist"); + var allOf = optionsDef!["allOf"]; + Assert.IsNotNull(allOf, "Options definition should use allOf"); + + var extensionProperties = allOf!.AsArray()[1]?["properties"]; + var retryModeProp = extensionProperties!["RetryMode"]; + Assert.IsNotNull(retryModeProp, "Custom option property should exist"); + Assert.AreEqual("#/definitions/retryMode", retryModeProp!["$ref"]?.GetValue()); + } + + [Test] + public void Generate_IncludesEndpointProperty_ForStringEndpoint() + { + var inputParameters = new[] + { + InputFactory.EndpointParameter( + "endpoint", + InputPrimitiveType.String, + defaultValue: InputFactory.Constant.String("https://default.endpoint.io"), + scope: InputParameterScope.Client, + isEndpoint: true) + }; + var client = InputFactory.Client("TestService", parameters: inputParameters); + var clientProvider = new ClientProvider(client); + + var output = new TestOutputLibrary([clientProvider]); + var result = ConfigurationSchemaGenerator.Generate(output); + + Assert.IsNotNull(result); + var doc = JsonNode.Parse(result!)!; + + var clientEntry = doc["properties"]?["Clients"]?["properties"]?["TestService"]; + var endpoint = clientEntry?["properties"]?["Endpoint"]; + Assert.IsNotNull(endpoint, "Client entry should have an Endpoint property"); + Assert.AreEqual("string", endpoint!["type"]?.GetValue()); + } + + [Test] + public void Generate_IncludesEndpointProperty_ForUriEndpoint() + { + var inputParameters = new[] + { + InputFactory.EndpointParameter( + "endpoint", + InputPrimitiveType.Url, + defaultValue: InputFactory.Constant.String("https://default.endpoint.io"), + scope: InputParameterScope.Client, + isEndpoint: true) + }; + var client = InputFactory.Client("TestService", parameters: inputParameters); + var clientProvider = new ClientProvider(client); + + var output = new TestOutputLibrary([clientProvider]); + var result = ConfigurationSchemaGenerator.Generate(output); + + Assert.IsNotNull(result); + var doc = JsonNode.Parse(result!)!; + + var clientEntry = doc["properties"]?["Clients"]?["properties"]?["TestService"]; + var endpoint = clientEntry?["properties"]?["Endpoint"]; + Assert.IsNotNull(endpoint, "Client entry should have an Endpoint property"); + Assert.AreEqual("string", endpoint!["type"]?.GetValue()); + Assert.AreEqual("uri", endpoint!["format"]?.GetValue()); + } + + [Test] + public void Generate_IncludesOptionsAllOf_WhenClientHasCustomOptions() + { + InputParameter[] inputParameters = + [ + InputFactory.EndpointParameter( + "endpoint", + InputPrimitiveType.String, + defaultValue: InputFactory.Constant.String("https://default.endpoint.io"), + scope: InputParameterScope.Client, + isEndpoint: true), + InputFactory.QueryParameter( + "enableTenantDiscovery", + InputPrimitiveType.Boolean, + isRequired: false, + defaultValue: new InputConstant(false, InputPrimitiveType.Boolean), + scope: InputParameterScope.Client, + isApiVersion: false) + ]; + var client = InputFactory.Client("BlobService", parameters: inputParameters); + var clientProvider = new ClientProvider(client); + + var output = new TestOutputLibrary([clientProvider]); + var result = ConfigurationSchemaGenerator.Generate(output); + + Assert.IsNotNull(result); + var doc = JsonNode.Parse(result!)!; + + var clientEntry = doc["properties"]?["Clients"]?["properties"]?["BlobService"]; + var options = clientEntry?["properties"]?["Options"]; + Assert.IsNotNull(options, "Client entry should have an Options property"); + + // Options should reference a named local definition + var optionsRef = options!["$ref"]?.GetValue(); + Assert.IsNotNull(optionsRef, "Options should be a $ref to a local definition"); + var defName = optionsRef!.Replace("#/definitions/", ""); + + // Verify the local definition uses allOf to inherit from base options with custom properties + var optionsDef = doc["definitions"]?[defName]; + Assert.IsNotNull(optionsDef, $"Options definition '{defName}' should exist"); + + var allOf = optionsDef!["allOf"]; + Assert.IsNotNull(allOf, "Options definition should use allOf"); + + var allOfArray = allOf!.AsArray(); + Assert.AreEqual(2, allOfArray.Count, + "allOf should have base options ref + custom properties extension"); + Assert.AreEqual("#/definitions/options", allOfArray[0]?["$ref"]?.GetValue()); + Assert.AreEqual("object", allOfArray[1]?["type"]?.GetValue()); + + // Verify the custom property is included + var extensionProperties = allOfArray[1]?["properties"]; + Assert.IsNotNull(extensionProperties); + var enableTenantDiscovery = extensionProperties!["EnableTenantDiscovery"]; + Assert.IsNotNull(enableTenantDiscovery, "Custom option property should be included"); + Assert.AreEqual("boolean", enableTenantDiscovery!["type"]?.GetValue()); + } + + [Test] + public void Generate_OptionsDefinition_IncludesStringProperty() + { + InputParameter[] inputParameters = + [ + InputFactory.EndpointParameter( + "endpoint", + InputPrimitiveType.String, + defaultValue: InputFactory.Constant.String("https://default.endpoint.io"), + scope: InputParameterScope.Client, + isEndpoint: true), + InputFactory.QueryParameter( + "audience", + InputPrimitiveType.String, + isRequired: false, + defaultValue: new InputConstant("https://api.example.com", InputPrimitiveType.String), + scope: InputParameterScope.Client, + isApiVersion: false) + ]; + var client = InputFactory.Client("TestService", parameters: inputParameters); + var clientProvider = new ClientProvider(client); + + var output = new TestOutputLibrary([clientProvider]); + var result = ConfigurationSchemaGenerator.Generate(output); + + Assert.IsNotNull(result); + var doc = JsonNode.Parse(result!)!; + + var clientEntry = doc["properties"]?["Clients"]?["properties"]?["TestService"]; + var optionsRef = clientEntry?["properties"]?["Options"]?["$ref"]?.GetValue(); + Assert.IsNotNull(optionsRef); + var defName = optionsRef!.Replace("#/definitions/", ""); + + var optionsDef = doc["definitions"]?[defName]; + Assert.IsNotNull(optionsDef); + + var allOf = optionsDef!["allOf"]!.AsArray(); + Assert.AreEqual(2, allOf.Count, "allOf should have base options + extension"); + Assert.AreEqual("#/definitions/options", allOf[0]?["$ref"]?.GetValue()); + + var extensionProperties = allOf[1]?["properties"]; + Assert.IsNotNull(extensionProperties); + var audienceProp = extensionProperties!["Audience"]; + Assert.IsNotNull(audienceProp, "String option property should exist"); + Assert.AreEqual("string", audienceProp!["type"]?.GetValue()); + } + + [Test] + public void Generate_OptionsDefinition_IncludesIntegerProperty() + { + InputParameter[] inputParameters = + [ + InputFactory.EndpointParameter( + "endpoint", + InputPrimitiveType.String, + defaultValue: InputFactory.Constant.String("https://default.endpoint.io"), + scope: InputParameterScope.Client, + isEndpoint: true), + InputFactory.QueryParameter( + "maxRetries", + InputPrimitiveType.Int32, + isRequired: false, + defaultValue: new InputConstant(3, InputPrimitiveType.Int32), + scope: InputParameterScope.Client, + isApiVersion: false) + ]; + var client = InputFactory.Client("TestService", parameters: inputParameters); + var clientProvider = new ClientProvider(client); + + var output = new TestOutputLibrary([clientProvider]); + var result = ConfigurationSchemaGenerator.Generate(output); + + Assert.IsNotNull(result); + var doc = JsonNode.Parse(result!)!; + + var clientEntry = doc["properties"]?["Clients"]?["properties"]?["TestService"]; + var optionsRef = clientEntry?["properties"]?["Options"]?["$ref"]?.GetValue(); + Assert.IsNotNull(optionsRef); + var defName = optionsRef!.Replace("#/definitions/", ""); + + var optionsDef = doc["definitions"]?[defName]; + Assert.IsNotNull(optionsDef); + + var allOf = optionsDef!["allOf"]!.AsArray(); + Assert.AreEqual(2, allOf.Count, "allOf should have base options + extension"); + + var extensionProperties = allOf[1]?["properties"]; + Assert.IsNotNull(extensionProperties); + var maxRetriesProp = extensionProperties!["MaxRetries"]; + Assert.IsNotNull(maxRetriesProp, "Integer option property should exist"); + Assert.AreEqual("integer", maxRetriesProp!["type"]?.GetValue()); + } + + [Test] + public void Generate_OptionsDefinition_IncludesMultipleMixedProperties() + { + InputParameter[] inputParameters = + [ + InputFactory.EndpointParameter( + "endpoint", + InputPrimitiveType.String, + defaultValue: InputFactory.Constant.String("https://default.endpoint.io"), + scope: InputParameterScope.Client, + isEndpoint: true), + InputFactory.QueryParameter( + "audience", + InputPrimitiveType.String, + isRequired: false, + defaultValue: new InputConstant("https://api.example.com", InputPrimitiveType.String), + scope: InputParameterScope.Client, + isApiVersion: false), + InputFactory.QueryParameter( + "enableCaching", + InputPrimitiveType.Boolean, + isRequired: false, + defaultValue: new InputConstant(true, InputPrimitiveType.Boolean), + scope: InputParameterScope.Client, + isApiVersion: false), + InputFactory.QueryParameter( + "maxRetries", + InputPrimitiveType.Int32, + isRequired: false, + defaultValue: new InputConstant(3, InputPrimitiveType.Int32), + scope: InputParameterScope.Client, + isApiVersion: false) + ]; + var client = InputFactory.Client("TestService", parameters: inputParameters); + var clientProvider = new ClientProvider(client); + + var output = new TestOutputLibrary([clientProvider]); + var result = ConfigurationSchemaGenerator.Generate(output); + + Assert.IsNotNull(result); + var doc = JsonNode.Parse(result!)!; + + var clientEntry = doc["properties"]?["Clients"]?["properties"]?["TestService"]; + var optionsRef = clientEntry?["properties"]?["Options"]?["$ref"]?.GetValue(); + Assert.IsNotNull(optionsRef); + var defName = optionsRef!.Replace("#/definitions/", ""); + + var optionsDef = doc["definitions"]?[defName]; + Assert.IsNotNull(optionsDef); + + var allOf = optionsDef!["allOf"]!.AsArray(); + Assert.AreEqual(2, allOf.Count, "allOf should have base options + extension with multiple properties"); + Assert.AreEqual("#/definitions/options", allOf[0]?["$ref"]?.GetValue()); + Assert.AreEqual("object", allOf[1]?["type"]?.GetValue()); + + var extensionProperties = allOf[1]?["properties"]; + Assert.IsNotNull(extensionProperties); + + // Verify all three additional properties are present with correct types + var audienceProp = extensionProperties!["Audience"]; + Assert.IsNotNull(audienceProp, "String option property should exist"); + Assert.AreEqual("string", audienceProp!["type"]?.GetValue()); + + var enableCachingProp = extensionProperties!["EnableCaching"]; + Assert.IsNotNull(enableCachingProp, "Boolean option property should exist"); + Assert.AreEqual("boolean", enableCachingProp!["type"]?.GetValue()); + + var maxRetriesProp = extensionProperties!["MaxRetries"]; + Assert.IsNotNull(maxRetriesProp, "Integer option property should exist"); + Assert.AreEqual("integer", maxRetriesProp!["type"]?.GetValue()); + } + + [Test] + public void Generate_OptionsDefinition_IncludesModelProperty() + { + // Create a model type with properties + var retryPolicyModel = InputFactory.Model( + "RetryPolicyConfig", + properties: + [ + InputFactory.Property("MaxRetries", InputPrimitiveType.Int32), + InputFactory.Property("Delay", InputPrimitiveType.String) + ]); + + // Reset and reload mock with the model registered + var singletonField = typeof(ClientOptionsProvider).GetField("_singletonInstance", BindingFlags.Static | BindingFlags.NonPublic); + singletonField?.SetValue(null, null); + MockHelpers.LoadMockGenerator(inputModels: () => [retryPolicyModel]); + + InputParameter[] inputParameters = + [ + InputFactory.EndpointParameter( + "endpoint", + InputPrimitiveType.String, + defaultValue: InputFactory.Constant.String("https://default.endpoint.io"), + scope: InputParameterScope.Client, + isEndpoint: true), + InputFactory.QueryParameter( + "retryPolicy", + retryPolicyModel, + isRequired: false, + defaultValue: new InputConstant(null, retryPolicyModel), + scope: InputParameterScope.Client, + isApiVersion: false) + ]; + var client = InputFactory.Client("TestService", parameters: inputParameters); + var clientProvider = new ClientProvider(client); + + var output = new TestOutputLibrary([clientProvider]); + var result = ConfigurationSchemaGenerator.Generate(output); + + Assert.IsNotNull(result); + var doc = JsonNode.Parse(result!)!; + + // Verify local definitions contain the model + var definitions = doc["definitions"]; + Assert.IsNotNull(definitions, "Schema should include local definitions"); + + var retryPolicyDef = definitions!["retryPolicyConfig"]; + Assert.IsNotNull(retryPolicyDef, "Definitions should include 'retryPolicyConfig' model"); + Assert.AreEqual("object", retryPolicyDef!["type"]?.GetValue()); + + // Verify the model definition has its properties + var modelProperties = retryPolicyDef["properties"]; + Assert.IsNotNull(modelProperties, "Model definition should have properties"); + Assert.IsNotNull(modelProperties!["MaxRetries"], "Model should have MaxRetries property"); + Assert.AreEqual("integer", modelProperties["MaxRetries"]!["type"]?.GetValue()); + Assert.IsNotNull(modelProperties["Delay"], "Model should have Delay property"); + Assert.AreEqual("string", modelProperties["Delay"]!["type"]?.GetValue()); + + // Verify the options definition references the model via $ref + var clientEntry = doc["properties"]?["Clients"]?["properties"]?["TestService"]; + var optionsRef = clientEntry?["properties"]?["Options"]?["$ref"]?.GetValue(); + Assert.IsNotNull(optionsRef); + var optionsDefName = optionsRef!.Replace("#/definitions/", ""); + + var optionsDef = definitions[optionsDefName]; + Assert.IsNotNull(optionsDef); + var allOf = optionsDef!["allOf"]!.AsArray(); + Assert.AreEqual(2, allOf.Count, "allOf should have base options + extension"); + + var extensionProperties = allOf[1]?["properties"]; + Assert.IsNotNull(extensionProperties); + var retryPolicyProp = extensionProperties!["RetryPolicy"]; + Assert.IsNotNull(retryPolicyProp, "Model option property should exist"); + Assert.AreEqual("#/definitions/retryPolicyConfig", retryPolicyProp!["$ref"]?.GetValue()); + } + + [Test] + public void Generate_ConstructorParameter_IncludesModelDefinition() + { + // Create a model type with properties to use as a required constructor parameter + var connectionConfigModel = InputFactory.Model( + "ConnectionConfig", + properties: + [ + InputFactory.Property("Host", InputPrimitiveType.String), + InputFactory.Property("Port", InputPrimitiveType.Int32) + ]); + + // Reset and reload mock with the model registered + var singletonField = typeof(ClientOptionsProvider).GetField("_singletonInstance", BindingFlags.Static | BindingFlags.NonPublic); + singletonField?.SetValue(null, null); + MockHelpers.LoadMockGenerator(inputModels: () => [connectionConfigModel]); + + InputParameter[] inputParameters = + [ + InputFactory.EndpointParameter( + "endpoint", + InputPrimitiveType.String, + defaultValue: InputFactory.Constant.String("https://default.endpoint.io"), + scope: InputParameterScope.Client, + isEndpoint: true), + InputFactory.QueryParameter( + "connectionConfig", + connectionConfigModel, + isRequired: true, + scope: InputParameterScope.Client, + isApiVersion: false) + ]; + var client = InputFactory.Client("TestService", parameters: inputParameters); + var clientProvider = new ClientProvider(client); + + var output = new TestOutputLibrary([clientProvider]); + var result = ConfigurationSchemaGenerator.Generate(output); + + Assert.IsNotNull(result); + var doc = JsonNode.Parse(result!)!; + + // Verify local definitions contain the model + var definitions = doc["definitions"]; + Assert.IsNotNull(definitions, "Schema should include local definitions"); + + var connectionConfigDef = definitions!["connectionConfig"]; + Assert.IsNotNull(connectionConfigDef, "Definitions should include 'connectionConfig' model"); + Assert.AreEqual("object", connectionConfigDef!["type"]?.GetValue()); + + // Verify the model definition has its properties + var modelProperties = connectionConfigDef["properties"]; + Assert.IsNotNull(modelProperties, "Model definition should have properties"); + Assert.IsNotNull(modelProperties!["Host"], "Model should have Host property"); + Assert.AreEqual("string", modelProperties["Host"]!["type"]?.GetValue()); + Assert.IsNotNull(modelProperties["Port"], "Model should have Port property"); + Assert.AreEqual("integer", modelProperties["Port"]!["type"]?.GetValue()); + + // Verify the model appears as a top-level constructor parameter property (not under Options) + var clientEntry = doc["properties"]?["Clients"]?["properties"]?["TestService"]; + Assert.IsNotNull(clientEntry); + var connectionConfigProp = clientEntry!["properties"]?["ConnectionConfig"]; + Assert.IsNotNull(connectionConfigProp, "Constructor parameter model should appear as top-level client property"); + Assert.AreEqual("#/definitions/connectionConfig", connectionConfigProp!["$ref"]?.GetValue()); + + var expected = GetExpectedJsonFromFile(); + Assert.AreEqual(expected, result); + } + + [Test] + public void Generate_HandlesMultipleClients() + { + var client1 = InputFactory.Client("ServiceA"); + var client2 = InputFactory.Client("ServiceB"); + var provider1 = new ClientProvider(client1); + var provider2 = new ClientProvider(client2); + + var output = new TestOutputLibrary([provider1, provider2]); + var result = ConfigurationSchemaGenerator.Generate(output); + + Assert.IsNotNull(result); + var doc = JsonNode.Parse(result!)!; + + var clientsSection = doc["properties"]?["Clients"]?["properties"]; + Assert.IsNotNull(clientsSection?["ServiceA"], "Should include ServiceA"); + Assert.IsNotNull(clientsSection?["ServiceB"], "Should include ServiceB"); + + var expected = GetExpectedJsonFromFile(); + Assert.AreEqual(expected, result); + } + + [Test] + public void Generate_IncludesAdditionalPropertiesOnSection() + { + var client = InputFactory.Client("TestService"); + var clientProvider = new ClientProvider(client); + + var output = new TestOutputLibrary([clientProvider]); + var result = ConfigurationSchemaGenerator.Generate(output); + + Assert.IsNotNull(result); + var doc = JsonNode.Parse(result!)!; + + var clientsSection = doc["properties"]?["Clients"]; + var additionalProperties = clientsSection?["additionalProperties"]; + Assert.IsNotNull(additionalProperties, "Section should have additionalProperties for custom-named instances"); + Assert.AreEqual("object", additionalProperties!["type"]?.GetValue()); + } + + [Test] + public void Generate_ReturnsNull_WhenClientIsParentOnlyInitialized() + { + // Create a sub-client initialized by parent only + var parentClient = InputFactory.Client("ParentService"); + var subClient = InputFactory.Client( + "SubService", + parent: parentClient, + initializedBy: InputClientInitializedBy.Parent); + var subProvider = new ClientProvider(subClient); + + // Sub-client with Parent initialization should NOT have ClientSettings + Assert.IsNull(subProvider.ClientSettings); + + var output = new TestOutputLibrary([subProvider]); + var result = ConfigurationSchemaGenerator.Generate(output); + Assert.IsNull(result, "Should return null when no clients have settings"); + } + + [Test] + public void GetJsonSchemaForType_ReturnsCorrectSchema_ForPrimitiveTypes() + { + // String + var stringSchema = ConfigurationSchemaGenerator.GetJsonSchemaForType(new CSharpType(typeof(string))); + Assert.AreEqual("string", stringSchema["type"]?.GetValue()); + + // Boolean + var boolSchema = ConfigurationSchemaGenerator.GetJsonSchemaForType(new CSharpType(typeof(bool))); + Assert.AreEqual("boolean", boolSchema["type"]?.GetValue()); + + // Integer types + var intSchema = ConfigurationSchemaGenerator.GetJsonSchemaForType(new CSharpType(typeof(int))); + Assert.AreEqual("integer", intSchema["type"]?.GetValue()); + + var longSchema = ConfigurationSchemaGenerator.GetJsonSchemaForType(new CSharpType(typeof(long))); + Assert.AreEqual("integer", longSchema["type"]?.GetValue()); + + // Float types + var floatSchema = ConfigurationSchemaGenerator.GetJsonSchemaForType(new CSharpType(typeof(float))); + Assert.AreEqual("number", floatSchema["type"]?.GetValue()); + + var doubleSchema = ConfigurationSchemaGenerator.GetJsonSchemaForType(new CSharpType(typeof(double))); + Assert.AreEqual("number", doubleSchema["type"]?.GetValue()); + + // Uri + var uriSchema = ConfigurationSchemaGenerator.GetJsonSchemaForType(new CSharpType(typeof(Uri))); + Assert.AreEqual("string", uriSchema["type"]?.GetValue()); + Assert.AreEqual("uri", uriSchema["format"]?.GetValue()); + + // TimeSpan + var timeSpanSchema = ConfigurationSchemaGenerator.GetJsonSchemaForType(new CSharpType(typeof(TimeSpan))); + Assert.AreEqual("string", timeSpanSchema["type"]?.GetValue()); + } + + [Test] + public void GetJsonSchemaForType_ReturnsCorrectSchema_ForNullableTypes() + { + var nullableStringSchema = ConfigurationSchemaGenerator.GetJsonSchemaForType(new CSharpType(typeof(string), isNullable: true)); + Assert.AreEqual("string", nullableStringSchema["type"]?.GetValue()); + + var nullableBoolSchema = ConfigurationSchemaGenerator.GetJsonSchemaForType(new CSharpType(typeof(bool), isNullable: true)); + Assert.AreEqual("boolean", nullableBoolSchema["type"]?.GetValue()); + } + + /// + /// Test output library that wraps provided TypeProviders. + /// + private class TestOutputLibrary : OutputLibrary + { + private readonly TypeProvider[] _types; + + public TestOutputLibrary(TypeProvider[] types) + { + _types = types; + } + + protected override TypeProvider[] BuildTypeProviders() => _types; + } + } +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/ConfigurationSchemaGeneratorTests/Generate_ConstructorParameter_IncludesModelDefinition.json b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/ConfigurationSchemaGeneratorTests/Generate_ConstructorParameter_IncludesModelDefinition.json new file mode 100644 index 00000000000..c36ea45c926 --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/ConfigurationSchemaGeneratorTests/Generate_ConstructorParameter_IncludesModelDefinition.json @@ -0,0 +1,53 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "TestService": { + "type": "object", + "description": "Configuration for TestService.", + "properties": { + "Endpoint": { + "type": "string", + "description": "Gets or sets the Endpoint." + }, + "ConnectionConfig": { + "$ref": "#/definitions/connectionConfig" + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/testServiceOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "connectionConfig": { + "type": "object", + "properties": { + "Host": { + "type": "string" + }, + "Port": { + "type": "integer" + } + } + }, + "testServiceOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/ConfigurationSchemaGeneratorTests/Generate_HandlesMultipleClients.json b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/ConfigurationSchemaGeneratorTests/Generate_HandlesMultipleClients.json new file mode 100644 index 00000000000..7283b9b2c1f --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/ConfigurationSchemaGeneratorTests/Generate_HandlesMultipleClients.json @@ -0,0 +1,54 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "ServiceA": { + "type": "object", + "description": "Configuration for ServiceA.", + "properties": { + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/serviceAOptions" + } + } + }, + "ServiceB": { + "type": "object", + "description": "Configuration for ServiceB.", + "properties": { + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/serviceBOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "serviceAOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + }, + "serviceBOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/ConfigurationSchemaGeneratorTests/Generate_ReturnsSchema_ForClientWithSettings.json b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/ConfigurationSchemaGeneratorTests/Generate_ReturnsSchema_ForClientWithSettings.json new file mode 100644 index 00000000000..7bf8de8af1b --- /dev/null +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/test/TestData/ConfigurationSchemaGeneratorTests/Generate_ReturnsSchema_ForClientWithSettings.json @@ -0,0 +1,35 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "TestService": { + "type": "object", + "description": "Configuration for TestService.", + "properties": { + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/testServiceOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "testServiceOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/CSharpGen.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/CSharpGen.cs index 777c96bf558..9fa8e650b15 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/CSharpGen.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/CSharpGen.cs @@ -112,7 +112,10 @@ await customCodeWorkspace.GetCompilationAsync(), await File.WriteAllTextAsync(filename, file.Text); } - // Write project scaffolding files + // Write additional output files (e.g. configuration schemas, .targets files) + await CodeModelGenerator.Instance.WriteAdditionalFiles(outputPath); + + // Write project scaffolding files (after additional files so schema existence can be checked) if (CodeModelGenerator.Instance.IsNewProject) { await CodeModelGenerator.Instance.TypeFactory.CreateNewProjectScaffolding().Execute(); diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/CodeModelGenerator.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/CodeModelGenerator.cs index 6fc87d7ced9..d44b2b49305 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/CodeModelGenerator.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/CodeModelGenerator.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.ComponentModel.Composition; using System.Diagnostics; +using System.Threading.Tasks; using Microsoft.CodeAnalysis; using Microsoft.TypeSpec.Generator.EmitterRpc; using Microsoft.TypeSpec.Generator.Input; @@ -182,5 +183,12 @@ public void AddTypeToKeep(string typeName, bool isRoot = true) /// Whether to treat the type as a root type. Any dependencies of root types will /// not have their accessibility changed regardless of the 'unreferenced-types-handling' value. public void AddTypeToKeep(TypeProvider type, bool isRoot = true) => AddTypeToKeep(type.Type.FullyQualifiedName, isRoot); + + /// + /// Writes additional output files (e.g. configuration schemas) after the main code generation is complete. + /// Override this method to generate non-C# output files. + /// + /// The root output directory. + public virtual Task WriteAdditionalFiles(string outputPath) => Task.CompletedTask; } } diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Primitives/NewProjectScaffolding.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Primitives/NewProjectScaffolding.cs index 18f58c9bf48..74c74c62e48 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Primitives/NewProjectScaffolding.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Primitives/NewProjectScaffolding.cs @@ -71,6 +71,15 @@ protected virtual string GetSourceProjectFileContent() builder.CompileIncludes.Add(compileInclude); } + // Add pack items for ConfigurationSchema.json and .targets file + var packageName = CodeModelGenerator.Instance.Configuration.PackageName; + var schemaPath = Path.Combine(CodeModelGenerator.Instance.Configuration.OutputDirectory, "schema", "ConfigurationSchema.json"); + if (File.Exists(schemaPath)) + { + builder.PackItems.Add(new CSharpProjectWriter.CSProjPackItem(@"..\schema\ConfigurationSchema.json", @"\")); + builder.PackItems.Add(new CSharpProjectWriter.CSProjPackItem($@"..\{packageName}.NuGet.targets", @"buildTransitive\netstandard2.0\" + $"{packageName}.targets")); + } + return builder.Write(); } @@ -81,7 +90,7 @@ protected virtual string GetSourceProjectFileContent() private static readonly IReadOnlyList _unbrandedDependencyPackages = new CSharpProjectWriter.CSProjDependencyPackage[] { - new("System.ClientModel", "1.9.0"), + new("System.ClientModel", "1.10.0"), }; protected virtual string GetSolutionFileContent() diff --git a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Writers/CSharpProjectWriter.cs b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Writers/CSharpProjectWriter.cs index c6cf1db6ebb..810ac06e632 100644 --- a/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Writers/CSharpProjectWriter.cs +++ b/packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator/src/Writers/CSharpProjectWriter.cs @@ -19,6 +19,7 @@ public CSharpProjectWriter() PackageReferences = new List(); PrivatePackageReferences = new List(); CompileIncludes = new List(); + PackItems = new List(); } public CSProjProperty? Description { get; init; } @@ -61,6 +62,8 @@ public CSharpProjectWriter() public IList CompileIncludes { get; } + public IList PackItems { get; } + public string Write() { var builder = new StringBuilder(); @@ -132,6 +135,19 @@ public string Write() writer.WriteEndElement(); } + // write pack items for NuGet package + if (PackItems.Count > 0) + { + writer.Flush(); + builder.Append(NewLine); + writer.WriteStartElement("ItemGroup"); + foreach (var item in PackItems) + { + WritePackItem(writer, item); + } + writer.WriteEndElement(); + } + writer.WriteEndDocument(); writer.Close(); writer.Flush(); @@ -207,6 +223,15 @@ private void WritePackageReference(XmlWriter writer, CSProjDependencyPackage pac writer.WriteEndElement(); } + private static void WritePackItem(XmlWriter writer, CSProjPackItem item) + { + writer.WriteStartElement("None"); + writer.WriteAttributeString("Include", item.Include); + writer.WriteAttributeString("Pack", "true"); + writer.WriteAttributeString("PackagePath", item.PackagePath); + writer.WriteEndElement(); + } + public record CSProjProperty(string Value, string? Comment) { public CSProjProperty(string value) : this(value, null) @@ -220,4 +245,6 @@ public record CSProjDependencyPackage(string PackageName, string? Version) { public CSProjDependencyPackage(string packageName) : this(packageName, null) { } } + + public record CSProjPackItem(string Include, string PackagePath); } diff --git a/packages/http-client-csharp/generator/Packages.Data.props b/packages/http-client-csharp/generator/Packages.Data.props index 332a7ad5ab8..e0d387e0cfb 100644 --- a/packages/http-client-csharp/generator/Packages.Data.props +++ b/packages/http-client-csharp/generator/Packages.Data.props @@ -14,8 +14,8 @@ - - - + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/SampleTypeSpec.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/SampleTypeSpec.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/SampleTypeSpec.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..94ee15dbddc --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/schema/ConfigurationSchema.json @@ -0,0 +1,80 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "Notebooks": { + "type": "object", + "description": "Configuration for Notebooks.", + "properties": { + "SampleTypeSpecUrl": { + "type": "string", + "format": "uri", + "description": "Gets or sets the SampleTypeSpecUrl." + }, + "Notebook": { + "type": "string" + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/sampleTypeSpecClientOptions" + } + } + }, + "Metrics": { + "type": "object", + "description": "Configuration for Metrics.", + "properties": { + "SampleTypeSpecUrl": { + "type": "string", + "format": "uri", + "description": "Gets or sets the SampleTypeSpecUrl." + }, + "MetricsNamespace": { + "type": "string" + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/sampleTypeSpecClientOptions" + } + } + }, + "SampleTypeSpecClient": { + "type": "object", + "description": "Configuration for SampleTypeSpecClient.", + "properties": { + "SampleTypeSpecUrl": { + "type": "string", + "format": "uri", + "description": "Gets or sets the SampleTypeSpecUrl." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/sampleTypeSpecClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "sampleTypeSpecClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/SampleTypeSpec.csproj b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/SampleTypeSpec.csproj index 9465df7d19f..633e517ed50 100644 --- a/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/SampleTypeSpec.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Local/Sample-TypeSpec/src/SampleTypeSpec.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/Authentication.ApiKey.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/Authentication.ApiKey.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/Authentication.ApiKey.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..1978b2f0446 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "ApiKeyClient": { + "type": "object", + "description": "Configuration for ApiKeyClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/apiKeyClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "apiKeyClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/src/Authentication.ApiKey.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/src/Authentication.ApiKey.csproj index b2f00a0960b..69c033b2e6c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/src/Authentication.ApiKey.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/src/Authentication.ApiKey.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/Authentication.Http.Custom.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/Authentication.Http.Custom.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/Authentication.Http.Custom.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..b206c55fc71 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "CustomClient": { + "type": "object", + "description": "Configuration for CustomClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/customClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "customClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/src/Authentication.Http.Custom.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/src/Authentication.Http.Custom.csproj index 36f4cbbe8ba..9eec620d6e7 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/src/Authentication.Http.Custom.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/src/Authentication.Http.Custom.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/Authentication.OAuth2.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/Authentication.OAuth2.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/Authentication.OAuth2.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..d5d64542f56 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "OAuth2Client": { + "type": "object", + "description": "Configuration for OAuth2Client.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/oAuth2ClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "oAuth2ClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/src/Authentication.OAuth2.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/src/Authentication.OAuth2.csproj index 42430909fa0..54aaff9cbeb 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/src/Authentication.OAuth2.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/src/Authentication.OAuth2.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/Authentication.Union.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/Authentication.Union.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/Authentication.Union.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..370dae5b9f1 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "UnionClient": { + "type": "object", + "description": "Configuration for UnionClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/unionClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "unionClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/src/Authentication.Union.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/src/Authentication.Union.csproj index 60336a11ddc..a911fec8d51 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/src/Authentication.Union.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/src/Authentication.Union.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/Client.Structure.Service.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/Client.Structure.Service.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/Client.Structure.Service.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..f15b3ce0d20 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/schema/ConfigurationSchema.json @@ -0,0 +1,79 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "FirstClient": { + "type": "object", + "description": "Configuration for FirstClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Client": { + "$ref": "#/definitions/clientType" + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/firstClientOptions" + } + } + }, + "SubNamespaceSecondClient": { + "type": "object", + "description": "Configuration for SubNamespaceSecondClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Client": { + "$ref": "#/definitions/clientType" + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/subNamespaceSecondClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "clientType": { + "enum": [ + "default", + "multi-client", + "renamed-operation", + "two-operation-group", + "client-operation-group" + ] + }, + "firstClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + }, + "subNamespaceSecondClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/src/Client.Structure.Service.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/src/Client.Structure.Service.csproj index efce57fd9a0..88ca9df6442 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/src/Client.Structure.Service.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/client-operation-group/src/Client.Structure.Service.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/Client.Structure.Service.Default.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/Client.Structure.Service.Default.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/Client.Structure.Service.Default.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..56265421f49 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/schema/ConfigurationSchema.json @@ -0,0 +1,52 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "ServiceClient": { + "type": "object", + "description": "Configuration for ServiceClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Client": { + "$ref": "#/definitions/clientType" + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/serviceClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "clientType": { + "enum": [ + "default", + "multi-client", + "renamed-operation", + "two-operation-group", + "client-operation-group" + ] + }, + "serviceClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Client.Structure.Service.Default.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Client.Structure.Service.Default.csproj index fe6e72f7cb7..2895afe83b2 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Client.Structure.Service.Default.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Client.Structure.Service.Default.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/multi-client/Client.Structure.Service.Multi.Client.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/multi-client/Client.Structure.Service.Multi.Client.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/multi-client/Client.Structure.Service.Multi.Client.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/multi-client/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/multi-client/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..52b7facca37 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/multi-client/schema/ConfigurationSchema.json @@ -0,0 +1,79 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "ClientAClient": { + "type": "object", + "description": "Configuration for ClientAClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Client": { + "$ref": "#/definitions/clientType" + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/clientAClientOptions" + } + } + }, + "ClientBClient": { + "type": "object", + "description": "Configuration for ClientBClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Client": { + "$ref": "#/definitions/clientType" + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/clientBClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "clientAClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + }, + "clientBClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + }, + "clientType": { + "enum": [ + "default", + "multi-client", + "renamed-operation", + "two-operation-group", + "client-operation-group" + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/multi-client/src/Client.Structure.Service.Multi.Client.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/multi-client/src/Client.Structure.Service.Multi.Client.csproj index e6b5dbce271..055841ee7de 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/multi-client/src/Client.Structure.Service.Multi.Client.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/multi-client/src/Client.Structure.Service.Multi.Client.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/Client.Structure.Service.Renamed.Operation.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/Client.Structure.Service.Renamed.Operation.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/Client.Structure.Service.Renamed.Operation.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..486c6fe3689 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/schema/ConfigurationSchema.json @@ -0,0 +1,52 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "RenamedOperationClient": { + "type": "object", + "description": "Configuration for RenamedOperationClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Client": { + "$ref": "#/definitions/clientType" + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/renamedOperationClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "clientType": { + "enum": [ + "default", + "multi-client", + "renamed-operation", + "two-operation-group", + "client-operation-group" + ] + }, + "renamedOperationClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/src/Client.Structure.Service.Renamed.Operation.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/src/Client.Structure.Service.Renamed.Operation.csproj index e7f97fb99b8..4507c8799d8 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/src/Client.Structure.Service.Renamed.Operation.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/renamed-operation/src/Client.Structure.Service.Renamed.Operation.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/Client.Structure.Service.TwoOperationGroup.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/Client.Structure.Service.TwoOperationGroup.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/Client.Structure.Service.TwoOperationGroup.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..e45184ac881 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/schema/ConfigurationSchema.json @@ -0,0 +1,52 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "TwoOperationGroupClient": { + "type": "object", + "description": "Configuration for TwoOperationGroupClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Client": { + "$ref": "#/definitions/clientType" + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/twoOperationGroupClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "clientType": { + "enum": [ + "default", + "multi-client", + "renamed-operation", + "two-operation-group", + "client-operation-group" + ] + }, + "twoOperationGroupClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/src/Client.Structure.Service.TwoOperationGroup.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/src/Client.Structure.Service.TwoOperationGroup.csproj index 1bb7799a71e..f448d8180fe 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/src/Client.Structure.Service.TwoOperationGroup.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/two-operation-group/src/Client.Structure.Service.TwoOperationGroup.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/Documentation.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/Documentation.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/Documentation.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..e9879042aa4 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "DocumentationClient": { + "type": "object", + "description": "Configuration for DocumentationClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/documentationClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "documentationClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/src/Documentation.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/src/Documentation.csproj index 0b3fe015fb3..1080a510b71 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/src/Documentation.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/documentation/src/Documentation.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/Encode.Array.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/Encode.Array.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/Encode.Array.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..daafccb5cfb --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "ArrayClient": { + "type": "object", + "description": "Configuration for ArrayClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/arrayClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "arrayClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/src/Encode.Array.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/src/Encode.Array.csproj index d7ccd424c1e..6a07d0e4316 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/src/Encode.Array.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/array/src/Encode.Array.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/Encode.Bytes.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/Encode.Bytes.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/Encode.Bytes.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..120cc0e01aa --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "BytesClient": { + "type": "object", + "description": "Configuration for BytesClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/bytesClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "bytesClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Encode.Bytes.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Encode.Bytes.csproj index d923c122c85..f5f0f469a04 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Encode.Bytes.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Encode.Bytes.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/Encode.Datetime.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/Encode.Datetime.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/Encode.Datetime.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..f13d4ed3b76 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "DatetimeClient": { + "type": "object", + "description": "Configuration for DatetimeClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/datetimeClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "datetimeClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Encode.Datetime.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Encode.Datetime.csproj index 795c9fcc605..7ce48712307 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Encode.Datetime.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Encode.Datetime.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/Encode.Duration.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/Encode.Duration.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/Encode.Duration.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..f0eec9c5ae3 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "DurationClient": { + "type": "object", + "description": "Configuration for DurationClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/durationClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "durationClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Encode.Duration.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Encode.Duration.csproj index 6d861d25c81..cc2c673c47c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Encode.Duration.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Encode.Duration.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/Encode.Numeric.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/Encode.Numeric.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/Encode.Numeric.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..4917a18de1d --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "NumericClient": { + "type": "object", + "description": "Configuration for NumericClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/numericClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "numericClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/src/Encode.Numeric.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/src/Encode.Numeric.csproj index 63a8d810f00..1d89e893d40 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/src/Encode.Numeric.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/src/Encode.Numeric.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/Parameters.Basic.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/Parameters.Basic.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/Parameters.Basic.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..4c45381dee2 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "BasicClient": { + "type": "object", + "description": "Configuration for BasicClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/basicClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "basicClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/src/Parameters.Basic.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/src/Parameters.Basic.csproj index b2dc7977f26..771cb83ea00 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/src/Parameters.Basic.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/src/Parameters.Basic.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/Parameters.BodyOptionality.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/Parameters.BodyOptionality.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/Parameters.BodyOptionality.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..d4e43983069 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "BodyOptionalityClient": { + "type": "object", + "description": "Configuration for BodyOptionalityClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/bodyOptionalityClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "bodyOptionalityClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/src/Parameters.BodyOptionality.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/src/Parameters.BodyOptionality.csproj index 03fd1bb4c50..cebede3fbfd 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/src/Parameters.BodyOptionality.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/src/Parameters.BodyOptionality.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/Parameters.CollectionFormat.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/Parameters.CollectionFormat.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/Parameters.CollectionFormat.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..dca8a061f73 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "CollectionFormatClient": { + "type": "object", + "description": "Configuration for CollectionFormatClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/collectionFormatClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "collectionFormatClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/src/Parameters.CollectionFormat.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/src/Parameters.CollectionFormat.csproj index 3e172169ca7..26f68b5ca9a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/src/Parameters.CollectionFormat.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/src/Parameters.CollectionFormat.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/Parameters.Path.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/Parameters.Path.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/Parameters.Path.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..18b9a87440a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "PathClient": { + "type": "object", + "description": "Configuration for PathClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/pathClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "pathClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/src/Parameters.Path.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/src/Parameters.Path.csproj index 761c08fd25c..8a54b871c62 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/src/Parameters.Path.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/src/Parameters.Path.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/Parameters.Query.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/Parameters.Query.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/Parameters.Query.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..91b3c185344 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "QueryClient": { + "type": "object", + "description": "Configuration for QueryClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/queryClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "queryClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/src/Parameters.Query.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/src/Parameters.Query.csproj index 36929bde8c7..064c41e364c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/src/Parameters.Query.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/query/src/Parameters.Query.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/Parameters.Spread.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/Parameters.Spread.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/Parameters.Spread.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..15ae497a4ca --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "SpreadClient": { + "type": "object", + "description": "Configuration for SpreadClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/spreadClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "spreadClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/src/Parameters.Spread.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/src/Parameters.Spread.csproj index ae8693b5c1a..cd7f87bb1e4 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/src/Parameters.Spread.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/src/Parameters.Spread.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/Payload.ContentNegotiation.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/Payload.ContentNegotiation.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/Payload.ContentNegotiation.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..429fa759986 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "ContentNegotiationClient": { + "type": "object", + "description": "Configuration for ContentNegotiationClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/contentNegotiationClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "contentNegotiationClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Payload.ContentNegotiation.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Payload.ContentNegotiation.csproj index 7e4886ecf67..56e913ccc3c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Payload.ContentNegotiation.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Payload.ContentNegotiation.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/Payload.JsonMergePatch.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/Payload.JsonMergePatch.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/Payload.JsonMergePatch.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..7f9ceee34ff --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "JsonMergePatchClient": { + "type": "object", + "description": "Configuration for JsonMergePatchClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/jsonMergePatchClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "jsonMergePatchClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/src/Payload.JsonMergePatch.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/src/Payload.JsonMergePatch.csproj index 6bbf49f66df..254b584387d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/src/Payload.JsonMergePatch.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/src/Payload.JsonMergePatch.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/Payload.MediaType.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/Payload.MediaType.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/Payload.MediaType.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..4341d641115 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "MediaTypeClient": { + "type": "object", + "description": "Configuration for MediaTypeClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/mediaTypeClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "mediaTypeClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/src/Payload.MediaType.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/src/Payload.MediaType.csproj index 75ed27a3fcf..8281cc20c4d 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/src/Payload.MediaType.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/src/Payload.MediaType.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/Payload.MultiPart.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/Payload.MultiPart.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/Payload.MultiPart.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..1e8e4a7a060 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "MultiPartClient": { + "type": "object", + "description": "Configuration for MultiPartClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/multiPartClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "multiPartClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Payload.MultiPart.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Payload.MultiPart.csproj index 3354b884925..37c3a8b2458 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Payload.MultiPart.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Payload.MultiPart.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/Payload.Pageable.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/Payload.Pageable.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/Payload.Pageable.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..52a7a7fb073 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "PageableClient": { + "type": "object", + "description": "Configuration for PageableClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/pageableClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "pageableClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Payload.Pageable.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Payload.Pageable.csproj index 17be1ba87e5..c4237d41dbf 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Payload.Pageable.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/pageable/src/Payload.Pageable.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/Payload.Xml.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/Payload.Xml.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/Payload.Xml.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..c6bdafb54b6 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "XmlClient": { + "type": "object", + "description": "Configuration for XmlClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/xmlClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "xmlClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Payload.Xml.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Payload.Xml.csproj index b0c5ee7edcd..1636376e015 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Payload.Xml.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/xml/src/Payload.Xml.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v1/Resiliency.SrvDriven.V1.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v1/Resiliency.SrvDriven.V1.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v1/Resiliency.SrvDriven.V1.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v1/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v1/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..f57ef66baf2 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v1/schema/ConfigurationSchema.json @@ -0,0 +1,43 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "ResiliencyServiceDrivenClient": { + "type": "object", + "description": "Configuration for ResiliencyServiceDrivenClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "ServiceDeploymentVersion": { + "type": "string" + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/resiliencyServiceDrivenClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "resiliencyServiceDrivenClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v1/src/Resiliency.SrvDriven.V1.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v1/src/Resiliency.SrvDriven.V1.csproj index e4cec94ef68..56a8622b66f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v1/src/Resiliency.SrvDriven.V1.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v1/src/Resiliency.SrvDriven.V1.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v2/Resiliency.SrvDriven.V2.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v2/Resiliency.SrvDriven.V2.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v2/Resiliency.SrvDriven.V2.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v2/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v2/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..f57ef66baf2 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v2/schema/ConfigurationSchema.json @@ -0,0 +1,43 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "ResiliencyServiceDrivenClient": { + "type": "object", + "description": "Configuration for ResiliencyServiceDrivenClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "ServiceDeploymentVersion": { + "type": "string" + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/resiliencyServiceDrivenClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "resiliencyServiceDrivenClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v2/src/Resiliency.SrvDriven.V2.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v2/src/Resiliency.SrvDriven.V2.csproj index f75c3d5e0d3..42a6d3226ab 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v2/src/Resiliency.SrvDriven.V2.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/resiliency/srv-driven/v2/src/Resiliency.SrvDriven.V2.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/status-code-range/Response.StatusCodeRange.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/status-code-range/Response.StatusCodeRange.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/status-code-range/Response.StatusCodeRange.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/status-code-range/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/status-code-range/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..7afeb875915 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/status-code-range/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "StatusCodeRangeClient": { + "type": "object", + "description": "Configuration for StatusCodeRangeClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/statusCodeRangeClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "statusCodeRangeClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/status-code-range/src/Response.StatusCodeRange.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/status-code-range/src/Response.StatusCodeRange.csproj index 9f14a610115..769e2d4e7a4 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/response/status-code-range/src/Response.StatusCodeRange.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/response/status-code-range/src/Response.StatusCodeRange.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/Routes.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/Routes.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/Routes.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..ff6cfbbd27c --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "RoutesClient": { + "type": "object", + "description": "Configuration for RoutesClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/routesClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "routesClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Routes.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Routes.csproj index 4ed2ba74989..8ee0dca08ad 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Routes.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Routes.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/Serialization.EncodedName.Json.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/Serialization.EncodedName.Json.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/Serialization.EncodedName.Json.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..9410b7bf43e --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "JsonClient": { + "type": "object", + "description": "Configuration for JsonClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/jsonClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "jsonClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/src/Serialization.EncodedName.Json.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/src/Serialization.EncodedName.Json.csproj index 1109271f253..77f1356aebd 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/src/Serialization.EncodedName.Json.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/src/Serialization.EncodedName.Json.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/Server.Endpoint.NotDefined.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/Server.Endpoint.NotDefined.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/Server.Endpoint.NotDefined.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..7d107613b60 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "NotDefinedClient": { + "type": "object", + "description": "Configuration for NotDefinedClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/notDefinedClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "notDefinedClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/src/Server.Endpoint.NotDefined.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/src/Server.Endpoint.NotDefined.csproj index e5fc04dddb4..206322eb5f6 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/src/Server.Endpoint.NotDefined.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/src/Server.Endpoint.NotDefined.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/multiple/Server.Path.Multiple.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/multiple/Server.Path.Multiple.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/multiple/Server.Path.Multiple.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/multiple/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/multiple/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..b1cb57736dd --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/multiple/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "MultipleClient": { + "type": "object", + "description": "Configuration for MultipleClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/multipleClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "multipleClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/multiple/src/Server.Path.Multiple.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/multiple/src/Server.Path.Multiple.csproj index 76a9c5f0f75..6277265ac00 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/multiple/src/Server.Path.Multiple.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/multiple/src/Server.Path.Multiple.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/Server.Path.Single.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/Server.Path.Single.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/Server.Path.Single.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..8aaa89bcb3d --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "SingleClient": { + "type": "object", + "description": "Configuration for SingleClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/singleClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "singleClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/src/Server.Path.Single.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/src/Server.Path.Single.csproj index 8b61759c74d..424780b201e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/src/Server.Path.Single.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/src/Server.Path.Single.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/Server.Versions.NotVersioned.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/Server.Versions.NotVersioned.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/Server.Versions.NotVersioned.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..d6bfe467432 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "NotVersionedClient": { + "type": "object", + "description": "Configuration for NotVersionedClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/notVersionedClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "notVersionedClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/src/Server.Versions.NotVersioned.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/src/Server.Versions.NotVersioned.csproj index d7cc34212bd..f604e7c53de 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/src/Server.Versions.NotVersioned.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/src/Server.Versions.NotVersioned.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/versioned/Server.Versions.Versioned.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/versioned/Server.Versions.Versioned.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/versioned/Server.Versions.Versioned.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/versioned/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/versioned/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..d12452e9f66 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/versioned/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "VersionedClient": { + "type": "object", + "description": "Configuration for VersionedClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/versionedClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "versionedClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/versioned/src/Server.Versions.Versioned.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/versioned/src/Server.Versions.Versioned.csproj index 53926118c32..8fa0f366933 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/versioned/src/Server.Versions.Versioned.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/versioned/src/Server.Versions.Versioned.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/SpecialHeaders.ConditionalRequest.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/SpecialHeaders.ConditionalRequest.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/SpecialHeaders.ConditionalRequest.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..830040d350d --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "ConditionalRequestClient": { + "type": "object", + "description": "Configuration for ConditionalRequestClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/conditionalRequestClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "conditionalRequestClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/src/SpecialHeaders.ConditionalRequest.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/src/SpecialHeaders.ConditionalRequest.csproj index 85c62ee0300..329eb3c8050 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/src/SpecialHeaders.ConditionalRequest.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/src/SpecialHeaders.ConditionalRequest.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/SpecialHeaders.Repeatability.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/SpecialHeaders.Repeatability.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/SpecialHeaders.Repeatability.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..f19ad45f5ae --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "RepeatabilityClient": { + "type": "object", + "description": "Configuration for RepeatabilityClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/repeatabilityClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "repeatabilityClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/src/SpecialHeaders.Repeatability.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/src/SpecialHeaders.Repeatability.csproj index 2e8d9d974d3..d8427118057 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/src/SpecialHeaders.Repeatability.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/src/SpecialHeaders.Repeatability.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/SpecialWords.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/SpecialWords.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/SpecialWords.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..dc19afb58df --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "SpecialWordsClient": { + "type": "object", + "description": "Configuration for SpecialWordsClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/specialWordsClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "specialWordsClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/SpecialWords.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/SpecialWords.csproj index dcda0f46983..ebfba0cb721 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/SpecialWords.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/SpecialWords.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/Type.Array.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/Type.Array.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/Type.Array.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..daafccb5cfb --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "ArrayClient": { + "type": "object", + "description": "Configuration for ArrayClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/arrayClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "arrayClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Type.Array.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Type.Array.csproj index 93155a5610c..4cb7bc7df17 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Type.Array.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Type.Array.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/Type.Dictionary.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/Type.Dictionary.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/Type.Dictionary.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..62c0abb0cf9 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "DictionaryClient": { + "type": "object", + "description": "Configuration for DictionaryClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/dictionaryClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "dictionaryClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Type.Dictionary.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Type.Dictionary.csproj index 11bf42a6ee9..ce97388cc58 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Type.Dictionary.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Type.Dictionary.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/Type.Enum.Extensible.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/Type.Enum.Extensible.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/Type.Enum.Extensible.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..0fc3d20c2e0 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "ExtensibleClient": { + "type": "object", + "description": "Configuration for ExtensibleClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/extensibleClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "extensibleClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Type.Enum.Extensible.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Type.Enum.Extensible.csproj index 4d62e98e5aa..79a71255b36 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Type.Enum.Extensible.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Type.Enum.Extensible.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/Type.Enum.Fixed.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/Type.Enum.Fixed.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/Type.Enum.Fixed.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..3e27428990e --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "FixedClient": { + "type": "object", + "description": "Configuration for FixedClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/fixedClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "fixedClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Type.Enum.Fixed.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Type.Enum.Fixed.csproj index 7a0f3b184b1..973f665dee4 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Type.Enum.Fixed.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Type.Enum.Fixed.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/Type.Model.Empty.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/Type.Model.Empty.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/Type.Model.Empty.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..ee38e5032d5 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "EmptyClient": { + "type": "object", + "description": "Configuration for EmptyClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/emptyClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "emptyClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/src/Type.Model.Empty.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/src/Type.Model.Empty.csproj index a7f9887b0be..f3d0275f70f 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/src/Type.Model.Empty.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/src/Type.Model.Empty.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/Type.Model.Inheritance.EnumDiscriminator.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/Type.Model.Inheritance.EnumDiscriminator.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/Type.Model.Inheritance.EnumDiscriminator.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..7591f16230a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "EnumDiscriminatorClient": { + "type": "object", + "description": "Configuration for EnumDiscriminatorClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/enumDiscriminatorClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "enumDiscriminatorClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/src/Type.Model.Inheritance.EnumDiscriminator.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/src/Type.Model.Inheritance.EnumDiscriminator.csproj index 35612789efc..46278f5bd8e 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/src/Type.Model.Inheritance.EnumDiscriminator.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/src/Type.Model.Inheritance.EnumDiscriminator.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/Type.Model.Inheritance.NestedDiscriminator.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/Type.Model.Inheritance.NestedDiscriminator.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/Type.Model.Inheritance.NestedDiscriminator.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..6b466ad2b16 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "NestedDiscriminatorClient": { + "type": "object", + "description": "Configuration for NestedDiscriminatorClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/nestedDiscriminatorClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "nestedDiscriminatorClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/src/Type.Model.Inheritance.NestedDiscriminator.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/src/Type.Model.Inheritance.NestedDiscriminator.csproj index dc43dde34f4..8d7f0909ed8 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/src/Type.Model.Inheritance.NestedDiscriminator.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/src/Type.Model.Inheritance.NestedDiscriminator.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/Type.Model.Inheritance.NotDiscriminated.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/Type.Model.Inheritance.NotDiscriminated.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/Type.Model.Inheritance.NotDiscriminated.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..3ef39b513d4 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "NotDiscriminatedClient": { + "type": "object", + "description": "Configuration for NotDiscriminatedClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/notDiscriminatedClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "notDiscriminatedClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/src/Type.Model.Inheritance.NotDiscriminated.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/src/Type.Model.Inheritance.NotDiscriminated.csproj index c3f4519509b..946eea44c80 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/src/Type.Model.Inheritance.NotDiscriminated.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/src/Type.Model.Inheritance.NotDiscriminated.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/Type.Model.Inheritance.Recursive.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/Type.Model.Inheritance.Recursive.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/Type.Model.Inheritance.Recursive.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..5433e73d760 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "RecursiveClient": { + "type": "object", + "description": "Configuration for RecursiveClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/recursiveClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "recursiveClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/src/Type.Model.Inheritance.Recursive.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/src/Type.Model.Inheritance.Recursive.csproj index 8a71cad9164..457c7301afe 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/src/Type.Model.Inheritance.Recursive.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/src/Type.Model.Inheritance.Recursive.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/Type.Model.Inheritance.SingleDiscriminator.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/Type.Model.Inheritance.SingleDiscriminator.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/Type.Model.Inheritance.SingleDiscriminator.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..d4c2f8f2c9e --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "SingleDiscriminatorClient": { + "type": "object", + "description": "Configuration for SingleDiscriminatorClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/singleDiscriminatorClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "singleDiscriminatorClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/src/Type.Model.Inheritance.SingleDiscriminator.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/src/Type.Model.Inheritance.SingleDiscriminator.csproj index 9595f93156b..947f88a8398 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/src/Type.Model.Inheritance.SingleDiscriminator.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/src/Type.Model.Inheritance.SingleDiscriminator.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/Type.Model.Usage.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/Type.Model.Usage.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/Type.Model.Usage.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..e442e4b354e --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "UsageClient": { + "type": "object", + "description": "Configuration for UsageClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/usageClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "usageClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/src/Type.Model.Usage.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/src/Type.Model.Usage.csproj index e2ed8c43863..28b2773d3ab 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/src/Type.Model.Usage.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/src/Type.Model.Usage.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/Type.Model.Visibility.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/Type.Model.Visibility.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/Type.Model.Visibility.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..f8b38a4807e --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "VisibilityClient": { + "type": "object", + "description": "Configuration for VisibilityClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/visibilityClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "visibilityClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/src/Type.Model.Visibility.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/src/Type.Model.Visibility.csproj index 92cf919ec3a..0f7078276a3 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/src/Type.Model.Visibility.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/src/Type.Model.Visibility.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/Type.Property.AdditionalProperties.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/Type.Property.AdditionalProperties.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/Type.Property.AdditionalProperties.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..97c6be67bb3 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "AdditionalPropertiesClient": { + "type": "object", + "description": "Configuration for AdditionalPropertiesClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/additionalPropertiesClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "additionalPropertiesClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Type.Property.AdditionalProperties.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Type.Property.AdditionalProperties.csproj index 0d612975af4..552b7ca3ef2 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Type.Property.AdditionalProperties.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Type.Property.AdditionalProperties.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/Type.Property.Nullable.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/Type.Property.Nullable.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/Type.Property.Nullable.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..706088c678c --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "NullableClient": { + "type": "object", + "description": "Configuration for NullableClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/nullableClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "nullableClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Type.Property.Nullable.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Type.Property.Nullable.csproj index 1b4cc3f50c5..52d97e0498c 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Type.Property.Nullable.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Type.Property.Nullable.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/Type.Property.Optional.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/Type.Property.Optional.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/Type.Property.Optional.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..0bc6d6dae33 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "OptionalClient": { + "type": "object", + "description": "Configuration for OptionalClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/optionalClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "optionalClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Type.Property.Optional.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Type.Property.Optional.csproj index 67f8b6664e2..6ab95c43208 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Type.Property.Optional.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Type.Property.Optional.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/Type.Property.ValueTypes.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/Type.Property.ValueTypes.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/Type.Property.ValueTypes.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..ac2ba5078ef --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "ValueTypesClient": { + "type": "object", + "description": "Configuration for ValueTypesClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/valueTypesClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "valueTypesClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Type.Property.ValueTypes.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Type.Property.ValueTypes.csproj index baf7b168641..3a9cd7a63ff 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Type.Property.ValueTypes.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Type.Property.ValueTypes.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/Type.Scalar.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/Type.Scalar.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/Type.Scalar.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..a5186dcd3fe --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "ScalarClient": { + "type": "object", + "description": "Configuration for ScalarClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/scalarClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "scalarClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Type.Scalar.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Type.Scalar.csproj index 133ae6e4c0b..b06ec818218 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Type.Scalar.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Type.Scalar.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/Type.Union.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/Type.Union.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/Type.Union.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..370dae5b9f1 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "UnionClient": { + "type": "object", + "description": "Configuration for UnionClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/unionClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "unionClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Type.Union.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Type.Union.csproj index f429a3e55fe..80d98052a44 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Type.Union.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Type.Union.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v1/Versioning.Added.V1.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v1/Versioning.Added.V1.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v1/Versioning.Added.V1.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v1/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v1/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..d1b35cb7f82 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v1/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "AddedClient": { + "type": "object", + "description": "Configuration for AddedClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/addedClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "addedClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v1/src/Versioning.Added.V1.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v1/src/Versioning.Added.V1.csproj index b471f07704f..540c0ce0b5a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v1/src/Versioning.Added.V1.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v1/src/Versioning.Added.V1.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/Versioning.Added.V2.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/Versioning.Added.V2.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/Versioning.Added.V2.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..d1b35cb7f82 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "AddedClient": { + "type": "object", + "description": "Configuration for AddedClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/addedClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "addedClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/src/Versioning.Added.V2.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/src/Versioning.Added.V2.csproj index 49a8c9fd26c..c9ec63cf281 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/src/Versioning.Added.V2.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/added/v2/src/Versioning.Added.V2.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v1/Versioning.MadeOptional.V1.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v1/Versioning.MadeOptional.V1.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v1/Versioning.MadeOptional.V1.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v1/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v1/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..a54478f80e9 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v1/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "MadeOptionalClient": { + "type": "object", + "description": "Configuration for MadeOptionalClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/madeOptionalClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "madeOptionalClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v1/src/Versioning.MadeOptional.V1.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v1/src/Versioning.MadeOptional.V1.csproj index 10434fd7525..8ea2a6de1eb 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v1/src/Versioning.MadeOptional.V1.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v1/src/Versioning.MadeOptional.V1.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v2/Versioning.MadeOptional.V2.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v2/Versioning.MadeOptional.V2.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v2/Versioning.MadeOptional.V2.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v2/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v2/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..a54478f80e9 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v2/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "MadeOptionalClient": { + "type": "object", + "description": "Configuration for MadeOptionalClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/madeOptionalClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "madeOptionalClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v2/src/Versioning.MadeOptional.V2.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v2/src/Versioning.MadeOptional.V2.csproj index a2e225d396b..f990f92fc68 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v2/src/Versioning.MadeOptional.V2.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/madeOptional/v2/src/Versioning.MadeOptional.V2.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/Versioning.Removed.V1.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/Versioning.Removed.V1.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/Versioning.Removed.V1.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..b634f506a23 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "RemovedClient": { + "type": "object", + "description": "Configuration for RemovedClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/removedClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "removedClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/src/Versioning.Removed.V1.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/src/Versioning.Removed.V1.csproj index 5162390039b..180a124a477 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/src/Versioning.Removed.V1.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v1/src/Versioning.Removed.V1.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2/Versioning.Removed.V2.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2/Versioning.Removed.V2.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2/Versioning.Removed.V2.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..b634f506a23 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "RemovedClient": { + "type": "object", + "description": "Configuration for RemovedClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/removedClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "removedClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2/src/Versioning.Removed.V2.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2/src/Versioning.Removed.V2.csproj index 6930b51c625..b1309bb9703 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2/src/Versioning.Removed.V2.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2/src/Versioning.Removed.V2.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/Versioning.Removed.V2Preview.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/Versioning.Removed.V2Preview.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/Versioning.Removed.V2Preview.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..b634f506a23 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "RemovedClient": { + "type": "object", + "description": "Configuration for RemovedClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/removedClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "removedClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/src/Versioning.Removed.V2Preview.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/src/Versioning.Removed.V2Preview.csproj index ff8716ad107..8d4f1884481 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/src/Versioning.Removed.V2Preview.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/removed/v2Preview/src/Versioning.Removed.V2Preview.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/Versioning.RenamedFrom.V1.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/Versioning.RenamedFrom.V1.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/Versioning.RenamedFrom.V1.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..6eacb332a72 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "RenamedFromClient": { + "type": "object", + "description": "Configuration for RenamedFromClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/renamedFromClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "renamedFromClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/src/Versioning.RenamedFrom.V1.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/src/Versioning.RenamedFrom.V1.csproj index 6d4c62fae46..f2b6a69a9c7 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/src/Versioning.RenamedFrom.V1.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v1/src/Versioning.RenamedFrom.V1.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/Versioning.RenamedFrom.V2.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/Versioning.RenamedFrom.V2.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/Versioning.RenamedFrom.V2.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..6eacb332a72 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "RenamedFromClient": { + "type": "object", + "description": "Configuration for RenamedFromClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/renamedFromClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "renamedFromClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/src/Versioning.RenamedFrom.V2.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/src/Versioning.RenamedFrom.V2.csproj index eda07072a69..4802af20acd 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/src/Versioning.RenamedFrom.V2.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/renamedFrom/v2/src/Versioning.RenamedFrom.V2.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v1/Versioning.ReturnTypeChangedFrom.V1.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v1/Versioning.ReturnTypeChangedFrom.V1.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v1/Versioning.ReturnTypeChangedFrom.V1.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v1/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v1/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..4a3087ec9b7 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v1/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "ReturnTypeChangedFromClient": { + "type": "object", + "description": "Configuration for ReturnTypeChangedFromClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/returnTypeChangedFromClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "returnTypeChangedFromClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v1/src/Versioning.ReturnTypeChangedFrom.V1.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v1/src/Versioning.ReturnTypeChangedFrom.V1.csproj index da2e5ca050a..adf5ce55b5a 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v1/src/Versioning.ReturnTypeChangedFrom.V1.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v1/src/Versioning.ReturnTypeChangedFrom.V1.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v2/Versioning.ReturnTypeChangedFrom.V2.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v2/Versioning.ReturnTypeChangedFrom.V2.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v2/Versioning.ReturnTypeChangedFrom.V2.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v2/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v2/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..4a3087ec9b7 --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v2/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "ReturnTypeChangedFromClient": { + "type": "object", + "description": "Configuration for ReturnTypeChangedFromClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/returnTypeChangedFromClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "returnTypeChangedFromClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v2/src/Versioning.ReturnTypeChangedFrom.V2.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v2/src/Versioning.ReturnTypeChangedFrom.V2.csproj index 72f0f79253b..9c8d9121e17 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v2/src/Versioning.ReturnTypeChangedFrom.V2.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/returnTypeChangedFrom/v2/src/Versioning.ReturnTypeChangedFrom.V2.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v1/Versioning.TypeChangedFrom.V1.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v1/Versioning.TypeChangedFrom.V1.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v1/Versioning.TypeChangedFrom.V1.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v1/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v1/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..7ff9d4a9b8a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v1/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "TypeChangedFromClient": { + "type": "object", + "description": "Configuration for TypeChangedFromClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/typeChangedFromClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "typeChangedFromClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v1/src/Versioning.TypeChangedFrom.V1.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v1/src/Versioning.TypeChangedFrom.V1.csproj index 76f51f1faa3..7139bd06976 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v1/src/Versioning.TypeChangedFrom.V1.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v1/src/Versioning.TypeChangedFrom.V1.csproj @@ -10,6 +10,11 @@ - + + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v2/Versioning.TypeChangedFrom.V2.NuGet.targets b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v2/Versioning.TypeChangedFrom.V2.NuGet.targets new file mode 100644 index 00000000000..9df53f09f6f --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v2/Versioning.TypeChangedFrom.V2.NuGet.targets @@ -0,0 +1,6 @@ + + + + + diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v2/schema/ConfigurationSchema.json b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v2/schema/ConfigurationSchema.json new file mode 100644 index 00000000000..7ff9d4a9b8a --- /dev/null +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v2/schema/ConfigurationSchema.json @@ -0,0 +1,40 @@ +{ + "type": "object", + "properties": { + "Clients": { + "type": "object", + "properties": { + "TypeChangedFromClient": { + "type": "object", + "description": "Configuration for TypeChangedFromClient.", + "properties": { + "Endpoint": { + "type": "string", + "format": "uri", + "description": "Gets or sets the Endpoint." + }, + "Credential": { + "$ref": "#/definitions/credential" + }, + "Options": { + "$ref": "#/definitions/typeChangedFromClientOptions" + } + } + } + }, + "additionalProperties": { + "type": "object", + "description": "Configuration for a named client instance." + } + } + }, + "definitions": { + "typeChangedFromClientOptions": { + "allOf": [ + { + "$ref": "#/definitions/options" + } + ] + } + } +} diff --git a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v2/src/Versioning.TypeChangedFrom.V2.csproj b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v2/src/Versioning.TypeChangedFrom.V2.csproj index 62153305eab..fdacda26035 100644 --- a/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v2/src/Versioning.TypeChangedFrom.V2.csproj +++ b/packages/http-client-csharp/generator/TestProjects/Spector/http/versioning/typeChangedFrom/v2/src/Versioning.TypeChangedFrom.V2.csproj @@ -10,6 +10,11 @@ - + + + + + +