From 1f26e0f00c8471372c915f19748b6ba6c37cb1d6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 13 Jan 2026 13:14:44 +0000 Subject: [PATCH 01/10] Initial plan From 05c08c4a50fbcad53fd7c91afb85dd360401ee63 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 13 Jan 2026 13:25:02 +0000 Subject: [PATCH 02/10] Add YAML configuration support with anchors and merge keys Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com> --- .../Extensions/YamlConfigurationExtensions.cs | 241 ++++++++++++++++++ DevProxy.Abstractions/Plugins/BaseLoader.cs | 22 +- DevProxy.Abstractions/Utils/ProxyYaml.cs | 202 +++++++++++++++ DevProxy/Commands/ConfigCommand.cs | 45 +++- .../ConfigurationManagerExtensions.cs | 19 +- 5 files changed, 508 insertions(+), 21 deletions(-) create mode 100644 DevProxy.Abstractions/Extensions/YamlConfigurationExtensions.cs create mode 100644 DevProxy.Abstractions/Utils/ProxyYaml.cs diff --git a/DevProxy.Abstractions/Extensions/YamlConfigurationExtensions.cs b/DevProxy.Abstractions/Extensions/YamlConfigurationExtensions.cs new file mode 100644 index 000000000..d58f56bcb --- /dev/null +++ b/DevProxy.Abstractions/Extensions/YamlConfigurationExtensions.cs @@ -0,0 +1,241 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using DevProxy.Abstractions.Utils; +using YamlDotNet.RepresentationModel; + +#pragma warning disable IDE0130 +namespace Microsoft.Extensions.Configuration; +#pragma warning restore IDE0130 + +/// +/// A YAML file configuration source. +/// +public sealed class YamlConfigurationSource : FileConfigurationSource +{ + /// + public override IConfigurationProvider Build(IConfigurationBuilder builder) + { + EnsureDefaults(builder); + return new YamlConfigurationProvider(this); + } +} + +/// +/// A YAML file configuration provider that supports anchors and merge keys. +/// +public sealed class YamlConfigurationProvider : FileConfigurationProvider +{ + /// + /// Initializes a new instance of the class. + /// + /// The configuration source. + public YamlConfigurationProvider(YamlConfigurationSource source) : base(source) + { + } + + /// + public override void Load(Stream stream) + { + using var reader = new StreamReader(stream); + var yamlContent = reader.ReadToEnd(); + + // Parse the YAML using RepresentationModel which handles anchors/aliases natively + var yaml = new YamlStream(); + using var stringReader = new StringReader(yamlContent); + yaml.Load(stringReader); + + Data = new Dictionary(StringComparer.OrdinalIgnoreCase); + + if (yaml.Documents.Count == 0 || yaml.Documents[0].RootNode is null) + { + return; + } + + if (yaml.Documents[0].RootNode is YamlMappingNode mappingNode) + { + FlattenYamlNode(mappingNode, string.Empty); + } + } + + private void FlattenYamlNode(YamlNode node, string prefix) + { + switch (node) + { + case YamlMappingNode mappingNode: + FlattenMappingNode(mappingNode, prefix); + break; + case YamlSequenceNode sequenceNode: + FlattenSequenceNode(sequenceNode, prefix); + break; + case YamlScalarNode scalarNode: + Data[prefix] = scalarNode.Value; + break; + } + } + + private void FlattenMappingNode(YamlMappingNode mappingNode, string prefix) + { + // First, collect all merge key values + var mergedValues = new Dictionary(StringComparer.OrdinalIgnoreCase); + + foreach (var entry in mappingNode.Children) + { + var key = ((YamlScalarNode)entry.Key).Value ?? string.Empty; + + // Handle YAML merge key (<<) + if (key == "<<") + { + if (entry.Value is YamlMappingNode mergeMapping) + { + CollectMergedValues(mergeMapping, string.Empty, mergedValues); + } + else if (entry.Value is YamlSequenceNode mergeSequence) + { + foreach (var item in mergeSequence.Children) + { + if (item is YamlMappingNode itemMapping) + { + CollectMergedValues(itemMapping, string.Empty, mergedValues); + } + } + } + } + } + + // Add merged values first (they can be overridden by explicit values) + foreach (var kvp in mergedValues) + { + var fullKey = string.IsNullOrEmpty(prefix) + ? kvp.Key + : $"{prefix}{ConfigurationPath.KeyDelimiter}{kvp.Key}"; + Data.TryAdd(fullKey, kvp.Value); + } + + // Then process regular keys (they override merged values) + foreach (var entry in mappingNode.Children) + { + var key = ((YamlScalarNode)entry.Key).Value ?? string.Empty; + + // Skip merge key + if (key == "<<") + { + continue; + } + + var newPrefix = string.IsNullOrEmpty(prefix) + ? key + : $"{prefix}{ConfigurationPath.KeyDelimiter}{key}"; + + FlattenYamlNode(entry.Value, newPrefix); + } + } + + private void CollectMergedValues(YamlMappingNode mappingNode, string prefix, Dictionary values) + { + foreach (var entry in mappingNode.Children) + { + var key = ((YamlScalarNode)entry.Key).Value ?? string.Empty; + + // Skip nested merge keys in merged content + if (key == "<<") + { + continue; + } + + var newPrefix = string.IsNullOrEmpty(prefix) + ? key + : $"{prefix}{ConfigurationPath.KeyDelimiter}{key}"; + + CollectMergedValuesFromNode(entry.Value, newPrefix, values); + } + } + + private void CollectMergedValuesFromNode(YamlNode node, string prefix, Dictionary values) + { + switch (node) + { + case YamlMappingNode mappingNode: + CollectMergedValues(mappingNode, prefix, values); + break; + case YamlSequenceNode sequenceNode: + for (int i = 0; i < sequenceNode.Children.Count; i++) + { + var newPrefix = $"{prefix}{ConfigurationPath.KeyDelimiter}{i}"; + CollectMergedValuesFromNode(sequenceNode.Children[i], newPrefix, values); + } + break; + case YamlScalarNode scalarNode: + values.TryAdd(prefix, scalarNode.Value); + break; + } + } + + private void FlattenSequenceNode(YamlSequenceNode sequenceNode, string prefix) + { + for (int i = 0; i < sequenceNode.Children.Count; i++) + { + var newPrefix = $"{prefix}{ConfigurationPath.KeyDelimiter}{i}"; + FlattenYamlNode(sequenceNode.Children[i], newPrefix); + } + } +} + +/// +/// Extension methods for adding YAML configuration. +/// +public static class YamlConfigurationExtensions +{ + /// + /// Adds a YAML configuration source to the configuration builder. + /// + /// The configuration builder. + /// The path to the YAML file. + /// Whether the file is optional. + /// Whether to reload on change. + /// The configuration builder. + public static IConfigurationBuilder AddYamlFile( + this IConfigurationBuilder builder, + string path, + bool optional = false, + bool reloadOnChange = false) + { + ArgumentNullException.ThrowIfNull(builder); + ArgumentException.ThrowIfNullOrEmpty(path); + + return builder.Add(s => + { + s.FileProvider = null; + s.Path = path; + s.Optional = optional; + s.ReloadOnChange = reloadOnChange; + s.ResolveFileProvider(); + }); + } + + /// + /// Adds a configuration file (JSON or YAML based on extension). + /// + /// The configuration builder. + /// The path to the configuration file. + /// Whether the file is optional. + /// Whether to reload on change. + /// The configuration builder. + public static IConfigurationBuilder AddConfigFile( + this IConfigurationBuilder builder, + string path, + bool optional = false, + bool reloadOnChange = false) + { + ArgumentNullException.ThrowIfNull(builder); + ArgumentException.ThrowIfNullOrEmpty(path); + + if (ProxyYaml.IsYamlFile(path)) + { + return builder.AddYamlFile(path, optional, reloadOnChange); + } + + return builder.AddJsonFile(path, optional, reloadOnChange); + } +} diff --git a/DevProxy.Abstractions/Plugins/BaseLoader.cs b/DevProxy.Abstractions/Plugins/BaseLoader.cs index aa0cccea0..b06cc255c 100644 --- a/DevProxy.Abstractions/Plugins/BaseLoader.cs +++ b/DevProxy.Abstractions/Plugins/BaseLoader.cs @@ -120,11 +120,27 @@ private async Task LoadFileContentsAsync(CancellationToken cancellationToken) { using var stream = new FileStream(FilePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); using var reader = new StreamReader(stream); - var responsesString = await reader.ReadToEndAsync(cancellationToken); + var fileContents = await reader.ReadToEndAsync(cancellationToken); - if (!_validateSchemas || await ValidateFileContentsAsync(responsesString, cancellationToken)) + // Convert YAML to JSON if needed + string jsonContents; + if (ProxyYaml.IsYamlFile(FilePath)) { - LoadData(responsesString); + if (!ProxyYaml.TryConvertYamlToJson(fileContents, out var converted, out var error)) + { + Logger.LogError("Failed to parse YAML file {File}: {Error}", FilePath, error); + return; + } + jsonContents = converted!; + } + else + { + jsonContents = fileContents; + } + + if (!_validateSchemas || await ValidateFileContentsAsync(jsonContents, cancellationToken)) + { + LoadData(jsonContents); } } catch (Exception ex) diff --git a/DevProxy.Abstractions/Utils/ProxyYaml.cs b/DevProxy.Abstractions/Utils/ProxyYaml.cs new file mode 100644 index 000000000..f6064584e --- /dev/null +++ b/DevProxy.Abstractions/Utils/ProxyYaml.cs @@ -0,0 +1,202 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Text.Json; +using YamlDotNet.Core; +using YamlDotNet.RepresentationModel; + +namespace DevProxy.Abstractions.Utils; + +/// +/// Utility class for YAML operations including conversion to JSON. +/// +public static class ProxyYaml +{ + /// + /// Determines if a file path is a YAML file based on its extension. + /// + /// The file path to check. + /// True if the file is a YAML file, false otherwise. + public static bool IsYamlFile(string? filePath) + { + if (string.IsNullOrEmpty(filePath)) + { + return false; + } + + var extension = Path.GetExtension(filePath); + return extension.Equals(".yaml", StringComparison.OrdinalIgnoreCase) || + extension.Equals(".yml", StringComparison.OrdinalIgnoreCase); + } + + /// + /// Converts YAML content to JSON. + /// + /// The YAML content to convert. + /// The JSON representation of the YAML content. + /// Thrown when the YAML is invalid. + public static string ConvertYamlToJson(string yamlContent) + { + ArgumentNullException.ThrowIfNull(yamlContent); + + // Parse the YAML using RepresentationModel which handles anchors/aliases natively + var yaml = new YamlStream(); + using var reader = new StringReader(yamlContent); + yaml.Load(reader); + + if (yaml.Documents.Count == 0 || yaml.Documents[0].RootNode is null) + { + return "{}"; + } + + var root = yaml.Documents[0].RootNode; + var jsonObject = ConvertNode(root); + + return JsonSerializer.Serialize(jsonObject, ProxyUtils.JsonSerializerOptions); + } + + /// + /// Tries to convert YAML content to JSON. + /// + /// The YAML content to convert. + /// When successful, contains the JSON content; otherwise, null. + /// When unsuccessful, contains the error message; otherwise, null. + /// True if conversion was successful, false otherwise. + public static bool TryConvertYamlToJson(string yamlContent, out string? jsonContent, out string? error) + { + try + { + jsonContent = ConvertYamlToJson(yamlContent); + error = null; + return true; + } + catch (YamlException ex) + { + jsonContent = null; + error = ex.Message; + return false; + } + catch (Exception ex) + { + jsonContent = null; + error = ex.Message; + return false; + } + } + + private static object? ConvertNode(YamlNode node) + { + return node switch + { + YamlMappingNode mappingNode => ConvertMappingNode(mappingNode), + YamlSequenceNode sequenceNode => ConvertSequenceNode(sequenceNode), + YamlScalarNode scalarNode => ConvertScalarNode(scalarNode), + _ => null + }; + } + + private static Dictionary ConvertMappingNode(YamlMappingNode mappingNode) + { + var result = new Dictionary(); + + foreach (var entry in mappingNode.Children) + { + var key = ((YamlScalarNode)entry.Key).Value ?? string.Empty; + + // Handle YAML merge key (<<) + if (key == "<<") + { + // Merge the referenced mapping into the current one + if (entry.Value is YamlMappingNode mergeMapping) + { + var mergeDict = ConvertMappingNode(mergeMapping); + foreach (var kvp in mergeDict) + { + // Only add if not already present (current values take precedence) + result.TryAdd(kvp.Key, kvp.Value); + } + } + else if (entry.Value is YamlSequenceNode mergeSequence) + { + // Handle merging multiple mappings + foreach (var item in mergeSequence.Children) + { + if (item is YamlMappingNode itemMapping) + { + var mergeDict = ConvertMappingNode(itemMapping); + foreach (var kvp in mergeDict) + { + result.TryAdd(kvp.Key, kvp.Value); + } + } + } + } + continue; + } + + result[key] = ConvertNode(entry.Value); + } + + return result; + } + + private static List ConvertSequenceNode(YamlSequenceNode sequenceNode) + { + var result = new List(); + foreach (var item in sequenceNode.Children) + { + result.Add(ConvertNode(item)); + } + return result; + } + + private static object? ConvertScalarNode(YamlScalarNode scalarNode) + { + var value = scalarNode.Value; + + if (value is null) + { + return null; + } + + // Try to infer the type from the value + // Check for boolean values + if (value.Equals("true", StringComparison.OrdinalIgnoreCase)) + { + return true; + } + if (value.Equals("false", StringComparison.OrdinalIgnoreCase)) + { + return false; + } + + // Check for null values + if (value.Equals("null", StringComparison.OrdinalIgnoreCase) || + value.Equals("~", StringComparison.Ordinal) || + value.Length == 0) + { + return null; + } + + // Check for integer values + if (long.TryParse(value, out var longValue)) + { + // Return int if it fits, otherwise long + if (longValue >= int.MinValue && longValue <= int.MaxValue) + { + return (int)longValue; + } + return longValue; + } + + // Check for floating point values + if (double.TryParse(value, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out var doubleValue)) + { + return doubleValue; + } + + // Return as string + return value; + } +} diff --git a/DevProxy/Commands/ConfigCommand.cs b/DevProxy/Commands/ConfigCommand.cs index a089494b2..2e9499bee 100644 --- a/DevProxy/Commands/ConfigCommand.cs +++ b/DevProxy/Commands/ConfigCommand.cs @@ -201,34 +201,51 @@ private ProxyConfigInfo GetConfigInfo(string configFolder) { var configInfo = new ProxyConfigInfo(); - _logger.LogDebug("Getting list of JSON files in {ConfigFolder}...", configFolder); + _logger.LogDebug("Getting list of config files in {ConfigFolder}...", configFolder); + + // Get both JSON and YAML files var jsonFiles = Directory.GetFiles(configFolder, "*.json"); - if (jsonFiles.Length == 0) + var yamlFiles = Directory.GetFiles(configFolder, "*.yaml"); + var ymlFiles = Directory.GetFiles(configFolder, "*.yml"); + var allConfigFiles = jsonFiles.Concat(yamlFiles).Concat(ymlFiles).ToArray(); + + if (allConfigFiles.Length == 0) { - _logger.LogDebug("No JSON files found"); + _logger.LogDebug("No config files found"); return configInfo; } - foreach (var jsonFile in jsonFiles) + foreach (var configFile in allConfigFiles) { - _logger.LogDebug("Reading file {JsonFile}...", jsonFile); - - var fileContents = File.ReadAllText(jsonFile); - if (fileContents.Contains("\"plugins\":", StringComparison.OrdinalIgnoreCase)) + _logger.LogDebug("Reading file {ConfigFile}...", configFile); + + var fileContents = File.ReadAllText(configFile); + + // Check for plugins marker (case-insensitive) + // For JSON: "plugins": + // For YAML: plugins: + if (fileContents.Contains("\"plugins\":", StringComparison.OrdinalIgnoreCase) || + fileContents.Contains("plugins:", StringComparison.OrdinalIgnoreCase)) { - _logger.LogDebug("File {JsonFile} contains proxy config", jsonFile); - configInfo.ConfigFiles.Add(jsonFile); + _logger.LogDebug("File {ConfigFile} contains proxy config", configFile); + configInfo.ConfigFiles.Add(configFile); continue; } - if (fileContents.Contains("\"responses\":", StringComparison.OrdinalIgnoreCase)) + // Check for responses/mocks marker (case-insensitive) + // For JSON: "responses": or "mocks": + // For YAML: responses: or mocks: + if (fileContents.Contains("\"responses\":", StringComparison.OrdinalIgnoreCase) || + fileContents.Contains("\"mocks\":", StringComparison.OrdinalIgnoreCase) || + fileContents.Contains("responses:", StringComparison.OrdinalIgnoreCase) || + fileContents.Contains("mocks:", StringComparison.OrdinalIgnoreCase)) { - _logger.LogDebug("File {JsonFile} contains mock data", jsonFile); - configInfo.MockFiles.Add(jsonFile); + _logger.LogDebug("File {ConfigFile} contains mock data", configFile); + configInfo.MockFiles.Add(configFile); continue; } - _logger.LogDebug("File {JsonFile} is not a proxy config or mock data", jsonFile); + _logger.LogDebug("File {ConfigFile} is not a proxy config or mock data", configFile); } if (configInfo.ConfigFiles.Any()) diff --git a/DevProxy/Extensions/ConfigurationManagerExtensions.cs b/DevProxy/Extensions/ConfigurationManagerExtensions.cs index d9b7536b9..cac373b93 100644 --- a/DevProxy/Extensions/ConfigurationManagerExtensions.cs +++ b/DevProxy/Extensions/ConfigurationManagerExtensions.cs @@ -20,24 +20,35 @@ public static ConfigurationManager ConfigureDevProxyConfig(this ConfigurationMan // config file specified by the user takes precedence // null if not specified options.ConfigFile, - // current directory + // current directory - JSON/JSONC files "devproxyrc.jsonc", "devproxyrc.json", + // current directory - YAML files + "devproxyrc.yaml", + "devproxyrc.yml", + // .devproxy subdirectory - JSON/JSONC files Path.Combine(".devproxy", "devproxyrc.jsonc"), Path.Combine(".devproxy", "devproxyrc.json"), + // .devproxy subdirectory - YAML files + Path.Combine(".devproxy", "devproxyrc.yaml"), + Path.Combine(".devproxy", "devproxyrc.yml"), + // app folder - JSON/JSONC files Path.Combine(ProxyUtils.AppFolder ?? "", "devproxyrc.jsonc"), - Path.Combine(ProxyUtils.AppFolder ?? "", "devproxyrc.json") + Path.Combine(ProxyUtils.AppFolder ?? "", "devproxyrc.json"), + // app folder - YAML files + Path.Combine(ProxyUtils.AppFolder ?? "", "devproxyrc.yaml"), + Path.Combine(ProxyUtils.AppFolder ?? "", "devproxyrc.yml") ]; foreach (var configFile in configFiles) { if (!string.IsNullOrEmpty(configFile) && File.Exists(configFile)) { - _ = configuration.AddJsonFile(configFile, optional: false, reloadOnChange: true); + _ = configuration.AddConfigFile(configFile, optional: false, reloadOnChange: true); return configuration; } } - throw new InvalidOperationException("No configuration file found. Please create a devproxyrc.json file in the current directory."); + throw new InvalidOperationException("No configuration file found. Please create a devproxyrc.json or devproxyrc.yaml file in the current directory."); } } \ No newline at end of file From d9bc12dd46f8ce0eae46fdbaea10aea30128b0e8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 13 Jan 2026 13:28:37 +0000 Subject: [PATCH 03/10] Fix YAML merge key precedence logic Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com> --- .../Extensions/YamlConfigurationExtensions.cs | 5 ++-- DevProxy.Abstractions/Utils/ProxyYaml.cs | 28 +++++++++++++++---- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/DevProxy.Abstractions/Extensions/YamlConfigurationExtensions.cs b/DevProxy.Abstractions/Extensions/YamlConfigurationExtensions.cs index d58f56bcb..a336387e5 100644 --- a/DevProxy.Abstractions/Extensions/YamlConfigurationExtensions.cs +++ b/DevProxy.Abstractions/Extensions/YamlConfigurationExtensions.cs @@ -110,7 +110,7 @@ private void FlattenMappingNode(YamlMappingNode mappingNode, string prefix) var fullKey = string.IsNullOrEmpty(prefix) ? kvp.Key : $"{prefix}{ConfigurationPath.KeyDelimiter}{kvp.Key}"; - Data.TryAdd(fullKey, kvp.Value); + Data[fullKey] = kvp.Value; } // Then process regular keys (they override merged values) @@ -167,7 +167,8 @@ private void CollectMergedValuesFromNode(YamlNode node, string prefix, Dictionar } break; case YamlScalarNode scalarNode: - values.TryAdd(prefix, scalarNode.Value); + // Later values override earlier values within merged content + values[prefix] = scalarNode.Value; break; } } diff --git a/DevProxy.Abstractions/Utils/ProxyYaml.cs b/DevProxy.Abstractions/Utils/ProxyYaml.cs index f6064584e..83f40c745 100644 --- a/DevProxy.Abstractions/Utils/ProxyYaml.cs +++ b/DevProxy.Abstractions/Utils/ProxyYaml.cs @@ -100,21 +100,21 @@ public static bool TryConvertYamlToJson(string yamlContent, out string? jsonCont { var result = new Dictionary(); + // First, process all merge keys to get merged values + var mergedValues = new Dictionary(); foreach (var entry in mappingNode.Children) { var key = ((YamlScalarNode)entry.Key).Value ?? string.Empty; - // Handle YAML merge key (<<) if (key == "<<") { - // Merge the referenced mapping into the current one if (entry.Value is YamlMappingNode mergeMapping) { var mergeDict = ConvertMappingNode(mergeMapping); foreach (var kvp in mergeDict) { - // Only add if not already present (current values take precedence) - result.TryAdd(kvp.Key, kvp.Value); + // Later merges override earlier merges + mergedValues[kvp.Key] = kvp.Value; } } else if (entry.Value is YamlSequenceNode mergeSequence) @@ -127,14 +127,32 @@ public static bool TryConvertYamlToJson(string yamlContent, out string? jsonCont var mergeDict = ConvertMappingNode(itemMapping); foreach (var kvp in mergeDict) { - result.TryAdd(kvp.Key, kvp.Value); + mergedValues[kvp.Key] = kvp.Value; } } } } + } + } + + // Add merged values to result first + foreach (var kvp in mergedValues) + { + result[kvp.Key] = kvp.Value; + } + + // Then, process explicit keys (they override merged values) + foreach (var entry in mappingNode.Children) + { + var key = ((YamlScalarNode)entry.Key).Value ?? string.Empty; + + // Skip merge keys + if (key == "<<") + { continue; } + // Explicit keys always override merged values result[key] = ConvertNode(entry.Value); } From 11f91aaa01f3c951c98bb5e80ba4b99526f03e81 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 13 Jan 2026 13:34:58 +0000 Subject: [PATCH 04/10] Fix unsafe casts in YAML processing Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com> --- .../Extensions/YamlConfigurationExtensions.cs | 23 ++++++++++++++++--- DevProxy.Abstractions/Utils/ProxyYaml.cs | 20 +++++++++++++--- 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/DevProxy.Abstractions/Extensions/YamlConfigurationExtensions.cs b/DevProxy.Abstractions/Extensions/YamlConfigurationExtensions.cs index a336387e5..342b060f3 100644 --- a/DevProxy.Abstractions/Extensions/YamlConfigurationExtensions.cs +++ b/DevProxy.Abstractions/Extensions/YamlConfigurationExtensions.cs @@ -82,7 +82,11 @@ private void FlattenMappingNode(YamlMappingNode mappingNode, string prefix) foreach (var entry in mappingNode.Children) { - var key = ((YamlScalarNode)entry.Key).Value ?? string.Empty; + var key = GetScalarValue(entry.Key); + if (key is null) + { + continue; + } // Handle YAML merge key (<<) if (key == "<<") @@ -116,7 +120,11 @@ private void FlattenMappingNode(YamlMappingNode mappingNode, string prefix) // Then process regular keys (they override merged values) foreach (var entry in mappingNode.Children) { - var key = ((YamlScalarNode)entry.Key).Value ?? string.Empty; + var key = GetScalarValue(entry.Key); + if (key is null) + { + continue; + } // Skip merge key if (key == "<<") @@ -132,11 +140,20 @@ private void FlattenMappingNode(YamlMappingNode mappingNode, string prefix) } } + private static string? GetScalarValue(YamlNode node) + { + return node is YamlScalarNode scalarNode ? scalarNode.Value : null; + } + private void CollectMergedValues(YamlMappingNode mappingNode, string prefix, Dictionary values) { foreach (var entry in mappingNode.Children) { - var key = ((YamlScalarNode)entry.Key).Value ?? string.Empty; + var key = GetScalarValue(entry.Key); + if (key is null) + { + continue; + } // Skip nested merge keys in merged content if (key == "<<") diff --git a/DevProxy.Abstractions/Utils/ProxyYaml.cs b/DevProxy.Abstractions/Utils/ProxyYaml.cs index 83f40c745..c52f64fc4 100644 --- a/DevProxy.Abstractions/Utils/ProxyYaml.cs +++ b/DevProxy.Abstractions/Utils/ProxyYaml.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Globalization; using System.Text.Json; using YamlDotNet.Core; using YamlDotNet.RepresentationModel; @@ -104,7 +105,11 @@ public static bool TryConvertYamlToJson(string yamlContent, out string? jsonCont var mergedValues = new Dictionary(); foreach (var entry in mappingNode.Children) { - var key = ((YamlScalarNode)entry.Key).Value ?? string.Empty; + var key = GetScalarValue(entry.Key); + if (key is null) + { + continue; + } if (key == "<<") { @@ -144,7 +149,11 @@ public static bool TryConvertYamlToJson(string yamlContent, out string? jsonCont // Then, process explicit keys (they override merged values) foreach (var entry in mappingNode.Children) { - var key = ((YamlScalarNode)entry.Key).Value ?? string.Empty; + var key = GetScalarValue(entry.Key); + if (key is null) + { + continue; + } // Skip merge keys if (key == "<<") @@ -159,6 +168,11 @@ public static bool TryConvertYamlToJson(string yamlContent, out string? jsonCont return result; } + private static string? GetScalarValue(YamlNode node) + { + return node is YamlScalarNode scalarNode ? scalarNode.Value : null; + } + private static List ConvertSequenceNode(YamlSequenceNode sequenceNode) { var result = new List(); @@ -209,7 +223,7 @@ public static bool TryConvertYamlToJson(string yamlContent, out string? jsonCont } // Check for floating point values - if (double.TryParse(value, System.Globalization.NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, out var doubleValue)) + if (double.TryParse(value, NumberStyles.Float, CultureInfo.InvariantCulture, out var doubleValue)) { return doubleValue; } From 5d6ace82e78a6686f92f995e69c04dac7e637855 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 13 Jan 2026 13:36:45 +0000 Subject: [PATCH 05/10] Improve YAML boolean and null value detection per YAML spec Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com> --- DevProxy.Abstractions/Utils/ProxyYaml.cs | 39 ++++++++++++++++-------- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/DevProxy.Abstractions/Utils/ProxyYaml.cs b/DevProxy.Abstractions/Utils/ProxyYaml.cs index c52f64fc4..46ebbf1c9 100644 --- a/DevProxy.Abstractions/Utils/ProxyYaml.cs +++ b/DevProxy.Abstractions/Utils/ProxyYaml.cs @@ -192,23 +192,20 @@ public static bool TryConvertYamlToJson(string yamlContent, out string? jsonCont return null; } - // Try to infer the type from the value - // Check for boolean values - if (value.Equals("true", StringComparison.OrdinalIgnoreCase)) + // Check for null values (YAML 1.1 and 1.2 spec) + if (IsNullValue(value)) { - return true; + return null; } - if (value.Equals("false", StringComparison.OrdinalIgnoreCase)) + + // Check for boolean values (YAML 1.1 spec - commonly used) + if (IsTrueValue(value)) { - return false; + return true; } - - // Check for null values - if (value.Equals("null", StringComparison.OrdinalIgnoreCase) || - value.Equals("~", StringComparison.Ordinal) || - value.Length == 0) + if (IsFalseValue(value)) { - return null; + return false; } // Check for integer values @@ -231,4 +228,22 @@ public static bool TryConvertYamlToJson(string yamlContent, out string? jsonCont // Return as string return value; } + + // YAML 1.1 boolean true values + private static bool IsTrueValue(string value) => + value.Equals("true", StringComparison.OrdinalIgnoreCase) || + value.Equals("yes", StringComparison.OrdinalIgnoreCase) || + value.Equals("on", StringComparison.OrdinalIgnoreCase); + + // YAML 1.1 boolean false values + private static bool IsFalseValue(string value) => + value.Equals("false", StringComparison.OrdinalIgnoreCase) || + value.Equals("no", StringComparison.OrdinalIgnoreCase) || + value.Equals("off", StringComparison.OrdinalIgnoreCase); + + // YAML 1.1 and 1.2 null values + private static bool IsNullValue(string value) => + value.Length == 0 || + value.Equals("~", StringComparison.Ordinal) || + value.Equals("null", StringComparison.OrdinalIgnoreCase); } From a0204d85c55cf072e8c29287420062d4420f126f Mon Sep 17 00:00:00 2001 From: waldekmastykarz Date: Sun, 22 Feb 2026 13:43:23 +0100 Subject: [PATCH 06/10] Fix Copilot review: nested merges, quoted empty strings, YAML boolean normalization - Handle nested merge keys recursively in CollectMergedValues instead of skipping them - Distinguish quoted empty strings from null using ScalarStyle in ProxyYaml - Normalize YAML 1.1 booleans (yes/no/on/off) to true/false in YamlConfigurationProvider --- .../Extensions/YamlConfigurationExtensions.cs | 42 ++++++++++++++++++- DevProxy.Abstractions/Utils/ProxyYaml.cs | 7 ++++ 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/DevProxy.Abstractions/Extensions/YamlConfigurationExtensions.cs b/DevProxy.Abstractions/Extensions/YamlConfigurationExtensions.cs index 342b060f3..feb5ab0c1 100644 --- a/DevProxy.Abstractions/Extensions/YamlConfigurationExtensions.cs +++ b/DevProxy.Abstractions/Extensions/YamlConfigurationExtensions.cs @@ -70,7 +70,7 @@ private void FlattenYamlNode(YamlNode node, string prefix) FlattenSequenceNode(sequenceNode, prefix); break; case YamlScalarNode scalarNode: - Data[prefix] = scalarNode.Value; + Data[prefix] = NormalizeScalar(scalarNode); break; } } @@ -145,6 +145,29 @@ private void FlattenMappingNode(YamlMappingNode mappingNode, string prefix) return node is YamlScalarNode scalarNode ? scalarNode.Value : null; } + private static string? NormalizeScalar(YamlScalarNode scalarNode) + { + var value = scalarNode.Value; + if (value is null) + { + return null; + } + + // Only normalize plain (unquoted) scalars + if (scalarNode.Style != YamlDotNet.Core.ScalarStyle.Plain) + { + return value; + } + + return value.ToLowerInvariant() switch + { + "y" or "yes" or "true" or "on" => "true", + "n" or "no" or "false" or "off" => "false", + "~" or "null" or "" => null, + _ => value + }; + } + private void CollectMergedValues(YamlMappingNode mappingNode, string prefix, Dictionary values) { foreach (var entry in mappingNode.Children) @@ -155,9 +178,24 @@ private void CollectMergedValues(YamlMappingNode mappingNode, string prefix, Dic continue; } - // Skip nested merge keys in merged content + // Handle nested merge keys recursively if (key == "<<") { + switch (entry.Value) + { + case YamlMappingNode mergeMapping: + CollectMergedValues(mergeMapping, prefix, values); + break; + case YamlSequenceNode mergeSequence: + foreach (var child in mergeSequence.Children) + { + if (child is YamlMappingNode childMapping) + { + CollectMergedValues(childMapping, prefix, values); + } + } + break; + } continue; } diff --git a/DevProxy.Abstractions/Utils/ProxyYaml.cs b/DevProxy.Abstractions/Utils/ProxyYaml.cs index 46ebbf1c9..02734b5b0 100644 --- a/DevProxy.Abstractions/Utils/ProxyYaml.cs +++ b/DevProxy.Abstractions/Utils/ProxyYaml.cs @@ -192,6 +192,13 @@ public static bool TryConvertYamlToJson(string yamlContent, out string? jsonCont return null; } + // Only apply type inference to plain (unquoted) scalars. + // Quoted scalars are always strings. + if (scalarNode.Style != ScalarStyle.Plain) + { + return value; + } + // Check for null values (YAML 1.1 and 1.2 spec) if (IsNullValue(value)) { From c02bc370d0e59be63f783494f45299446824f9b0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Feb 2026 15:18:37 +0000 Subject: [PATCH 07/10] Add YAML versions of default configuration files Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com> --- DevProxy/DevProxy.csproj | 6 +++ DevProxy/devproxy-errors.yaml | 72 +++++++++++++++++++++++++++++++++++ DevProxy/devproxyrc.yaml | 27 +++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 DevProxy/devproxy-errors.yaml create mode 100644 DevProxy/devproxyrc.yaml diff --git a/DevProxy/DevProxy.csproj b/DevProxy/DevProxy.csproj index 07c1b736d..65ef0964b 100644 --- a/DevProxy/DevProxy.csproj +++ b/DevProxy/DevProxy.csproj @@ -57,9 +57,15 @@ Always + + PreserveNewest + PreserveNewest + + PreserveNewest + PreserveNewest diff --git a/DevProxy/devproxy-errors.yaml b/DevProxy/devproxy-errors.yaml new file mode 100644 index 000000000..5ecfa9565 --- /dev/null +++ b/DevProxy/devproxy-errors.yaml @@ -0,0 +1,72 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v2.2.0/genericrandomerrorplugin.errorsfile.schema.json +# Dev Proxy error responses configuration +# This YAML version serves as a reference example alongside the default JSON configuration. +# It demonstrates YAML features like comments, multiline strings, and anchors. + +# Define reusable error body templates using YAML anchors +definitions: + client_error_body: &client_error_body + message: "Client Error" + + server_error_body: &server_error_body + message: "Server Error" + +errors: + - request: + url: "https://*/*" + responses: + - statusCode: 400 + body: + <<: *client_error_body + message: Bad Request + details: The server cannot process the request due to invalid syntax. + + - statusCode: 401 + body: + <<: *client_error_body + message: Unauthorized + details: The request requires user authentication. + + - statusCode: 403 + body: + <<: *client_error_body + message: Forbidden + details: The server understood the request, but refuses to authorize it. + + - statusCode: 404 + body: + <<: *client_error_body + message: Not Found + details: The requested resource could not be found. + + - statusCode: 418 + body: + message: I'm a teapot + details: The server refuses the attempt to brew coffee with a teapot. + + - statusCode: 429 + body: + message: Too Many Requests + details: >- + The user has sent too many requests in a given amount of time + ("rate limiting"). + headers: + - name: Retry-After + value: "@dynamic" + + - statusCode: 500 + body: + <<: *server_error_body + message: Internal Server Error + details: >- + The server encountered an internal error and was unable to complete + your request. Either the server is overloaded or there is an error + in the application. + + - statusCode: 503 + body: + <<: *server_error_body + message: Service Unavailable + details: >- + The server is currently unable to handle the request due to a + temporary overload or maintenance. Please try again later. diff --git a/DevProxy/devproxyrc.yaml b/DevProxy/devproxyrc.yaml new file mode 100644 index 000000000..6826a1e26 --- /dev/null +++ b/DevProxy/devproxyrc.yaml @@ -0,0 +1,27 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v2.2.0/rc.schema.json +# Dev Proxy configuration file +# This YAML version serves as a reference example alongside the default JSON configuration. + +plugins: + - name: RetryAfterPlugin + enabled: true + pluginPath: "~appFolder/plugins/DevProxy.Plugins.dll" + + - name: GenericRandomErrorPlugin + enabled: true + pluginPath: "~appFolder/plugins/DevProxy.Plugins.dll" + configSection: genericRandomErrorPlugin + +urlsToWatch: + - "https://jsonplaceholder.typicode.com/*" + +genericRandomErrorPlugin: + # yaml-language-server: $schema=https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v2.2.0/genericrandomerrorplugin.schema.json + errorsFile: devproxy-errors.yaml + rate: 50 + +logLevel: information +newVersionNotification: stable +showSkipMessages: true +showTimestamps: true +validateSchemas: true From cc2b32e9869435aab3a84086b758ad3743c10c36 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Feb 2026 12:25:14 +0000 Subject: [PATCH 08/10] Add remark to validateSchemas that it only applies to JSON configs Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com> --- schemas/v2.2.0/rc.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/v2.2.0/rc.schema.json b/schemas/v2.2.0/rc.schema.json index 369a19a0d..daa86c54d 100644 --- a/schemas/v2.2.0/rc.schema.json +++ b/schemas/v2.2.0/rc.schema.json @@ -154,7 +154,7 @@ }, "validateSchemas": { "type": "boolean", - "description": "Whether to validate configuration files against their schemas." + "description": "Whether to validate configuration files against their schemas. Only applies to JSON-based configuration files." }, "watchPids": { "type": "array", From 0fe6f55aa487b0ae7331d0ad81261b1811f296e5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Feb 2026 12:28:56 +0000 Subject: [PATCH 09/10] Add definitions property to v2.2.0 schemas for YAML anchor support Co-authored-by: waldekmastykarz <11164679+waldekmastykarz@users.noreply.github.com> --- ...centerminimalpermissionsplugin.schema.json | 4 ++++ .../apicenteronboardingplugin.schema.json | 4 ++++ ...icenterproductionversionplugin.schema.json | 4 ++++ schemas/v2.2.0/authplugin.schema.json | 4 ++++ .../v2.2.0/cachingguidanceplugin.schema.json | 4 ++++ .../v2.2.0/crudapiplugin.apifile.schema.json | 20 +++++++++++++++---- schemas/v2.2.0/crudapiplugin.schema.json | 4 ++++ schemas/v2.2.0/devtoolsplugin.schema.json | 4 ++++ .../v2.2.0/executionsummaryplugin.schema.json | 4 ++++ ...icrandomerrorplugin.errorsfile.schema.json | 4 ++++ .../genericrandomerrorplugin.schema.json | 4 ++++ ...nimalpermissionsguidanceplugin.schema.json | 11 +++++++++- .../graphminimalpermissionsplugin.schema.json | 4 ++++ .../v2.2.0/graphrandomerrorplugin.schema.json | 4 ++++ schemas/v2.2.0/hargeneratorplugin.schema.json | 6 +++++- .../httpfilegeneratorplugin.schema.json | 4 ++++ .../languagemodelfailureplugin.schema.json | 4 ++++ ...itingplugin.customresponsefile.schema.json | 6 +++++- ...anguagemodelratelimitingplugin.schema.json | 6 +++++- schemas/v2.2.0/latencyplugin.schema.json | 4 ++++ .../minimalcsompermissions.types.schema.json | 12 +++++++++-- .../minimalcsompermissionsplugin.schema.json | 4 ++++ ...nimalpermissionsguidanceplugin.schema.json | 11 +++++++++- .../minimalpermissionsplugin.schema.json | 4 ++++ .../mockrequestplugin.mockfile.schema.json | 4 ++++ schemas/v2.2.0/mockrequestplugin.schema.json | 4 ++++ .../mockresponseplugin.mocksfile.schema.json | 4 ++++ schemas/v2.2.0/mockresponseplugin.schema.json | 4 ++++ ...kstdioresponseplugin.mocksfile.schema.json | 6 +++++- .../mockstdioresponseplugin.schema.json | 6 +++++- ...enaitelemetryplugin.pricesfile.schema.json | 4 ++++ .../v2.2.0/openaitelemetryplugin.schema.json | 6 +++++- .../openapispecgeneratorplugin.schema.json | 4 ++++ ...itingplugin.customresponsefile.schema.json | 4 ++++ schemas/v2.2.0/ratelimitingplugin.schema.json | 4 ++++ schemas/v2.2.0/rc.schema.json | 4 ++++ .../rewriteplugin.rewritesfile.schema.json | 17 +++++++++++++--- schemas/v2.2.0/rewriteplugin.schema.json | 4 ++++ .../typespecgeneratorplugin.schema.json | 4 ++++ 39 files changed, 202 insertions(+), 17 deletions(-) diff --git a/schemas/v2.2.0/apicenterminimalpermissionsplugin.schema.json b/schemas/v2.2.0/apicenterminimalpermissionsplugin.schema.json index e0b473c35..9c92d4aab 100644 --- a/schemas/v2.2.0/apicenterminimalpermissionsplugin.schema.json +++ b/schemas/v2.2.0/apicenterminimalpermissionsplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "resourceGroupName": { "type": "string", "description": "Name of the resource group where the Azure API Center is located." diff --git a/schemas/v2.2.0/apicenteronboardingplugin.schema.json b/schemas/v2.2.0/apicenteronboardingplugin.schema.json index ee3bde341..bae643ad2 100644 --- a/schemas/v2.2.0/apicenteronboardingplugin.schema.json +++ b/schemas/v2.2.0/apicenteronboardingplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "createApicEntryForNewApis": { "type": "boolean", "description": "Set to true to have Dev Proxy create new API entries for APIs detected but not yet registered in API Center. When false, Dev Proxy only lists unregistered APIs. Default is true." diff --git a/schemas/v2.2.0/apicenterproductionversionplugin.schema.json b/schemas/v2.2.0/apicenterproductionversionplugin.schema.json index ce726153a..1e9580881 100644 --- a/schemas/v2.2.0/apicenterproductionversionplugin.schema.json +++ b/schemas/v2.2.0/apicenterproductionversionplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "resourceGroupName": { "type": "string", "description": "Name of the resource group where the Azure API Center is located." diff --git a/schemas/v2.2.0/authplugin.schema.json b/schemas/v2.2.0/authplugin.schema.json index 900d07aeb..476563a8f 100644 --- a/schemas/v2.2.0/authplugin.schema.json +++ b/schemas/v2.2.0/authplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "apiKey": { "type": "object", "description": "Configuration for API key authentication and authorization.", diff --git a/schemas/v2.2.0/cachingguidanceplugin.schema.json b/schemas/v2.2.0/cachingguidanceplugin.schema.json index 18116180a..6e6ff1674 100644 --- a/schemas/v2.2.0/cachingguidanceplugin.schema.json +++ b/schemas/v2.2.0/cachingguidanceplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "cacheThresholdSeconds": { "type": "integer", "description": "The number of seconds between the same request that triggers the guidance warning. Default is 5." diff --git a/schemas/v2.2.0/crudapiplugin.apifile.schema.json b/schemas/v2.2.0/crudapiplugin.apifile.schema.json index d5e8e676c..a2e001767 100644 --- a/schemas/v2.2.0/crudapiplugin.apifile.schema.json +++ b/schemas/v2.2.0/crudapiplugin.apifile.schema.json @@ -8,6 +8,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "baseUrl": { "type": "string", "description": "Base URL where Dev Proxy exposes the API. Dev Proxy prepends this base URL to the URLs defined in actions." @@ -80,12 +84,16 @@ }, "scopes": { "type": "array", - "items": { "type": "string" }, + "items": { + "type": "string" + }, "description": "Array of valid scopes. At least one must be present in the token." }, "roles": { "type": "array", - "items": { "type": "string" }, + "items": { + "type": "string" + }, "description": "Array of valid roles. At least one must be present in the token." }, "validateLifetime": { @@ -127,12 +135,16 @@ }, "scopes": { "type": "array", - "items": { "type": "string" }, + "items": { + "type": "string" + }, "description": "Array of valid scopes. At least one must be present in the token." }, "roles": { "type": "array", - "items": { "type": "string" }, + "items": { + "type": "string" + }, "description": "Array of valid roles. At least one must be present in the token." }, "validateLifetime": { diff --git a/schemas/v2.2.0/crudapiplugin.schema.json b/schemas/v2.2.0/crudapiplugin.schema.json index 8c6d499ca..5559fab53 100644 --- a/schemas/v2.2.0/crudapiplugin.schema.json +++ b/schemas/v2.2.0/crudapiplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "apiFile": { "type": "string", "description": "Path to the file that contains the definition of the CRUD API." diff --git a/schemas/v2.2.0/devtoolsplugin.schema.json b/schemas/v2.2.0/devtoolsplugin.schema.json index e451af1f3..f2c932fd5 100644 --- a/schemas/v2.2.0/devtoolsplugin.schema.json +++ b/schemas/v2.2.0/devtoolsplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "preferredBrowser": { "type": "string", "enum": [ diff --git a/schemas/v2.2.0/executionsummaryplugin.schema.json b/schemas/v2.2.0/executionsummaryplugin.schema.json index e370b0523..c6f71db1a 100644 --- a/schemas/v2.2.0/executionsummaryplugin.schema.json +++ b/schemas/v2.2.0/executionsummaryplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "groupBy": { "type": "string", "enum": [ diff --git a/schemas/v2.2.0/genericrandomerrorplugin.errorsfile.schema.json b/schemas/v2.2.0/genericrandomerrorplugin.errorsfile.schema.json index 79d124299..46fe6f7dc 100644 --- a/schemas/v2.2.0/genericrandomerrorplugin.errorsfile.schema.json +++ b/schemas/v2.2.0/genericrandomerrorplugin.errorsfile.schema.json @@ -8,6 +8,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "errors": { "type": "array", "description": "List of error response definitions to simulate. Each entry defines a request pattern and possible error responses.", diff --git a/schemas/v2.2.0/genericrandomerrorplugin.schema.json b/schemas/v2.2.0/genericrandomerrorplugin.schema.json index ec9facf0d..4a51724e9 100644 --- a/schemas/v2.2.0/genericrandomerrorplugin.schema.json +++ b/schemas/v2.2.0/genericrandomerrorplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "errorsFile": { "type": "string", "description": "Path to the file that contains error responses." diff --git a/schemas/v2.2.0/graphminimalpermissionsguidanceplugin.schema.json b/schemas/v2.2.0/graphminimalpermissionsguidanceplugin.schema.json index 721994513..e70921f85 100644 --- a/schemas/v2.2.0/graphminimalpermissionsguidanceplugin.schema.json +++ b/schemas/v2.2.0/graphminimalpermissionsguidanceplugin.schema.json @@ -7,13 +7,22 @@ "type": "string", "description": "Reference to the JSON schema definition." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "permissionsToExclude": { "type": "array", "items": { "type": "string" }, "description": "The scopes to ignore and not include in the report. Default: ['profile', 'openid', 'offline_access', 'email'].", - "default": ["profile", "openid", "offline_access", "email"] + "default": [ + "profile", + "openid", + "offline_access", + "email" + ] } }, "additionalProperties": false diff --git a/schemas/v2.2.0/graphminimalpermissionsplugin.schema.json b/schemas/v2.2.0/graphminimalpermissionsplugin.schema.json index d72dd68fa..b49546dad 100644 --- a/schemas/v2.2.0/graphminimalpermissionsplugin.schema.json +++ b/schemas/v2.2.0/graphminimalpermissionsplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "Reference to the JSON schema definition." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "type": { "type": "string", "enum": [ diff --git a/schemas/v2.2.0/graphrandomerrorplugin.schema.json b/schemas/v2.2.0/graphrandomerrorplugin.schema.json index e74fae9d0..1a6deead6 100644 --- a/schemas/v2.2.0/graphrandomerrorplugin.schema.json +++ b/schemas/v2.2.0/graphrandomerrorplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "Reference to the JSON schema definition." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "allowedErrors": { "type": "array", "description": "Array of HTTP status codes (integers between 400 and 599) that the plugin can use to simulate errors. For example, [429] to simulate throttling.", diff --git a/schemas/v2.2.0/hargeneratorplugin.schema.json b/schemas/v2.2.0/hargeneratorplugin.schema.json index a7aa5b5e9..cd9bc5498 100644 --- a/schemas/v2.2.0/hargeneratorplugin.schema.json +++ b/schemas/v2.2.0/hargeneratorplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "Reference to the JSON schema definition." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "includeSensitiveInformation": { "type": "boolean", "description": "Determines whether to include sensitive information (such as authentication headers, and cookies) in the generated HAR file. When set to false, sensitive information will be redacted. Default: false." @@ -17,4 +21,4 @@ } }, "additionalProperties": false -} +} \ No newline at end of file diff --git a/schemas/v2.2.0/httpfilegeneratorplugin.schema.json b/schemas/v2.2.0/httpfilegeneratorplugin.schema.json index f25784f1c..d86052184 100644 --- a/schemas/v2.2.0/httpfilegeneratorplugin.schema.json +++ b/schemas/v2.2.0/httpfilegeneratorplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "Reference to the JSON schema definition." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "includeOptionsRequests": { "type": "boolean", "description": "Determines whether to include OPTIONS requests in the generated HTTP file. Default: false." diff --git a/schemas/v2.2.0/languagemodelfailureplugin.schema.json b/schemas/v2.2.0/languagemodelfailureplugin.schema.json index db6dc115f..53b5aec6d 100644 --- a/schemas/v2.2.0/languagemodelfailureplugin.schema.json +++ b/schemas/v2.2.0/languagemodelfailureplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "failures": { "type": "array", "items": { diff --git a/schemas/v2.2.0/languagemodelratelimitingplugin.customresponsefile.schema.json b/schemas/v2.2.0/languagemodelratelimitingplugin.customresponsefile.schema.json index cbb6b903e..e52ac3ae7 100644 --- a/schemas/v2.2.0/languagemodelratelimitingplugin.customresponsefile.schema.json +++ b/schemas/v2.2.0/languagemodelratelimitingplugin.customresponsefile.schema.json @@ -8,6 +8,10 @@ "type": "string", "description": "The URL of the JSON schema used to validate this custom response file." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "body": { "type": [ "object", @@ -43,4 +47,4 @@ } }, "additionalProperties": false -} +} \ No newline at end of file diff --git a/schemas/v2.2.0/languagemodelratelimitingplugin.schema.json b/schemas/v2.2.0/languagemodelratelimitingplugin.schema.json index 1cc836bb4..a38ae015f 100644 --- a/schemas/v2.2.0/languagemodelratelimitingplugin.schema.json +++ b/schemas/v2.2.0/languagemodelratelimitingplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "The URL of the JSON schema used to validate this configuration file." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "headerRetryAfter": { "type": "string", "description": "Name of the response header that communicates the retry-after period (e.g., 'Retry-After')." @@ -40,4 +44,4 @@ } }, "additionalProperties": false -} +} \ No newline at end of file diff --git a/schemas/v2.2.0/latencyplugin.schema.json b/schemas/v2.2.0/latencyplugin.schema.json index 82fdd5c92..780a9f2af 100644 --- a/schemas/v2.2.0/latencyplugin.schema.json +++ b/schemas/v2.2.0/latencyplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "Reference to the JSON schema definition." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "minMs": { "type": "integer", "minimum": 0, diff --git a/schemas/v2.2.0/minimalcsompermissions.types.schema.json b/schemas/v2.2.0/minimalcsompermissions.types.schema.json index c212cdb5c..d94506729 100644 --- a/schemas/v2.2.0/minimalcsompermissions.types.schema.json +++ b/schemas/v2.2.0/minimalcsompermissions.types.schema.json @@ -3,12 +3,20 @@ "title": "SharePoint CSOM Types and Permissions Schema", "description": "Schema for defining SharePoint CSOM types, return types, and their required permissions", "type": "object", - "required": ["types", "returnTypes", "actions"], + "required": [ + "types", + "returnTypes", + "actions" + ], "properties": { "$schema": { "type": "string", "description": "Reference to the JSON schema definition." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "types": { "type": "object", "description": "Mapping of GUIDs to their corresponding SharePoint CSOM types. Used for readability and easier mapping.", @@ -55,4 +63,4 @@ } } } -} +} \ No newline at end of file diff --git a/schemas/v2.2.0/minimalcsompermissionsplugin.schema.json b/schemas/v2.2.0/minimalcsompermissionsplugin.schema.json index f4b3eba17..965389bce 100644 --- a/schemas/v2.2.0/minimalcsompermissionsplugin.schema.json +++ b/schemas/v2.2.0/minimalcsompermissionsplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "Reference to the JSON schema definition." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "typesFilePath": { "type": "string", "description": "Path to the file that lists permissions required to call SharePoint CSOM APIs. Default: ~appFolder/config/spo-csom-types.json." diff --git a/schemas/v2.2.0/minimalpermissionsguidanceplugin.schema.json b/schemas/v2.2.0/minimalpermissionsguidanceplugin.schema.json index 967657c77..b19d17b18 100644 --- a/schemas/v2.2.0/minimalpermissionsguidanceplugin.schema.json +++ b/schemas/v2.2.0/minimalpermissionsguidanceplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "apiSpecsFolderPath": { "type": "string", "description": "Relative or absolute path to the folder with API specs. Used to compare JWT token permissions against minimal required scopes." @@ -17,7 +21,12 @@ "type": "string" }, "description": "The scopes to ignore and not include in the report. Default: ['profile', 'openid', 'offline_access', 'email'].", - "default": ["profile", "openid", "offline_access", "email"] + "default": [ + "profile", + "openid", + "offline_access", + "email" + ] }, "schemeName": { "type": "string", diff --git a/schemas/v2.2.0/minimalpermissionsplugin.schema.json b/schemas/v2.2.0/minimalpermissionsplugin.schema.json index 84d1d24d1..bd2f3d740 100644 --- a/schemas/v2.2.0/minimalpermissionsplugin.schema.json +++ b/schemas/v2.2.0/minimalpermissionsplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "apiSpecsFolderPath": { "type": "string", "description": "Relative or absolute path to the folder with API specs. Used to determine minimal permissions required for API calls." diff --git a/schemas/v2.2.0/mockrequestplugin.mockfile.schema.json b/schemas/v2.2.0/mockrequestplugin.mockfile.schema.json index aa5b3ee40..52ff0092a 100644 --- a/schemas/v2.2.0/mockrequestplugin.mockfile.schema.json +++ b/schemas/v2.2.0/mockrequestplugin.mockfile.schema.json @@ -8,6 +8,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "request": { "type": "object", "description": "The request to issue.", diff --git a/schemas/v2.2.0/mockrequestplugin.schema.json b/schemas/v2.2.0/mockrequestplugin.schema.json index 08355e537..84b1640cc 100644 --- a/schemas/v2.2.0/mockrequestplugin.schema.json +++ b/schemas/v2.2.0/mockrequestplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "mockFile": { "type": "string", "description": "Path to the file containing the mock request." diff --git a/schemas/v2.2.0/mockresponseplugin.mocksfile.schema.json b/schemas/v2.2.0/mockresponseplugin.mocksfile.schema.json index 5f2478a38..1cb04db94 100644 --- a/schemas/v2.2.0/mockresponseplugin.mocksfile.schema.json +++ b/schemas/v2.2.0/mockresponseplugin.mocksfile.schema.json @@ -8,6 +8,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "mocks": { "type": "array", "description": "Array of mock definitions.", diff --git a/schemas/v2.2.0/mockresponseplugin.schema.json b/schemas/v2.2.0/mockresponseplugin.schema.json index 5343240c4..c41a54755 100644 --- a/schemas/v2.2.0/mockresponseplugin.schema.json +++ b/schemas/v2.2.0/mockresponseplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "mocksFile": { "type": "string", "description": "Path to the file containing the mock responses." diff --git a/schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json b/schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json index 235826447..ceded5c59 100644 --- a/schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json +++ b/schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json @@ -8,6 +8,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "mocks": { "type": "array", "description": "Array of stdio mock definitions.", @@ -58,4 +62,4 @@ "mocks" ], "additionalProperties": false -} +} \ No newline at end of file diff --git a/schemas/v2.2.0/mockstdioresponseplugin.schema.json b/schemas/v2.2.0/mockstdioresponseplugin.schema.json index 42e5ca0e7..bfdb002d3 100644 --- a/schemas/v2.2.0/mockstdioresponseplugin.schema.json +++ b/schemas/v2.2.0/mockstdioresponseplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "mocksFile": { "type": "string", "description": "Path to the file containing the stdio mock responses." @@ -20,4 +24,4 @@ "mocksFile" ], "additionalProperties": false -} +} \ No newline at end of file diff --git a/schemas/v2.2.0/openaitelemetryplugin.pricesfile.schema.json b/schemas/v2.2.0/openaitelemetryplugin.pricesfile.schema.json index c83a33626..4eba98e63 100644 --- a/schemas/v2.2.0/openaitelemetryplugin.pricesfile.schema.json +++ b/schemas/v2.2.0/openaitelemetryplugin.pricesfile.schema.json @@ -8,6 +8,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "prices": { "type": "object", "description": "Map of model names to their pricing information.", diff --git a/schemas/v2.2.0/openaitelemetryplugin.schema.json b/schemas/v2.2.0/openaitelemetryplugin.schema.json index e805c7cfc..93b133950 100644 --- a/schemas/v2.2.0/openaitelemetryplugin.schema.json +++ b/schemas/v2.2.0/openaitelemetryplugin.schema.json @@ -8,6 +8,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "application": { "type": "string", "description": "The name of the application using the OpenTelemetry plugin.", @@ -49,4 +53,4 @@ } }, "additionalProperties": false -} +} \ No newline at end of file diff --git a/schemas/v2.2.0/openapispecgeneratorplugin.schema.json b/schemas/v2.2.0/openapispecgeneratorplugin.schema.json index 53d5be29b..73e736c36 100644 --- a/schemas/v2.2.0/openapispecgeneratorplugin.schema.json +++ b/schemas/v2.2.0/openapispecgeneratorplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "The JSON schema reference for validation." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "includeOptionsRequests": { "type": "boolean", "description": "Determines whether to include OPTIONS requests in the generated OpenAPI spec. Default: false." diff --git a/schemas/v2.2.0/ratelimitingplugin.customresponsefile.schema.json b/schemas/v2.2.0/ratelimitingplugin.customresponsefile.schema.json index fa1b2b38c..dde1e1512 100644 --- a/schemas/v2.2.0/ratelimitingplugin.customresponsefile.schema.json +++ b/schemas/v2.2.0/ratelimitingplugin.customresponsefile.schema.json @@ -8,6 +8,10 @@ "type": "string", "description": "The URL of the JSON schema used to validate this custom response file." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "body": { "type": [ "object", diff --git a/schemas/v2.2.0/ratelimitingplugin.schema.json b/schemas/v2.2.0/ratelimitingplugin.schema.json index 62b1422ab..0f7f4ec39 100644 --- a/schemas/v2.2.0/ratelimitingplugin.schema.json +++ b/schemas/v2.2.0/ratelimitingplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "The URL of the JSON schema used to validate this configuration file." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "headerLimit": { "type": "string", "description": "Name of the response header that communicates the rate-limiting limit (e.g., 'RateLimit-Limit')." diff --git a/schemas/v2.2.0/rc.schema.json b/schemas/v2.2.0/rc.schema.json index daa86c54d..c1d6e5786 100644 --- a/schemas/v2.2.0/rc.schema.json +++ b/schemas/v2.2.0/rc.schema.json @@ -8,6 +8,10 @@ "type": "string", "description": "The URL of the JSON schema used to validate this configuration file. Should match the Dev Proxy version." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "apiPort": { "type": "number", "minimum": 0, diff --git a/schemas/v2.2.0/rewriteplugin.rewritesfile.schema.json b/schemas/v2.2.0/rewriteplugin.rewritesfile.schema.json index c4ef5a6dd..efe6384c1 100644 --- a/schemas/v2.2.0/rewriteplugin.rewritesfile.schema.json +++ b/schemas/v2.2.0/rewriteplugin.rewritesfile.schema.json @@ -8,6 +8,10 @@ "type": "string", "description": "The URL of the JSON schema used to validate this rewrite rules file." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "rewrites": { "type": "array", "description": "Array of rewrite rule objects that define the list of rewrite rules the RewritePlugin applies.", @@ -24,7 +28,9 @@ "description": "Regular expression to match the incoming request URL." } }, - "required": ["url"] + "required": [ + "url" + ] }, "out": { "type": "object", @@ -36,10 +42,15 @@ "description": "URL to rewrite the request to. Can use capture groups from the 'in' pattern." } }, - "required": ["url"] + "required": [ + "url" + ] } }, - "required": ["in", "out"] + "required": [ + "in", + "out" + ] } } }, diff --git a/schemas/v2.2.0/rewriteplugin.schema.json b/schemas/v2.2.0/rewriteplugin.schema.json index 6cf593e96..ed5242be5 100644 --- a/schemas/v2.2.0/rewriteplugin.schema.json +++ b/schemas/v2.2.0/rewriteplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "The URL of the JSON schema used to validate this configuration file." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "rewritesFile": { "type": "string", "description": "Path to the file containing rewrite definitions (e.g., 'rewrites.json')." diff --git a/schemas/v2.2.0/typespecgeneratorplugin.schema.json b/schemas/v2.2.0/typespecgeneratorplugin.schema.json index db770ca4f..54f0b41cf 100644 --- a/schemas/v2.2.0/typespecgeneratorplugin.schema.json +++ b/schemas/v2.2.0/typespecgeneratorplugin.schema.json @@ -7,6 +7,10 @@ "type": "string", "description": "The URL of the JSON schema used to validate this configuration file." }, + "definitions": { + "type": "object", + "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." + }, "ignoreResponseTypes": { "type": "boolean", "description": "Determines whether to generate types for API responses (false) or to set them to 'string' (true)." From 08ecbe7ab39f1ab6c458ef662370dd1a5c276185 Mon Sep 17 00:00:00 2001 From: Waldek Mastykarz Date: Wed, 25 Feb 2026 11:22:49 +0100 Subject: [PATCH 10/10] Revert definitions property, allow arbitrary properties on standalone schemas Remove the definitions property from all v2.2.0 schemas (it's an arbitrary name that shouldn't be in schemas). Instead, set additionalProperties: true on standalone file schemas (rc, errorsfile, mocksfile, mockfile, apifile, customresponsefile, rewritesfile, pricesfile, types) so that YAML files with any custom anchor properties pass schema validation. --- ...centerminimalpermissionsplugin.schema.json | 4 ---- .../apicenteronboardingplugin.schema.json | 4 ---- ...icenterproductionversionplugin.schema.json | 4 ---- schemas/v2.2.0/authplugin.schema.json | 4 ---- .../v2.2.0/cachingguidanceplugin.schema.json | 4 ---- .../v2.2.0/crudapiplugin.apifile.schema.json | 22 +++++-------------- schemas/v2.2.0/crudapiplugin.schema.json | 4 ---- schemas/v2.2.0/devtoolsplugin.schema.json | 4 ---- .../v2.2.0/executionsummaryplugin.schema.json | 4 ---- ...icrandomerrorplugin.errorsfile.schema.json | 6 +---- .../genericrandomerrorplugin.schema.json | 4 ---- ...nimalpermissionsguidanceplugin.schema.json | 11 +--------- .../graphminimalpermissionsplugin.schema.json | 4 ---- .../v2.2.0/graphrandomerrorplugin.schema.json | 4 ---- schemas/v2.2.0/hargeneratorplugin.schema.json | 6 +---- .../httpfilegeneratorplugin.schema.json | 4 ---- .../languagemodelfailureplugin.schema.json | 4 ---- ...itingplugin.customresponsefile.schema.json | 8 ++----- ...anguagemodelratelimitingplugin.schema.json | 6 +---- schemas/v2.2.0/latencyplugin.schema.json | 4 ---- .../minimalcsompermissions.types.schema.json | 12 ++-------- .../minimalcsompermissionsplugin.schema.json | 4 ---- ...nimalpermissionsguidanceplugin.schema.json | 11 +--------- .../minimalpermissionsplugin.schema.json | 4 ---- .../mockrequestplugin.mockfile.schema.json | 6 +---- schemas/v2.2.0/mockrequestplugin.schema.json | 4 ---- .../mockresponseplugin.mocksfile.schema.json | 6 +---- schemas/v2.2.0/mockresponseplugin.schema.json | 4 ---- ...kstdioresponseplugin.mocksfile.schema.json | 8 ++----- .../mockstdioresponseplugin.schema.json | 6 +---- ...enaitelemetryplugin.pricesfile.schema.json | 6 +---- .../v2.2.0/openaitelemetryplugin.schema.json | 6 +---- .../openapispecgeneratorplugin.schema.json | 4 ---- ...itingplugin.customresponsefile.schema.json | 6 +---- schemas/v2.2.0/ratelimitingplugin.schema.json | 4 ---- schemas/v2.2.0/rc.schema.json | 4 ---- .../rewriteplugin.rewritesfile.schema.json | 19 ++++------------ schemas/v2.2.0/rewriteplugin.schema.json | 4 ---- .../typespecgeneratorplugin.schema.json | 4 ---- 39 files changed, 26 insertions(+), 211 deletions(-) diff --git a/schemas/v2.2.0/apicenterminimalpermissionsplugin.schema.json b/schemas/v2.2.0/apicenterminimalpermissionsplugin.schema.json index 9c92d4aab..e0b473c35 100644 --- a/schemas/v2.2.0/apicenterminimalpermissionsplugin.schema.json +++ b/schemas/v2.2.0/apicenterminimalpermissionsplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "resourceGroupName": { "type": "string", "description": "Name of the resource group where the Azure API Center is located." diff --git a/schemas/v2.2.0/apicenteronboardingplugin.schema.json b/schemas/v2.2.0/apicenteronboardingplugin.schema.json index bae643ad2..ee3bde341 100644 --- a/schemas/v2.2.0/apicenteronboardingplugin.schema.json +++ b/schemas/v2.2.0/apicenteronboardingplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "createApicEntryForNewApis": { "type": "boolean", "description": "Set to true to have Dev Proxy create new API entries for APIs detected but not yet registered in API Center. When false, Dev Proxy only lists unregistered APIs. Default is true." diff --git a/schemas/v2.2.0/apicenterproductionversionplugin.schema.json b/schemas/v2.2.0/apicenterproductionversionplugin.schema.json index 1e9580881..ce726153a 100644 --- a/schemas/v2.2.0/apicenterproductionversionplugin.schema.json +++ b/schemas/v2.2.0/apicenterproductionversionplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "resourceGroupName": { "type": "string", "description": "Name of the resource group where the Azure API Center is located." diff --git a/schemas/v2.2.0/authplugin.schema.json b/schemas/v2.2.0/authplugin.schema.json index 476563a8f..900d07aeb 100644 --- a/schemas/v2.2.0/authplugin.schema.json +++ b/schemas/v2.2.0/authplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "apiKey": { "type": "object", "description": "Configuration for API key authentication and authorization.", diff --git a/schemas/v2.2.0/cachingguidanceplugin.schema.json b/schemas/v2.2.0/cachingguidanceplugin.schema.json index 6e6ff1674..18116180a 100644 --- a/schemas/v2.2.0/cachingguidanceplugin.schema.json +++ b/schemas/v2.2.0/cachingguidanceplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "cacheThresholdSeconds": { "type": "integer", "description": "The number of seconds between the same request that triggers the guidance warning. Default is 5." diff --git a/schemas/v2.2.0/crudapiplugin.apifile.schema.json b/schemas/v2.2.0/crudapiplugin.apifile.schema.json index a2e001767..279fdd760 100644 --- a/schemas/v2.2.0/crudapiplugin.apifile.schema.json +++ b/schemas/v2.2.0/crudapiplugin.apifile.schema.json @@ -8,10 +8,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "baseUrl": { "type": "string", "description": "Base URL where Dev Proxy exposes the API. Dev Proxy prepends this base URL to the URLs defined in actions." @@ -84,16 +80,12 @@ }, "scopes": { "type": "array", - "items": { - "type": "string" - }, + "items": { "type": "string" }, "description": "Array of valid scopes. At least one must be present in the token." }, "roles": { "type": "array", - "items": { - "type": "string" - }, + "items": { "type": "string" }, "description": "Array of valid roles. At least one must be present in the token." }, "validateLifetime": { @@ -135,16 +127,12 @@ }, "scopes": { "type": "array", - "items": { - "type": "string" - }, + "items": { "type": "string" }, "description": "Array of valid scopes. At least one must be present in the token." }, "roles": { "type": "array", - "items": { - "type": "string" - }, + "items": { "type": "string" }, "description": "Array of valid roles. At least one must be present in the token." }, "validateLifetime": { @@ -163,5 +151,5 @@ "dataFile", "actions" ], - "additionalProperties": false + "additionalProperties": true } \ No newline at end of file diff --git a/schemas/v2.2.0/crudapiplugin.schema.json b/schemas/v2.2.0/crudapiplugin.schema.json index 5559fab53..8c6d499ca 100644 --- a/schemas/v2.2.0/crudapiplugin.schema.json +++ b/schemas/v2.2.0/crudapiplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "apiFile": { "type": "string", "description": "Path to the file that contains the definition of the CRUD API." diff --git a/schemas/v2.2.0/devtoolsplugin.schema.json b/schemas/v2.2.0/devtoolsplugin.schema.json index f2c932fd5..e451af1f3 100644 --- a/schemas/v2.2.0/devtoolsplugin.schema.json +++ b/schemas/v2.2.0/devtoolsplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "preferredBrowser": { "type": "string", "enum": [ diff --git a/schemas/v2.2.0/executionsummaryplugin.schema.json b/schemas/v2.2.0/executionsummaryplugin.schema.json index c6f71db1a..e370b0523 100644 --- a/schemas/v2.2.0/executionsummaryplugin.schema.json +++ b/schemas/v2.2.0/executionsummaryplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "groupBy": { "type": "string", "enum": [ diff --git a/schemas/v2.2.0/genericrandomerrorplugin.errorsfile.schema.json b/schemas/v2.2.0/genericrandomerrorplugin.errorsfile.schema.json index 46fe6f7dc..0ff4d13e0 100644 --- a/schemas/v2.2.0/genericrandomerrorplugin.errorsfile.schema.json +++ b/schemas/v2.2.0/genericrandomerrorplugin.errorsfile.schema.json @@ -8,10 +8,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "errors": { "type": "array", "description": "List of error response definitions to simulate. Each entry defines a request pattern and possible error responses.", @@ -103,5 +99,5 @@ "required": [ "errors" ], - "additionalProperties": false + "additionalProperties": true } \ No newline at end of file diff --git a/schemas/v2.2.0/genericrandomerrorplugin.schema.json b/schemas/v2.2.0/genericrandomerrorplugin.schema.json index 4a51724e9..ec9facf0d 100644 --- a/schemas/v2.2.0/genericrandomerrorplugin.schema.json +++ b/schemas/v2.2.0/genericrandomerrorplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "errorsFile": { "type": "string", "description": "Path to the file that contains error responses." diff --git a/schemas/v2.2.0/graphminimalpermissionsguidanceplugin.schema.json b/schemas/v2.2.0/graphminimalpermissionsguidanceplugin.schema.json index e70921f85..721994513 100644 --- a/schemas/v2.2.0/graphminimalpermissionsguidanceplugin.schema.json +++ b/schemas/v2.2.0/graphminimalpermissionsguidanceplugin.schema.json @@ -7,22 +7,13 @@ "type": "string", "description": "Reference to the JSON schema definition." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "permissionsToExclude": { "type": "array", "items": { "type": "string" }, "description": "The scopes to ignore and not include in the report. Default: ['profile', 'openid', 'offline_access', 'email'].", - "default": [ - "profile", - "openid", - "offline_access", - "email" - ] + "default": ["profile", "openid", "offline_access", "email"] } }, "additionalProperties": false diff --git a/schemas/v2.2.0/graphminimalpermissionsplugin.schema.json b/schemas/v2.2.0/graphminimalpermissionsplugin.schema.json index b49546dad..d72dd68fa 100644 --- a/schemas/v2.2.0/graphminimalpermissionsplugin.schema.json +++ b/schemas/v2.2.0/graphminimalpermissionsplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "Reference to the JSON schema definition." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "type": { "type": "string", "enum": [ diff --git a/schemas/v2.2.0/graphrandomerrorplugin.schema.json b/schemas/v2.2.0/graphrandomerrorplugin.schema.json index 1a6deead6..e74fae9d0 100644 --- a/schemas/v2.2.0/graphrandomerrorplugin.schema.json +++ b/schemas/v2.2.0/graphrandomerrorplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "Reference to the JSON schema definition." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "allowedErrors": { "type": "array", "description": "Array of HTTP status codes (integers between 400 and 599) that the plugin can use to simulate errors. For example, [429] to simulate throttling.", diff --git a/schemas/v2.2.0/hargeneratorplugin.schema.json b/schemas/v2.2.0/hargeneratorplugin.schema.json index cd9bc5498..a7aa5b5e9 100644 --- a/schemas/v2.2.0/hargeneratorplugin.schema.json +++ b/schemas/v2.2.0/hargeneratorplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "Reference to the JSON schema definition." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "includeSensitiveInformation": { "type": "boolean", "description": "Determines whether to include sensitive information (such as authentication headers, and cookies) in the generated HAR file. When set to false, sensitive information will be redacted. Default: false." @@ -21,4 +17,4 @@ } }, "additionalProperties": false -} \ No newline at end of file +} diff --git a/schemas/v2.2.0/httpfilegeneratorplugin.schema.json b/schemas/v2.2.0/httpfilegeneratorplugin.schema.json index d86052184..f25784f1c 100644 --- a/schemas/v2.2.0/httpfilegeneratorplugin.schema.json +++ b/schemas/v2.2.0/httpfilegeneratorplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "Reference to the JSON schema definition." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "includeOptionsRequests": { "type": "boolean", "description": "Determines whether to include OPTIONS requests in the generated HTTP file. Default: false." diff --git a/schemas/v2.2.0/languagemodelfailureplugin.schema.json b/schemas/v2.2.0/languagemodelfailureplugin.schema.json index 53b5aec6d..db6dc115f 100644 --- a/schemas/v2.2.0/languagemodelfailureplugin.schema.json +++ b/schemas/v2.2.0/languagemodelfailureplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "failures": { "type": "array", "items": { diff --git a/schemas/v2.2.0/languagemodelratelimitingplugin.customresponsefile.schema.json b/schemas/v2.2.0/languagemodelratelimitingplugin.customresponsefile.schema.json index e52ac3ae7..b8e9121f5 100644 --- a/schemas/v2.2.0/languagemodelratelimitingplugin.customresponsefile.schema.json +++ b/schemas/v2.2.0/languagemodelratelimitingplugin.customresponsefile.schema.json @@ -8,10 +8,6 @@ "type": "string", "description": "The URL of the JSON schema used to validate this custom response file." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "body": { "type": [ "object", @@ -46,5 +42,5 @@ } } }, - "additionalProperties": false -} \ No newline at end of file + "additionalProperties": true +} diff --git a/schemas/v2.2.0/languagemodelratelimitingplugin.schema.json b/schemas/v2.2.0/languagemodelratelimitingplugin.schema.json index a38ae015f..1cc836bb4 100644 --- a/schemas/v2.2.0/languagemodelratelimitingplugin.schema.json +++ b/schemas/v2.2.0/languagemodelratelimitingplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "The URL of the JSON schema used to validate this configuration file." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "headerRetryAfter": { "type": "string", "description": "Name of the response header that communicates the retry-after period (e.g., 'Retry-After')." @@ -44,4 +40,4 @@ } }, "additionalProperties": false -} \ No newline at end of file +} diff --git a/schemas/v2.2.0/latencyplugin.schema.json b/schemas/v2.2.0/latencyplugin.schema.json index 780a9f2af..82fdd5c92 100644 --- a/schemas/v2.2.0/latencyplugin.schema.json +++ b/schemas/v2.2.0/latencyplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "Reference to the JSON schema definition." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "minMs": { "type": "integer", "minimum": 0, diff --git a/schemas/v2.2.0/minimalcsompermissions.types.schema.json b/schemas/v2.2.0/minimalcsompermissions.types.schema.json index d94506729..c212cdb5c 100644 --- a/schemas/v2.2.0/minimalcsompermissions.types.schema.json +++ b/schemas/v2.2.0/minimalcsompermissions.types.schema.json @@ -3,20 +3,12 @@ "title": "SharePoint CSOM Types and Permissions Schema", "description": "Schema for defining SharePoint CSOM types, return types, and their required permissions", "type": "object", - "required": [ - "types", - "returnTypes", - "actions" - ], + "required": ["types", "returnTypes", "actions"], "properties": { "$schema": { "type": "string", "description": "Reference to the JSON schema definition." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "types": { "type": "object", "description": "Mapping of GUIDs to their corresponding SharePoint CSOM types. Used for readability and easier mapping.", @@ -63,4 +55,4 @@ } } } -} \ No newline at end of file +} diff --git a/schemas/v2.2.0/minimalcsompermissionsplugin.schema.json b/schemas/v2.2.0/minimalcsompermissionsplugin.schema.json index 965389bce..f4b3eba17 100644 --- a/schemas/v2.2.0/minimalcsompermissionsplugin.schema.json +++ b/schemas/v2.2.0/minimalcsompermissionsplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "Reference to the JSON schema definition." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "typesFilePath": { "type": "string", "description": "Path to the file that lists permissions required to call SharePoint CSOM APIs. Default: ~appFolder/config/spo-csom-types.json." diff --git a/schemas/v2.2.0/minimalpermissionsguidanceplugin.schema.json b/schemas/v2.2.0/minimalpermissionsguidanceplugin.schema.json index b19d17b18..967657c77 100644 --- a/schemas/v2.2.0/minimalpermissionsguidanceplugin.schema.json +++ b/schemas/v2.2.0/minimalpermissionsguidanceplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "apiSpecsFolderPath": { "type": "string", "description": "Relative or absolute path to the folder with API specs. Used to compare JWT token permissions against minimal required scopes." @@ -21,12 +17,7 @@ "type": "string" }, "description": "The scopes to ignore and not include in the report. Default: ['profile', 'openid', 'offline_access', 'email'].", - "default": [ - "profile", - "openid", - "offline_access", - "email" - ] + "default": ["profile", "openid", "offline_access", "email"] }, "schemeName": { "type": "string", diff --git a/schemas/v2.2.0/minimalpermissionsplugin.schema.json b/schemas/v2.2.0/minimalpermissionsplugin.schema.json index bd2f3d740..84d1d24d1 100644 --- a/schemas/v2.2.0/minimalpermissionsplugin.schema.json +++ b/schemas/v2.2.0/minimalpermissionsplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "apiSpecsFolderPath": { "type": "string", "description": "Relative or absolute path to the folder with API specs. Used to determine minimal permissions required for API calls." diff --git a/schemas/v2.2.0/mockrequestplugin.mockfile.schema.json b/schemas/v2.2.0/mockrequestplugin.mockfile.schema.json index 52ff0092a..7a6c6d9db 100644 --- a/schemas/v2.2.0/mockrequestplugin.mockfile.schema.json +++ b/schemas/v2.2.0/mockrequestplugin.mockfile.schema.json @@ -8,10 +8,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "request": { "type": "object", "description": "The request to issue.", @@ -70,5 +66,5 @@ "required": [ "request" ], - "additionalProperties": false + "additionalProperties": true } \ No newline at end of file diff --git a/schemas/v2.2.0/mockrequestplugin.schema.json b/schemas/v2.2.0/mockrequestplugin.schema.json index 84b1640cc..08355e537 100644 --- a/schemas/v2.2.0/mockrequestplugin.schema.json +++ b/schemas/v2.2.0/mockrequestplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "mockFile": { "type": "string", "description": "Path to the file containing the mock request." diff --git a/schemas/v2.2.0/mockresponseplugin.mocksfile.schema.json b/schemas/v2.2.0/mockresponseplugin.mocksfile.schema.json index 1cb04db94..4b9488792 100644 --- a/schemas/v2.2.0/mockresponseplugin.mocksfile.schema.json +++ b/schemas/v2.2.0/mockresponseplugin.mocksfile.schema.json @@ -8,10 +8,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "mocks": { "type": "array", "description": "Array of mock definitions.", @@ -104,5 +100,5 @@ "required": [ "mocks" ], - "additionalProperties": false + "additionalProperties": true } \ No newline at end of file diff --git a/schemas/v2.2.0/mockresponseplugin.schema.json b/schemas/v2.2.0/mockresponseplugin.schema.json index c41a54755..5343240c4 100644 --- a/schemas/v2.2.0/mockresponseplugin.schema.json +++ b/schemas/v2.2.0/mockresponseplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "mocksFile": { "type": "string", "description": "Path to the file containing the mock responses." diff --git a/schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json b/schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json index b787b47a9..958cd9099 100644 --- a/schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json +++ b/schemas/v2.2.0/mockstdioresponseplugin.mocksfile.schema.json @@ -8,10 +8,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "mocks": { "type": "array", "description": "Array of stdio mock definitions.", @@ -65,5 +61,5 @@ "required": [ "mocks" ], - "additionalProperties": false -} \ No newline at end of file + "additionalProperties": true +} diff --git a/schemas/v2.2.0/mockstdioresponseplugin.schema.json b/schemas/v2.2.0/mockstdioresponseplugin.schema.json index bfdb002d3..42e5ca0e7 100644 --- a/schemas/v2.2.0/mockstdioresponseplugin.schema.json +++ b/schemas/v2.2.0/mockstdioresponseplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "mocksFile": { "type": "string", "description": "Path to the file containing the stdio mock responses." @@ -24,4 +20,4 @@ "mocksFile" ], "additionalProperties": false -} \ No newline at end of file +} diff --git a/schemas/v2.2.0/openaitelemetryplugin.pricesfile.schema.json b/schemas/v2.2.0/openaitelemetryplugin.pricesfile.schema.json index 4eba98e63..c03e0c1ba 100644 --- a/schemas/v2.2.0/openaitelemetryplugin.pricesfile.schema.json +++ b/schemas/v2.2.0/openaitelemetryplugin.pricesfile.schema.json @@ -8,10 +8,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "prices": { "type": "object", "description": "Map of model names to their pricing information.", @@ -37,5 +33,5 @@ "required": [ "prices" ], - "additionalProperties": false + "additionalProperties": true } \ No newline at end of file diff --git a/schemas/v2.2.0/openaitelemetryplugin.schema.json b/schemas/v2.2.0/openaitelemetryplugin.schema.json index 93b133950..e805c7cfc 100644 --- a/schemas/v2.2.0/openaitelemetryplugin.schema.json +++ b/schemas/v2.2.0/openaitelemetryplugin.schema.json @@ -8,10 +8,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "application": { "type": "string", "description": "The name of the application using the OpenTelemetry plugin.", @@ -53,4 +49,4 @@ } }, "additionalProperties": false -} \ No newline at end of file +} diff --git a/schemas/v2.2.0/openapispecgeneratorplugin.schema.json b/schemas/v2.2.0/openapispecgeneratorplugin.schema.json index 73e736c36..53d5be29b 100644 --- a/schemas/v2.2.0/openapispecgeneratorplugin.schema.json +++ b/schemas/v2.2.0/openapispecgeneratorplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "The JSON schema reference for validation." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "includeOptionsRequests": { "type": "boolean", "description": "Determines whether to include OPTIONS requests in the generated OpenAPI spec. Default: false." diff --git a/schemas/v2.2.0/ratelimitingplugin.customresponsefile.schema.json b/schemas/v2.2.0/ratelimitingplugin.customresponsefile.schema.json index dde1e1512..435ca265b 100644 --- a/schemas/v2.2.0/ratelimitingplugin.customresponsefile.schema.json +++ b/schemas/v2.2.0/ratelimitingplugin.customresponsefile.schema.json @@ -8,10 +8,6 @@ "type": "string", "description": "The URL of the JSON schema used to validate this custom response file." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "body": { "type": [ "object", @@ -46,5 +42,5 @@ } } }, - "additionalProperties": false + "additionalProperties": true } \ No newline at end of file diff --git a/schemas/v2.2.0/ratelimitingplugin.schema.json b/schemas/v2.2.0/ratelimitingplugin.schema.json index 0f7f4ec39..62b1422ab 100644 --- a/schemas/v2.2.0/ratelimitingplugin.schema.json +++ b/schemas/v2.2.0/ratelimitingplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "The URL of the JSON schema used to validate this configuration file." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "headerLimit": { "type": "string", "description": "Name of the response header that communicates the rate-limiting limit (e.g., 'RateLimit-Limit')." diff --git a/schemas/v2.2.0/rc.schema.json b/schemas/v2.2.0/rc.schema.json index c1d6e5786..daa86c54d 100644 --- a/schemas/v2.2.0/rc.schema.json +++ b/schemas/v2.2.0/rc.schema.json @@ -8,10 +8,6 @@ "type": "string", "description": "The URL of the JSON schema used to validate this configuration file. Should match the Dev Proxy version." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "apiPort": { "type": "number", "minimum": 0, diff --git a/schemas/v2.2.0/rewriteplugin.rewritesfile.schema.json b/schemas/v2.2.0/rewriteplugin.rewritesfile.schema.json index efe6384c1..b2cbcdd1f 100644 --- a/schemas/v2.2.0/rewriteplugin.rewritesfile.schema.json +++ b/schemas/v2.2.0/rewriteplugin.rewritesfile.schema.json @@ -8,10 +8,6 @@ "type": "string", "description": "The URL of the JSON schema used to validate this rewrite rules file." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "rewrites": { "type": "array", "description": "Array of rewrite rule objects that define the list of rewrite rules the RewritePlugin applies.", @@ -28,9 +24,7 @@ "description": "Regular expression to match the incoming request URL." } }, - "required": [ - "url" - ] + "required": ["url"] }, "out": { "type": "object", @@ -42,20 +36,15 @@ "description": "URL to rewrite the request to. Can use capture groups from the 'in' pattern." } }, - "required": [ - "url" - ] + "required": ["url"] } }, - "required": [ - "in", - "out" - ] + "required": ["in", "out"] } } }, "required": [ "rewrites" ], - "additionalProperties": false + "additionalProperties": true } \ No newline at end of file diff --git a/schemas/v2.2.0/rewriteplugin.schema.json b/schemas/v2.2.0/rewriteplugin.schema.json index ed5242be5..6cf593e96 100644 --- a/schemas/v2.2.0/rewriteplugin.schema.json +++ b/schemas/v2.2.0/rewriteplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "The URL of the JSON schema used to validate this configuration file." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "rewritesFile": { "type": "string", "description": "Path to the file containing rewrite definitions (e.g., 'rewrites.json')." diff --git a/schemas/v2.2.0/typespecgeneratorplugin.schema.json b/schemas/v2.2.0/typespecgeneratorplugin.schema.json index 54f0b41cf..db770ca4f 100644 --- a/schemas/v2.2.0/typespecgeneratorplugin.schema.json +++ b/schemas/v2.2.0/typespecgeneratorplugin.schema.json @@ -7,10 +7,6 @@ "type": "string", "description": "The URL of the JSON schema used to validate this configuration file." }, - "definitions": { - "type": "object", - "description": "Reusable definitions for YAML anchors. This property has no effect in JSON configs." - }, "ignoreResponseTypes": { "type": "boolean", "description": "Determines whether to generate types for API responses (false) or to set them to 'string' (true)."