From 6115e5fbfe1886e3b072a1a66cd69568f1d57314 Mon Sep 17 00:00:00 2001 From: "release-please-token-provider[bot]" <225477224+release-please-token-provider[bot]@users.noreply.github.com> Date: Mon, 8 Dec 2025 18:16:25 +0000 Subject: [PATCH 001/388] chore(support/v2): release 2.3.11 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ Directory.Build.props | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 380448567..bf97149fe 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.3.10" + ".": "2.3.11" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c809876c..e74aada15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [2.3.11](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.10...v2.3.11) (2025-12-08) + + +### Bug Fixes + +* additional properties serialization should not emit a schema in v2 ([946cba9](https://github.com/microsoft/OpenAPI.NET/commit/946cba992a2733a60182453e38722b4ed789b729)) +* additional properties serialization should not emit a schema in v2 fix: additional properties serialization should not emit booleans in v3.1+ ([275dd9d](https://github.com/microsoft/OpenAPI.NET/commit/275dd9d7525b1f490eccaf1e6e60829ae51bdf5d)) +* additional properties serialization should not emit booleans in v3.1+ ([946cba9](https://github.com/microsoft/OpenAPI.NET/commit/946cba992a2733a60182453e38722b4ed789b729)) + ## [2.3.10](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.9...v2.3.10) (2025-11-17) diff --git a/Directory.Build.props b/Directory.Build.props index 3f2536c56..77209392f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ https://github.com/Microsoft/OpenAPI.NET © Microsoft Corporation. All rights reserved. OpenAPI .NET - 2.3.10 + 2.3.11 From 2436d7382bfbf8b9ba501d88f682e952bdf27146 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 11 Dec 2025 12:51:07 -0500 Subject: [PATCH 002/388] fix: non-seekable json streams would fail to load as a document --- .../Reader/OpenApiModelFactory.cs | 20 +-- .../Reader/OpenApiModelFactoryTests.cs | 166 ++++++++++++++++++ 2 files changed, 172 insertions(+), 14 deletions(-) diff --git a/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs b/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs index 6f02d9426..9903f7329 100644 --- a/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs +++ b/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs @@ -403,20 +403,12 @@ private static string InspectStreamFormat(Stream stream) // Inspect the format from the buffered portion format ??= InspectStreamFormat(bufferStream); - // If format is JSON, no need to buffer further — use the original stream. - if (format.Equals(OpenApiConstants.Json, StringComparison.OrdinalIgnoreCase)) - { - preparedStream = input; - } - else - { - // YAML or other non-JSON format; copy remaining input to a new stream. - preparedStream = new MemoryStream(); - bufferStream.Position = 0; - await bufferStream.CopyToAsync(preparedStream, 81920, token).ConfigureAwait(false); // Copy buffered portion - await input.CopyToAsync(preparedStream, 81920, token).ConfigureAwait(false); // Copy remaining data - preparedStream.Position = 0; - } + // we need to copy the stream to memory string we've already started reading it and can't reposition it + preparedStream = new MemoryStream(); + bufferStream.Position = 0; + await bufferStream.CopyToAsync(preparedStream, 81920, token).ConfigureAwait(false); // Copy buffered portion + await input.CopyToAsync(preparedStream, 81920, token).ConfigureAwait(false); // Copy remaining data + preparedStream.Position = 0; } else { diff --git a/test/Microsoft.OpenApi.Tests/Reader/OpenApiModelFactoryTests.cs b/test/Microsoft.OpenApi.Tests/Reader/OpenApiModelFactoryTests.cs index 26bd6d472..bc7571b4e 100644 --- a/test/Microsoft.OpenApi.Tests/Reader/OpenApiModelFactoryTests.cs +++ b/test/Microsoft.OpenApi.Tests/Reader/OpenApiModelFactoryTests.cs @@ -3,6 +3,7 @@ using System.Threading.Tasks; using System.IO; using System; +using System.Threading; namespace Microsoft.OpenApi.Tests.Reader; @@ -119,4 +120,169 @@ await File.WriteAllTextAsync(tempFilePathReferrer, Assert.NotNull(readResult.Document.Components); Assert.Equal(baseUri, readResult.Document.BaseUri); } + [Fact] + public async Task CanLoadANonSeekableStream() + { + // Given + var documentJson = +""" +{ + "openapi": "3.1.0", + "info": { + "title": "Sample API", + "version": "1.0.0" + }, + "paths": {} +} +"""; + using var memoryStream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(documentJson)); + using var nonSeekableStream = new NonSeekableStream(memoryStream); + + // When + var (document, _) = await OpenApiDocument.LoadAsync(nonSeekableStream); + + // Then + Assert.NotNull(document); + Assert.Equal("Sample API", document.Info.Title); + } + + public sealed class NonSeekableStream : Stream + { + private readonly Stream _innerStream; + public NonSeekableStream(Stream stream) : base() + { + _innerStream = stream; + } + public override bool CanSeek => false; + + public override long Position { get => _innerStream.Position; set => throw new InvalidOperationException("Seeking is not supported."); } + + public override bool CanRead => _innerStream.CanRead; + + public override bool CanWrite => _innerStream.CanWrite; + + public override long Length => _innerStream.Length; + public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state) + { + return _innerStream.BeginRead(buffer, offset, count, callback, state); + } + + public override void Flush() + { + _innerStream.Flush(); + } + + public override int Read(byte[] buffer, int offset, int count) + { + return _innerStream.Read(buffer, offset, count); + } + + public override long Seek(long offset, SeekOrigin origin) + { + throw new NotSupportedException("Seeking is not supported."); + } + + public override void SetLength(long value) + { + _innerStream.SetLength(value); + } + + public override void Write(byte[] buffer, int offset, int count) + { + _innerStream.Write(buffer, offset, count); + } + protected override void Dispose(bool disposing) + { + _innerStream.Dispose(); + base.Dispose(disposing); + } + + public override async ValueTask DisposeAsync() + { + await _innerStream.DisposeAsync(); + await base.DisposeAsync(); + } + + public override Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken) + { + return _innerStream.CopyToAsync(destination, bufferSize, cancellationToken); + } + + public override bool CanTimeout => _innerStream.CanTimeout; + + public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state) + { + return _innerStream.BeginWrite(buffer, offset, count, callback, state); + } + + public override void CopyTo(Stream destination, int bufferSize) + { + _innerStream.CopyTo(destination, bufferSize); + } + + public override void Close() + { + _innerStream.Close(); + } + + public override int EndRead(IAsyncResult asyncResult) + { + return _innerStream.EndRead(asyncResult); + } + + public override void EndWrite(IAsyncResult asyncResult) + { + _innerStream.EndWrite(asyncResult); + } + + public override int ReadByte() + { + return _innerStream.ReadByte(); + } + + public override void WriteByte(byte value) + { + _innerStream.WriteByte(value); + } + + public override Task FlushAsync(CancellationToken cancellationToken) + { + return _innerStream.FlushAsync(cancellationToken); + } + + public override int Read(Span buffer) + { + return _innerStream.Read(buffer); + } + + public override Task ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) + { + return _innerStream.ReadAsync(buffer, offset, count, cancellationToken); + } + + public override ValueTask ReadAsync(Memory buffer, CancellationToken cancellationToken = default) + { + return _innerStream.ReadAsync(buffer, cancellationToken); + } + + public override int ReadTimeout { get => _innerStream.ReadTimeout; set => _innerStream.ReadTimeout = value; } + + public override void Write(ReadOnlySpan buffer) + { + _innerStream.Write(buffer); + } + + public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) + { + return _innerStream.WriteAsync(buffer, offset, count, cancellationToken); + } + + public override ValueTask WriteAsync(ReadOnlyMemory buffer, CancellationToken cancellationToken = default) + { + return _innerStream.WriteAsync(buffer, cancellationToken); + } + + public override int WriteTimeout { get => _innerStream.WriteTimeout; set => _innerStream.WriteTimeout = value; } + + } } From f9e524859722476b3111cb6006f77208c2d1f526 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 11 Dec 2025 14:34:46 -0500 Subject: [PATCH 003/388] fix: reading streams in an asp.net context would cause async exceptions --- .../Reader/OpenApiModelFactory.cs | 112 ++++++---- .../Reader/OpenApiModelFactoryTests.cs | 208 +++++++++++++++++- 2 files changed, 275 insertions(+), 45 deletions(-) diff --git a/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs b/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs index 9903f7329..06c60889d 100644 --- a/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs +++ b/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. using System; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using System.Security; @@ -362,7 +363,23 @@ private static string InspectInputFormat(string input) return input.StartsWith("{", StringComparison.OrdinalIgnoreCase) || input.StartsWith("[", StringComparison.OrdinalIgnoreCase) ? OpenApiConstants.Json : OpenApiConstants.Yaml; } - private static string InspectStreamFormat(Stream stream) + /// + /// Reads the initial bytes of the stream to determine if it is JSON or YAML. + /// + /// + /// It is important NOT TO change the stream type from MemoryStream. + /// In Asp.Net core 3.0+ we could get passed a stream from a request or response body. + /// In such case, we CAN'T use the ReadByte method as it throws NotSupportedException. + /// Therefore, we need to ensure that the stream is a MemoryStream before calling this method. + /// Maintaining this type ensures there won't be any unforeseen wrong usage of the method. + /// + /// The stream to inspect + /// The format of the stream. + private static string InspectStreamFormat(MemoryStream stream) + { + return TryInspectStreamFormat(stream, out var format) ? format! : throw new InvalidOperationException("Could not determine the format of the stream."); + } + private static bool TryInspectStreamFormat(Stream stream, out string? format) { #if NET6_0_OR_GREATER ArgumentNullException.ThrowIfNull(stream); @@ -370,57 +387,74 @@ private static string InspectStreamFormat(Stream stream) if (stream is null) throw new ArgumentNullException(nameof(stream)); #endif - long initialPosition = stream.Position; - int firstByte = stream.ReadByte(); - - // Skip whitespace if present and read the next non-whitespace byte - if (char.IsWhiteSpace((char)firstByte)) + try { - firstByte = stream.ReadByte(); - } + var initialPosition = stream.Position; + var firstByte = (char)stream.ReadByte(); + + // Skip whitespace if present and read the next non-whitespace byte + if (char.IsWhiteSpace(firstByte)) + { + firstByte = (char)stream.ReadByte(); + } - stream.Position = initialPosition; // Reset the stream position to the beginning + stream.Position = initialPosition; // Reset the stream position to the beginning - char firstChar = (char)firstByte; - return firstChar switch + format = firstByte switch + { + '{' or '[' => OpenApiConstants.Json, // If the first character is '{' or '[', assume JSON + _ => OpenApiConstants.Yaml // Otherwise assume YAML + }; + return true; + } + catch (NotSupportedException) + { + // https://github.com/dotnet/aspnetcore/blob/c9d0750396e1d319301255ba61842721ab72ab10/src/Servers/Kestrel/Core/src/Internal/Http/HttpResponseStream.cs#L40 + } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP || NET5_0_OR_GREATER + catch (InvalidOperationException ex) when (ex.Message.Contains("AllowSynchronousIO", StringComparison.Ordinal)) +#else + catch (InvalidOperationException ex) when (ex.Message.Contains("AllowSynchronousIO")) +#endif { - '{' or '[' => OpenApiConstants.Json, // If the first character is '{' or '[', assume JSON - _ => OpenApiConstants.Yaml // Otherwise assume YAML - }; + // https://github.com/dotnet/aspnetcore/blob/c9d0750396e1d319301255ba61842721ab72ab10/src/Servers/HttpSys/src/RequestProcessing/RequestStream.cs#L100-L108 + // https://github.com/dotnet/aspnetcore/blob/c9d0750396e1d319301255ba61842721ab72ab10/src/Servers/IIS/IIS/src/Core/HttpRequestStream.cs#L24-L30 + // https://github.com/dotnet/aspnetcore/blob/c9d0750396e1d319301255ba61842721ab72ab10/src/Servers/Kestrel/Core/src/Internal/Http/HttpRequestStream.cs#L54-L60 + } + format = null; + return false; } + private static async Task CopyToMemoryStreamAsync(Stream input, CancellationToken token) + { + var bufferStream = new MemoryStream(); +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP || NET5_0_OR_GREATER + await input.CopyToAsync(bufferStream, token).ConfigureAwait(false); +#else + await input.CopyToAsync(bufferStream, 81920, token).ConfigureAwait(false); +#endif + bufferStream.Position = 0; + return bufferStream; + } + private static async Task<(Stream, string)> PrepareStreamForReadingAsync(Stream input, string? format, CancellationToken token = default) { Stream preparedStream = input; - if (!input.CanSeek) + if (input is MemoryStream ms) { - // Use a temporary buffer to read a small portion for format detection - using var bufferStream = new MemoryStream(); - await input.CopyToAsync(bufferStream, 1024, token).ConfigureAwait(false); - bufferStream.Position = 0; - - // Inspect the format from the buffered portion - format ??= InspectStreamFormat(bufferStream); - - // we need to copy the stream to memory string we've already started reading it and can't reposition it - preparedStream = new MemoryStream(); - bufferStream.Position = 0; - await bufferStream.CopyToAsync(preparedStream, 81920, token).ConfigureAwait(false); // Copy buffered portion - await input.CopyToAsync(preparedStream, 81920, token).ConfigureAwait(false); // Copy remaining data - preparedStream.Position = 0; + format ??= InspectStreamFormat(ms); } - else + else if (!input.CanSeek) { - format ??= InspectStreamFormat(input); - - if (!format.Equals(OpenApiConstants.Json, StringComparison.OrdinalIgnoreCase)) - { - // Buffer stream for non-JSON formats (e.g., YAML) since they require synchronous reading - preparedStream = new MemoryStream(); - await input.CopyToAsync(preparedStream, 81920, token).ConfigureAwait(false); - preparedStream.Position = 0; - } + // Copy to a MemoryStream to enable seeking and perform format inspection + var bufferStream = await CopyToMemoryStreamAsync(input, token).ConfigureAwait(false); + return await PrepareStreamForReadingAsync(bufferStream, format, token).ConfigureAwait(false); + } + else if (!TryInspectStreamFormat(input, out format!)) + { + var bufferStream = await CopyToMemoryStreamAsync(input, token).ConfigureAwait(false); + return await PrepareStreamForReadingAsync(bufferStream, format, token).ConfigureAwait(false); } return (preparedStream, format); diff --git a/test/Microsoft.OpenApi.Tests/Reader/OpenApiModelFactoryTests.cs b/test/Microsoft.OpenApi.Tests/Reader/OpenApiModelFactoryTests.cs index bc7571b4e..464e8fdf3 100644 --- a/test/Microsoft.OpenApi.Tests/Reader/OpenApiModelFactoryTests.cs +++ b/test/Microsoft.OpenApi.Tests/Reader/OpenApiModelFactoryTests.cs @@ -120,11 +120,7 @@ await File.WriteAllTextAsync(tempFilePathReferrer, Assert.NotNull(readResult.Document.Components); Assert.Equal(baseUri, readResult.Document.BaseUri); } - [Fact] - public async Task CanLoadANonSeekableStream() - { - // Given - var documentJson = + private readonly string documentJson = """ { "openapi": "3.1.0", @@ -135,6 +131,18 @@ public async Task CanLoadANonSeekableStream() "paths": {} } """; + private readonly string documentYaml = +""" +openapi: 3.1.0 +info: + title: Sample API + version: 1.0.0 +paths: {} +"""; + [Fact] + public async Task CanLoadANonSeekableStreamInJsonAndDetectFormat() + { + // Given using var memoryStream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(documentJson)); using var nonSeekableStream = new NonSeekableStream(memoryStream); @@ -146,6 +154,194 @@ public async Task CanLoadANonSeekableStream() Assert.Equal("Sample API", document.Info.Title); } + [Fact] + public async Task CanLoadANonSeekableStreamInYamlAndDetectFormat() + { + // Given + using var memoryStream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(documentYaml)); + using var nonSeekableStream = new NonSeekableStream(memoryStream); + var settings = new OpenApiReaderSettings(); + settings.AddYamlReader(); + + // When + var (document, _) = await OpenApiDocument.LoadAsync(nonSeekableStream, settings: settings); + + // Then + Assert.NotNull(document); + Assert.Equal("Sample API", document.Info.Title); + } + + [Fact] + public async Task CanLoadAnAsyncOnlyStreamInJsonAndDetectFormat() + { + // Given + await using var memoryStream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(documentJson)); + await using var nonSeekableStream = new AsyncOnlyStream(memoryStream); + + // When + var (document, _) = await OpenApiDocument.LoadAsync(nonSeekableStream); + + // Then + Assert.NotNull(document); + Assert.Equal("Sample API", document.Info.Title); + } + + [Fact] + public async Task CanLoadAnAsyncOnlyStreamInYamlAndDetectFormat() + { + // Given + await using var memoryStream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(documentYaml)); + await using var nonSeekableStream = new AsyncOnlyStream(memoryStream); + var settings = new OpenApiReaderSettings(); + settings.AddYamlReader(); + + // When + var (document, _) = await OpenApiDocument.LoadAsync(nonSeekableStream, settings: settings); + + // Then + Assert.NotNull(document); + Assert.Equal("Sample API", document.Info.Title); + } + + public sealed class AsyncOnlyStream : Stream + { + private readonly Stream _innerStream; + public AsyncOnlyStream(Stream stream) : base() + { + _innerStream = stream; + } + public override bool CanSeek => _innerStream.CanSeek; + + public override long Position { get => _innerStream.Position; set => throw new NotSupportedException("Blocking operations are not supported"); } + + public override bool CanRead => _innerStream.CanRead; + + public override bool CanWrite => _innerStream.CanWrite; + + public override long Length => _innerStream.Length; + public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state) + { + return _innerStream.BeginRead(buffer, offset, count, callback, state); + } + + public override void Flush() + { + throw new NotSupportedException("Blocking operations are not supported."); + } + + public override int Read(byte[] buffer, int offset, int count) + { + throw new NotSupportedException("Blocking operations are not supported."); + } + + public override long Seek(long offset, SeekOrigin origin) + { + throw new NotSupportedException("Blocking operations are not supported."); + } + + public override void SetLength(long value) + { + _innerStream.SetLength(value); + } + + public override void Write(byte[] buffer, int offset, int count) + { + throw new NotSupportedException("Blocking operations are not supported."); + } + protected override void Dispose(bool disposing) + { + throw new NotSupportedException("Blocking operations are not supported."); + } + + public override async ValueTask DisposeAsync() + { + await _innerStream.DisposeAsync(); + await base.DisposeAsync(); + } + + public override Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken) + { + return _innerStream.CopyToAsync(destination, bufferSize, cancellationToken); + } + + public override bool CanTimeout => _innerStream.CanTimeout; + + public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state) + { + return _innerStream.BeginWrite(buffer, offset, count, callback, state); + } + + public override void CopyTo(Stream destination, int bufferSize) + { + throw new NotSupportedException("Blocking operations are not supported."); + } + + public override void Close() + { + _innerStream.Close(); + } + + public override int EndRead(IAsyncResult asyncResult) + { + return _innerStream.EndRead(asyncResult); + } + + public override void EndWrite(IAsyncResult asyncResult) + { + _innerStream.EndWrite(asyncResult); + } + + public override int ReadByte() + { + throw new NotSupportedException("Blocking operations are not supported."); + } + + public override void WriteByte(byte value) + { + throw new NotSupportedException("Blocking operations are not supported."); + } + + public override Task FlushAsync(CancellationToken cancellationToken) + { + return _innerStream.FlushAsync(cancellationToken); + } + + public override int Read(Span buffer) + { + throw new NotSupportedException("Blocking operations are not supported."); + } + + public override Task ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) + { + return _innerStream.ReadAsync(buffer, offset, count, cancellationToken); + } + + public override ValueTask ReadAsync(Memory buffer, CancellationToken cancellationToken = default) + { + return _innerStream.ReadAsync(buffer, cancellationToken); + } + + public override int ReadTimeout { get => _innerStream.ReadTimeout; set => _innerStream.ReadTimeout = value; } + + public override void Write(ReadOnlySpan buffer) + { + throw new NotSupportedException("Blocking operations are not supported."); + } + + public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) + { + return _innerStream.WriteAsync(buffer, offset, count, cancellationToken); + } + + public override ValueTask WriteAsync(ReadOnlyMemory buffer, CancellationToken cancellationToken = default) + { + return _innerStream.WriteAsync(buffer, cancellationToken); + } + + public override int WriteTimeout { get => _innerStream.WriteTimeout; set => _innerStream.WriteTimeout = value; } + + } + public sealed class NonSeekableStream : Stream { private readonly Stream _innerStream; @@ -155,7 +351,7 @@ public NonSeekableStream(Stream stream) : base() } public override bool CanSeek => false; - public override long Position { get => _innerStream.Position; set => throw new InvalidOperationException("Seeking is not supported."); } + public override long Position { get => _innerStream.Position; set => throw new NotSupportedException("Seeking is not supported."); } public override bool CanRead => _innerStream.CanRead; From fff87597988af9368c70fcd56fe8f613919f3b8b Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 11 Dec 2025 14:56:48 -0500 Subject: [PATCH 004/388] chore: linting --- src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs b/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs index 06c60889d..d6b57fbbb 100644 --- a/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs +++ b/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs @@ -445,17 +445,12 @@ private static async Task CopyToMemoryStreamAsync(Stream input, Ca { format ??= InspectStreamFormat(ms); } - else if (!input.CanSeek) + else if (!input.CanSeek || !TryInspectStreamFormat(input, out format!)) { // Copy to a MemoryStream to enable seeking and perform format inspection var bufferStream = await CopyToMemoryStreamAsync(input, token).ConfigureAwait(false); return await PrepareStreamForReadingAsync(bufferStream, format, token).ConfigureAwait(false); } - else if (!TryInspectStreamFormat(input, out format!)) - { - var bufferStream = await CopyToMemoryStreamAsync(input, token).ConfigureAwait(false); - return await PrepareStreamForReadingAsync(bufferStream, format, token).ConfigureAwait(false); - } return (preparedStream, format); } From 6461bac01c4176424210e9ac249698f665a514a6 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 12 Dec 2025 09:06:30 -0500 Subject: [PATCH 005/388] fix: load JSON documents that are preceded by multiple whitespace Signed-off-by: Vincent Biret --- .../Reader/OpenApiModelFactory.cs | 6 +++-- .../Reader/OpenApiModelFactoryTests.cs | 26 +++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs b/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs index d6b57fbbb..2abd04873 100644 --- a/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs +++ b/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs @@ -360,7 +360,9 @@ SecurityException or private static string InspectInputFormat(string input) { - return input.StartsWith("{", StringComparison.OrdinalIgnoreCase) || input.StartsWith("[", StringComparison.OrdinalIgnoreCase) ? OpenApiConstants.Json : OpenApiConstants.Yaml; + var trimmedInput = input.TrimStart(); + return trimmedInput.StartsWith("{", StringComparison.OrdinalIgnoreCase) || trimmedInput.StartsWith("[", StringComparison.OrdinalIgnoreCase) ? + OpenApiConstants.Json : OpenApiConstants.Yaml; } /// @@ -393,7 +395,7 @@ private static bool TryInspectStreamFormat(Stream stream, out string? format) var firstByte = (char)stream.ReadByte(); // Skip whitespace if present and read the next non-whitespace byte - if (char.IsWhiteSpace(firstByte)) + while (char.IsWhiteSpace(firstByte)) { firstByte = (char)stream.ReadByte(); } diff --git a/test/Microsoft.OpenApi.Tests/Reader/OpenApiModelFactoryTests.cs b/test/Microsoft.OpenApi.Tests/Reader/OpenApiModelFactoryTests.cs index 2e5895c01..c3d1f87d1 100644 --- a/test/Microsoft.OpenApi.Tests/Reader/OpenApiModelFactoryTests.cs +++ b/test/Microsoft.OpenApi.Tests/Reader/OpenApiModelFactoryTests.cs @@ -203,6 +203,32 @@ public async Task CanLoadAnAsyncOnlyStreamInYamlAndDetectFormat() Assert.Equal("Sample API", document.Info.Title); } + [Fact] + public async Task CanLoadANonSeekableStreamInJsonAndDetectFormatWhenPrecededBySpaces() + { + // Given + using var memoryStream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(" " + documentJson)); + using var nonSeekableStream = new NonSeekableStream(memoryStream); + + // When + var (document, _) = await OpenApiDocument.LoadAsync(nonSeekableStream); + + // Then + Assert.NotNull(document); + Assert.Equal("Sample API", document.Info.Title); + } + + [Fact] + public void CanLoadAStringJsonAndDetectFormatWhenPrecededBySpaces() + { + // When + var (document, _) = OpenApiDocument.Parse(" " + documentJson); + + // Then + Assert.NotNull(document); + Assert.Equal("Sample API", document.Info.Title); + } + public sealed class AsyncOnlyStream : Stream { private readonly Stream _innerStream; From 640e59a143a2a6d3b79c9f6a97a6029593d7dd8f Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 12 Dec 2025 09:06:30 -0500 Subject: [PATCH 006/388] fix: load JSON documents that are preceded by multiple whitespace Signed-off-by: Vincent Biret --- .../Reader/OpenApiModelFactory.cs | 6 +++-- .../Reader/OpenApiModelFactoryTests.cs | 26 +++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs b/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs index d6b57fbbb..2abd04873 100644 --- a/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs +++ b/src/Microsoft.OpenApi/Reader/OpenApiModelFactory.cs @@ -360,7 +360,9 @@ SecurityException or private static string InspectInputFormat(string input) { - return input.StartsWith("{", StringComparison.OrdinalIgnoreCase) || input.StartsWith("[", StringComparison.OrdinalIgnoreCase) ? OpenApiConstants.Json : OpenApiConstants.Yaml; + var trimmedInput = input.TrimStart(); + return trimmedInput.StartsWith("{", StringComparison.OrdinalIgnoreCase) || trimmedInput.StartsWith("[", StringComparison.OrdinalIgnoreCase) ? + OpenApiConstants.Json : OpenApiConstants.Yaml; } /// @@ -393,7 +395,7 @@ private static bool TryInspectStreamFormat(Stream stream, out string? format) var firstByte = (char)stream.ReadByte(); // Skip whitespace if present and read the next non-whitespace byte - if (char.IsWhiteSpace(firstByte)) + while (char.IsWhiteSpace(firstByte)) { firstByte = (char)stream.ReadByte(); } diff --git a/test/Microsoft.OpenApi.Tests/Reader/OpenApiModelFactoryTests.cs b/test/Microsoft.OpenApi.Tests/Reader/OpenApiModelFactoryTests.cs index 464e8fdf3..c51d3e9db 100644 --- a/test/Microsoft.OpenApi.Tests/Reader/OpenApiModelFactoryTests.cs +++ b/test/Microsoft.OpenApi.Tests/Reader/OpenApiModelFactoryTests.cs @@ -203,6 +203,32 @@ public async Task CanLoadAnAsyncOnlyStreamInYamlAndDetectFormat() Assert.Equal("Sample API", document.Info.Title); } + [Fact] + public async Task CanLoadANonSeekableStreamInJsonAndDetectFormatWhenPrecededBySpaces() + { + // Given + using var memoryStream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(" " + documentJson)); + using var nonSeekableStream = new NonSeekableStream(memoryStream); + + // When + var (document, _) = await OpenApiDocument.LoadAsync(nonSeekableStream); + + // Then + Assert.NotNull(document); + Assert.Equal("Sample API", document.Info.Title); + } + + [Fact] + public void CanLoadAStringJsonAndDetectFormatWhenPrecededBySpaces() + { + // When + var (document, _) = OpenApiDocument.Parse(" " + documentJson); + + // Then + Assert.NotNull(document); + Assert.Equal("Sample API", document.Info.Title); + } + public sealed class AsyncOnlyStream : Stream { private readonly Stream _innerStream; From 2c99ccfe6caae1eb6fad3d7848f9229cbc7b1481 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Dec 2025 21:01:25 +0000 Subject: [PATCH 007/388] chore(deps): bump actions/upload-artifact from 5 to 6 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 4d53ec759..c13b4d179 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -76,7 +76,7 @@ jobs: working-directory: ./performance/benchmark - name: Publish benchmark results - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 with: if-no-files-found: error name: benchmark-results From 9eeaab5b35b0d8000f28f45e47a14adaa93e95c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Dec 2025 21:01:32 +0000 Subject: [PATCH 008/388] chore(deps): bump actions/cache from 4 to 5 Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/cache dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/sonarcloud.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 3f969e825..7cd77844c 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -47,7 +47,7 @@ jobs: with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Cache SonarCloud packages - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar From 95baa73bfa779f6648686cc30e344eb244dfc3b2 Mon Sep 17 00:00:00 2001 From: "release-please-token-provider[bot]" <225477224+release-please-token-provider[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 15:38:02 +0000 Subject: [PATCH 009/388] chore(support/v2): release 2.3.12 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 10 ++++++++++ Directory.Build.props | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bf97149fe..de740effa 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.3.11" + ".": "2.3.12" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e74aada15..53c21a800 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [2.3.12](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.11...v2.3.12) (2025-12-15) + + +### Bug Fixes + +* load JSON documents that are preceded by multiple whitespace ([640e59a](https://github.com/microsoft/OpenAPI.NET/commit/640e59a143a2a6d3b79c9f6a97a6029593d7dd8f)) +* non-seekable json streams would fail to load as a document ([76b0159](https://github.com/microsoft/OpenAPI.NET/commit/76b0159d12790ab00310ff107e37396ecdf13336)) +* non-seekable json streams would fail to load as a document ([2436d73](https://github.com/microsoft/OpenAPI.NET/commit/2436d7382bfbf8b9ba501d88f682e952bdf27146)) +* reading streams in an asp.net context would cause async exceptions ([f9e5248](https://github.com/microsoft/OpenAPI.NET/commit/f9e524859722476b3111cb6006f77208c2d1f526)) + ## [2.3.11](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.10...v2.3.11) (2025-12-08) diff --git a/Directory.Build.props b/Directory.Build.props index 77209392f..26fffd5c2 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ https://github.com/Microsoft/OpenAPI.NET © Microsoft Corporation. All rights reserved. OpenAPI .NET - 2.3.11 + 2.3.12 From 7c2568f4fa1013a84f44dbf8081874ae1efd9886 Mon Sep 17 00:00:00 2001 From: "release-please-token-provider[bot]" <225477224+release-please-token-provider[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 17:41:14 +0000 Subject: [PATCH 010/388] chore(main): release 3.0.3 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ Directory.Build.props | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a1304a172..9202efd86 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.0.2" + ".": "3.0.3" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b3bcf2306..e4da9e8f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [3.0.3](https://github.com/microsoft/OpenAPI.NET/compare/v3.0.2...v3.0.3) (2025-12-16) + + +### Bug Fixes + +* load JSON documents that are preceded by multiple whitespace ([6461bac](https://github.com/microsoft/OpenAPI.NET/commit/6461bac01c4176424210e9ac249698f665a514a6)) +* non-seekable json streams would fail to load as a document ([2436d73](https://github.com/microsoft/OpenAPI.NET/commit/2436d7382bfbf8b9ba501d88f682e952bdf27146)) +* reading streams in an asp.net context would cause async exceptions ([f9e5248](https://github.com/microsoft/OpenAPI.NET/commit/f9e524859722476b3111cb6006f77208c2d1f526)) + ## [3.0.2](https://github.com/microsoft/OpenAPI.NET/compare/v3.0.1...v3.0.2) (2025-12-08) ### Bug Fixes diff --git a/Directory.Build.props b/Directory.Build.props index 8582f5826..e5fa07a18 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ https://github.com/Microsoft/OpenAPI.NET © Microsoft Corporation. All rights reserved. OpenAPI .NET - 3.0.2 + 3.0.3 From 782cf8d1ff8166e3c7be706e08dabf168b9616a4 Mon Sep 17 00:00:00 2001 From: Sjoerd van der Meer Date: Wed, 17 Dec 2025 21:58:43 +0100 Subject: [PATCH 011/388] Merge pull request #2645 from desjoerd/fix/support-v2/gh-2629 feat: Add `type: "null"` downcasting when in oneOf and anyOf for OpenAPI v3 --- src/Microsoft.OpenApi/Models/OpenApiSchema.cs | 78 ++++- .../Models/OpenApiSchemaTests.cs | 313 ++++++++++++++++++ 2 files changed, 379 insertions(+), 12 deletions(-) diff --git a/src/Microsoft.OpenApi/Models/OpenApiSchema.cs b/src/Microsoft.OpenApi/Models/OpenApiSchema.cs index f31644c1f..1ffccd272 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiSchema.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiSchema.cs @@ -438,23 +438,39 @@ private void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version // enum var enumValue = Enum is not { Count: > 0 } - && !string.IsNullOrEmpty(Const) + && !string.IsNullOrEmpty(Const) && version < OpenApiSpecVersion.OpenApi3_1 ? new List { JsonValue.Create(Const)! } : Enum; writer.WriteOptionalCollection(OpenApiConstants.Enum, enumValue, (nodeWriter, s) => nodeWriter.WriteAny(s)); + // Handle oneOf/anyOf with null type for v3.0 downcast + IList? effectiveOneOf = OneOf; + IList? effectiveAnyOf = AnyOf; + bool hasNullInComposition = false; + JsonSchemaType? inferredType = null; + + if (version == OpenApiSpecVersion.OpenApi3_0) + { + (effectiveOneOf, var inferredOneOf, var nullInOneOf) = ProcessCompositionForNull(OneOf); + hasNullInComposition |= nullInOneOf; + inferredType = inferredOneOf ?? inferredType; + (effectiveAnyOf, var inferredAnyOf, var nullInAnyOf) = ProcessCompositionForNull(AnyOf); + hasNullInComposition |= nullInAnyOf; + inferredType = inferredAnyOf ?? inferredType; + } + // type - SerializeTypeProperty(writer, version); + SerializeTypeProperty(writer, version, inferredType); // allOf writer.WriteOptionalCollection(OpenApiConstants.AllOf, AllOf, callback); // anyOf - writer.WriteOptionalCollection(OpenApiConstants.AnyOf, AnyOf, callback); + writer.WriteOptionalCollection(OpenApiConstants.AnyOf, effectiveAnyOf, callback); // oneOf - writer.WriteOptionalCollection(OpenApiConstants.OneOf, OneOf, callback); + writer.WriteOptionalCollection(OpenApiConstants.OneOf, effectiveOneOf, callback); // not writer.WriteOptionalObject(OpenApiConstants.Not, Not, callback); @@ -493,7 +509,7 @@ private void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version // nullable if (version == OpenApiSpecVersion.OpenApi3_0) { - SerializeNullable(writer, version); + SerializeNullable(writer, version, hasNullInComposition); } // discriminator @@ -766,14 +782,17 @@ private void SerializeAsV2( writer.WriteEndObject(); } - private void SerializeTypeProperty(IOpenApiWriter writer, OpenApiSpecVersion version) + private void SerializeTypeProperty(IOpenApiWriter writer, OpenApiSpecVersion version, JsonSchemaType? inferredType = null) { - if (Type is null) + // Use original type or inferred type when the explicit type is not set + var typeToUse = Type ?? inferredType; + + if (typeToUse is null) { return; } - var unifiedType = IsNullable ? Type.Value | JsonSchemaType.Null : Type.Value; + var unifiedType = IsNullable ? typeToUse.Value | JsonSchemaType.Null : typeToUse.Value; var typeWithoutNull = unifiedType & ~JsonSchemaType.Null; switch (version) @@ -804,8 +823,8 @@ private static bool HasMultipleTypes(JsonSchemaType schemaType) private static void WriteUnifiedSchemaType(JsonSchemaType type, IOpenApiWriter writer) { var array = (from JsonSchemaType flag in jsonSchemaTypeValues - where type.HasFlag(flag) - select flag.ToFirstIdentifier()).ToArray(); + where type.HasFlag(flag) + select flag.ToFirstIdentifier()).ToArray(); if (array.Length > 1) { writer.WriteOptionalCollection(OpenApiConstants.Type, array, (w, s) => @@ -822,9 +841,9 @@ where type.HasFlag(flag) } } - private void SerializeNullable(IOpenApiWriter writer, OpenApiSpecVersion version) + private void SerializeNullable(IOpenApiWriter writer, OpenApiSpecVersion version, bool hasNullInComposition = false) { - if (IsNullable) + if (IsNullable || hasNullInComposition) { switch (version) { @@ -838,6 +857,41 @@ private void SerializeNullable(IOpenApiWriter writer, OpenApiSpecVersion version } } + /// + /// Processes a composition (oneOf or anyOf) for null types, filtering out null schemas and inferring common type. + /// + /// The list of schemas in the composition. + /// A tuple with the effective list, inferred type, and whether null is present in composition. + private static (IList? effective, JsonSchemaType? inferredType, bool hasNullInComposition) + ProcessCompositionForNull(IList? composition) + { + if (composition is null || !composition.Any(static s => s.Type is JsonSchemaType.Null)) + { + // Nothing to patch + return (composition, null, false); + } + + var nonNullSchemas = composition + .Where(static s => s.Type is null or not JsonSchemaType.Null) + .ToList(); + + if (nonNullSchemas.Count > 0) + { + JsonSchemaType commonType = 0; + + foreach (var schema in nonNullSchemas) + { + commonType |= schema.Type.GetValueOrDefault() & ~JsonSchemaType.Null; + } + + return (nonNullSchemas, commonType, true); + } + else + { + return (null, null, true); + } + } + #if NET5_0_OR_GREATER private static readonly Array jsonSchemaTypeValues = System.Enum.GetValues(); #else diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs index 6ffbb9fe4..c20da3127 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs @@ -790,6 +790,319 @@ public async Task SerializeAdditionalPropertiesAsV3PlusEmits(OpenApiSpecVersion Assert.True(JsonNode.DeepEquals(JsonNode.Parse(expected), JsonNode.Parse(actual))); } + [Fact] + public async Task SerializeOneOfWithNullAsV3ShouldUseNullableAsync() + { + // Arrange - oneOf with null and a reference-like schema + var schema = new OpenApiSchema + { + OneOf = new List + { + new OpenApiSchema { Type = JsonSchemaType.Null }, + new OpenApiSchema + { + Type = JsonSchemaType.String, + MaxLength = 10 + } + } + }; + + var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture); + var writer = new OpenApiJsonWriter(outputStringWriter, new() { Terse = false }); + + // Act + schema.SerializeAsV3(writer); + await writer.FlushAsync(); + + var v3Schema = outputStringWriter.GetStringBuilder().ToString(); + + var expectedV3Schema = + """ + { + "type": "string", + "oneOf": [ + { + "maxLength": 10, + "type": "string" + } + ], + "nullable": true + } + """; + + // Assert + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(expectedV3Schema), JsonNode.Parse(v3Schema))); + } + + [Fact] + public async Task SerializeOneOfWithNullAndMultipleSchemasAsV3ShouldMarkItAsNullableWithoutType() + { + // Arrange - oneOf with null, string, and number + var schema = new OpenApiSchema + { + OneOf = new List + { + new OpenApiSchema { Type = JsonSchemaType.Null }, + new OpenApiSchema { Type = JsonSchemaType.String }, + new OpenApiSchema { Type = JsonSchemaType.Number }, + } + }; + + var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture); + var writer = new OpenApiJsonWriter(outputStringWriter, new() { Terse = false }); + + // Act + schema.SerializeAsV3(writer); + await writer.FlushAsync(); + + var v3Schema = outputStringWriter.GetStringBuilder().ToString(); + + var expectedV3Schema = + """ + { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ], + "nullable": true + } + """; + + // Assert + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(expectedV3Schema), JsonNode.Parse(v3Schema))); + } + + [Fact] + public async Task SerializeAnyOfWithNullAsV3ShouldUseNullableAsync() + { + // Arrange - anyOf with null and object schema + var schema = new OpenApiSchema + { + AnyOf = new List + { + new OpenApiSchema { Type = JsonSchemaType.Null }, + new OpenApiSchema + { + Type = JsonSchemaType.Object, + Properties = new Dictionary + { + ["id"] = new OpenApiSchema { Type = JsonSchemaType.Integer } + } + } + } + }; + + var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture); + var writer = new OpenApiJsonWriter(outputStringWriter, new() { Terse = false }); + + // Act + schema.SerializeAsV3(writer); + await writer.FlushAsync(); + + var v3Schema = outputStringWriter.GetStringBuilder().ToString(); + + var expectedV3Schema = + """ + { + "type": "object", + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "integer" + } + } + } + ], + "nullable": true + } + """; + // Assert + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(expectedV3Schema), JsonNode.Parse(v3Schema))); + } + + [Fact] + public async Task SerializeAnyOfWithNullAndMultipleSchemasAsV3ShouldApplyNullable() + { + // Arrange - anyOf with null and multiple schemas + var schema = new OpenApiSchema + { + AnyOf = new List + { + new OpenApiSchema { Type = JsonSchemaType.Null }, + new OpenApiSchema { Type = JsonSchemaType.String, MinLength = 1 }, + new OpenApiSchema { Type = JsonSchemaType.Integer } + } + }; + + var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture); + var writer = new OpenApiJsonWriter(outputStringWriter, new() { Terse = false }); + + // Act + schema.SerializeAsV3(writer); + await writer.FlushAsync(); + + var v3Schema = outputStringWriter.GetStringBuilder().ToString(); + + var expectedV3Schema = + """ + { + "anyOf": [ + { + "minLength": 1, + "type": "string" + }, + { + "type": "integer" + } + ], + "nullable": true + } + """; + + // Assert + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(expectedV3Schema), JsonNode.Parse(v3Schema))); + } + + [Fact] + public async Task SerializeOneOfWithOnlyNullAsV3ShouldJustBeNullableAsync() + { + // Arrange - oneOf with only null + var schema = new OpenApiSchema + { + OneOf = new List + { + new OpenApiSchema { Type = JsonSchemaType.Null } + } + }; + + var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture); + var writer = new OpenApiJsonWriter(outputStringWriter, new() { Terse = false }); + + // Act + schema.SerializeAsV3(writer); + await writer.FlushAsync(); + + var v3Schema = outputStringWriter.GetStringBuilder().ToString(); + + var expectedV3Schema = + """ + { + "nullable": true + } + """; + + // Assert + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(expectedV3Schema), JsonNode.Parse(v3Schema))); + } + + [Fact] + public async Task SerializeOneOfWithNullAsV31ShouldNotChangeAsync() + { + // Arrange - oneOf with null should remain unchanged in v3.1 + var schema = new OpenApiSchema + { + OneOf = new List + { + new OpenApiSchema { Type = JsonSchemaType.Null }, + new OpenApiSchema { Type = JsonSchemaType.String } + } + }; + + var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture); + var writer = new OpenApiJsonWriter(outputStringWriter, new() { Terse = false }); + + // Act + schema.SerializeAsV31(writer); + await writer.FlushAsync(); + + var v31Schema = outputStringWriter.GetStringBuilder().ToString(); + + var expectedV31Schema = + """ + { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + } + """; + + // Assert + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(expectedV31Schema), JsonNode.Parse(v31Schema))); + } + + [Fact] + public async Task SerializeOneOfWithNullAndRefAsV3ShouldUseNullableAsync() + { + // Arrange - oneOf with null and a $ref to a schema component + var document = new OpenApiDocument + { + Components = new OpenApiComponents + { + Schemas = new Dictionary + { + ["Pet"] = new OpenApiSchema + { + Type = JsonSchemaType.Object, + Properties = new Dictionary + { + ["id"] = new OpenApiSchema { Type = JsonSchemaType.Integer }, + ["name"] = new OpenApiSchema { Type = JsonSchemaType.String } + } + } + } + } + }; + + // Register components so references can be resolved + document.Workspace.RegisterComponents(document); + + var schemaRef = new OpenApiSchemaReference("Pet", document); + + var schema = new OpenApiSchema + { + OneOf = new List + { + new OpenApiSchema { Type = JsonSchemaType.Null }, + schemaRef + } + }; + + var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture); + var writer = new OpenApiJsonWriter(outputStringWriter, new() { Terse = false }); + + // Act + schema.SerializeAsV3(writer); + await writer.FlushAsync(); + + var v3Schema = outputStringWriter.GetStringBuilder().ToString(); + + var expectedV3Schema = + """ + { + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/Pet" + } + ], + "nullable": true + } + """; + + // Assert + Assert.True(JsonNode.DeepEquals(JsonNode.Parse(expectedV3Schema), JsonNode.Parse(v3Schema))); + } internal class SchemaVisitor : OpenApiVisitorBase { From 6c08b16a95042b9f003d789c485db059019daaac Mon Sep 17 00:00:00 2001 From: "release-please-token-provider[bot]" <225477224+release-please-token-provider[bot]@users.noreply.github.com> Date: Wed, 17 Dec 2025 20:59:07 +0000 Subject: [PATCH 012/388] chore(support/v2): release 2.4.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ Directory.Build.props | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index de740effa..b44b28703 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.3.12" + ".": "2.4.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 53c21a800..a60c484e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.4.0](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.12...v2.4.0) (2025-12-17) + + +### Features + +* Add `type: "null"` downcasting when in oneOf and anyOf for OpenAPI v3 ([782cf8d](https://github.com/microsoft/OpenAPI.NET/commit/782cf8d1ff8166e3c7be706e08dabf168b9616a4)) + ## [2.3.12](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.11...v2.3.12) (2025-12-15) diff --git a/Directory.Build.props b/Directory.Build.props index 26fffd5c2..caf63957a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ https://github.com/Microsoft/OpenAPI.NET © Microsoft Corporation. All rights reserved. OpenAPI .NET - 2.3.12 + 2.4.0 From 79f60f72d9427ff824114c4b0c610d12732df9a5 Mon Sep 17 00:00:00 2001 From: "release-please-token-provider[bot]" <225477224+release-please-token-provider[bot]@users.noreply.github.com> Date: Wed, 17 Dec 2025 21:34:20 +0000 Subject: [PATCH 013/388] chore(main): release 3.1.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ Directory.Build.props | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9202efd86..e0dc5001b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.0.3" + ".": "3.1.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a1497c2f6..fe45c813e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.1.0](https://github.com/microsoft/OpenAPI.NET/compare/v3.0.3...v3.1.0) (2025-12-17) + + +### Features + +* Add `type: "null"` downcasting when in oneOf and anyOf for OpenAPI v3 ([782cf8d](https://github.com/microsoft/OpenAPI.NET/commit/782cf8d1ff8166e3c7be706e08dabf168b9616a4)) + ## [3.0.3](https://github.com/microsoft/OpenAPI.NET/compare/v3.0.2...v3.0.3) (2025-12-16) ### Bug Fixes diff --git a/Directory.Build.props b/Directory.Build.props index e5fa07a18..11a996a34 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ https://github.com/Microsoft/OpenAPI.NET © Microsoft Corporation. All rights reserved. OpenAPI .NET - 3.0.3 + 3.1.0 From e36fc9565bce42916eb7bf64d1f74d491dd1f407 Mon Sep 17 00:00:00 2001 From: Niels van Dijk Date: Thu, 18 Dec 2025 10:04:33 +0100 Subject: [PATCH 014/388] fix(schema): always serialize `additionalProperties: false` * Updates serialization logic to emit `additionalProperties: false` for all OpenAPI versions when `AdditionalPropertiesAllowed` is false. * Refactors related test to a theory and verifies behavior for both OpenAPI 3.0 and 3.1. * Ensures consistent schema output across OpenAPI versions. --- src/Microsoft.OpenApi/Models/OpenApiSchema.cs | 5 ++--- test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs | 8 +++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Microsoft.OpenApi/Models/OpenApiSchema.cs b/src/Microsoft.OpenApi/Models/OpenApiSchema.cs index 1ffccd272..e0b4ae495 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiSchema.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiSchema.cs @@ -489,9 +489,8 @@ private void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version AdditionalProperties, callback); } - // true is the default in earlier versions 3, no need to write it out - // boolean value is only supported for version 3 and earlier (version 2 is implemented in the other serialize method, the condition is a failsafe) - else if (!AdditionalPropertiesAllowed && version <= OpenApiSpecVersion.OpenApi3_0) + // true is the default, no need to write it out + else if (!AdditionalPropertiesAllowed) { writer.WriteProperty(OpenApiConstants.AdditionalProperties, AdditionalPropertiesAllowed); } diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs index c20da3127..67a79e35e 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiSchemaTests.cs @@ -754,8 +754,10 @@ public async Task SerializeAdditionalPropertiesAllowedAsV3PlusDefaultDoesNotEmit Assert.True(JsonNode.DeepEquals(JsonNode.Parse(expected), JsonNode.Parse(actual))); } - [Fact] - public async Task SerializeAdditionalPropertiesAllowedAsV3FalseEmits() + [Theory] + [InlineData(OpenApiSpecVersion.OpenApi3_0)] + [InlineData(OpenApiSpecVersion.OpenApi3_1)] + public async Task SerializeAdditionalPropertiesAllowedAsV3PlusFalseEmits(OpenApiSpecVersion version) { var expected = @"{ ""additionalProperties"": false }"; // Given @@ -765,7 +767,7 @@ public async Task SerializeAdditionalPropertiesAllowedAsV3FalseEmits() }; // When - var actual = await schema.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0); + var actual = await schema.SerializeAsJsonAsync(version); // Then Assert.True(JsonNode.DeepEquals(JsonNode.Parse(expected), JsonNode.Parse(actual))); From a7ae46e7e9432986d656bcb747071787a0e87c47 Mon Sep 17 00:00:00 2001 From: "release-please-token-provider[bot]" <225477224+release-please-token-provider[bot]@users.noreply.github.com> Date: Thu, 18 Dec 2025 11:35:21 +0000 Subject: [PATCH 015/388] chore(support/v2): release 2.4.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ Directory.Build.props | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b44b28703..adf5fd769 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.4.0" + ".": "2.4.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a60c484e2..7414944db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [2.4.1](https://github.com/microsoft/OpenAPI.NET/compare/v2.4.0...v2.4.1) (2025-12-18) + + +### Bug Fixes + +* **schema:** always serialize `additionalProperties: false` ([6651c36](https://github.com/microsoft/OpenAPI.NET/commit/6651c36ff341329c053776d65b36b1b7fa9dd3ea)) +* **schema:** always serialize `additionalProperties: false` ([e36fc95](https://github.com/microsoft/OpenAPI.NET/commit/e36fc9565bce42916eb7bf64d1f74d491dd1f407)) + ## [2.4.0](https://github.com/microsoft/OpenAPI.NET/compare/v2.3.12...v2.4.0) (2025-12-17) diff --git a/Directory.Build.props b/Directory.Build.props index caf63957a..2d0fc7255 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ https://github.com/Microsoft/OpenAPI.NET © Microsoft Corporation. All rights reserved. OpenAPI .NET - 2.4.0 + 2.4.1 From f71787dd16a40d079aa5013ac5c937c81f92b563 Mon Sep 17 00:00:00 2001 From: "release-please-token-provider[bot]" <225477224+release-please-token-provider[bot]@users.noreply.github.com> Date: Thu, 18 Dec 2025 16:12:12 +0000 Subject: [PATCH 016/388] chore(main): release 3.1.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ Directory.Build.props | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e0dc5001b..89c23baca 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.1.0" + ".": "3.1.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b3e5aa34a..be4068a9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [3.1.1](https://github.com/microsoft/OpenAPI.NET/compare/v3.1.0...v3.1.1) (2025-12-18) + + +### Bug Fixes + +* **schema:** always serialize `additionalProperties: false` ([6651c36](https://github.com/microsoft/OpenAPI.NET/commit/6651c36ff341329c053776d65b36b1b7fa9dd3ea)) +* **schema:** always serialize `additionalProperties: false` ([e36fc95](https://github.com/microsoft/OpenAPI.NET/commit/e36fc9565bce42916eb7bf64d1f74d491dd1f407)) + ## [3.1.0](https://github.com/microsoft/OpenAPI.NET/compare/v3.0.3...v3.1.0) (2025-12-17) ### Features diff --git a/Directory.Build.props b/Directory.Build.props index 11a996a34..5aba3b052 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ https://github.com/Microsoft/OpenAPI.NET © Microsoft Corporation. All rights reserved. OpenAPI .NET - 3.1.0 + 3.1.1 From 82177a457784e9ed9fbd35f34b4d1b013997d269 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 19 Dec 2025 14:29:19 -0500 Subject: [PATCH 017/388] docs: adds instructions to update public reference docs after nuget release Signed-off-by: Vincent Biret --- .azure-pipelines/ci-build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 8921e7112..53b181b22 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -472,4 +472,8 @@ extends: -t "$(REGISTRY)/$(IMAGE_NAME):${VERSION}" \ "$(Pipeline.Workspace)" displayName: 'Build and Push Release Image' - condition: contains(variables['Build.SourceBranch'], 'refs/tags/v') \ No newline at end of file + condition: contains(variables['Build.SourceBranch'], 'refs/tags/v') + +# once the nuget has been released, fill this form to get the public documentation updated. +# https://dev.azure.com/msft-skilling/Content/_workitems/create/User%20Story?templateId=39fb91e3-64a2-4c8a-83db-b2bdf3603dd3&ownerId=c4a28f90-17ae-4384-b514-7273392b082b +# https://learn.microsoft.com/en-us/dotnet/api/microsoft.openapi From 931a3929fc14dc15f862b98bc03e52236a1a8e03 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 22 Dec 2025 13:21:08 -0500 Subject: [PATCH 018/388] chore: adds 3.2 version to the workbench chore: sets 3.2 as default version for the workbench Signed-off-by: Vincent Biret --- src/Microsoft.OpenApi.Workbench/MainModel.cs | 2 +- src/Microsoft.OpenApi.Workbench/MainWindow.xaml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.OpenApi.Workbench/MainModel.cs b/src/Microsoft.OpenApi.Workbench/MainModel.cs index 660fcc5ed..08bfbd001 100644 --- a/src/Microsoft.OpenApi.Workbench/MainModel.cs +++ b/src/Microsoft.OpenApi.Workbench/MainModel.cs @@ -42,7 +42,7 @@ public class MainModel : INotifyPropertyChanged /// /// Default version. /// - private OpenApiSpecVersion _version = OpenApiSpecVersion.OpenApi3_0; + private OpenApiSpecVersion _version = OpenApiSpecVersion.OpenApi3_2; private static readonly HttpClient _httpClient = new(); diff --git a/src/Microsoft.OpenApi.Workbench/MainWindow.xaml b/src/Microsoft.OpenApi.Workbench/MainWindow.xaml index 32c14659d..87e219796 100644 --- a/src/Microsoft.OpenApi.Workbench/MainWindow.xaml +++ b/src/Microsoft.OpenApi.Workbench/MainWindow.xaml @@ -40,8 +40,9 @@ - - + + + From 2495dea83fef872752120edeb842be492a0723d4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 22 Dec 2025 18:53:09 +0000 Subject: [PATCH 019/388] Initial plan From 50b44aad12d8fa86a46f7f6d62896a7b1c344d2e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 22 Dec 2025 19:07:23 +0000 Subject: [PATCH 020/388] fix: wrap extension parser calls in try-catch to ensure correct error pointers When extension parsers throw OpenApiException, the exceptions are now caught in LoadExtension methods across all OpenAPI versions (V2, V3, V3.1, V3.2). This ensures the error pointer correctly includes all path segments (e.g., #/definitions/demo/x-tag instead of #/definitions/x-tag). Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> --- .../Reader/V2/OpenApiV2Deserializer.cs | 11 +- .../Reader/V3/OpenApiV3Deserializer.cs | 23 ++-- .../Reader/V31/OpenApiV31Deserializer.cs | 17 ++- .../Reader/V32/OpenApiV32Deserializer.cs | 17 ++- .../TestCustomExtension.cs | 102 ++++++++++++++++++ 5 files changed, 156 insertions(+), 14 deletions(-) diff --git a/src/Microsoft.OpenApi/Reader/V2/OpenApiV2Deserializer.cs b/src/Microsoft.OpenApi/Reader/V2/OpenApiV2Deserializer.cs index c640b310c..2b075c1bc 100644 --- a/src/Microsoft.OpenApi/Reader/V2/OpenApiV2Deserializer.cs +++ b/src/Microsoft.OpenApi/Reader/V2/OpenApiV2Deserializer.cs @@ -79,7 +79,16 @@ private static IOpenApiExtension LoadExtension(string name, ParseNode node) { if (node.Context.ExtensionParsers is not null && node.Context.ExtensionParsers.TryGetValue(name, out var parser)) { - return parser(node.CreateAny(), OpenApiSpecVersion.OpenApi2_0); + try + { + return parser(node.CreateAny(), OpenApiSpecVersion.OpenApi2_0); + } + catch (OpenApiException ex) + { + ex.Pointer = node.Context.GetLocation(); + node.Context.Diagnostic.Errors.Add(new(ex)); + return new JsonNodeExtension(node.CreateAny()); + } } else { diff --git a/src/Microsoft.OpenApi/Reader/V3/OpenApiV3Deserializer.cs b/src/Microsoft.OpenApi/Reader/V3/OpenApiV3Deserializer.cs index 0b74cedc5..1a03268d6 100644 --- a/src/Microsoft.OpenApi/Reader/V3/OpenApiV3Deserializer.cs +++ b/src/Microsoft.OpenApi/Reader/V3/OpenApiV3Deserializer.cs @@ -130,15 +130,24 @@ public static JsonNodeExtension LoadAny(ParseNode node, OpenApiDocument hostDocu private static IOpenApiExtension LoadExtension(string name, ParseNode node) { - if (node.Context.ExtensionParsers is not null && node.Context.ExtensionParsers.TryGetValue(name, out var parser) && parser( - node.CreateAny(), OpenApiSpecVersion.OpenApi3_0) is { } result) + if (node.Context.ExtensionParsers is not null && node.Context.ExtensionParsers.TryGetValue(name, out var parser)) { - return result; - } - else - { - return new JsonNodeExtension(node.CreateAny()); + try + { + var result = parser(node.CreateAny(), OpenApiSpecVersion.OpenApi3_0); + if (result is { }) + { + return result; + } + } + catch (OpenApiException ex) + { + ex.Pointer = node.Context.GetLocation(); + node.Context.Diagnostic.Errors.Add(new(ex)); + } } + + return new JsonNodeExtension(node.CreateAny()); } private static string? LoadString(ParseNode node) diff --git a/src/Microsoft.OpenApi/Reader/V31/OpenApiV31Deserializer.cs b/src/Microsoft.OpenApi/Reader/V31/OpenApiV31Deserializer.cs index 08f2ec048..3608ad5f7 100644 --- a/src/Microsoft.OpenApi/Reader/V31/OpenApiV31Deserializer.cs +++ b/src/Microsoft.OpenApi/Reader/V31/OpenApiV31Deserializer.cs @@ -131,9 +131,20 @@ public static JsonNode LoadAny(ParseNode node, OpenApiDocument hostDocument) private static IOpenApiExtension LoadExtension(string name, ParseNode node) { - return node.Context.ExtensionParsers is not null && node.Context.ExtensionParsers.TryGetValue(name, out var parser) - ? parser(node.CreateAny(), OpenApiSpecVersion.OpenApi3_1) - : new JsonNodeExtension(node.CreateAny()); + if (node.Context.ExtensionParsers is not null && node.Context.ExtensionParsers.TryGetValue(name, out var parser)) + { + try + { + return parser(node.CreateAny(), OpenApiSpecVersion.OpenApi3_1); + } + catch (OpenApiException ex) + { + ex.Pointer = node.Context.GetLocation(); + node.Context.Diagnostic.Errors.Add(new(ex)); + } + } + + return new JsonNodeExtension(node.CreateAny()); } private static string? LoadString(ParseNode node) diff --git a/src/Microsoft.OpenApi/Reader/V32/OpenApiV32Deserializer.cs b/src/Microsoft.OpenApi/Reader/V32/OpenApiV32Deserializer.cs index 9b062931d..55f45b38e 100644 --- a/src/Microsoft.OpenApi/Reader/V32/OpenApiV32Deserializer.cs +++ b/src/Microsoft.OpenApi/Reader/V32/OpenApiV32Deserializer.cs @@ -131,9 +131,20 @@ public static JsonNode LoadAny(ParseNode node, OpenApiDocument hostDocument) private static IOpenApiExtension LoadExtension(string name, ParseNode node) { - return node.Context.ExtensionParsers is not null && node.Context.ExtensionParsers.TryGetValue(name, out var parser) - ? parser(node.CreateAny(), OpenApiSpecVersion.OpenApi3_2) - : new JsonNodeExtension(node.CreateAny()); + if (node.Context.ExtensionParsers is not null && node.Context.ExtensionParsers.TryGetValue(name, out var parser)) + { + try + { + return parser(node.CreateAny(), OpenApiSpecVersion.OpenApi3_2); + } + catch (OpenApiException ex) + { + ex.Pointer = node.Context.GetLocation(); + node.Context.Diagnostic.Errors.Add(new(ex)); + } + } + + return new JsonNodeExtension(node.CreateAny()); } private static string? LoadString(ParseNode node) diff --git a/test/Microsoft.OpenApi.Readers.Tests/TestCustomExtension.cs b/test/Microsoft.OpenApi.Readers.Tests/TestCustomExtension.cs index 57f55e95e..1964ea61b 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/TestCustomExtension.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/TestCustomExtension.cs @@ -44,6 +44,108 @@ public void ParseCustomExtension() Assert.Equal("hey", fooExtension.Bar); Assert.Equal("hi!", fooExtension.Baz); } + + [Fact] + public void ExtensionParserThrowingOpenApiException_V2_ShouldHaveCorrectPointer() + { + var json = @"{ + ""swagger"": ""2.0"", + ""info"": { + ""title"": ""Demo"", + ""version"": ""1"" + }, + ""paths"": {}, + ""definitions"": { + ""demo"": { + ""x-tag"": null + } + } +}"; + var settings = new OpenApiReaderSettings + { + ExtensionParsers = + { + { "x-tag", (any, version) => throw new OpenApiException("Testing") } + } + }; + + var result = OpenApiDocument.Parse(json, "json", settings); + + Assert.NotNull(result.Diagnostic); + Assert.NotEmpty(result.Diagnostic.Errors); + var error = result.Diagnostic.Errors[0]; + Assert.Equal("Testing", error.Message); + Assert.Equal("#/definitions/demo/x-tag", error.Pointer); + } + + [Fact] + public void ExtensionParserThrowingOpenApiException_V3_ShouldHaveCorrectPointer() + { + var json = @"{ + ""openapi"": ""3.0.0"", + ""info"": { + ""title"": ""Demo"", + ""version"": ""1"" + }, + ""paths"": {}, + ""components"": { + ""schemas"": { + ""demo"": { + ""x-tag"": null + } + } + } +}"; + var settings = new OpenApiReaderSettings + { + ExtensionParsers = + { + { "x-tag", (any, version) => throw new OpenApiException("Testing") } + } + }; + + var result = OpenApiDocument.Parse(json, "json", settings); + + Assert.NotNull(result.Diagnostic); + Assert.NotEmpty(result.Diagnostic.Errors); + var error = result.Diagnostic.Errors[0]; + Assert.Equal("Testing", error.Message); + Assert.Equal("#/components/schemas/demo/x-tag", error.Pointer); + } + + [Fact] + public void ExtensionParserThrowingOpenApiException_V31_ShouldHaveCorrectPointer() + { + var json = @"{ + ""openapi"": ""3.1.0"", + ""info"": { + ""title"": ""Demo"", + ""version"": ""1"" + }, + ""components"": { + ""schemas"": { + ""demo"": { + ""x-tag"": null + } + } + } +}"; + var settings = new OpenApiReaderSettings + { + ExtensionParsers = + { + { "x-tag", (any, version) => throw new OpenApiException("Testing") } + } + }; + + var result = OpenApiDocument.Parse(json, "json", settings); + + Assert.NotNull(result.Diagnostic); + Assert.NotEmpty(result.Diagnostic.Errors); + var error = result.Diagnostic.Errors[0]; + Assert.Equal("Testing", error.Message); + Assert.Equal("#/components/schemas/demo/x-tag", error.Pointer); + } } internal class FooExtension : IOpenApiExtension, IOpenApiElement From 12f649959fe73d76c36a51f0126b41f14f4823fd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 22 Dec 2025 19:10:01 +0000 Subject: [PATCH 021/388] refactor: make V2 LoadExtension consistent with other versions Moved the return statement for JsonNodeExtension outside the catch block to match the pattern used in V3, V31, and V32 deserializers. Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> --- src/Microsoft.OpenApi/Reader/V2/OpenApiV2Deserializer.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.OpenApi/Reader/V2/OpenApiV2Deserializer.cs b/src/Microsoft.OpenApi/Reader/V2/OpenApiV2Deserializer.cs index 2b075c1bc..80d079b5e 100644 --- a/src/Microsoft.OpenApi/Reader/V2/OpenApiV2Deserializer.cs +++ b/src/Microsoft.OpenApi/Reader/V2/OpenApiV2Deserializer.cs @@ -87,13 +87,10 @@ private static IOpenApiExtension LoadExtension(string name, ParseNode node) { ex.Pointer = node.Context.GetLocation(); node.Context.Diagnostic.Errors.Add(new(ex)); - return new JsonNodeExtension(node.CreateAny()); } } - else - { - return new JsonNodeExtension(node.CreateAny()); - } + + return new JsonNodeExtension(node.CreateAny()); } private static string? LoadString(ParseNode node) From e85698a4172a874c33eba6c902d60f975e51e887 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 22 Dec 2025 19:20:54 +0000 Subject: [PATCH 022/388] style: use raw string literals for JSON test data Changed from verbatim string literals (@"...") to raw string literals ("""...""") for consistency with existing test code. Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> --- .../TestCustomExtension.cs | 68 ++++++++++--------- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/test/Microsoft.OpenApi.Readers.Tests/TestCustomExtension.cs b/test/Microsoft.OpenApi.Readers.Tests/TestCustomExtension.cs index 1964ea61b..b12a56d31 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/TestCustomExtension.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/TestCustomExtension.cs @@ -48,19 +48,21 @@ public void ParseCustomExtension() [Fact] public void ExtensionParserThrowingOpenApiException_V2_ShouldHaveCorrectPointer() { - var json = @"{ - ""swagger"": ""2.0"", - ""info"": { - ""title"": ""Demo"", - ""version"": ""1"" + var json = """ +{ + "swagger": "2.0", + "info": { + "title": "Demo", + "version": "1" }, - ""paths"": {}, - ""definitions"": { - ""demo"": { - ""x-tag"": null + "paths": {}, + "definitions": { + "demo": { + "x-tag": null } } -}"; +} +"""; var settings = new OpenApiReaderSettings { ExtensionParsers = @@ -81,21 +83,23 @@ public void ExtensionParserThrowingOpenApiException_V2_ShouldHaveCorrectPointer( [Fact] public void ExtensionParserThrowingOpenApiException_V3_ShouldHaveCorrectPointer() { - var json = @"{ - ""openapi"": ""3.0.0"", - ""info"": { - ""title"": ""Demo"", - ""version"": ""1"" + var json = """ +{ + "openapi": "3.0.0", + "info": { + "title": "Demo", + "version": "1" }, - ""paths"": {}, - ""components"": { - ""schemas"": { - ""demo"": { - ""x-tag"": null + "paths": {}, + "components": { + "schemas": { + "demo": { + "x-tag": null } } } -}"; +} +"""; var settings = new OpenApiReaderSettings { ExtensionParsers = @@ -116,20 +120,22 @@ public void ExtensionParserThrowingOpenApiException_V3_ShouldHaveCorrectPointer( [Fact] public void ExtensionParserThrowingOpenApiException_V31_ShouldHaveCorrectPointer() { - var json = @"{ - ""openapi"": ""3.1.0"", - ""info"": { - ""title"": ""Demo"", - ""version"": ""1"" + var json = """ +{ + "openapi": "3.1.0", + "info": { + "title": "Demo", + "version": "1" }, - ""components"": { - ""schemas"": { - ""demo"": { - ""x-tag"": null + "components": { + "schemas": { + "demo": { + "x-tag": null } } } -}"; +} +"""; var settings = new OpenApiReaderSettings { ExtensionParsers = From 8021a752fb5516ccf749bd3628f860bf3f0848c0 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 22 Dec 2025 14:42:22 -0500 Subject: [PATCH 023/388] chore: refactors test definition for better coverage Signed-off-by: Vincent Biret --- .../TestCustomExtension.cs | 47 +++---------------- 1 file changed, 7 insertions(+), 40 deletions(-) diff --git a/test/Microsoft.OpenApi.Readers.Tests/TestCustomExtension.cs b/test/Microsoft.OpenApi.Readers.Tests/TestCustomExtension.cs index b12a56d31..9f4404c05 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/TestCustomExtension.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/TestCustomExtension.cs @@ -80,12 +80,15 @@ public void ExtensionParserThrowingOpenApiException_V2_ShouldHaveCorrectPointer( Assert.Equal("#/definitions/demo/x-tag", error.Pointer); } - [Fact] - public void ExtensionParserThrowingOpenApiException_V3_ShouldHaveCorrectPointer() + [Theory] + [InlineData("3.0.4")] + [InlineData("3.1.1")] + [InlineData("3.2.0")] + public void ExtensionParserThrowingOpenApiException_V3_ShouldHaveCorrectPointer(string version) { - var json = """ + var json = $$""" { - "openapi": "3.0.0", + "openapi": "{{version}}", "info": { "title": "Demo", "version": "1" @@ -116,42 +119,6 @@ public void ExtensionParserThrowingOpenApiException_V3_ShouldHaveCorrectPointer( Assert.Equal("Testing", error.Message); Assert.Equal("#/components/schemas/demo/x-tag", error.Pointer); } - - [Fact] - public void ExtensionParserThrowingOpenApiException_V31_ShouldHaveCorrectPointer() - { - var json = """ -{ - "openapi": "3.1.0", - "info": { - "title": "Demo", - "version": "1" - }, - "components": { - "schemas": { - "demo": { - "x-tag": null - } - } - } -} -"""; - var settings = new OpenApiReaderSettings - { - ExtensionParsers = - { - { "x-tag", (any, version) => throw new OpenApiException("Testing") } - } - }; - - var result = OpenApiDocument.Parse(json, "json", settings); - - Assert.NotNull(result.Diagnostic); - Assert.NotEmpty(result.Diagnostic.Errors); - var error = result.Diagnostic.Errors[0]; - Assert.Equal("Testing", error.Message); - Assert.Equal("#/components/schemas/demo/x-tag", error.Pointer); - } } internal class FooExtension : IOpenApiExtension, IOpenApiElement From 458cabe6cd0fbdb192dbd17f2d6ab3b8162d1166 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 22 Dec 2025 19:07:23 +0000 Subject: [PATCH 024/388] fix: wrap extension parser calls in try-catch to ensure correct error pointers When extension parsers throw OpenApiException, the exceptions are now caught in LoadExtension methods across all OpenAPI versions (V2, V3, V3.1, V3.2). This ensures the error pointer correctly includes all path segments (e.g., #/definitions/demo/x-tag instead of #/definitions/x-tag). Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> refactor: make V2 LoadExtension consistent with other versions Moved the return statement for JsonNodeExtension outside the catch block to match the pattern used in V3, V31, and V32 deserializers. Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> style: use raw string literals for JSON test data Changed from verbatim string literals (@"...") to raw string literals ("""...""") for consistency with existing test code. Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> chore: refactors test definition for better coverage Signed-off-by: Vincent Biret chore: removes extraneous version --- .../Reader/V2/OpenApiV2Deserializer.cs | 16 ++-- .../Reader/V3/OpenApiV3Deserializer.cs | 23 ++++-- .../Reader/V31/OpenApiV31Deserializer.cs | 17 ++++- .../TestCustomExtension.cs | 74 +++++++++++++++++++ 4 files changed, 115 insertions(+), 15 deletions(-) diff --git a/src/Microsoft.OpenApi/Reader/V2/OpenApiV2Deserializer.cs b/src/Microsoft.OpenApi/Reader/V2/OpenApiV2Deserializer.cs index c640b310c..80d079b5e 100644 --- a/src/Microsoft.OpenApi/Reader/V2/OpenApiV2Deserializer.cs +++ b/src/Microsoft.OpenApi/Reader/V2/OpenApiV2Deserializer.cs @@ -79,12 +79,18 @@ private static IOpenApiExtension LoadExtension(string name, ParseNode node) { if (node.Context.ExtensionParsers is not null && node.Context.ExtensionParsers.TryGetValue(name, out var parser)) { - return parser(node.CreateAny(), OpenApiSpecVersion.OpenApi2_0); - } - else - { - return new JsonNodeExtension(node.CreateAny()); + try + { + return parser(node.CreateAny(), OpenApiSpecVersion.OpenApi2_0); + } + catch (OpenApiException ex) + { + ex.Pointer = node.Context.GetLocation(); + node.Context.Diagnostic.Errors.Add(new(ex)); + } } + + return new JsonNodeExtension(node.CreateAny()); } private static string? LoadString(ParseNode node) diff --git a/src/Microsoft.OpenApi/Reader/V3/OpenApiV3Deserializer.cs b/src/Microsoft.OpenApi/Reader/V3/OpenApiV3Deserializer.cs index 0b74cedc5..1a03268d6 100644 --- a/src/Microsoft.OpenApi/Reader/V3/OpenApiV3Deserializer.cs +++ b/src/Microsoft.OpenApi/Reader/V3/OpenApiV3Deserializer.cs @@ -130,15 +130,24 @@ public static JsonNodeExtension LoadAny(ParseNode node, OpenApiDocument hostDocu private static IOpenApiExtension LoadExtension(string name, ParseNode node) { - if (node.Context.ExtensionParsers is not null && node.Context.ExtensionParsers.TryGetValue(name, out var parser) && parser( - node.CreateAny(), OpenApiSpecVersion.OpenApi3_0) is { } result) + if (node.Context.ExtensionParsers is not null && node.Context.ExtensionParsers.TryGetValue(name, out var parser)) { - return result; - } - else - { - return new JsonNodeExtension(node.CreateAny()); + try + { + var result = parser(node.CreateAny(), OpenApiSpecVersion.OpenApi3_0); + if (result is { }) + { + return result; + } + } + catch (OpenApiException ex) + { + ex.Pointer = node.Context.GetLocation(); + node.Context.Diagnostic.Errors.Add(new(ex)); + } } + + return new JsonNodeExtension(node.CreateAny()); } private static string? LoadString(ParseNode node) diff --git a/src/Microsoft.OpenApi/Reader/V31/OpenApiV31Deserializer.cs b/src/Microsoft.OpenApi/Reader/V31/OpenApiV31Deserializer.cs index 08f2ec048..3608ad5f7 100644 --- a/src/Microsoft.OpenApi/Reader/V31/OpenApiV31Deserializer.cs +++ b/src/Microsoft.OpenApi/Reader/V31/OpenApiV31Deserializer.cs @@ -131,9 +131,20 @@ public static JsonNode LoadAny(ParseNode node, OpenApiDocument hostDocument) private static IOpenApiExtension LoadExtension(string name, ParseNode node) { - return node.Context.ExtensionParsers is not null && node.Context.ExtensionParsers.TryGetValue(name, out var parser) - ? parser(node.CreateAny(), OpenApiSpecVersion.OpenApi3_1) - : new JsonNodeExtension(node.CreateAny()); + if (node.Context.ExtensionParsers is not null && node.Context.ExtensionParsers.TryGetValue(name, out var parser)) + { + try + { + return parser(node.CreateAny(), OpenApiSpecVersion.OpenApi3_1); + } + catch (OpenApiException ex) + { + ex.Pointer = node.Context.GetLocation(); + node.Context.Diagnostic.Errors.Add(new(ex)); + } + } + + return new JsonNodeExtension(node.CreateAny()); } private static string? LoadString(ParseNode node) diff --git a/test/Microsoft.OpenApi.Readers.Tests/TestCustomExtension.cs b/test/Microsoft.OpenApi.Readers.Tests/TestCustomExtension.cs index 57f55e95e..96de89cf9 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/TestCustomExtension.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/TestCustomExtension.cs @@ -44,6 +44,80 @@ public void ParseCustomExtension() Assert.Equal("hey", fooExtension.Bar); Assert.Equal("hi!", fooExtension.Baz); } + + [Fact] + public void ExtensionParserThrowingOpenApiException_V2_ShouldHaveCorrectPointer() + { + var json = """ +{ + "swagger": "2.0", + "info": { + "title": "Demo", + "version": "1" + }, + "paths": {}, + "definitions": { + "demo": { + "x-tag": null + } + } +} +"""; + var settings = new OpenApiReaderSettings + { + ExtensionParsers = + { + { "x-tag", (any, version) => throw new OpenApiException("Testing") } + } + }; + + var result = OpenApiDocument.Parse(json, "json", settings); + + Assert.NotNull(result.Diagnostic); + Assert.NotEmpty(result.Diagnostic.Errors); + var error = result.Diagnostic.Errors[0]; + Assert.Equal("Testing", error.Message); + Assert.Equal("#/definitions/demo/x-tag", error.Pointer); + } + + [Theory] + [InlineData("3.0.4")] + [InlineData("3.1.1")] + public void ExtensionParserThrowingOpenApiException_V3_ShouldHaveCorrectPointer(string version) + { + var json = $$""" +{ + "openapi": "{{version}}", + "info": { + "title": "Demo", + "version": "1" + }, + "paths": {}, + "components": { + "schemas": { + "demo": { + "x-tag": null + } + } + } +} +"""; + var settings = new OpenApiReaderSettings + { + ExtensionParsers = + { + { "x-tag", (any, version) => throw new OpenApiException("Testing") } + } + }; + + var result = OpenApiDocument.Parse(json, "json", settings); + + Assert.NotNull(result.Diagnostic); + Assert.NotEmpty(result.Diagnostic.Errors); + var error = result.Diagnostic.Errors[0]; + Assert.Equal("Testing", error.Message); + Assert.Equal("#/components/schemas/demo/x-tag", error.Pointer); + } } internal class FooExtension : IOpenApiExtension, IOpenApiElement From aeffc9832f2aac1f1e65c0b6ae0a73fb10560900 Mon Sep 17 00:00:00 2001 From: "release-please-token-provider[bot]" <225477224+release-please-token-provider[bot]@users.noreply.github.com> Date: Mon, 22 Dec 2025 20:20:29 +0000 Subject: [PATCH 025/388] chore(support/v2): release 2.4.2 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ Directory.Build.props | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index adf5fd769..bd1ba1cb3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.4.1" + ".": "2.4.2" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 7414944db..b7d9b73f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [2.4.2](https://github.com/microsoft/OpenAPI.NET/compare/v2.4.1...v2.4.2) (2025-12-22) + + +### Bug Fixes + +* wrap extension parser calls in try-catch to ensure correct error pointers ([63cf4a3](https://github.com/microsoft/OpenAPI.NET/commit/63cf4a3029fe2d285a6fe2724e30ffcf3bdd2f9f)) +* wrap extension parser calls in try-catch to ensure correct error pointers ([458cabe](https://github.com/microsoft/OpenAPI.NET/commit/458cabe6cd0fbdb192dbd17f2d6ab3b8162d1166)) + ## [2.4.1](https://github.com/microsoft/OpenAPI.NET/compare/v2.4.0...v2.4.1) (2025-12-18) diff --git a/Directory.Build.props b/Directory.Build.props index 2d0fc7255..a64e378aa 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ https://github.com/Microsoft/OpenAPI.NET © Microsoft Corporation. All rights reserved. OpenAPI .NET - 2.4.1 + 2.4.2 From d0cae6626ae17cd64db584885de12cec6c80ce1f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Jan 2026 21:01:46 +0000 Subject: [PATCH 026/388] chore(deps): bump dependabot/fetch-metadata from 2.4.0 to 2.5.0 Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 2.4.0 to 2.5.0. - [Release notes](https://github.com/dependabot/fetch-metadata/releases) - [Commits](https://github.com/dependabot/fetch-metadata/compare/v2.4.0...v2.5.0) --- updated-dependencies: - dependency-name: dependabot/fetch-metadata dependency-version: 2.5.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/auto-merge-dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-merge-dependabot.yml b/.github/workflows/auto-merge-dependabot.yml index d454cd186..ba2243c97 100644 --- a/.github/workflows/auto-merge-dependabot.yml +++ b/.github/workflows/auto-merge-dependabot.yml @@ -19,7 +19,7 @@ jobs: steps: - name: Dependabot metadata id: metadata - uses: dependabot/fetch-metadata@v2.4.0 + uses: dependabot/fetch-metadata@v2.5.0 with: github-token: "${{ secrets.GITHUB_TOKEN }}" From 9792817c391be1b631a57462e0b417aa04c5f3d4 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 6 Jan 2026 08:16:45 -0500 Subject: [PATCH 027/388] docs: updates versions to clarify the ranges --- docs/upgrade-guide-3.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/upgrade-guide-3.md b/docs/upgrade-guide-3.md index e874a8998..49e467d24 100644 --- a/docs/upgrade-guide-3.md +++ b/docs/upgrade-guide-3.md @@ -11,11 +11,11 @@ We are excited to announce OpenAPI.NET v3.0! This major update introduces suppor If you are using this library with [AspNetCore OpenAPI versions](https://www.nuget.org/packages/Microsoft.AspNetCore.OpenApi) `< 10.0` then you must remain on version `1.x` as it's not compatible with version 3 or above of this library. -If you are using this library with [AspNetCore OpenAPI versions](https://www.nuget.org/packages/Microsoft.AspNetCore.OpenApi) `= 10.0` then you must remain on version `2.x` as it's not compatible with version 3 or above of this library. +If you are using this library with [AspNetCore OpenAPI versions](https://www.nuget.org/packages/Microsoft.AspNetCore.OpenApi) `= 10.X` then you must remain on version `2.x` as it's not compatible with version 3 or above of this library. If you are using this library with [Swashbuckle.AspNetCore version](https://www.nuget.org/packages/Swashbuckle.AspNetCore/) `< 10.0` then you must remain on version `1.x` as it's not compatible with version 3 or above of this library. -If you are using this library with [Swashbuckle.AspNetCore version](https://www.nuget.org/packages/Swashbuckle.AspNetCore/) `= 10.0` then you must remain on version `2.x` as it's not compatible with version 3 or above of this library. +If you are using this library with [Swashbuckle.AspNetCore version](https://www.nuget.org/packages/Swashbuckle.AspNetCore/) `= 10.X` then you must remain on version `2.x` as it's not compatible with version 3 or above of this library. The latest support policy information for this library, and integration with ASP.NET Core can be found on [the contributing documentation](https://github.com/microsoft/OpenAPI.NET/blob/main/CONTRIBUTING.md#branches-and-support-policy). From 4e4f4c6ed737bb759fce508cd2a6e8dd3c4e2084 Mon Sep 17 00:00:00 2001 From: "release-please-token-provider[bot]" <225477224+release-please-token-provider[bot]@users.noreply.github.com> Date: Tue, 6 Jan 2026 15:00:35 +0000 Subject: [PATCH 028/388] chore(main): release 3.1.2 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ Directory.Build.props | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 89c23baca..9d7db69f9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.1.1" + ".": "3.1.2" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index be4068a9a..ed99a1173 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [3.1.2](https://github.com/microsoft/OpenAPI.NET/compare/v3.1.1...v3.1.2) (2026-01-06) + + +### Bug Fixes + +* correct error pointer when extension parser throws OpenApiException ([43c75a9](https://github.com/microsoft/OpenAPI.NET/commit/43c75a90746344fcc975611100e995fe4045edf0)) +* wrap extension parser calls in try-catch to ensure correct error pointers ([50b44aa](https://github.com/microsoft/OpenAPI.NET/commit/50b44aad12d8fa86a46f7f6d62896a7b1c344d2e)) + ## [3.1.1](https://github.com/microsoft/OpenAPI.NET/compare/v3.1.0...v3.1.1) (2025-12-18) diff --git a/Directory.Build.props b/Directory.Build.props index 5aba3b052..c1b6e63d1 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ https://github.com/Microsoft/OpenAPI.NET © Microsoft Corporation. All rights reserved. OpenAPI .NET - 3.1.1 + 3.1.2 From aef319c3093837b8ebb03c77f08f18ac9ad1a85d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 21:25:18 +0000 Subject: [PATCH 029/388] chore(deps): bump dotnet-sdk from 8.0.416 to 8.0.417 Bumps [dotnet-sdk](https://github.com/dotnet/sdk) from 8.0.416 to 8.0.417. - [Release notes](https://github.com/dotnet/sdk/releases) - [Commits](https://github.com/dotnet/sdk/compare/v8.0.416...v8.0.417) --- updated-dependencies: - dependency-name: dotnet-sdk dependency-version: 8.0.417 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 3d946171e..4ca757b0e 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "8.0.416" + "version": "8.0.417" } } \ No newline at end of file From b05d54a75207f60e93592b9dc053db3ade5cbf75 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 21:25:54 +0000 Subject: [PATCH 030/388] Bump the microsoftextensions group with 6 updates Bumps Microsoft.Extensions.DependencyInjection from 10.0.1 to 10.0.2 Bumps Microsoft.Extensions.Logging from 10.0.1 to 10.0.2 Bumps Microsoft.Extensions.Logging.Abstractions from 10.0.1 to 10.0.2 Bumps Microsoft.Extensions.Logging.Console from 10.0.1 to 10.0.2 Bumps Microsoft.Extensions.Logging.Debug from 10.0.1 to 10.0.2 Bumps System.Text.Json from 10.0.1 to 10.0.2 --- updated-dependencies: - dependency-name: Microsoft.Extensions.DependencyInjection dependency-version: 10.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging dependency-version: 10.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging dependency-version: 10.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging.Abstractions dependency-version: 10.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging.Console dependency-version: 10.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: System.Text.Json dependency-version: 10.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging.Console dependency-version: 10.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging.Debug dependency-version: 10.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging.Debug dependency-version: 10.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions ... Signed-off-by: dependabot[bot] --- performance/resultsComparer/resultsComparer.csproj | 10 +++++----- .../Microsoft.OpenApi.Hidi.csproj | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/performance/resultsComparer/resultsComparer.csproj b/performance/resultsComparer/resultsComparer.csproj index aab8f01bb..248caf5fa 100644 --- a/performance/resultsComparer/resultsComparer.csproj +++ b/performance/resultsComparer/resultsComparer.csproj @@ -8,12 +8,12 @@ - - - - + + + + - + diff --git a/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj b/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj index 458972ef0..2e955f3a6 100644 --- a/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj +++ b/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj @@ -29,10 +29,10 @@ - - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all From eb07dc202cb6c4a2478f3251ee8c149808997b9f Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 14 Jan 2026 10:49:02 -0500 Subject: [PATCH 031/388] chore: aligns STJ package to avoid dependency downgrade --- .../Microsoft.OpenApi.Readers.Tests.csproj | 2 +- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj index a49f77ebd..95365132f 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj +++ b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj @@ -19,7 +19,7 @@ - + diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 6913fdd97..8792e4404 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -13,7 +13,7 @@ - + From 7610d07bd11a99a4ce1cc31338d180dbd764d952 Mon Sep 17 00:00:00 2001 From: Paul Spangler <7519484+spanglerco@users.noreply.github.com> Date: Thu, 15 Jan 2026 15:33:52 -0600 Subject: [PATCH 032/388] fix: Support custom tag ordering --- .../Models/OpenApiDocument.cs | 15 +++- .../Models/OpenApiDocumentTests.cs | 76 +++++++++++++++++++ 2 files changed, 88 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.OpenApi/Models/OpenApiDocument.cs b/src/Microsoft.OpenApi/Models/OpenApiDocument.cs index 031eadb5d..3f12efef1 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiDocument.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiDocument.cs @@ -3,6 +3,9 @@ using System; using System.Collections.Generic; +#if NET +using System.Collections.Immutable; +#endif using System.IO; using System.Linq; using System.Security.Cryptography; @@ -83,9 +86,15 @@ public ISet? Tags { return; } - _tags = value is HashSet tags && tags.Comparer is OpenApiTagComparer ? - tags : - new HashSet(value, OpenApiTagComparer.Instance); + _tags = value switch + { + HashSet tags when tags.Comparer != EqualityComparer.Default => value, + SortedSet => value, +#if NET + ImmutableSortedSet => value, +#endif + _ => new HashSet(value, OpenApiTagComparer.Instance), + }; } } diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs index 5e3644f1b..8480269d2 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs @@ -3,8 +3,11 @@ using System; using System.Collections.Generic; +using System.Collections.Immutable; +using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; +using System.Linq; using System.Net.Http; using System.Threading.Tasks; using VerifyXunit; @@ -2126,6 +2129,79 @@ public void DeduplicatesTags() Assert.Contains(document.Tags, t => t.Name == "tag2"); } + [Fact] + public void TagsSupportsCustomComparer() + { + var document = new OpenApiDocument + { + Tags = new HashSet(new CaseInsensitiveOpenApiTagEqualityComparer()), + }; + + Assert.True(document.Tags.Add(new OpenApiTag { Name = "Tag1" })); + Assert.False(document.Tags.Add(new OpenApiTag { Name = "tag1" })); + Assert.True(document.Tags.Add(new OpenApiTag { Name = "tag2" })); + Assert.False(document.Tags.Add(new OpenApiTag { Name = "TAG1" })); + Assert.Equal(2, document.Tags.Count); + } + + private sealed class CaseInsensitiveOpenApiTagEqualityComparer : IEqualityComparer + { + public bool Equals(OpenApiTag x, OpenApiTag y) + { + return string.Equals(x.Name, y.Name, StringComparison.OrdinalIgnoreCase); + } + + public int GetHashCode([DisallowNull] OpenApiTag obj) + { + return obj.Name.GetHashCode(StringComparison.OrdinalIgnoreCase); + } + } + + [Fact] + public void TagsSupportsSortedSets() + { + var document = new OpenApiDocument + { + Tags = new SortedSet(new DescendingOpenApiTagComparer()) + { + new OpenApiTag { Name = "tagB" }, + new OpenApiTag { Name = "tagA" }, + new OpenApiTag { Name = "tagC" }, + } + }; + + var names = document.Tags.Select(t => t.Name); + Assert.Equal(["tagC", "tagB", "tagA"], names); + Assert.IsType>(document.Tags); + } + + private sealed class DescendingOpenApiTagComparer : IComparer + { + public int Compare(OpenApiTag x, OpenApiTag y) + { + return string.Compare(y?.Name, x?.Name, StringComparison.Ordinal); + } + } + + [Fact] + public void TagsSupportsImmutableSortedSets() + { + var document = new OpenApiDocument + { + Tags = ImmutableSortedSet.Create( + new DescendingOpenApiTagComparer(), + [ + new OpenApiTag { Name = "tagB" }, + new OpenApiTag { Name = "tagA" }, + new OpenApiTag { Name = "tagC" }, + ]), + }; + + var names = document.Tags.Select(t => t.Name); + Assert.Equal(["tagC", "tagB", "tagA"], names); + Assert.IsType>(document.Tags); + } + public static TheoryData OpenApiSpecVersions() { var values = new TheoryData(); From 0def7871a31cb81488f55a3e62d11e86865c18d5 Mon Sep 17 00:00:00 2001 From: "release-please-token-provider[bot]" <225477224+release-please-token-provider[bot]@users.noreply.github.com> Date: Fri, 16 Jan 2026 17:38:14 +0000 Subject: [PATCH 033/388] chore(support/v2): release 2.4.3 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ Directory.Build.props | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bd1ba1cb3..2b7962cdd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.4.2" + ".": "2.4.3" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b7d9b73f6..457ff02e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [2.4.3](https://github.com/microsoft/OpenAPI.NET/compare/v2.4.2...v2.4.3) (2026-01-16) + + +### Bug Fixes + +* Support custom tag ordering ([008576c](https://github.com/microsoft/OpenAPI.NET/commit/008576c31f8dcecf59363c9c2f85d691601faa73)) +* Support custom tag ordering ([7610d07](https://github.com/microsoft/OpenAPI.NET/commit/7610d07bd11a99a4ce1cc31338d180dbd764d952)) + ## [2.4.2](https://github.com/microsoft/OpenAPI.NET/compare/v2.4.1...v2.4.2) (2025-12-22) diff --git a/Directory.Build.props b/Directory.Build.props index a64e378aa..7b6a763dc 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ https://github.com/Microsoft/OpenAPI.NET © Microsoft Corporation. All rights reserved. OpenAPI .NET - 2.4.2 + 2.4.3 From 3e44113d0f7e02382a635d22b6df10e03f20e985 Mon Sep 17 00:00:00 2001 From: "release-please-token-provider[bot]" <225477224+release-please-token-provider[bot]@users.noreply.github.com> Date: Fri, 16 Jan 2026 17:58:17 +0000 Subject: [PATCH 034/388] chore(main): release 3.1.3 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ Directory.Build.props | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9d7db69f9..534c8ff8b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.1.2" + ".": "3.1.3" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fc036d34..44e6eba95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [3.1.3](https://github.com/microsoft/OpenAPI.NET/compare/v3.1.2...v3.1.3) (2026-01-16) + + +### Bug Fixes + +* Support custom tag ordering ([008576c](https://github.com/microsoft/OpenAPI.NET/commit/008576c31f8dcecf59363c9c2f85d691601faa73)) +* Support custom tag ordering ([7610d07](https://github.com/microsoft/OpenAPI.NET/commit/7610d07bd11a99a4ce1cc31338d180dbd764d952)) + ## [3.1.2](https://github.com/microsoft/OpenAPI.NET/compare/v3.1.1...v3.1.2) (2026-01-06) ### Bug Fixes diff --git a/Directory.Build.props b/Directory.Build.props index c1b6e63d1..b0681cf72 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ https://github.com/Microsoft/OpenAPI.NET © Microsoft Corporation. All rights reserved. OpenAPI .NET - 3.1.2 + 3.1.3 From d2a6719fedf7e9f0ea6ea4484b723a7d39d41424 Mon Sep 17 00:00:00 2001 From: Steven Yeh Date: Fri, 16 Jan 2026 19:32:14 -0600 Subject: [PATCH 035/388] Fix Typo in IOpenApiReadOnlyExtensible.cs --- src/Microsoft.OpenApi/Interfaces/IOpenApiReadOnlyExtensible.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.OpenApi/Interfaces/IOpenApiReadOnlyExtensible.cs b/src/Microsoft.OpenApi/Interfaces/IOpenApiReadOnlyExtensible.cs index fac742d7d..c059842c0 100644 --- a/src/Microsoft.OpenApi/Interfaces/IOpenApiReadOnlyExtensible.cs +++ b/src/Microsoft.OpenApi/Interfaces/IOpenApiReadOnlyExtensible.cs @@ -3,7 +3,7 @@ namespace Microsoft.OpenApi; /// -/// Represents an Extensible Open API element elements can be rad from. +/// Represents an Extensible Open API element elements can be read from. /// public interface IOpenApiReadOnlyExtensible { From e38e511de5c90a4e73868cb292a2fff7cd7071a4 Mon Sep 17 00:00:00 2001 From: Steven Yeh Date: Fri, 16 Jan 2026 19:32:14 -0600 Subject: [PATCH 036/388] Fix Typo in IOpenApiReadOnlyExtensible.cs --- src/Microsoft.OpenApi/Interfaces/IOpenApiReadOnlyExtensible.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.OpenApi/Interfaces/IOpenApiReadOnlyExtensible.cs b/src/Microsoft.OpenApi/Interfaces/IOpenApiReadOnlyExtensible.cs index fac742d7d..c059842c0 100644 --- a/src/Microsoft.OpenApi/Interfaces/IOpenApiReadOnlyExtensible.cs +++ b/src/Microsoft.OpenApi/Interfaces/IOpenApiReadOnlyExtensible.cs @@ -3,7 +3,7 @@ namespace Microsoft.OpenApi; /// -/// Represents an Extensible Open API element elements can be rad from. +/// Represents an Extensible Open API element elements can be read from. /// public interface IOpenApiReadOnlyExtensible { From a8fb81cf9524a3f2f721aa808db244434e1cd177 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 19 Jan 2026 11:15:25 -0500 Subject: [PATCH 037/388] fix: discriminator property validation fails any/allOf cases when it shouldn't Signed-off-by: Vincent Biret --- .../Validations/Rules/OpenApiSchemaRules.cs | 41 ++++---- .../PublicApi/PublicApi.approved.txt | 4 + .../OpenApiSchemaValidationTests.cs | 99 ++++++++++++++++++- 3 files changed, 126 insertions(+), 18 deletions(-) diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiSchemaRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiSchemaRules.cs index 70d558a13..4f2a122a9 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiSchemaRules.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiSchemaRules.cs @@ -5,6 +5,8 @@ namespace Microsoft.OpenApi { + using System; + using System.ComponentModel; using System.Linq; /// @@ -48,6 +50,7 @@ public static class OpenApiSchemaRules { var discriminatorName = schema.Discriminator?.PropertyName; +#pragma warning disable CS0618 // Type or member is obsolete if (!ValidateChildSchemaAgainstDiscriminator(schema, discriminatorName)) { context.Enter("discriminator"); @@ -56,6 +59,7 @@ public static class OpenApiSchemaRules schema is OpenApiSchemaReference { Reference: not null} schemaReference ? schemaReference.Reference.Id : string.Empty, discriminatorName)); context.Exit(); } +#pragma warning restore CS0618 // Type or member is obsolete } }); @@ -65,6 +69,8 @@ public static class OpenApiSchemaRules /// The parent schema. /// Adds support for polymorphism. The discriminator is an object name that is used to differentiate /// between other schemas which may satisfy the payload description. + [Obsolete("This method will be made private in future versions.")] + [Browsable(false)] public static bool ValidateChildSchemaAgainstDiscriminator(IOpenApiSchema schema, string? discriminatorName) { if (discriminatorName is not null) @@ -72,15 +78,15 @@ public static bool ValidateChildSchemaAgainstDiscriminator(IOpenApiSchema schema if (schema.Required is null || !schema.Required.Contains(discriminatorName)) { // recursively check nested schema.OneOf, schema.AnyOf or schema.AllOf and their required fields for the discriminator - if (schema.OneOf?.Count != 0) + if (schema.OneOf is { Count: > 0}) { return TraverseSchemaElements(discriminatorName, schema.OneOf); } - if (schema.AnyOf?.Count != 0) + if (schema.AnyOf is { Count: > 0}) { return TraverseSchemaElements(discriminatorName, schema.AnyOf); } - if (schema.AllOf?.Count != 0) + if (schema.AllOf is { Count: > 0}) { return TraverseSchemaElements(discriminatorName, schema.AllOf); } @@ -102,25 +108,26 @@ public static bool ValidateChildSchemaAgainstDiscriminator(IOpenApiSchema schema /// between other schemas which may satisfy the payload description. /// The child schema. /// + [Obsolete("This method will be made private in future versions.")] + [Browsable(false)] public static bool TraverseSchemaElements(string discriminatorName, IList? childSchema) { - if (childSchema is not null) + if (childSchema is null) { - foreach (var childItem in childSchema) + return false; + } + foreach (var childItem in childSchema) + { + if ((!childItem.Properties?.ContainsKey(discriminatorName) ?? false) && + (!childItem.Required?.Contains(discriminatorName) ?? false)) { - if ((!childItem.Properties?.ContainsKey(discriminatorName) ?? false) && - (!childItem.Required?.Contains(discriminatorName) ?? false)) - { - return ValidateChildSchemaAgainstDiscriminator(childItem, discriminatorName); - } - else - { - return true; - } + return ValidateChildSchemaAgainstDiscriminator(childItem, discriminatorName); } - return false; - } - + else + { + return true; + } + } return false; } } diff --git a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt index 1446cb8d7..6a8ad3955 100644 --- a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt +++ b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt @@ -1352,7 +1352,11 @@ namespace Microsoft.OpenApi { public static Microsoft.OpenApi.ValidationRule ValidateSchemaDiscriminator { get; } public static Microsoft.OpenApi.ValidationRule ValidateSchemaPropertyHasValue { get; } + [System.ComponentModel.Browsable(false)] + [System.Obsolete("This method will be made private in future versions.")] public static bool TraverseSchemaElements(string discriminatorName, System.Collections.Generic.IList? childSchema) { } + [System.ComponentModel.Browsable(false)] + [System.Obsolete("This method will be made private in future versions.")] public static bool ValidateChildSchemaAgainstDiscriminator(Microsoft.OpenApi.IOpenApiSchema schema, string? discriminatorName) { } } public class OpenApiSecurityRequirement : System.Collections.Generic.Dictionary>, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiSerializable diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiSchemaValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiSchemaValidationTests.cs index f22806825..fdf36e0b4 100644 --- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiSchemaValidationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiSchemaValidationTests.cs @@ -246,7 +246,7 @@ public void ValidateSchemaRequiredFieldListMustContainThePropertySpecifiedInTheD } [Fact] - public void ValidateOneOfSchemaPropertyNameContainsPropertySpecifiedInTheDiscriminator() + public void ValidateOneOfSchemaPropertyNameContainsPropertySpecifiedInTheDiscriminatorOneOf() { // Arrange var components = new OpenApiComponents @@ -293,5 +293,102 @@ public void ValidateOneOfSchemaPropertyNameContainsPropertySpecifiedInTheDiscrim //Assert Assert.Empty(errors); } + + [Fact] + public void ValidateOneOfSchemaPropertyNameContainsPropertySpecifiedInTheDiscriminatorAnyOf() + { + // Arrange + var components = new OpenApiComponents + { + Schemas = new Dictionary + { + { + "Person", + new OpenApiSchema + { + Type = JsonSchemaType.Array, + Discriminator = new() + { + PropertyName = "type" + }, + AnyOf = + [ + new OpenApiSchema() + { + Properties = new Dictionary + { + { + "type", + new OpenApiSchema + { + Type = JsonSchemaType.Array + } + } + }, + } + ], + } + } + } + }; + + // Act + var validator = new OpenApiValidator(ValidationRuleSet.GetDefaultRuleSet()); + var walker = new OpenApiWalker(validator); + walker.Walk(components); + + var errors = validator.Errors; + + //Assert + Assert.Empty(errors); + } + [Fact] + public void ValidateOneOfSchemaPropertyNameContainsPropertySpecifiedInTheDiscriminatorAllOf() + { + // Arrange + var components = new OpenApiComponents + { + Schemas = new Dictionary + { + { + "Person", + new OpenApiSchema + { + Type = JsonSchemaType.Array, + Discriminator = new() + { + PropertyName = "type" + }, + AllOf = + [ + new OpenApiSchema() + { + Properties = new Dictionary + { + { + "type", + new OpenApiSchema + { + Type = JsonSchemaType.Array + } + } + }, + } + ], + } + } + } + }; + + // Act + var validator = new OpenApiValidator(ValidationRuleSet.GetDefaultRuleSet()); + var walker = new OpenApiWalker(validator); + walker.Walk(components); + + var errors = validator.Errors; + + //Assert + Assert.Empty(errors); + } } } From 7def73d774d1f0e96118e92b636e52cbea371f2d Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 19 Jan 2026 11:15:25 -0500 Subject: [PATCH 038/388] fix: discriminator property validation fails any/allOf cases when it shouldn't Signed-off-by: Vincent Biret --- .../Validations/Rules/OpenApiSchemaRules.cs | 41 ++++---- .../PublicApi/PublicApi.approved.txt | 4 + .../OpenApiSchemaValidationTests.cs | 99 ++++++++++++++++++- 3 files changed, 126 insertions(+), 18 deletions(-) diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiSchemaRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiSchemaRules.cs index 70d558a13..4f2a122a9 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiSchemaRules.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiSchemaRules.cs @@ -5,6 +5,8 @@ namespace Microsoft.OpenApi { + using System; + using System.ComponentModel; using System.Linq; /// @@ -48,6 +50,7 @@ public static class OpenApiSchemaRules { var discriminatorName = schema.Discriminator?.PropertyName; +#pragma warning disable CS0618 // Type or member is obsolete if (!ValidateChildSchemaAgainstDiscriminator(schema, discriminatorName)) { context.Enter("discriminator"); @@ -56,6 +59,7 @@ public static class OpenApiSchemaRules schema is OpenApiSchemaReference { Reference: not null} schemaReference ? schemaReference.Reference.Id : string.Empty, discriminatorName)); context.Exit(); } +#pragma warning restore CS0618 // Type or member is obsolete } }); @@ -65,6 +69,8 @@ public static class OpenApiSchemaRules /// The parent schema. /// Adds support for polymorphism. The discriminator is an object name that is used to differentiate /// between other schemas which may satisfy the payload description. + [Obsolete("This method will be made private in future versions.")] + [Browsable(false)] public static bool ValidateChildSchemaAgainstDiscriminator(IOpenApiSchema schema, string? discriminatorName) { if (discriminatorName is not null) @@ -72,15 +78,15 @@ public static bool ValidateChildSchemaAgainstDiscriminator(IOpenApiSchema schema if (schema.Required is null || !schema.Required.Contains(discriminatorName)) { // recursively check nested schema.OneOf, schema.AnyOf or schema.AllOf and their required fields for the discriminator - if (schema.OneOf?.Count != 0) + if (schema.OneOf is { Count: > 0}) { return TraverseSchemaElements(discriminatorName, schema.OneOf); } - if (schema.AnyOf?.Count != 0) + if (schema.AnyOf is { Count: > 0}) { return TraverseSchemaElements(discriminatorName, schema.AnyOf); } - if (schema.AllOf?.Count != 0) + if (schema.AllOf is { Count: > 0}) { return TraverseSchemaElements(discriminatorName, schema.AllOf); } @@ -102,25 +108,26 @@ public static bool ValidateChildSchemaAgainstDiscriminator(IOpenApiSchema schema /// between other schemas which may satisfy the payload description. /// The child schema. /// + [Obsolete("This method will be made private in future versions.")] + [Browsable(false)] public static bool TraverseSchemaElements(string discriminatorName, IList? childSchema) { - if (childSchema is not null) + if (childSchema is null) { - foreach (var childItem in childSchema) + return false; + } + foreach (var childItem in childSchema) + { + if ((!childItem.Properties?.ContainsKey(discriminatorName) ?? false) && + (!childItem.Required?.Contains(discriminatorName) ?? false)) { - if ((!childItem.Properties?.ContainsKey(discriminatorName) ?? false) && - (!childItem.Required?.Contains(discriminatorName) ?? false)) - { - return ValidateChildSchemaAgainstDiscriminator(childItem, discriminatorName); - } - else - { - return true; - } + return ValidateChildSchemaAgainstDiscriminator(childItem, discriminatorName); } - return false; - } - + else + { + return true; + } + } return false; } } diff --git a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt index 39cfb8ccc..d0b8989ef 100644 --- a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt +++ b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt @@ -1261,7 +1261,11 @@ namespace Microsoft.OpenApi { public static Microsoft.OpenApi.ValidationRule ValidateSchemaDiscriminator { get; } public static Microsoft.OpenApi.ValidationRule ValidateSchemaPropertyHasValue { get; } + [System.ComponentModel.Browsable(false)] + [System.Obsolete("This method will be made private in future versions.")] public static bool TraverseSchemaElements(string discriminatorName, System.Collections.Generic.IList? childSchema) { } + [System.ComponentModel.Browsable(false)] + [System.Obsolete("This method will be made private in future versions.")] public static bool ValidateChildSchemaAgainstDiscriminator(Microsoft.OpenApi.IOpenApiSchema schema, string? discriminatorName) { } } public class OpenApiSecurityRequirement : System.Collections.Generic.Dictionary>, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiSerializable diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiSchemaValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiSchemaValidationTests.cs index f22806825..fdf36e0b4 100644 --- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiSchemaValidationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiSchemaValidationTests.cs @@ -246,7 +246,7 @@ public void ValidateSchemaRequiredFieldListMustContainThePropertySpecifiedInTheD } [Fact] - public void ValidateOneOfSchemaPropertyNameContainsPropertySpecifiedInTheDiscriminator() + public void ValidateOneOfSchemaPropertyNameContainsPropertySpecifiedInTheDiscriminatorOneOf() { // Arrange var components = new OpenApiComponents @@ -293,5 +293,102 @@ public void ValidateOneOfSchemaPropertyNameContainsPropertySpecifiedInTheDiscrim //Assert Assert.Empty(errors); } + + [Fact] + public void ValidateOneOfSchemaPropertyNameContainsPropertySpecifiedInTheDiscriminatorAnyOf() + { + // Arrange + var components = new OpenApiComponents + { + Schemas = new Dictionary + { + { + "Person", + new OpenApiSchema + { + Type = JsonSchemaType.Array, + Discriminator = new() + { + PropertyName = "type" + }, + AnyOf = + [ + new OpenApiSchema() + { + Properties = new Dictionary + { + { + "type", + new OpenApiSchema + { + Type = JsonSchemaType.Array + } + } + }, + } + ], + } + } + } + }; + + // Act + var validator = new OpenApiValidator(ValidationRuleSet.GetDefaultRuleSet()); + var walker = new OpenApiWalker(validator); + walker.Walk(components); + + var errors = validator.Errors; + + //Assert + Assert.Empty(errors); + } + [Fact] + public void ValidateOneOfSchemaPropertyNameContainsPropertySpecifiedInTheDiscriminatorAllOf() + { + // Arrange + var components = new OpenApiComponents + { + Schemas = new Dictionary + { + { + "Person", + new OpenApiSchema + { + Type = JsonSchemaType.Array, + Discriminator = new() + { + PropertyName = "type" + }, + AllOf = + [ + new OpenApiSchema() + { + Properties = new Dictionary + { + { + "type", + new OpenApiSchema + { + Type = JsonSchemaType.Array + } + } + }, + } + ], + } + } + } + }; + + // Act + var validator = new OpenApiValidator(ValidationRuleSet.GetDefaultRuleSet()); + var walker = new OpenApiWalker(validator); + walker.Walk(components); + + var errors = validator.Errors; + + //Assert + Assert.Empty(errors); + } } } From 62e7d56ac0863875999240d68a2766d2cc2d594c Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 19 Jan 2026 13:13:05 -0500 Subject: [PATCH 039/388] feat: hidi validate command now logs warnings Signed-off-by: Vincent Biret --- src/Microsoft.OpenApi.Hidi/OpenApiService.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.OpenApi.Hidi/OpenApiService.cs b/src/Microsoft.OpenApi.Hidi/OpenApiService.cs index 48f1d1c3e..a494b4f2e 100644 --- a/src/Microsoft.OpenApi.Hidi/OpenApiService.cs +++ b/src/Microsoft.OpenApi.Hidi/OpenApiService.cs @@ -398,6 +398,7 @@ private static async Task ParseOpenApiAsync(string openApiFile, bool logger.LogTrace("{Timestamp}ms: Completed parsing.", stopwatch.ElapsedMilliseconds); LogErrors(logger, result); + LogWarnings(logger, result); stopwatch.Stop(); } @@ -652,7 +653,7 @@ private static string GetInputPathExtension(string? openapi = null, string? csdl private static void LogErrors(ILogger logger, ReadResult result) { var context = result.Diagnostic; - if (context is not null && context.Errors.Count != 0) + if (context is { Errors.Count: > 0 }) { using (logger.BeginScope("Detected errors")) { @@ -664,6 +665,21 @@ private static void LogErrors(ILogger logger, ReadResult result) } } + private static void LogWarnings(ILogger logger, ReadResult result) + { + var context = result.Diagnostic; + if (context is { Warnings.Count: > 0 }) + { + using (logger.BeginScope("Detected warnings")) + { + foreach (var warning in context.Warnings) + { + logger.LogWarning("Detected warning during parsing: {Warning}", warning.ToString()); + } + } + } + } + internal static void WriteTreeDocumentAsMarkdown(string openapiUrl, OpenApiDocument document, StreamWriter writer) { var rootNode = OpenApiUrlTreeNode.Create(document, "main"); From 18ed5acce9661639e1698f19c194e520eb5c93c1 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 19 Jan 2026 13:13:05 -0500 Subject: [PATCH 040/388] feat: hidi validate command now logs warnings Signed-off-by: Vincent Biret --- src/Microsoft.OpenApi.Hidi/OpenApiService.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.OpenApi.Hidi/OpenApiService.cs b/src/Microsoft.OpenApi.Hidi/OpenApiService.cs index 797ec2359..b35cc2cbb 100644 --- a/src/Microsoft.OpenApi.Hidi/OpenApiService.cs +++ b/src/Microsoft.OpenApi.Hidi/OpenApiService.cs @@ -398,6 +398,7 @@ private static async Task ParseOpenApiAsync(string openApiFile, bool logger.LogTrace("{Timestamp}ms: Completed parsing.", stopwatch.ElapsedMilliseconds); LogErrors(logger, result); + LogWarnings(logger, result); stopwatch.Stop(); } @@ -652,7 +653,7 @@ private static string GetInputPathExtension(string? openapi = null, string? csdl private static void LogErrors(ILogger logger, ReadResult result) { var context = result.Diagnostic; - if (context is not null && context.Errors.Count != 0) + if (context is { Errors.Count: > 0 }) { using (logger.BeginScope("Detected errors")) { @@ -664,6 +665,21 @@ private static void LogErrors(ILogger logger, ReadResult result) } } + private static void LogWarnings(ILogger logger, ReadResult result) + { + var context = result.Diagnostic; + if (context is { Warnings.Count: > 0 }) + { + using (logger.BeginScope("Detected warnings")) + { + foreach (var warning in context.Warnings) + { + logger.LogWarning("Detected warning during parsing: {Warning}", warning.ToString()); + } + } + } + } + internal static void WriteTreeDocumentAsMarkdown(string openapiUrl, OpenApiDocument document, StreamWriter writer) { var rootNode = OpenApiUrlTreeNode.Create(document, "main"); From 686ca47a0c533cde12f51ef55c843a6c85cf8b7a Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 19 Jan 2026 13:26:59 -0500 Subject: [PATCH 041/388] docs: adds missing mention of references resolution in the upgrade guide Signed-off-by: Vincent Biret --- docs/upgrade-guide-2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/upgrade-guide-2.md b/docs/upgrade-guide-2.md index 14eaacdf0..752b60c95 100644 --- a/docs/upgrade-guide-2.md +++ b/docs/upgrade-guide-2.md @@ -32,7 +32,7 @@ One of the key features of OpenAPI.NET is its performance. This version makes it In v1, instances of `$ref` were resolved in a second pass of the document to ensure the target of the reference has been parsed before attempting to resolve it. In v2, reference targets are lazily resolved when reference objects are accessed. This improves load time performance for documents that make heavy use of references. -[How does this change the behavior of external references?] +Because references are lazily loaded and depend on the workspace context, loading a document with unresolved references (internal or external) does not lead to an exception being thrown anymore. Instead warnings are logged in the diagnostics object. This gives you an opportunity to load additional documents in the workspace if needed, [more information](#component-registration-in-a-documents-workspace). ### Results From f09ce7915b3a43d18b68a9d155d2a838a71833fc Mon Sep 17 00:00:00 2001 From: "release-please-token-provider[bot]" <225477224+release-please-token-provider[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 18:59:57 +0000 Subject: [PATCH 042/388] chore(support/v2): release 2.5.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 14 ++++++++++++++ Directory.Build.props | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2b7962cdd..4dedeaebc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.4.3" + ".": "2.5.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 457ff02e5..3098a8f17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [2.5.0](https://github.com/microsoft/OpenAPI.NET/compare/v2.4.3...v2.5.0) (2026-01-19) + + +### Features + +* hidi validate command now logs warnings ([1d3d085](https://github.com/microsoft/OpenAPI.NET/commit/1d3d085e0278d9341d7bd10065eba584cb25773c)) +* hidi validate command now logs warnings ([18ed5ac](https://github.com/microsoft/OpenAPI.NET/commit/18ed5acce9661639e1698f19c194e520eb5c93c1)) + + +### Bug Fixes + +* discriminator property validation fails any/allOf cases when it shouldn't ([ff6e411](https://github.com/microsoft/OpenAPI.NET/commit/ff6e4115dcab8c893bbc6b97639fd620b50f105e)) +* discriminator property validation fails any/allOf cases when it shouldn't ([7def73d](https://github.com/microsoft/OpenAPI.NET/commit/7def73d774d1f0e96118e92b636e52cbea371f2d)) + ## [2.4.3](https://github.com/microsoft/OpenAPI.NET/compare/v2.4.2...v2.4.3) (2026-01-16) diff --git a/Directory.Build.props b/Directory.Build.props index 7b6a763dc..a4b8c77a1 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ https://github.com/Microsoft/OpenAPI.NET © Microsoft Corporation. All rights reserved. OpenAPI .NET - 2.4.3 + 2.5.0 From b0dbb301261a50a0ebe8e47b7680739cd6d024f4 Mon Sep 17 00:00:00 2001 From: "release-please-token-provider[bot]" <225477224+release-please-token-provider[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 19:00:33 +0000 Subject: [PATCH 043/388] chore(main): release 3.2.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 14 ++++++++++++++ Directory.Build.props | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 534c8ff8b..1f73031b8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.1.3" + ".": "3.2.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 44e6eba95..a863b9118 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [3.2.0](https://github.com/microsoft/OpenAPI.NET/compare/v3.1.3...v3.2.0) (2026-01-19) + + +### Features + +* hidi validate command now logs warnings ([76a3c0f](https://github.com/microsoft/OpenAPI.NET/commit/76a3c0fe33a6c953263d9d91669b2f1bab562a79)) +* hidi validate command now logs warnings ([62e7d56](https://github.com/microsoft/OpenAPI.NET/commit/62e7d56ac0863875999240d68a2766d2cc2d594c)) + + +### Bug Fixes + +* discriminator property validation fails any/allOf cases when it shouldn't ([fb6cecc](https://github.com/microsoft/OpenAPI.NET/commit/fb6cecccafd5713bc1eb22e0cf07619cf495ebb5)) +* discriminator property validation fails any/allOf cases when it shouldn't ([a8fb81c](https://github.com/microsoft/OpenAPI.NET/commit/a8fb81cf9524a3f2f721aa808db244434e1cd177)) + ## [3.1.3](https://github.com/microsoft/OpenAPI.NET/compare/v3.1.2...v3.1.3) (2026-01-16) diff --git a/Directory.Build.props b/Directory.Build.props index b0681cf72..028c4e6c5 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ https://github.com/Microsoft/OpenAPI.NET © Microsoft Corporation. All rights reserved. OpenAPI .NET - 3.1.3 + 3.2.0 From a4efdfe43ee310fba4bb643d9fd28ce92da32338 Mon Sep 17 00:00:00 2001 From: mdaneri Date: Wed, 21 Jan 2026 07:41:01 -0800 Subject: [PATCH 044/388] Support mutualTLS security scheme type (#2696) feat(models): support mutualTLS security scheme * fix(writers): throw for mutualTLS in OAS 3.0 --- .../Models/OpenApiSecurityScheme.cs | 16 ++++++++++++++++ .../Models/SecuritySchemeType.cs | 7 ++++++- .../V32Tests/OpenApiSecuritySchemeTests.cs | 19 +++++++++++++++++++ .../mutualTlsSecurityScheme.yaml | 2 ++ .../Models/OpenApiSecuritySchemeTests.cs | 19 +++++++++++++++++++ .../PublicApi/PublicApi.approved.txt | 2 ++ 6 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 test/Microsoft.OpenApi.Readers.Tests/V32Tests/Samples/OpenApiSecurityScheme/mutualTlsSecurityScheme.yaml diff --git a/src/Microsoft.OpenApi/Models/OpenApiSecurityScheme.cs b/src/Microsoft.OpenApi/Models/OpenApiSecurityScheme.cs index 4bee59619..57603e0aa 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiSecurityScheme.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiSecurityScheme.cs @@ -126,6 +126,14 @@ private void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version // openIdConnectUrl writer.WriteProperty(OpenApiConstants.OpenIdConnectUrl, OpenIdConnectUrl?.ToString()); break; + case SecuritySchemeType.MutualTLS: + // No additional properties for mutualTLS + if (version < OpenApiSpecVersion.OpenApi3_1) + { + // mutualTLS is introduced in OpenAPI 3.1 + throw new OpenApiException($"mutualTLS security scheme is only supported in OpenAPI 3.1 and later versions. Current version: {version}"); + } + break; } // deprecated - serialize as native field for v3.2+ or as extension for earlier versions @@ -170,6 +178,14 @@ public virtual void SerializeAsV2(IOpenApiWriter writer) return; } + if (Type == SecuritySchemeType.MutualTLS) + { + // Bail because V2 does not support mutualTLS + writer.WriteStartObject(); + writer.WriteEndObject(); + return; + } + writer.WriteStartObject(); // type diff --git a/src/Microsoft.OpenApi/Models/SecuritySchemeType.cs b/src/Microsoft.OpenApi/Models/SecuritySchemeType.cs index 6c304597a..5640caa9a 100644 --- a/src/Microsoft.OpenApi/Models/SecuritySchemeType.cs +++ b/src/Microsoft.OpenApi/Models/SecuritySchemeType.cs @@ -26,6 +26,11 @@ public enum SecuritySchemeType /// /// Use OAuth2 with OpenId Connect URL to discover OAuth2 configuration value. /// - [Display("openIdConnect")] OpenIdConnect + [Display("openIdConnect")] OpenIdConnect, + + /// + /// Use mutual TLS authentication. + /// + [Display("mutualTLS")] MutualTLS } } diff --git a/test/Microsoft.OpenApi.Readers.Tests/V32Tests/OpenApiSecuritySchemeTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V32Tests/OpenApiSecuritySchemeTests.cs index e053d7405..ea0937237 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V32Tests/OpenApiSecuritySchemeTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V32Tests/OpenApiSecuritySchemeTests.cs @@ -102,6 +102,25 @@ public async Task ParseOpenIdConnectSecuritySchemeShouldSucceed() }, securityScheme); } + [Fact] + public async Task ParseMutualTlsSecuritySchemeShouldSucceed() + { + // Act + var securityScheme = await OpenApiModelFactory.LoadAsync( + Path.Combine(SampleFolderPath, "mutualTlsSecurityScheme.yaml"), + OpenApiSpecVersion.OpenApi3_2, + new(), + SettingsFixture.ReaderSettings); + + // Assert + Assert.Equivalent( + new OpenApiSecurityScheme + { + Type = SecuritySchemeType.MutualTLS, + Description = "Sample Description" + }, securityScheme); + } + [Fact] public async Task ParseOAuth2SecuritySchemeWithDeviceAuthorizationUrlShouldSucceed() { diff --git a/test/Microsoft.OpenApi.Readers.Tests/V32Tests/Samples/OpenApiSecurityScheme/mutualTlsSecurityScheme.yaml b/test/Microsoft.OpenApi.Readers.Tests/V32Tests/Samples/OpenApiSecurityScheme/mutualTlsSecurityScheme.yaml new file mode 100644 index 000000000..72b4e9ae8 --- /dev/null +++ b/test/Microsoft.OpenApi.Readers.Tests/V32Tests/Samples/OpenApiSecurityScheme/mutualTlsSecurityScheme.yaml @@ -0,0 +1,2 @@ +type: mutualTLS +description: Sample Description diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.cs index 1432d07cc..cd8499b9f 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.cs @@ -101,6 +101,12 @@ public class OpenApiSecuritySchemeTests OpenIdConnectUrl = new("https://example.com/openIdConnect") }; + private static OpenApiSecurityScheme MutualTlsSecurityScheme => new() + { + Description = "description1", + Type = SecuritySchemeType.MutualTLS + }; + private static OpenApiSecuritySchemeReference OpenApiSecuritySchemeReference => new("sampleSecurityScheme"); private static OpenApiSecurityScheme ReferencedSecurityScheme => new() { @@ -208,6 +214,19 @@ public async Task SerializeHttpBearerSecuritySchemeAsV3JsonWorks() Assert.Equal(expected, actual); } + [Fact] + public void SerializeMutualTlsSecuritySchemeAsV3Throws() + { + // Arrange + var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture); + var writer = new OpenApiJsonWriter(outputStringWriter); + + // Act & Assert + var exception = Assert.Throws(() => MutualTlsSecurityScheme.SerializeAsV3(writer)); + Assert.Contains("mutualTLS security scheme is only supported in OpenAPI 3.1 and later versions", exception.Message); + Assert.Contains($"Current version: {OpenApiSpecVersion.OpenApi3_0}", exception.Message); + } + [Fact] public async Task SerializeOAuthSingleFlowSecuritySchemeAsV3JsonWorks() { diff --git a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt index 6a8ad3955..59f1bce31 100644 --- a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt +++ b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt @@ -1933,6 +1933,8 @@ namespace Microsoft.OpenApi OAuth2 = 2, [Microsoft.OpenApi.Display("openIdConnect")] OpenIdConnect = 3, + [Microsoft.OpenApi.Display("mutualTLS")] + MutualTLS = 4, } public abstract class SourceExpression : Microsoft.OpenApi.RuntimeExpression { From f9cf5b807d71c49e5bd7e2bec97f12d3b50ca180 Mon Sep 17 00:00:00 2001 From: mdaneri Date: Wed, 21 Jan 2026 07:41:01 -0800 Subject: [PATCH 045/388] Support mutualTLS security scheme type (#2696) feat(models): support mutualTLS security scheme * fix(writers): throw for mutualTLS in OAS 3.0 --- .../Models/OpenApiSecurityScheme.cs | 16 ++++++++++++++++ .../Models/SecuritySchemeType.cs | 7 ++++++- .../mutualTlsSecurityScheme.yaml | 2 ++ .../Models/OpenApiSecuritySchemeTests.cs | 19 +++++++++++++++++++ .../PublicApi/PublicApi.approved.txt | 2 ++ 5 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 test/Microsoft.OpenApi.Readers.Tests/V32Tests/Samples/OpenApiSecurityScheme/mutualTlsSecurityScheme.yaml diff --git a/src/Microsoft.OpenApi/Models/OpenApiSecurityScheme.cs b/src/Microsoft.OpenApi/Models/OpenApiSecurityScheme.cs index 7d82f3219..50c2ba545 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiSecurityScheme.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiSecurityScheme.cs @@ -115,6 +115,14 @@ private void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version // openIdConnectUrl writer.WriteProperty(OpenApiConstants.OpenIdConnectUrl, OpenIdConnectUrl?.ToString()); break; + case SecuritySchemeType.MutualTLS: + // No additional properties for mutualTLS + if (version < OpenApiSpecVersion.OpenApi3_1) + { + // mutualTLS is introduced in OpenAPI 3.1 + throw new OpenApiException($"mutualTLS security scheme is only supported in OpenAPI 3.1 and later versions. Current version: {version}"); + } + break; } // extensions @@ -146,6 +154,14 @@ public virtual void SerializeAsV2(IOpenApiWriter writer) return; } + if (Type == SecuritySchemeType.MutualTLS) + { + // Bail because V2 does not support mutualTLS + writer.WriteStartObject(); + writer.WriteEndObject(); + return; + } + writer.WriteStartObject(); // type diff --git a/src/Microsoft.OpenApi/Models/SecuritySchemeType.cs b/src/Microsoft.OpenApi/Models/SecuritySchemeType.cs index 6c304597a..5640caa9a 100644 --- a/src/Microsoft.OpenApi/Models/SecuritySchemeType.cs +++ b/src/Microsoft.OpenApi/Models/SecuritySchemeType.cs @@ -26,6 +26,11 @@ public enum SecuritySchemeType /// /// Use OAuth2 with OpenId Connect URL to discover OAuth2 configuration value. /// - [Display("openIdConnect")] OpenIdConnect + [Display("openIdConnect")] OpenIdConnect, + + /// + /// Use mutual TLS authentication. + /// + [Display("mutualTLS")] MutualTLS } } diff --git a/test/Microsoft.OpenApi.Readers.Tests/V32Tests/Samples/OpenApiSecurityScheme/mutualTlsSecurityScheme.yaml b/test/Microsoft.OpenApi.Readers.Tests/V32Tests/Samples/OpenApiSecurityScheme/mutualTlsSecurityScheme.yaml new file mode 100644 index 000000000..72b4e9ae8 --- /dev/null +++ b/test/Microsoft.OpenApi.Readers.Tests/V32Tests/Samples/OpenApiSecurityScheme/mutualTlsSecurityScheme.yaml @@ -0,0 +1,2 @@ +type: mutualTLS +description: Sample Description diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.cs index 1415d62a1..0b69e9de7 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiSecuritySchemeTests.cs @@ -100,6 +100,12 @@ public class OpenApiSecuritySchemeTests OpenIdConnectUrl = new("https://example.com/openIdConnect") }; + private static OpenApiSecurityScheme MutualTlsSecurityScheme => new() + { + Description = "description1", + Type = SecuritySchemeType.MutualTLS + }; + private static OpenApiSecuritySchemeReference OpenApiSecuritySchemeReference => new("sampleSecurityScheme"); private static OpenApiSecurityScheme ReferencedSecurityScheme => new() { @@ -198,6 +204,19 @@ public async Task SerializeHttpBearerSecuritySchemeAsV3JsonWorks() Assert.Equal(expected, actual); } + [Fact] + public void SerializeMutualTlsSecuritySchemeAsV3Throws() + { + // Arrange + var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture); + var writer = new OpenApiJsonWriter(outputStringWriter); + + // Act & Assert + var exception = Assert.Throws(() => MutualTlsSecurityScheme.SerializeAsV3(writer)); + Assert.Contains("mutualTLS security scheme is only supported in OpenAPI 3.1 and later versions", exception.Message); + Assert.Contains($"Current version: {OpenApiSpecVersion.OpenApi3_0}", exception.Message); + } + [Fact] public async Task SerializeOAuthSingleFlowSecuritySchemeAsV3JsonWorks() { diff --git a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt index d0b8989ef..fc0b3db73 100644 --- a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt +++ b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt @@ -1808,6 +1808,8 @@ namespace Microsoft.OpenApi OAuth2 = 2, [Microsoft.OpenApi.Display("openIdConnect")] OpenIdConnect = 3, + [Microsoft.OpenApi.Display("mutualTLS")] + MutualTLS = 4, } public abstract class SourceExpression : Microsoft.OpenApi.RuntimeExpression { From 9e13b2574e68387ecc01c453b571208c40124b46 Mon Sep 17 00:00:00 2001 From: mdaneri Date: Wed, 21 Jan 2026 08:32:08 -0800 Subject: [PATCH 046/388] feat(models): add shared Content interface (#2695) feat(models): add shared Content interface * Update src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs Co-authored-by: Vincent Biret * Update src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs Co-authored-by: Vincent Biret * Update src/Microsoft.OpenApi/Models/OpenApiHeader.cs Co-authored-by: Vincent Biret * Update src/Microsoft.OpenApi/Models/OpenApiResponse.cs Co-authored-by: Vincent Biret * Remove inheritance from IOpenApiReadOnlyContentElement revert commit 7758a8193a391629d82995881763bba3911b767e * Update src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs Co-authored-by: Vincent Biret * test(publicapi): approve content interface surface --------- Co-authored-by: Vincent Biret --- .../Interfaces/IOpenApiContentElement.cs | 27 ++++++++++++++ .../Models/Interfaces/IOpenApiHeader.cs | 7 +--- .../Models/Interfaces/IOpenApiParameter.cs | 13 +------ .../Models/Interfaces/IOpenApiRequestBody.cs | 7 +--- .../Models/Interfaces/IOpenApiResponse.cs | 8 +---- src/Microsoft.OpenApi/Models/OpenApiHeader.cs | 7 ++-- .../Models/OpenApiParameter.cs | 21 +++++++---- .../Models/OpenApiRequestBody.cs | 19 +++++----- .../Models/OpenApiResponse.cs | 6 ++-- .../PublicApi/PublicApi.approved.txt | 36 ++++++++++--------- 10 files changed, 84 insertions(+), 67 deletions(-) create mode 100644 src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs diff --git a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs new file mode 100644 index 000000000..15725d4fc --- /dev/null +++ b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; + +namespace Microsoft.OpenApi; + +/// +/// Describes an element that has content. +/// +public interface IOpenApiContentElement +{ + /// + /// A map containing descriptions of potential payloads. + /// The key is a media type or media type range and the value describes it. + /// + IDictionary? Content { get; set; } +} + +/// +/// Describes an element that has content. +/// +public interface IOpenApiReadOnlyContentElement +{ + /// + /// A map containing descriptions of potential payloads. + /// The key is a media type or media type range and the value describes it. + /// + IDictionary? Content { get; } +} diff --git a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiHeader.cs b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiHeader.cs index 55e484555..8104c72ed 100644 --- a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiHeader.cs +++ b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiHeader.cs @@ -8,7 +8,7 @@ namespace Microsoft.OpenApi; /// Defines the base properties for the headers object. /// This interface is provided for type assertions but should not be implemented by package consumers beyond automatic mocking. /// -public interface IOpenApiHeader : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable +public interface IOpenApiHeader : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable, IOpenApiReadOnlyContentElement { /// /// Determines whether this header is mandatory. @@ -58,9 +58,4 @@ public interface IOpenApiHeader : IOpenApiDescribedElement, IOpenApiReadOnlyExte /// public IDictionary? Examples { get; } - /// - /// A map containing the representations for the header. - /// - public IDictionary? Content { get; } - } diff --git a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiParameter.cs b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiParameter.cs index 5669a0bb3..405d04fab 100644 --- a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiParameter.cs +++ b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiParameter.cs @@ -7,7 +7,7 @@ namespace Microsoft.OpenApi; /// Defines the base properties for the parameter object. /// This interface is provided for type assertions but should not be implemented by package consumers beyond automatic mocking. /// -public interface IOpenApiParameter : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable +public interface IOpenApiParameter : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable, IOpenApiReadOnlyContentElement { /// /// REQUIRED. The name of the parameter. Parameter names are case sensitive. @@ -93,15 +93,4 @@ public interface IOpenApiParameter : IOpenApiDescribedElement, IOpenApiReadOnlyE /// Assign to use get null as a serialized value. /// public JsonNode? Example { get; } - - /// - /// A map containing the representations for the parameter. - /// The key is the media type and the value describes it. - /// The map MUST only contain one entry. - /// For more complex scenarios, the content property can define the media type and schema of the parameter. - /// A parameter MUST contain either a schema property, or a content property, but not both. - /// When example or examples are provided in conjunction with the schema object, - /// the example MUST follow the prescribed serialization strategy for the parameter. - /// - public IDictionary? Content { get; } } diff --git a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiRequestBody.cs b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiRequestBody.cs index 5ab2f7174..2e722b0f5 100644 --- a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiRequestBody.cs +++ b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiRequestBody.cs @@ -6,18 +6,13 @@ namespace Microsoft.OpenApi; /// Defines the base properties for the request body object. /// This interface is provided for type assertions but should not be implemented by package consumers beyond automatic mocking. /// -public interface IOpenApiRequestBody : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable +public interface IOpenApiRequestBody : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable, IOpenApiReadOnlyContentElement { /// /// Determines if the request body is required in the request. Defaults to false. /// public bool Required { get; } - /// - /// REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. - /// For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/* - /// - public IDictionary? Content { get; } /// /// Converts the request body to a body parameter in preparation for a v2 serialization. /// diff --git a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiResponse.cs b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiResponse.cs index d0423771f..6823868f2 100644 --- a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiResponse.cs +++ b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiResponse.cs @@ -6,19 +6,13 @@ namespace Microsoft.OpenApi; /// Defines the base properties for the response object. /// This interface is provided for type assertions but should not be implemented by package consumers beyond automatic mocking. /// -public interface IOpenApiResponse : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable, IOpenApiSummarizedElement +public interface IOpenApiResponse : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable, IOpenApiSummarizedElement, IOpenApiReadOnlyContentElement { /// /// Maps a header name to its definition. /// public IDictionary? Headers { get; } - /// - /// A map containing descriptions of potential response payloads. - /// The key is a media type or media type range and the value describes it. - /// - public IDictionary? Content { get; } - /// /// A map of operations links that can be followed from the response. /// The key of the map is a short name for the link, diff --git a/src/Microsoft.OpenApi/Models/OpenApiHeader.cs b/src/Microsoft.OpenApi/Models/OpenApiHeader.cs index 7e5ea273f..9ec42aa06 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiHeader.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiHeader.cs @@ -11,7 +11,7 @@ namespace Microsoft.OpenApi /// Header Object. /// The Header Object follows the structure of the Parameter Object. /// - public class OpenApiHeader : IOpenApiHeader, IOpenApiExtensible + public class OpenApiHeader : IOpenApiHeader, IOpenApiExtensible, IOpenApiContentElement { /// public string? Description { get; set; } @@ -98,7 +98,7 @@ public virtual void SerializeAsV3(IOpenApiWriter writer) SerializeInternal(writer, OpenApiSpecVersion.OpenApi3_0, (writer, element) => element.SerializeAsV3(writer)); } - internal void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, + internal void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, Action callback) { Utils.CheckArgumentNull(writer); @@ -175,7 +175,8 @@ public virtual void SerializeAsV2(IOpenApiWriter writer) writer.WriteProperty(OpenApiConstants.AllowReserved, AllowReserved, false); // schema - var targetSchema = Schema switch { + var targetSchema = Schema switch + { OpenApiSchemaReference schemaReference => schemaReference.RecursiveTarget, OpenApiSchema schema => schema, _ => null, diff --git a/src/Microsoft.OpenApi/Models/OpenApiParameter.cs b/src/Microsoft.OpenApi/Models/OpenApiParameter.cs index d6b060a78..14294cbd8 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiParameter.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiParameter.cs @@ -11,7 +11,7 @@ namespace Microsoft.OpenApi /// /// Parameter Object. /// - public class OpenApiParameter : IOpenApiExtensible, IOpenApiParameter + public class OpenApiParameter : IOpenApiExtensible, IOpenApiParameter, IOpenApiContentElement { private bool? _explode; private ParameterStyle? _style; @@ -60,7 +60,15 @@ public bool Explode /// public JsonNode? Example { get; set; } - /// + /// + /// A map containing the representations for the parameter. + /// The key is the media type and the value describes it. + /// The map MUST only contain one entry. + /// For more complex scenarios, the content property can define the media type and schema of the parameter. + /// A parameter MUST contain either a schema property, or a content property, but not both. + /// When example or examples are provided in conjunction with the schema object, + /// the example MUST follow the prescribed serialization strategy for the parameter. + /// public IDictionary? Content { get; set; } /// @@ -111,11 +119,11 @@ public virtual void SerializeAsV3(IOpenApiWriter writer) SerializeInternal(writer, OpenApiSpecVersion.OpenApi3_0, (writer, element) => element.SerializeAsV3(writer)); } - internal void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, + internal void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, Action callback) { Utils.CheckArgumentNull(writer); - + // Validate that Cookie style is only used in OpenAPI 3.2 and later if (Style == ParameterStyle.Cookie && version < OpenApiSpecVersion.OpenApi3_2) { @@ -226,7 +234,8 @@ internal virtual void WriteRequestBodySchemaForV2(IOpenApiWriter writer, Diction // uniqueItems // enum // multipleOf - var targetSchema = Schema switch { + var targetSchema = Schema switch + { OpenApiSchemaReference schemaReference => schemaReference.RecursiveTarget, OpenApiSchema schema => schema, _ => null, @@ -271,7 +280,7 @@ internal virtual void WriteRequestBodySchemaForV2(IOpenApiWriter writer, Diction public virtual void SerializeAsV2(IOpenApiWriter writer) { Utils.CheckArgumentNull(writer); - + // Validate that Cookie style is only used in OpenAPI 3.2 and later if (Style == ParameterStyle.Cookie) { diff --git a/src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs b/src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs index fa29d3ea0..225837544 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs @@ -10,7 +10,7 @@ namespace Microsoft.OpenApi /// /// Request Body Object /// - public class OpenApiRequestBody : IOpenApiExtensible, IOpenApiRequestBody + public class OpenApiRequestBody : IOpenApiExtensible, IOpenApiRequestBody, IOpenApiContentElement { /// public string? Description { get; set; } @@ -18,7 +18,10 @@ public class OpenApiRequestBody : IOpenApiExtensible, IOpenApiRequestBody /// public bool Required { get; set; } - /// + /// + /// REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. + /// For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/* + /// public IDictionary? Content { get; set; } /// @@ -64,7 +67,7 @@ public virtual void SerializeAsV3(IOpenApiWriter writer) { SerializeInternal(writer, OpenApiSpecVersion.OpenApi3_0, (writer, element) => element.SerializeAsV3(writer)); } - + internal void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, Action callback) { @@ -110,7 +113,7 @@ public IOpenApiParameter ConvertToBodyParameter(IOpenApiWriter writer) Extensions = Extensions?.ToDictionary(static k => k.Key, static v => v.Value) }; // Clone extensions so we can remove the x-bodyName extensions from the output V2 model. - if (bodyParameter.Extensions is not null && + if (bodyParameter.Extensions is not null && bodyParameter.Extensions.TryGetValue(OpenApiConstants.BodyName, out var bodyNameExtension) && bodyNameExtension is JsonNodeExtension bodyName) { @@ -126,7 +129,7 @@ public IEnumerable ConvertToFormDataParameters(IOpenApiWriter if (Content == null || !Content.Any()) yield break; var properties = Content.First().Value.Schema?.Properties; - if(properties != null) + if (properties != null) { foreach (var property in properties) { @@ -144,11 +147,11 @@ public IEnumerable ConvertToFormDataParameters(IOpenApiWriter OpenApiSchemaReference => throw new InvalidOperationException("Unresolved reference target"), _ => throw new InvalidOperationException("Unexpected schema type") }; - + updatedSchema.Type = "file".ToJsonSchemaType(); updatedSchema.Format = null; paramSchema = updatedSchema; - + } yield return new OpenApiFormDataParameter() { @@ -159,7 +162,7 @@ public IEnumerable ConvertToFormDataParameters(IOpenApiWriter Required = Content.First().Value.Schema?.Required?.Contains(property.Key) ?? false }; } - } + } } /// diff --git a/src/Microsoft.OpenApi/Models/OpenApiResponse.cs b/src/Microsoft.OpenApi/Models/OpenApiResponse.cs index 4ee39336e..6cc0000df 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiResponse.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiResponse.cs @@ -10,7 +10,7 @@ namespace Microsoft.OpenApi /// /// Response object. /// - public class OpenApiResponse : IOpenApiExtensible, IOpenApiResponse + public class OpenApiResponse : IOpenApiExtensible, IOpenApiResponse, IOpenApiContentElement { /// public string? Summary { get; set; } @@ -73,7 +73,7 @@ public virtual void SerializeAsV3(IOpenApiWriter writer) SerializeInternal(writer, OpenApiSpecVersion.OpenApi3_0, (writer, element) => element.SerializeAsV3(writer)); } - private void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, + private void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, Action callback) { Utils.CheckArgumentNull(writer); @@ -177,7 +177,7 @@ public virtual void SerializeAsV2(IOpenApiWriter writer) // so remove it from the cloned collection so we don't write it again. extensionsClone?.Remove(key); } - } + } } } diff --git a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt index 59f1bce31..5413879c0 100644 --- a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt +++ b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt @@ -109,6 +109,10 @@ namespace Microsoft.OpenApi { System.Collections.Generic.Dictionary? PathItems { get; } } + public interface IOpenApiContentElement + { + System.Collections.Generic.IDictionary? Content { get; set; } + } public interface IOpenApiDescribedElement : Microsoft.OpenApi.IOpenApiElement { string? Description { get; set; } @@ -129,11 +133,10 @@ namespace Microsoft.OpenApi { void Write(Microsoft.OpenApi.IOpenApiWriter writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion); } - public interface IOpenApiHeader : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public interface IOpenApiHeader : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { bool AllowEmptyValue { get; } bool AllowReserved { get; } - System.Collections.Generic.IDictionary? Content { get; } bool Deprecated { get; } System.Text.Json.Nodes.JsonNode? Example { get; } System.Collections.Generic.IDictionary? Examples { get; } @@ -160,11 +163,10 @@ namespace Microsoft.OpenApi System.Collections.Generic.IList? PrefixEncoding { get; } Microsoft.OpenApi.IOpenApiSchema? Schema { get; } } - public interface IOpenApiParameter : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public interface IOpenApiParameter : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { bool AllowEmptyValue { get; } bool AllowReserved { get; } - System.Collections.Generic.IDictionary? Content { get; } bool Deprecated { get; } System.Text.Json.Nodes.JsonNode? Example { get; } System.Collections.Generic.IDictionary? Examples { get; } @@ -181,6 +183,10 @@ namespace Microsoft.OpenApi System.Collections.Generic.IList? Parameters { get; } System.Collections.Generic.IList? Servers { get; } } + public interface IOpenApiReadOnlyContentElement + { + System.Collections.Generic.IDictionary? Content { get; } + } public interface IOpenApiReadOnlyDescribedElement : Microsoft.OpenApi.IOpenApiElement { string? Description { get; } @@ -214,16 +220,14 @@ namespace Microsoft.OpenApi U CopyReferenceAsTargetElementWithOverrides(U source); } public interface IOpenApiReferenceable : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiSerializable { } - public interface IOpenApiRequestBody : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public interface IOpenApiRequestBody : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { - System.Collections.Generic.IDictionary? Content { get; } bool Required { get; } Microsoft.OpenApi.IOpenApiParameter? ConvertToBodyParameter(Microsoft.OpenApi.IOpenApiWriter writer); System.Collections.Generic.IEnumerable? ConvertToFormDataParameters(Microsoft.OpenApi.IOpenApiWriter writer); } - public interface IOpenApiResponse : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable + public interface IOpenApiResponse : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable { - System.Collections.Generic.IDictionary? Content { get; } System.Collections.Generic.IDictionary? Headers { get; } System.Collections.Generic.IDictionary? Links { get; } } @@ -787,7 +791,7 @@ namespace Microsoft.OpenApi public static Microsoft.OpenApi.OpenApiUrlTreeNode CreateOpenApiUrlTreeNode(System.Collections.Generic.Dictionary sources) { } public static System.Func CreatePredicate(string? operationIds = null, string? tags = null, System.Collections.Generic.Dictionary>? requestUrls = null, Microsoft.OpenApi.OpenApiDocument? source = null) { } } - public class OpenApiHeader : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiHeader, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public class OpenApiHeader : Microsoft.OpenApi.IOpenApiContentElement, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiHeader, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { public OpenApiHeader() { } public bool AllowEmptyValue { get; set; } @@ -808,7 +812,7 @@ namespace Microsoft.OpenApi public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } } - public class OpenApiHeaderReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiHeader, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public class OpenApiHeaderReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiHeader, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { public OpenApiHeaderReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } public bool AllowEmptyValue { get; } @@ -1023,7 +1027,7 @@ namespace Microsoft.OpenApi public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } } - public class OpenApiParameter : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiParameter, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public class OpenApiParameter : Microsoft.OpenApi.IOpenApiContentElement, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiParameter, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { public OpenApiParameter() { } public bool AllowEmptyValue { get; set; } @@ -1046,7 +1050,7 @@ namespace Microsoft.OpenApi public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } } - public class OpenApiParameterReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiParameter, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public class OpenApiParameterReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiParameter, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { public OpenApiParameterReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } public bool AllowEmptyValue { get; } @@ -1151,7 +1155,7 @@ namespace Microsoft.OpenApi protected override void SerializeAdditionalV32Properties(Microsoft.OpenApi.IOpenApiWriter writer) { } protected override void SetAdditional31MetadataFromMapNode(System.Text.Json.Nodes.JsonObject jsonObject) { } } - public class OpenApiRequestBody : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiRequestBody, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public class OpenApiRequestBody : Microsoft.OpenApi.IOpenApiContentElement, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiRequestBody, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { public OpenApiRequestBody() { } public System.Collections.Generic.IDictionary? Content { get; set; } @@ -1166,7 +1170,7 @@ namespace Microsoft.OpenApi public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } } - public class OpenApiRequestBodyReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiRequestBody, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public class OpenApiRequestBodyReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiRequestBody, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { public OpenApiRequestBodyReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } public System.Collections.Generic.IDictionary? Content { get; } @@ -1180,7 +1184,7 @@ namespace Microsoft.OpenApi public Microsoft.OpenApi.IOpenApiRequestBody CreateShallowCopy() { } public override void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } } - public class OpenApiResponse : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiResponse, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable + public class OpenApiResponse : Microsoft.OpenApi.IOpenApiContentElement, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiResponse, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable { public OpenApiResponse() { } public System.Collections.Generic.IDictionary? Content { get; set; } @@ -1195,7 +1199,7 @@ namespace Microsoft.OpenApi public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } } - public class OpenApiResponseReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiResponse, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable + public class OpenApiResponseReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiResponse, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable { public OpenApiResponseReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } public System.Collections.Generic.IDictionary? Content { get; } From 069f8432788b2ac1dca3d27b07f4e68b40f53c46 Mon Sep 17 00:00:00 2001 From: "release-please-token-provider[bot]" <225477224+release-please-token-provider[bot]@users.noreply.github.com> Date: Wed, 21 Jan 2026 16:32:59 +0000 Subject: [PATCH 047/388] chore(main): release 3.3.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ Directory.Build.props | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1f73031b8..ff1c7af58 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.2.0" + ".": "3.3.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a863b9118..8855d4438 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [3.3.0](https://github.com/microsoft/OpenAPI.NET/compare/v3.2.0...v3.3.0) (2026-01-21) + + +### Features + +* **models:** add shared Content interface ([9e13b25](https://github.com/microsoft/OpenAPI.NET/commit/9e13b2574e68387ecc01c453b571208c40124b46)) +* **models:** add shared Content interface ([#2695](https://github.com/microsoft/OpenAPI.NET/issues/2695)) ([9e13b25](https://github.com/microsoft/OpenAPI.NET/commit/9e13b2574e68387ecc01c453b571208c40124b46)) +* **models:** support mutualTLS security scheme ([a4efdfe](https://github.com/microsoft/OpenAPI.NET/commit/a4efdfe43ee310fba4bb643d9fd28ce92da32338)) + ## [3.2.0](https://github.com/microsoft/OpenAPI.NET/compare/v3.1.3...v3.2.0) (2026-01-19) diff --git a/Directory.Build.props b/Directory.Build.props index 028c4e6c5..36284217c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ https://github.com/Microsoft/OpenAPI.NET © Microsoft Corporation. All rights reserved. OpenAPI .NET - 3.2.0 + 3.3.0 From 80e4bbfa4ab31d3af69fe29751714d001c1f9566 Mon Sep 17 00:00:00 2001 From: mdaneri Date: Wed, 21 Jan 2026 08:32:08 -0800 Subject: [PATCH 048/388] feat(models): add shared Content interface (#2695) feat(models): add shared Content interface * Update src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs Co-authored-by: Vincent Biret * Update src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs Co-authored-by: Vincent Biret * Update src/Microsoft.OpenApi/Models/OpenApiHeader.cs Co-authored-by: Vincent Biret * Update src/Microsoft.OpenApi/Models/OpenApiResponse.cs Co-authored-by: Vincent Biret * Remove inheritance from IOpenApiReadOnlyContentElement revert commit 7758a8193a391629d82995881763bba3911b767e * Update src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs Co-authored-by: Vincent Biret * test(publicapi): approve content interface surface --------- Co-authored-by: Vincent Biret Signed-off-by: Vincent Biret --- .../Interfaces/IOpenApiContentElement.cs | 27 ++++++++++++++ .../Models/Interfaces/IOpenApiHeader.cs | 8 +---- .../Models/Interfaces/IOpenApiParameter.cs | 13 +------ .../Models/Interfaces/IOpenApiRequestBody.cs | 7 +--- .../Models/Interfaces/IOpenApiResponse.cs | 8 +---- src/Microsoft.OpenApi/Models/OpenApiHeader.cs | 7 ++-- .../Models/OpenApiParameter.cs | 17 ++++++--- .../Models/OpenApiRequestBody.cs | 19 +++++----- .../Models/OpenApiResponse.cs | 6 ++-- .../PublicApi/PublicApi.approved.txt | 36 ++++++++++--------- 10 files changed, 82 insertions(+), 66 deletions(-) create mode 100644 src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs diff --git a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs new file mode 100644 index 000000000..15dcd955e --- /dev/null +++ b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; + +namespace Microsoft.OpenApi; + +/// +/// Describes an element that has content. +/// +public interface IOpenApiContentElement +{ + /// + /// A map containing descriptions of potential payloads. + /// The key is a media type or media type range and the value describes it. + /// + IDictionary? Content { get; set; } +} + +/// +/// Describes an element that has content. +/// +public interface IOpenApiReadOnlyContentElement +{ + /// + /// A map containing descriptions of potential payloads. + /// The key is a media type or media type range and the value describes it. + /// + IDictionary? Content { get; } +} diff --git a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiHeader.cs b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiHeader.cs index 04c24b5b2..5f65c39b4 100644 --- a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiHeader.cs +++ b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiHeader.cs @@ -8,7 +8,7 @@ namespace Microsoft.OpenApi; /// Defines the base properties for the headers object. /// This interface is provided for type assertions but should not be implemented by package consumers beyond automatic mocking. /// -public interface IOpenApiHeader : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable +public interface IOpenApiHeader : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable, IOpenApiReadOnlyContentElement { /// /// Determines whether this header is mandatory. @@ -57,10 +57,4 @@ public interface IOpenApiHeader : IOpenApiDescribedElement, IOpenApiReadOnlyExte /// Examples of the media type. /// public IDictionary? Examples { get; } - - /// - /// A map containing the representations for the header. - /// - public IDictionary? Content { get; } - } diff --git a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiParameter.cs b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiParameter.cs index 312517acb..405d04fab 100644 --- a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiParameter.cs +++ b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiParameter.cs @@ -7,7 +7,7 @@ namespace Microsoft.OpenApi; /// Defines the base properties for the parameter object. /// This interface is provided for type assertions but should not be implemented by package consumers beyond automatic mocking. /// -public interface IOpenApiParameter : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable +public interface IOpenApiParameter : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable, IOpenApiReadOnlyContentElement { /// /// REQUIRED. The name of the parameter. Parameter names are case sensitive. @@ -93,15 +93,4 @@ public interface IOpenApiParameter : IOpenApiDescribedElement, IOpenApiReadOnlyE /// Assign to use get null as a serialized value. /// public JsonNode? Example { get; } - - /// - /// A map containing the representations for the parameter. - /// The key is the media type and the value describes it. - /// The map MUST only contain one entry. - /// For more complex scenarios, the content property can define the media type and schema of the parameter. - /// A parameter MUST contain either a schema property, or a content property, but not both. - /// When example or examples are provided in conjunction with the schema object, - /// the example MUST follow the prescribed serialization strategy for the parameter. - /// - public IDictionary? Content { get; } } diff --git a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiRequestBody.cs b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiRequestBody.cs index dfe1e1715..2e722b0f5 100644 --- a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiRequestBody.cs +++ b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiRequestBody.cs @@ -6,18 +6,13 @@ namespace Microsoft.OpenApi; /// Defines the base properties for the request body object. /// This interface is provided for type assertions but should not be implemented by package consumers beyond automatic mocking. /// -public interface IOpenApiRequestBody : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable +public interface IOpenApiRequestBody : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable, IOpenApiReadOnlyContentElement { /// /// Determines if the request body is required in the request. Defaults to false. /// public bool Required { get; } - /// - /// REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. - /// For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/* - /// - public IDictionary? Content { get; } /// /// Converts the request body to a body parameter in preparation for a v2 serialization. /// diff --git a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiResponse.cs b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiResponse.cs index dfddd7838..07ef60f3d 100644 --- a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiResponse.cs +++ b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiResponse.cs @@ -6,19 +6,13 @@ namespace Microsoft.OpenApi; /// Defines the base properties for the response object. /// This interface is provided for type assertions but should not be implemented by package consumers beyond automatic mocking. /// -public interface IOpenApiResponse : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable +public interface IOpenApiResponse : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable, IOpenApiReadOnlyContentElement { /// /// Maps a header name to its definition. /// public IDictionary? Headers { get; } - /// - /// A map containing descriptions of potential response payloads. - /// The key is a media type or media type range and the value describes it. - /// - public IDictionary? Content { get; } - /// /// A map of operations links that can be followed from the response. /// The key of the map is a short name for the link, diff --git a/src/Microsoft.OpenApi/Models/OpenApiHeader.cs b/src/Microsoft.OpenApi/Models/OpenApiHeader.cs index 8bb155f85..33f119e4d 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiHeader.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiHeader.cs @@ -11,7 +11,7 @@ namespace Microsoft.OpenApi /// Header Object. /// The Header Object follows the structure of the Parameter Object. /// - public class OpenApiHeader : IOpenApiHeader, IOpenApiExtensible + public class OpenApiHeader : IOpenApiHeader, IOpenApiExtensible, IOpenApiContentElement { /// public string? Description { get; set; } @@ -90,7 +90,7 @@ public virtual void SerializeAsV3(IOpenApiWriter writer) SerializeInternal(writer, OpenApiSpecVersion.OpenApi3_0, (writer, element) => element.SerializeAsV3(writer)); } - internal void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, + internal void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, Action callback) { Utils.CheckArgumentNull(writer); @@ -167,7 +167,8 @@ public virtual void SerializeAsV2(IOpenApiWriter writer) writer.WriteProperty(OpenApiConstants.AllowReserved, AllowReserved, false); // schema - var targetSchema = Schema switch { + var targetSchema = Schema switch + { OpenApiSchemaReference schemaReference => schemaReference.RecursiveTarget, OpenApiSchema schema => schema, _ => null, diff --git a/src/Microsoft.OpenApi/Models/OpenApiParameter.cs b/src/Microsoft.OpenApi/Models/OpenApiParameter.cs index 63b3735e2..0ea9ef57b 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiParameter.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiParameter.cs @@ -11,7 +11,7 @@ namespace Microsoft.OpenApi /// /// Parameter Object. /// - public class OpenApiParameter : IOpenApiExtensible, IOpenApiParameter + public class OpenApiParameter : IOpenApiExtensible, IOpenApiParameter, IOpenApiContentElement { private bool? _explode; private ParameterStyle? _style; @@ -60,7 +60,15 @@ public bool Explode /// public JsonNode? Example { get; set; } - /// + /// + /// A map containing the representations for the parameter. + /// The key is the media type and the value describes it. + /// The map MUST only contain one entry. + /// For more complex scenarios, the content property can define the media type and schema of the parameter. + /// A parameter MUST contain either a schema property, or a content property, but not both. + /// When example or examples are provided in conjunction with the schema object, + /// the example MUST follow the prescribed serialization strategy for the parameter. + /// public IDictionary? Content { get; set; } /// @@ -105,7 +113,7 @@ public virtual void SerializeAsV3(IOpenApiWriter writer) SerializeInternal(writer, OpenApiSpecVersion.OpenApi3_0, (writer, element) => element.SerializeAsV3(writer)); } - internal void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, + internal void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, Action callback) { Utils.CheckArgumentNull(writer); @@ -200,7 +208,8 @@ internal virtual void WriteRequestBodySchemaForV2(IOpenApiWriter writer, Diction // uniqueItems // enum // multipleOf - var targetSchema = Schema switch { + var targetSchema = Schema switch + { OpenApiSchemaReference schemaReference => schemaReference.RecursiveTarget, OpenApiSchema schema => schema, _ => null, diff --git a/src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs b/src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs index 8f4c1bd90..73d5e9a98 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs @@ -10,7 +10,7 @@ namespace Microsoft.OpenApi /// /// Request Body Object /// - public class OpenApiRequestBody : IOpenApiExtensible, IOpenApiRequestBody + public class OpenApiRequestBody : IOpenApiExtensible, IOpenApiRequestBody, IOpenApiContentElement { /// public string? Description { get; set; } @@ -18,7 +18,10 @@ public class OpenApiRequestBody : IOpenApiExtensible, IOpenApiRequestBody /// public bool Required { get; set; } - /// + /// + /// REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. + /// For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/* + /// public IDictionary? Content { get; set; } /// @@ -56,7 +59,7 @@ public virtual void SerializeAsV3(IOpenApiWriter writer) { SerializeInternal(writer, OpenApiSpecVersion.OpenApi3_0, (writer, element) => element.SerializeAsV3(writer)); } - + internal void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, Action callback) { @@ -102,7 +105,7 @@ public IOpenApiParameter ConvertToBodyParameter(IOpenApiWriter writer) Extensions = Extensions?.ToDictionary(static k => k.Key, static v => v.Value) }; // Clone extensions so we can remove the x-bodyName extensions from the output V2 model. - if (bodyParameter.Extensions is not null && + if (bodyParameter.Extensions is not null && bodyParameter.Extensions.TryGetValue(OpenApiConstants.BodyName, out var bodyNameExtension) && bodyNameExtension is JsonNodeExtension bodyName) { @@ -118,7 +121,7 @@ public IEnumerable ConvertToFormDataParameters(IOpenApiWriter if (Content == null || !Content.Any()) yield break; var properties = Content.First().Value.Schema?.Properties; - if(properties != null) + if (properties != null) { foreach (var property in properties) { @@ -136,11 +139,11 @@ public IEnumerable ConvertToFormDataParameters(IOpenApiWriter OpenApiSchemaReference => throw new InvalidOperationException("Unresolved reference target"), _ => throw new InvalidOperationException("Unexpected schema type") }; - + updatedSchema.Type = "file".ToJsonSchemaType(); updatedSchema.Format = null; paramSchema = updatedSchema; - + } yield return new OpenApiFormDataParameter() { @@ -151,7 +154,7 @@ public IEnumerable ConvertToFormDataParameters(IOpenApiWriter Required = Content.First().Value.Schema?.Required?.Contains(property.Key) ?? false }; } - } + } } /// diff --git a/src/Microsoft.OpenApi/Models/OpenApiResponse.cs b/src/Microsoft.OpenApi/Models/OpenApiResponse.cs index 6c1af10f1..4023efaf5 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiResponse.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiResponse.cs @@ -10,7 +10,7 @@ namespace Microsoft.OpenApi /// /// Response object. /// - public class OpenApiResponse : IOpenApiExtensible, IOpenApiResponse + public class OpenApiResponse : IOpenApiExtensible, IOpenApiResponse, IOpenApiContentElement { /// public string? Description { get; set; } @@ -61,7 +61,7 @@ public virtual void SerializeAsV3(IOpenApiWriter writer) SerializeInternal(writer, OpenApiSpecVersion.OpenApi3_0, (writer, element) => element.SerializeAsV3(writer)); } - private void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, + private void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, Action callback) { Utils.CheckArgumentNull(writer); @@ -153,7 +153,7 @@ public virtual void SerializeAsV2(IOpenApiWriter writer) // so remove it from the cloned collection so we don't write it again. extensionsClone?.Remove(key); } - } + } } } diff --git a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt index d0b8989ef..167896e37 100644 --- a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt +++ b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt @@ -106,6 +106,10 @@ namespace Microsoft.OpenApi { System.Collections.Generic.Dictionary? PathItems { get; } } + public interface IOpenApiContentElement + { + System.Collections.Generic.IDictionary? Content { get; set; } + } public interface IOpenApiDescribedElement : Microsoft.OpenApi.IOpenApiElement { string? Description { get; set; } @@ -124,11 +128,10 @@ namespace Microsoft.OpenApi { void Write(Microsoft.OpenApi.IOpenApiWriter writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion); } - public interface IOpenApiHeader : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public interface IOpenApiHeader : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { bool AllowEmptyValue { get; } bool AllowReserved { get; } - System.Collections.Generic.IDictionary? Content { get; } bool Deprecated { get; } System.Text.Json.Nodes.JsonNode? Example { get; } System.Collections.Generic.IDictionary? Examples { get; } @@ -145,11 +148,10 @@ namespace Microsoft.OpenApi Microsoft.OpenApi.RuntimeExpressionAnyWrapper? RequestBody { get; } Microsoft.OpenApi.OpenApiServer? Server { get; } } - public interface IOpenApiParameter : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public interface IOpenApiParameter : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { bool AllowEmptyValue { get; } bool AllowReserved { get; } - System.Collections.Generic.IDictionary? Content { get; } bool Deprecated { get; } System.Text.Json.Nodes.JsonNode? Example { get; } System.Collections.Generic.IDictionary? Examples { get; } @@ -166,6 +168,10 @@ namespace Microsoft.OpenApi System.Collections.Generic.IList? Parameters { get; } System.Collections.Generic.IList? Servers { get; } } + public interface IOpenApiReadOnlyContentElement + { + System.Collections.Generic.IDictionary? Content { get; } + } public interface IOpenApiReadOnlyDescribedElement : Microsoft.OpenApi.IOpenApiElement { string? Description { get; } @@ -199,16 +205,14 @@ namespace Microsoft.OpenApi U CopyReferenceAsTargetElementWithOverrides(U source); } public interface IOpenApiReferenceable : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiSerializable { } - public interface IOpenApiRequestBody : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public interface IOpenApiRequestBody : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { - System.Collections.Generic.IDictionary? Content { get; } bool Required { get; } Microsoft.OpenApi.IOpenApiParameter? ConvertToBodyParameter(Microsoft.OpenApi.IOpenApiWriter writer); System.Collections.Generic.IEnumerable? ConvertToFormDataParameters(Microsoft.OpenApi.IOpenApiWriter writer); } - public interface IOpenApiResponse : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public interface IOpenApiResponse : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { - System.Collections.Generic.IDictionary? Content { get; } System.Collections.Generic.IDictionary? Headers { get; } System.Collections.Generic.IDictionary? Links { get; } } @@ -736,7 +740,7 @@ namespace Microsoft.OpenApi public static Microsoft.OpenApi.OpenApiUrlTreeNode CreateOpenApiUrlTreeNode(System.Collections.Generic.Dictionary sources) { } public static System.Func CreatePredicate(string? operationIds = null, string? tags = null, System.Collections.Generic.Dictionary>? requestUrls = null, Microsoft.OpenApi.OpenApiDocument? source = null) { } } - public class OpenApiHeader : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiHeader, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public class OpenApiHeader : Microsoft.OpenApi.IOpenApiContentElement, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiHeader, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { public OpenApiHeader() { } public bool AllowEmptyValue { get; set; } @@ -756,7 +760,7 @@ namespace Microsoft.OpenApi public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } } - public class OpenApiHeaderReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiHeader, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public class OpenApiHeaderReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiHeader, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { public OpenApiHeaderReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } public bool AllowEmptyValue { get; } @@ -941,7 +945,7 @@ namespace Microsoft.OpenApi public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } } - public class OpenApiParameter : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiParameter, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public class OpenApiParameter : Microsoft.OpenApi.IOpenApiContentElement, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiParameter, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { public OpenApiParameter() { } public bool AllowEmptyValue { get; set; } @@ -963,7 +967,7 @@ namespace Microsoft.OpenApi public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } } - public class OpenApiParameterReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiParameter, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public class OpenApiParameterReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiParameter, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { public OpenApiParameterReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } public bool AllowEmptyValue { get; } @@ -1065,7 +1069,7 @@ namespace Microsoft.OpenApi protected override void SerializeAdditionalV31Properties(Microsoft.OpenApi.IOpenApiWriter writer) { } protected override void SetAdditional31MetadataFromMapNode(System.Text.Json.Nodes.JsonObject jsonObject) { } } - public class OpenApiRequestBody : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiRequestBody, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public class OpenApiRequestBody : Microsoft.OpenApi.IOpenApiContentElement, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiRequestBody, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { public OpenApiRequestBody() { } public System.Collections.Generic.IDictionary? Content { get; set; } @@ -1079,7 +1083,7 @@ namespace Microsoft.OpenApi public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } } - public class OpenApiRequestBodyReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiRequestBody, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public class OpenApiRequestBodyReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiRequestBody, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { public OpenApiRequestBodyReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } public System.Collections.Generic.IDictionary? Content { get; } @@ -1093,7 +1097,7 @@ namespace Microsoft.OpenApi public Microsoft.OpenApi.IOpenApiRequestBody CreateShallowCopy() { } public override void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } } - public class OpenApiResponse : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiResponse, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public class OpenApiResponse : Microsoft.OpenApi.IOpenApiContentElement, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiResponse, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { public OpenApiResponse() { } public System.Collections.Generic.IDictionary? Content { get; set; } @@ -1106,7 +1110,7 @@ namespace Microsoft.OpenApi public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } } - public class OpenApiResponseReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiResponse, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public class OpenApiResponseReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiResponse, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { public OpenApiResponseReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } public System.Collections.Generic.IDictionary? Content { get; } From 67899ae3c64615be6e743594cd01b63a70e9ff0d Mon Sep 17 00:00:00 2001 From: "release-please-token-provider[bot]" <225477224+release-please-token-provider[bot]@users.noreply.github.com> Date: Wed, 21 Jan 2026 17:55:22 +0000 Subject: [PATCH 049/388] chore(support/v2): release 2.6.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 10 ++++++++++ Directory.Build.props | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4dedeaebc..511dd5165 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.5.0" + ".": "2.6.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3098a8f17..00819c348 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [2.6.0](https://github.com/microsoft/OpenAPI.NET/compare/v2.5.0...v2.6.0) (2026-01-21) + + +### Features + +* **models:** add shared Content interface ([80e4bbf](https://github.com/microsoft/OpenAPI.NET/commit/80e4bbfa4ab31d3af69fe29751714d001c1f9566)) +* **models:** add shared Content interface ([#2695](https://github.com/microsoft/OpenAPI.NET/issues/2695)) ([338566f](https://github.com/microsoft/OpenAPI.NET/commit/338566fafce04ee1329f4ead61fe1e87e01144ad)) +* **models:** add shared Content interface ([#2695](https://github.com/microsoft/OpenAPI.NET/issues/2695)) ([80e4bbf](https://github.com/microsoft/OpenAPI.NET/commit/80e4bbfa4ab31d3af69fe29751714d001c1f9566)) +* **models:** support mutualTLS security scheme ([f9cf5b8](https://github.com/microsoft/OpenAPI.NET/commit/f9cf5b807d71c49e5bd7e2bec97f12d3b50ca180)) + ## [2.5.0](https://github.com/microsoft/OpenAPI.NET/compare/v2.4.3...v2.5.0) (2026-01-19) diff --git a/Directory.Build.props b/Directory.Build.props index a4b8c77a1..76cd2b183 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ https://github.com/Microsoft/OpenAPI.NET © Microsoft Corporation. All rights reserved. OpenAPI .NET - 2.5.0 + 2.6.0 From 110b3b9611dbeb5a241dfcc2be4a7850c3e1bd41 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 22 Jan 2026 13:37:04 -0500 Subject: [PATCH 050/388] Revert "Merge pull request #2702 from microsoft/chore/sync-v2" This reverts commit 615d66109641b72071a014eece52d78ba79a1317, reversing changes made to 2258501030355fbda99c62df5a8d6a0579906360. --- CHANGELOG.md | 23 ------------------- .../Models/Interfaces/IOpenApiHeader.cs | 1 + 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4219e0dd4..8855d4438 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -87,29 +87,6 @@ * adds support for OpenAPI 3.2.0 ([765a8dd](https://github.com/microsoft/OpenAPI.NET/commit/765a8dd4d6efd1a31b6a76d282ccffa5877a845a)) -## [2.6.0](https://github.com/microsoft/OpenAPI.NET/compare/v2.5.0...v2.6.0) (2026-01-21) - -### Features - -* **models:** add shared Content interface ([80e4bbf](https://github.com/microsoft/OpenAPI.NET/commit/80e4bbfa4ab31d3af69fe29751714d001c1f9566)) -* **models:** add shared Content interface ([#2695](https://github.com/microsoft/OpenAPI.NET/issues/2695)) ([338566f](https://github.com/microsoft/OpenAPI.NET/commit/338566fafce04ee1329f4ead61fe1e87e01144ad)) -* **models:** add shared Content interface ([#2695](https://github.com/microsoft/OpenAPI.NET/issues/2695)) ([80e4bbf](https://github.com/microsoft/OpenAPI.NET/commit/80e4bbfa4ab31d3af69fe29751714d001c1f9566)) -* **models:** support mutualTLS security scheme ([f9cf5b8](https://github.com/microsoft/OpenAPI.NET/commit/f9cf5b807d71c49e5bd7e2bec97f12d3b50ca180)) - -## [2.5.0](https://github.com/microsoft/OpenAPI.NET/compare/v2.4.3...v2.5.0) (2026-01-19) - -## Features - -* hidi validate command now logs warnings ([1d3d085](https://github.com/microsoft/OpenAPI.NET/commit/1d3d085e0278d9341d7bd10065eba584cb25773c)) -* hidi validate command now logs warnings ([18ed5ac](https://github.com/microsoft/OpenAPI.NET/commit/18ed5acce9661639e1698f19c194e520eb5c93c1)) - - -### Bug Fixes - -* discriminator property validation fails any/allOf cases when it shouldn't ([ff6e411](https://github.com/microsoft/OpenAPI.NET/commit/ff6e4115dcab8c893bbc6b97639fd620b50f105e)) -* discriminator property validation fails any/allOf cases when it shouldn't ([7def73d](https://github.com/microsoft/OpenAPI.NET/commit/7def73d774d1f0e96118e92b636e52cbea371f2d)) - - ## [2.4.3](https://github.com/microsoft/OpenAPI.NET/compare/v2.4.2...v2.4.3) (2026-01-16) ## Bug Fixes diff --git a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiHeader.cs b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiHeader.cs index 5f65c39b4..8104c72ed 100644 --- a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiHeader.cs +++ b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiHeader.cs @@ -57,4 +57,5 @@ public interface IOpenApiHeader : IOpenApiDescribedElement, IOpenApiReadOnlyExte /// Examples of the media type. /// public IDictionary? Examples { get; } + } From e4514afcc9baf74df60736bbd59215b611f1c488 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 22 Jan 2026 13:37:24 -0500 Subject: [PATCH 051/388] Revert "feat(models): add shared Content interface (#2695)" This reverts commit 9e13b2574e68387ecc01c453b571208c40124b46. --- .../Interfaces/IOpenApiContentElement.cs | 27 -------------- .../Models/Interfaces/IOpenApiHeader.cs | 7 +++- .../Models/Interfaces/IOpenApiParameter.cs | 13 ++++++- .../Models/Interfaces/IOpenApiRequestBody.cs | 7 +++- .../Models/Interfaces/IOpenApiResponse.cs | 8 ++++- src/Microsoft.OpenApi/Models/OpenApiHeader.cs | 7 ++-- .../Models/OpenApiParameter.cs | 21 ++++------- .../Models/OpenApiRequestBody.cs | 19 +++++----- .../Models/OpenApiResponse.cs | 6 ++-- .../PublicApi/PublicApi.approved.txt | 36 +++++++++---------- 10 files changed, 67 insertions(+), 84 deletions(-) delete mode 100644 src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs diff --git a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs deleted file mode 100644 index 15725d4fc..000000000 --- a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Collections.Generic; - -namespace Microsoft.OpenApi; - -/// -/// Describes an element that has content. -/// -public interface IOpenApiContentElement -{ - /// - /// A map containing descriptions of potential payloads. - /// The key is a media type or media type range and the value describes it. - /// - IDictionary? Content { get; set; } -} - -/// -/// Describes an element that has content. -/// -public interface IOpenApiReadOnlyContentElement -{ - /// - /// A map containing descriptions of potential payloads. - /// The key is a media type or media type range and the value describes it. - /// - IDictionary? Content { get; } -} diff --git a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiHeader.cs b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiHeader.cs index 8104c72ed..55e484555 100644 --- a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiHeader.cs +++ b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiHeader.cs @@ -8,7 +8,7 @@ namespace Microsoft.OpenApi; /// Defines the base properties for the headers object. /// This interface is provided for type assertions but should not be implemented by package consumers beyond automatic mocking. /// -public interface IOpenApiHeader : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable, IOpenApiReadOnlyContentElement +public interface IOpenApiHeader : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable { /// /// Determines whether this header is mandatory. @@ -58,4 +58,9 @@ public interface IOpenApiHeader : IOpenApiDescribedElement, IOpenApiReadOnlyExte /// public IDictionary? Examples { get; } + /// + /// A map containing the representations for the header. + /// + public IDictionary? Content { get; } + } diff --git a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiParameter.cs b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiParameter.cs index 405d04fab..5669a0bb3 100644 --- a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiParameter.cs +++ b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiParameter.cs @@ -7,7 +7,7 @@ namespace Microsoft.OpenApi; /// Defines the base properties for the parameter object. /// This interface is provided for type assertions but should not be implemented by package consumers beyond automatic mocking. /// -public interface IOpenApiParameter : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable, IOpenApiReadOnlyContentElement +public interface IOpenApiParameter : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable { /// /// REQUIRED. The name of the parameter. Parameter names are case sensitive. @@ -93,4 +93,15 @@ public interface IOpenApiParameter : IOpenApiDescribedElement, IOpenApiReadOnlyE /// Assign to use get null as a serialized value. /// public JsonNode? Example { get; } + + /// + /// A map containing the representations for the parameter. + /// The key is the media type and the value describes it. + /// The map MUST only contain one entry. + /// For more complex scenarios, the content property can define the media type and schema of the parameter. + /// A parameter MUST contain either a schema property, or a content property, but not both. + /// When example or examples are provided in conjunction with the schema object, + /// the example MUST follow the prescribed serialization strategy for the parameter. + /// + public IDictionary? Content { get; } } diff --git a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiRequestBody.cs b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiRequestBody.cs index 2e722b0f5..5ab2f7174 100644 --- a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiRequestBody.cs +++ b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiRequestBody.cs @@ -6,13 +6,18 @@ namespace Microsoft.OpenApi; /// Defines the base properties for the request body object. /// This interface is provided for type assertions but should not be implemented by package consumers beyond automatic mocking. /// -public interface IOpenApiRequestBody : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable, IOpenApiReadOnlyContentElement +public interface IOpenApiRequestBody : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable { /// /// Determines if the request body is required in the request. Defaults to false. /// public bool Required { get; } + /// + /// REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. + /// For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/* + /// + public IDictionary? Content { get; } /// /// Converts the request body to a body parameter in preparation for a v2 serialization. /// diff --git a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiResponse.cs b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiResponse.cs index 6823868f2..d0423771f 100644 --- a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiResponse.cs +++ b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiResponse.cs @@ -6,13 +6,19 @@ namespace Microsoft.OpenApi; /// Defines the base properties for the response object. /// This interface is provided for type assertions but should not be implemented by package consumers beyond automatic mocking. /// -public interface IOpenApiResponse : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable, IOpenApiSummarizedElement, IOpenApiReadOnlyContentElement +public interface IOpenApiResponse : IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IShallowCopyable, IOpenApiReferenceable, IOpenApiSummarizedElement { /// /// Maps a header name to its definition. /// public IDictionary? Headers { get; } + /// + /// A map containing descriptions of potential response payloads. + /// The key is a media type or media type range and the value describes it. + /// + public IDictionary? Content { get; } + /// /// A map of operations links that can be followed from the response. /// The key of the map is a short name for the link, diff --git a/src/Microsoft.OpenApi/Models/OpenApiHeader.cs b/src/Microsoft.OpenApi/Models/OpenApiHeader.cs index 9ec42aa06..7e5ea273f 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiHeader.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiHeader.cs @@ -11,7 +11,7 @@ namespace Microsoft.OpenApi /// Header Object. /// The Header Object follows the structure of the Parameter Object. /// - public class OpenApiHeader : IOpenApiHeader, IOpenApiExtensible, IOpenApiContentElement + public class OpenApiHeader : IOpenApiHeader, IOpenApiExtensible { /// public string? Description { get; set; } @@ -98,7 +98,7 @@ public virtual void SerializeAsV3(IOpenApiWriter writer) SerializeInternal(writer, OpenApiSpecVersion.OpenApi3_0, (writer, element) => element.SerializeAsV3(writer)); } - internal void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, + internal void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, Action callback) { Utils.CheckArgumentNull(writer); @@ -175,8 +175,7 @@ public virtual void SerializeAsV2(IOpenApiWriter writer) writer.WriteProperty(OpenApiConstants.AllowReserved, AllowReserved, false); // schema - var targetSchema = Schema switch - { + var targetSchema = Schema switch { OpenApiSchemaReference schemaReference => schemaReference.RecursiveTarget, OpenApiSchema schema => schema, _ => null, diff --git a/src/Microsoft.OpenApi/Models/OpenApiParameter.cs b/src/Microsoft.OpenApi/Models/OpenApiParameter.cs index 14294cbd8..d6b060a78 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiParameter.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiParameter.cs @@ -11,7 +11,7 @@ namespace Microsoft.OpenApi /// /// Parameter Object. /// - public class OpenApiParameter : IOpenApiExtensible, IOpenApiParameter, IOpenApiContentElement + public class OpenApiParameter : IOpenApiExtensible, IOpenApiParameter { private bool? _explode; private ParameterStyle? _style; @@ -60,15 +60,7 @@ public bool Explode /// public JsonNode? Example { get; set; } - /// - /// A map containing the representations for the parameter. - /// The key is the media type and the value describes it. - /// The map MUST only contain one entry. - /// For more complex scenarios, the content property can define the media type and schema of the parameter. - /// A parameter MUST contain either a schema property, or a content property, but not both. - /// When example or examples are provided in conjunction with the schema object, - /// the example MUST follow the prescribed serialization strategy for the parameter. - /// + /// public IDictionary? Content { get; set; } /// @@ -119,11 +111,11 @@ public virtual void SerializeAsV3(IOpenApiWriter writer) SerializeInternal(writer, OpenApiSpecVersion.OpenApi3_0, (writer, element) => element.SerializeAsV3(writer)); } - internal void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, + internal void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, Action callback) { Utils.CheckArgumentNull(writer); - + // Validate that Cookie style is only used in OpenAPI 3.2 and later if (Style == ParameterStyle.Cookie && version < OpenApiSpecVersion.OpenApi3_2) { @@ -234,8 +226,7 @@ internal virtual void WriteRequestBodySchemaForV2(IOpenApiWriter writer, Diction // uniqueItems // enum // multipleOf - var targetSchema = Schema switch - { + var targetSchema = Schema switch { OpenApiSchemaReference schemaReference => schemaReference.RecursiveTarget, OpenApiSchema schema => schema, _ => null, @@ -280,7 +271,7 @@ internal virtual void WriteRequestBodySchemaForV2(IOpenApiWriter writer, Diction public virtual void SerializeAsV2(IOpenApiWriter writer) { Utils.CheckArgumentNull(writer); - + // Validate that Cookie style is only used in OpenAPI 3.2 and later if (Style == ParameterStyle.Cookie) { diff --git a/src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs b/src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs index 225837544..fa29d3ea0 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs @@ -10,7 +10,7 @@ namespace Microsoft.OpenApi /// /// Request Body Object /// - public class OpenApiRequestBody : IOpenApiExtensible, IOpenApiRequestBody, IOpenApiContentElement + public class OpenApiRequestBody : IOpenApiExtensible, IOpenApiRequestBody { /// public string? Description { get; set; } @@ -18,10 +18,7 @@ public class OpenApiRequestBody : IOpenApiExtensible, IOpenApiRequestBody, IOpen /// public bool Required { get; set; } - /// - /// REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. - /// For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/* - /// + /// public IDictionary? Content { get; set; } /// @@ -67,7 +64,7 @@ public virtual void SerializeAsV3(IOpenApiWriter writer) { SerializeInternal(writer, OpenApiSpecVersion.OpenApi3_0, (writer, element) => element.SerializeAsV3(writer)); } - + internal void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, Action callback) { @@ -113,7 +110,7 @@ public IOpenApiParameter ConvertToBodyParameter(IOpenApiWriter writer) Extensions = Extensions?.ToDictionary(static k => k.Key, static v => v.Value) }; // Clone extensions so we can remove the x-bodyName extensions from the output V2 model. - if (bodyParameter.Extensions is not null && + if (bodyParameter.Extensions is not null && bodyParameter.Extensions.TryGetValue(OpenApiConstants.BodyName, out var bodyNameExtension) && bodyNameExtension is JsonNodeExtension bodyName) { @@ -129,7 +126,7 @@ public IEnumerable ConvertToFormDataParameters(IOpenApiWriter if (Content == null || !Content.Any()) yield break; var properties = Content.First().Value.Schema?.Properties; - if (properties != null) + if(properties != null) { foreach (var property in properties) { @@ -147,11 +144,11 @@ public IEnumerable ConvertToFormDataParameters(IOpenApiWriter OpenApiSchemaReference => throw new InvalidOperationException("Unresolved reference target"), _ => throw new InvalidOperationException("Unexpected schema type") }; - + updatedSchema.Type = "file".ToJsonSchemaType(); updatedSchema.Format = null; paramSchema = updatedSchema; - + } yield return new OpenApiFormDataParameter() { @@ -162,7 +159,7 @@ public IEnumerable ConvertToFormDataParameters(IOpenApiWriter Required = Content.First().Value.Schema?.Required?.Contains(property.Key) ?? false }; } - } + } } /// diff --git a/src/Microsoft.OpenApi/Models/OpenApiResponse.cs b/src/Microsoft.OpenApi/Models/OpenApiResponse.cs index 6cc0000df..4ee39336e 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiResponse.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiResponse.cs @@ -10,7 +10,7 @@ namespace Microsoft.OpenApi /// /// Response object. /// - public class OpenApiResponse : IOpenApiExtensible, IOpenApiResponse, IOpenApiContentElement + public class OpenApiResponse : IOpenApiExtensible, IOpenApiResponse { /// public string? Summary { get; set; } @@ -73,7 +73,7 @@ public virtual void SerializeAsV3(IOpenApiWriter writer) SerializeInternal(writer, OpenApiSpecVersion.OpenApi3_0, (writer, element) => element.SerializeAsV3(writer)); } - private void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, + private void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, Action callback) { Utils.CheckArgumentNull(writer); @@ -177,7 +177,7 @@ public virtual void SerializeAsV2(IOpenApiWriter writer) // so remove it from the cloned collection so we don't write it again. extensionsClone?.Remove(key); } - } + } } } diff --git a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt index 5413879c0..59f1bce31 100644 --- a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt +++ b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt @@ -109,10 +109,6 @@ namespace Microsoft.OpenApi { System.Collections.Generic.Dictionary? PathItems { get; } } - public interface IOpenApiContentElement - { - System.Collections.Generic.IDictionary? Content { get; set; } - } public interface IOpenApiDescribedElement : Microsoft.OpenApi.IOpenApiElement { string? Description { get; set; } @@ -133,10 +129,11 @@ namespace Microsoft.OpenApi { void Write(Microsoft.OpenApi.IOpenApiWriter writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion); } - public interface IOpenApiHeader : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public interface IOpenApiHeader : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { bool AllowEmptyValue { get; } bool AllowReserved { get; } + System.Collections.Generic.IDictionary? Content { get; } bool Deprecated { get; } System.Text.Json.Nodes.JsonNode? Example { get; } System.Collections.Generic.IDictionary? Examples { get; } @@ -163,10 +160,11 @@ namespace Microsoft.OpenApi System.Collections.Generic.IList? PrefixEncoding { get; } Microsoft.OpenApi.IOpenApiSchema? Schema { get; } } - public interface IOpenApiParameter : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public interface IOpenApiParameter : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { bool AllowEmptyValue { get; } bool AllowReserved { get; } + System.Collections.Generic.IDictionary? Content { get; } bool Deprecated { get; } System.Text.Json.Nodes.JsonNode? Example { get; } System.Collections.Generic.IDictionary? Examples { get; } @@ -183,10 +181,6 @@ namespace Microsoft.OpenApi System.Collections.Generic.IList? Parameters { get; } System.Collections.Generic.IList? Servers { get; } } - public interface IOpenApiReadOnlyContentElement - { - System.Collections.Generic.IDictionary? Content { get; } - } public interface IOpenApiReadOnlyDescribedElement : Microsoft.OpenApi.IOpenApiElement { string? Description { get; } @@ -220,14 +214,16 @@ namespace Microsoft.OpenApi U CopyReferenceAsTargetElementWithOverrides(U source); } public interface IOpenApiReferenceable : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiSerializable { } - public interface IOpenApiRequestBody : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public interface IOpenApiRequestBody : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { + System.Collections.Generic.IDictionary? Content { get; } bool Required { get; } Microsoft.OpenApi.IOpenApiParameter? ConvertToBodyParameter(Microsoft.OpenApi.IOpenApiWriter writer); System.Collections.Generic.IEnumerable? ConvertToFormDataParameters(Microsoft.OpenApi.IOpenApiWriter writer); } - public interface IOpenApiResponse : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable + public interface IOpenApiResponse : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable { + System.Collections.Generic.IDictionary? Content { get; } System.Collections.Generic.IDictionary? Headers { get; } System.Collections.Generic.IDictionary? Links { get; } } @@ -791,7 +787,7 @@ namespace Microsoft.OpenApi public static Microsoft.OpenApi.OpenApiUrlTreeNode CreateOpenApiUrlTreeNode(System.Collections.Generic.Dictionary sources) { } public static System.Func CreatePredicate(string? operationIds = null, string? tags = null, System.Collections.Generic.Dictionary>? requestUrls = null, Microsoft.OpenApi.OpenApiDocument? source = null) { } } - public class OpenApiHeader : Microsoft.OpenApi.IOpenApiContentElement, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiHeader, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public class OpenApiHeader : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiHeader, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { public OpenApiHeader() { } public bool AllowEmptyValue { get; set; } @@ -812,7 +808,7 @@ namespace Microsoft.OpenApi public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } } - public class OpenApiHeaderReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiHeader, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public class OpenApiHeaderReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiHeader, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { public OpenApiHeaderReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } public bool AllowEmptyValue { get; } @@ -1027,7 +1023,7 @@ namespace Microsoft.OpenApi public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } } - public class OpenApiParameter : Microsoft.OpenApi.IOpenApiContentElement, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiParameter, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public class OpenApiParameter : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiParameter, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { public OpenApiParameter() { } public bool AllowEmptyValue { get; set; } @@ -1050,7 +1046,7 @@ namespace Microsoft.OpenApi public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } } - public class OpenApiParameterReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiParameter, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public class OpenApiParameterReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiParameter, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { public OpenApiParameterReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } public bool AllowEmptyValue { get; } @@ -1155,7 +1151,7 @@ namespace Microsoft.OpenApi protected override void SerializeAdditionalV32Properties(Microsoft.OpenApi.IOpenApiWriter writer) { } protected override void SetAdditional31MetadataFromMapNode(System.Text.Json.Nodes.JsonObject jsonObject) { } } - public class OpenApiRequestBody : Microsoft.OpenApi.IOpenApiContentElement, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiRequestBody, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public class OpenApiRequestBody : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiRequestBody, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { public OpenApiRequestBody() { } public System.Collections.Generic.IDictionary? Content { get; set; } @@ -1170,7 +1166,7 @@ namespace Microsoft.OpenApi public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } } - public class OpenApiRequestBodyReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiRequestBody, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable + public class OpenApiRequestBodyReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiRequestBody, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable { public OpenApiRequestBodyReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } public System.Collections.Generic.IDictionary? Content { get; } @@ -1184,7 +1180,7 @@ namespace Microsoft.OpenApi public Microsoft.OpenApi.IOpenApiRequestBody CreateShallowCopy() { } public override void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } } - public class OpenApiResponse : Microsoft.OpenApi.IOpenApiContentElement, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiResponse, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable + public class OpenApiResponse : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiResponse, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable { public OpenApiResponse() { } public System.Collections.Generic.IDictionary? Content { get; set; } @@ -1199,7 +1195,7 @@ namespace Microsoft.OpenApi public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } } - public class OpenApiResponseReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyContentElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiResponse, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable + public class OpenApiResponseReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiResponse, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable { public OpenApiResponseReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } public System.Collections.Generic.IDictionary? Content { get; } From e1b234cfe357e869b4900f8162ce93cb67424b16 Mon Sep 17 00:00:00 2001 From: "release-please-token-provider[bot]" <225477224+release-please-token-provider[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 18:53:14 +0000 Subject: [PATCH 052/388] chore(main): release 3.3.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 12 ++++++++++++ Directory.Build.props | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ff1c7af58..0befe35d6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.3.0" + ".": "3.3.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8855d4438..3d8605bbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [3.3.1](https://github.com/microsoft/OpenAPI.NET/compare/v3.3.0...v3.3.1) (2026-01-22) + + +### Features + +* **models:** add shared Content interface ([#2695](https://github.com/microsoft/OpenAPI.NET/issues/2695)) ([338566f](https://github.com/microsoft/OpenAPI.NET/commit/338566fafce04ee1329f4ead61fe1e87e01144ad)) + + +### Bug Fixes + +* broken binary compatibility due to interface changes in previous version ([d96bba7](https://github.com/microsoft/OpenAPI.NET/commit/d96bba72c383cd5db2b7032530aee3b4d944ebc6)) + ## [3.3.0](https://github.com/microsoft/OpenAPI.NET/compare/v3.2.0...v3.3.0) (2026-01-21) diff --git a/Directory.Build.props b/Directory.Build.props index 36284217c..13c72dd49 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,7 +12,7 @@ https://github.com/Microsoft/OpenAPI.NET © Microsoft Corporation. All rights reserved. OpenAPI .NET - 3.3.0 + 3.3.1 From 0156943368877e5f6bd6ea8c0a2a169ebe0d6e6c Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Jan 2026 14:21:47 -0600 Subject: [PATCH 053/388] ci: switches to public API analyzer * Initial plan * Convert PublicApi.approved.txt to PublicApiAnalyzers format - Converted test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt (2152 lines) to src/Microsoft.OpenApi/PublicAPI.Shipped.txt (1844 entries) - Generated PublicAPI.Shipped.txt and PublicAPI.Unshipped.txt files for both Microsoft.OpenApi and Microsoft.OpenApi.YamlReader projects - Added Microsoft.CodeAnalysis.PublicApiAnalyzers package reference in Directory.Build.props The conversion extracted 1843 public API declarations from the PublicApiGenerator format and converted them to the Microsoft.CodeAnalysis.PublicApiAnalyzers format: - Types (classes, interfaces, structs, enums, delegates) - Constructors - Methods - Properties (with get/set accessors) - Fields (including const fields) - Events - Enum values with their numeric assignments Note: Build validation and potential missing API entries will need to be addressed in follow-up work as the PublicApiAnalyzers may identify additional public APIs not captured in the original PublicApiGenerator output. * Populate PublicAPI.Shipped.txt for Microsoft.OpenApi project Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> * Remove backup files * Fix PublicAPI.Unshipped.txt for Microsoft.OpenApi.YamlReader - Generated public API using PublicApiGenerator for Microsoft.OpenApi.YamlReader assembly - Converted to PublicApiAnalyzers format and added to PublicAPI.Unshipped.txt - Made static ReadFragment(JsonNode...) method internal to resolve RS0016 and RS0026 analyzer errors - Resolved RS0016/RS0017 analyzer errors for YamlReader project - Note: RS0036 nullability annotation warnings remain but are separate from PublicAPI format issues Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> * chore: removes old unit test based public API validation Signed-off-by: Vincent Biret * chore: reverts copilot hallucination Signed-off-by: Vincent Biret * chore: moves the analyzer to library projects only * chore: refreshes API export Signed-off-by: Vincent Biret --------- Signed-off-by: Vincent Biret Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> Co-authored-by: Vincent Biret --- .../Microsoft.OpenApi.YamlReader.csproj | 5 + .../PublicAPI.Shipped.txt | 17 + .../PublicAPI.Unshipped.txt | 1 + .../Microsoft.OpenApi.csproj | 4 + src/Microsoft.OpenApi/PublicAPI.Shipped.txt | 2023 ++++++++++++++++ src/Microsoft.OpenApi/PublicAPI.Unshipped.txt | 1 + .../Microsoft.OpenApi.Tests.csproj | 1 - .../PublicApi/PublicApi.approved.txt | 2153 ----------------- .../PublicApi/PublicApiTests.cs | 56 - 9 files changed, 2051 insertions(+), 2210 deletions(-) create mode 100644 src/Microsoft.OpenApi.YamlReader/PublicAPI.Shipped.txt create mode 100644 src/Microsoft.OpenApi.YamlReader/PublicAPI.Unshipped.txt create mode 100644 src/Microsoft.OpenApi/PublicAPI.Shipped.txt create mode 100644 src/Microsoft.OpenApi/PublicAPI.Unshipped.txt delete mode 100644 test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt delete mode 100755 test/Microsoft.OpenApi.Tests/PublicApi/PublicApiTests.cs diff --git a/src/Microsoft.OpenApi.YamlReader/Microsoft.OpenApi.YamlReader.csproj b/src/Microsoft.OpenApi.YamlReader/Microsoft.OpenApi.YamlReader.csproj index 1f2f5fb36..c4961cb10 100644 --- a/src/Microsoft.OpenApi.YamlReader/Microsoft.OpenApi.YamlReader.csproj +++ b/src/Microsoft.OpenApi.YamlReader/Microsoft.OpenApi.YamlReader.csproj @@ -28,6 +28,11 @@ + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Microsoft.OpenApi.YamlReader/PublicAPI.Shipped.txt b/src/Microsoft.OpenApi.YamlReader/PublicAPI.Shipped.txt new file mode 100644 index 000000000..7ea43f370 --- /dev/null +++ b/src/Microsoft.OpenApi.YamlReader/PublicAPI.Shipped.txt @@ -0,0 +1,17 @@ +#nullable enable +Microsoft.OpenApi.Reader.OpenApiReaderSettingsExtensions +Microsoft.OpenApi.YamlReader.OpenApiYamlReader +Microsoft.OpenApi.YamlReader.OpenApiYamlReader.OpenApiYamlReader() -> void +Microsoft.OpenApi.YamlReader.OpenApiYamlReader.Read(System.IO.MemoryStream! input, System.Uri! location, Microsoft.OpenApi.Reader.OpenApiReaderSettings! settings) -> Microsoft.OpenApi.Reader.ReadResult! +Microsoft.OpenApi.YamlReader.OpenApiYamlReader.ReadAsync(System.IO.Stream! input, System.Uri! location, Microsoft.OpenApi.Reader.OpenApiReaderSettings! settings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +Microsoft.OpenApi.YamlReader.OpenApiYamlReader.ReadFragment(System.IO.MemoryStream! input, Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.OpenApiDocument! openApiDocument, out Microsoft.OpenApi.Reader.OpenApiDiagnostic! diagnostic, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null) -> T? +Microsoft.OpenApi.YamlReader.YamlConverter +static Microsoft.OpenApi.Reader.OpenApiReaderSettingsExtensions.AddYamlReader(this Microsoft.OpenApi.Reader.OpenApiReaderSettings! settings) -> void +static Microsoft.OpenApi.YamlReader.OpenApiYamlReader.Read(System.Text.Json.Nodes.JsonNode! jsonNode, System.Uri! location, Microsoft.OpenApi.Reader.OpenApiReaderSettings! settings) -> Microsoft.OpenApi.Reader.ReadResult! +static Microsoft.OpenApi.YamlReader.OpenApiYamlReader.ReadFragment(System.Text.Json.Nodes.JsonNode! input, Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.OpenApiDocument! openApiDocument, out Microsoft.OpenApi.Reader.OpenApiDiagnostic! diagnostic, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null) -> T? +static Microsoft.OpenApi.YamlReader.YamlConverter.ToJsonArray(this SharpYaml.Serialization.YamlSequenceNode! yaml) -> System.Text.Json.Nodes.JsonArray! +static Microsoft.OpenApi.YamlReader.YamlConverter.ToJsonNode(this SharpYaml.Serialization.YamlDocument! yaml) -> System.Text.Json.Nodes.JsonNode! +static Microsoft.OpenApi.YamlReader.YamlConverter.ToJsonNode(this SharpYaml.Serialization.YamlNode! yaml) -> System.Text.Json.Nodes.JsonNode! +static Microsoft.OpenApi.YamlReader.YamlConverter.ToJsonNode(this SharpYaml.Serialization.YamlStream! yaml) -> System.Collections.Generic.IEnumerable! +static Microsoft.OpenApi.YamlReader.YamlConverter.ToJsonObject(this SharpYaml.Serialization.YamlMappingNode! yaml) -> System.Text.Json.Nodes.JsonObject! +static Microsoft.OpenApi.YamlReader.YamlConverter.ToYamlNode(this System.Text.Json.Nodes.JsonNode! json) -> SharpYaml.Serialization.YamlNode! diff --git a/src/Microsoft.OpenApi.YamlReader/PublicAPI.Unshipped.txt b/src/Microsoft.OpenApi.YamlReader/PublicAPI.Unshipped.txt new file mode 100644 index 000000000..7dc5c5811 --- /dev/null +++ b/src/Microsoft.OpenApi.YamlReader/PublicAPI.Unshipped.txt @@ -0,0 +1 @@ +#nullable enable diff --git a/src/Microsoft.OpenApi/Microsoft.OpenApi.csproj b/src/Microsoft.OpenApi/Microsoft.OpenApi.csproj index dad533668..a6ea923a6 100644 --- a/src/Microsoft.OpenApi/Microsoft.OpenApi.csproj +++ b/src/Microsoft.OpenApi/Microsoft.OpenApi.csproj @@ -24,6 +24,10 @@ true + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + diff --git a/src/Microsoft.OpenApi/PublicAPI.Shipped.txt b/src/Microsoft.OpenApi/PublicAPI.Shipped.txt new file mode 100644 index 000000000..6658135b1 --- /dev/null +++ b/src/Microsoft.OpenApi/PublicAPI.Shipped.txt @@ -0,0 +1,2023 @@ +#nullable enable +abstract Microsoft.OpenApi.BaseOpenApiReferenceHolder.CopyReference(V! sourceReference) -> V! +abstract Microsoft.OpenApi.BaseOpenApiReferenceHolder.CopyReferenceAsTargetElementWithOverrides(U source) -> U +abstract Microsoft.OpenApi.OpenApiWriterBase.BaseIndentation.get -> int +abstract Microsoft.OpenApi.OpenApiWriterBase.WriteEndArray() -> void +abstract Microsoft.OpenApi.OpenApiWriterBase.WriteEndObject() -> void +abstract Microsoft.OpenApi.OpenApiWriterBase.WriteNull() -> void +abstract Microsoft.OpenApi.OpenApiWriterBase.WritePropertyName(string! name) -> void +abstract Microsoft.OpenApi.OpenApiWriterBase.WriteRaw(string! value) -> void +abstract Microsoft.OpenApi.OpenApiWriterBase.WriteStartArray() -> void +abstract Microsoft.OpenApi.OpenApiWriterBase.WriteStartObject() -> void +abstract Microsoft.OpenApi.OpenApiWriterBase.WriteValue(string! value) -> void +abstract Microsoft.OpenApi.OpenApiWriterBase.WriteValueSeparator() -> void +abstract Microsoft.OpenApi.RuntimeExpression.Expression.get -> string! +const Microsoft.OpenApi.BodyExpression.Body = "body" -> string! +const Microsoft.OpenApi.BodyExpression.PointerPrefix = "#" -> string! +const Microsoft.OpenApi.HeaderExpression.Header = "header." -> string! +const Microsoft.OpenApi.MethodExpression.Method = "$method" -> string! +const Microsoft.OpenApi.OpenApiConstants.AccessCode = "accessCode" -> string! +const Microsoft.OpenApi.OpenApiConstants.AdditionalOperations = "additionalOperations" -> string! +const Microsoft.OpenApi.OpenApiConstants.AdditionalProperties = "additionalProperties" -> string! +const Microsoft.OpenApi.OpenApiConstants.AllOf = "allOf" -> string! +const Microsoft.OpenApi.OpenApiConstants.AllowEmptyValue = "allowEmptyValue" -> string! +const Microsoft.OpenApi.OpenApiConstants.AllowReserved = "allowReserved" -> string! +const Microsoft.OpenApi.OpenApiConstants.AnyOf = "anyOf" -> string! +const Microsoft.OpenApi.OpenApiConstants.Application = "application" -> string! +const Microsoft.OpenApi.OpenApiConstants.Attribute = "attribute" -> string! +const Microsoft.OpenApi.OpenApiConstants.AuthorizationCode = "authorizationCode" -> string! +const Microsoft.OpenApi.OpenApiConstants.AuthorizationUrl = "authorizationUrl" -> string! +const Microsoft.OpenApi.OpenApiConstants.BasePath = "basePath" -> string! +const Microsoft.OpenApi.OpenApiConstants.BaseRegistryUri = "https://openapi.net/" -> string! +const Microsoft.OpenApi.OpenApiConstants.Basic = "basic" -> string! +const Microsoft.OpenApi.OpenApiConstants.Bearer = "bearer" -> string! +const Microsoft.OpenApi.OpenApiConstants.BearerFormat = "bearerFormat" -> string! +const Microsoft.OpenApi.OpenApiConstants.BodyName = "x-bodyName" -> string! +const Microsoft.OpenApi.OpenApiConstants.Callbacks = "callbacks" -> string! +const Microsoft.OpenApi.OpenApiConstants.ClientCredentials = "clientCredentials" -> string! +const Microsoft.OpenApi.OpenApiConstants.Comment = "$comment" -> string! +const Microsoft.OpenApi.OpenApiConstants.Components = "components" -> string! +const Microsoft.OpenApi.OpenApiConstants.ComponentsSegment = "/components/" -> string! +const Microsoft.OpenApi.OpenApiConstants.Const = "const" -> string! +const Microsoft.OpenApi.OpenApiConstants.Consumes = "consumes" -> string! +const Microsoft.OpenApi.OpenApiConstants.Contact = "contact" -> string! +const Microsoft.OpenApi.OpenApiConstants.Content = "content" -> string! +const Microsoft.OpenApi.OpenApiConstants.ContentType = "contentType" -> string! +const Microsoft.OpenApi.OpenApiConstants.DataValue = "dataValue" -> string! +const Microsoft.OpenApi.OpenApiConstants.Default = "default" -> string! +const Microsoft.OpenApi.OpenApiConstants.DefaultDefault = "Default Default" -> string! +const Microsoft.OpenApi.OpenApiConstants.DefaultDescription = "Default Description" -> string! +const Microsoft.OpenApi.OpenApiConstants.DefaultName = "Default Name" -> string! +const Microsoft.OpenApi.OpenApiConstants.DefaultTitle = "Default Title" -> string! +const Microsoft.OpenApi.OpenApiConstants.Definitions = "definitions" -> string! +const Microsoft.OpenApi.OpenApiConstants.Defs = "$defs" -> string! +const Microsoft.OpenApi.OpenApiConstants.Delete = "delete" -> string! +const Microsoft.OpenApi.OpenApiConstants.DependentRequired = "dependentRequired" -> string! +const Microsoft.OpenApi.OpenApiConstants.Deprecated = "deprecated" -> string! +const Microsoft.OpenApi.OpenApiConstants.Description = "description" -> string! +const Microsoft.OpenApi.OpenApiConstants.DeviceAuthorization = "deviceAuthorization" -> string! +const Microsoft.OpenApi.OpenApiConstants.DeviceAuthorizationUrl = "deviceAuthorizationUrl" -> string! +const Microsoft.OpenApi.OpenApiConstants.Discriminator = "discriminator" -> string! +const Microsoft.OpenApi.OpenApiConstants.DollarRef = "$ref" -> string! +const Microsoft.OpenApi.OpenApiConstants.DollarSchema = "$schema" -> string! +const Microsoft.OpenApi.OpenApiConstants.DynamicAnchor = "$dynamicAnchor" -> string! +const Microsoft.OpenApi.OpenApiConstants.DynamicRef = "$dynamicRef" -> string! +const Microsoft.OpenApi.OpenApiConstants.Email = "email" -> string! +const Microsoft.OpenApi.OpenApiConstants.Encoding = "encoding" -> string! +const Microsoft.OpenApi.OpenApiConstants.Enum = "enum" -> string! +const Microsoft.OpenApi.OpenApiConstants.Example = "example" -> string! +const Microsoft.OpenApi.OpenApiConstants.Examples = "examples" -> string! +const Microsoft.OpenApi.OpenApiConstants.ExamplesExtension = "x-examples" -> string! +const Microsoft.OpenApi.OpenApiConstants.ExclusiveMaximum = "exclusiveMaximum" -> string! +const Microsoft.OpenApi.OpenApiConstants.ExclusiveMinimum = "exclusiveMinimum" -> string! +const Microsoft.OpenApi.OpenApiConstants.Explode = "explode" -> string! +const Microsoft.OpenApi.OpenApiConstants.ExtensionFieldNamePrefix = "x-" -> string! +const Microsoft.OpenApi.OpenApiConstants.ExternalDocs = "externalDocs" -> string! +const Microsoft.OpenApi.OpenApiConstants.ExternalValue = "externalValue" -> string! +const Microsoft.OpenApi.OpenApiConstants.Flow = "flow" -> string! +const Microsoft.OpenApi.OpenApiConstants.Flows = "flows" -> string! +const Microsoft.OpenApi.OpenApiConstants.Format = "format" -> string! +const Microsoft.OpenApi.OpenApiConstants.Get = "get" -> string! +const Microsoft.OpenApi.OpenApiConstants.Head = "head" -> string! +const Microsoft.OpenApi.OpenApiConstants.Headers = "headers" -> string! +const Microsoft.OpenApi.OpenApiConstants.Host = "host" -> string! +const Microsoft.OpenApi.OpenApiConstants.Id = "$id" -> string! +const Microsoft.OpenApi.OpenApiConstants.Identifier = "identifier" -> string! +const Microsoft.OpenApi.OpenApiConstants.Implicit = "implicit" -> string! +const Microsoft.OpenApi.OpenApiConstants.In = "in" -> string! +const Microsoft.OpenApi.OpenApiConstants.Info = "info" -> string! +const Microsoft.OpenApi.OpenApiConstants.ItemEncoding = "itemEncoding" -> string! +const Microsoft.OpenApi.OpenApiConstants.Items = "items" -> string! +const Microsoft.OpenApi.OpenApiConstants.ItemSchema = "itemSchema" -> string! +const Microsoft.OpenApi.OpenApiConstants.Json = "json" -> string! +const Microsoft.OpenApi.OpenApiConstants.JsonSchemaDialect = "jsonSchemaDialect" -> string! +const Microsoft.OpenApi.OpenApiConstants.Jwt = "JWT" -> string! +const Microsoft.OpenApi.OpenApiConstants.License = "license" -> string! +const Microsoft.OpenApi.OpenApiConstants.Links = "links" -> string! +const Microsoft.OpenApi.OpenApiConstants.Mapping = "mapping" -> string! +const Microsoft.OpenApi.OpenApiConstants.Maximum = "maximum" -> string! +const Microsoft.OpenApi.OpenApiConstants.MaxItems = "maxItems" -> string! +const Microsoft.OpenApi.OpenApiConstants.MaxLength = "maxLength" -> string! +const Microsoft.OpenApi.OpenApiConstants.MaxProperties = "maxProperties" -> string! +const Microsoft.OpenApi.OpenApiConstants.MediaTypes = "mediaTypes" -> string! +const Microsoft.OpenApi.OpenApiConstants.Minimum = "minimum" -> string! +const Microsoft.OpenApi.OpenApiConstants.MinItems = "minItems" -> string! +const Microsoft.OpenApi.OpenApiConstants.MinLength = "minLength" -> string! +const Microsoft.OpenApi.OpenApiConstants.MinProperties = "minProperties" -> string! +const Microsoft.OpenApi.OpenApiConstants.MultipleOf = "multipleOf" -> string! +const Microsoft.OpenApi.OpenApiConstants.Name = "name" -> string! +const Microsoft.OpenApi.OpenApiConstants.Namespace = "namespace" -> string! +const Microsoft.OpenApi.OpenApiConstants.NodeType = "nodeType" -> string! +const Microsoft.OpenApi.OpenApiConstants.Not = "not" -> string! +const Microsoft.OpenApi.OpenApiConstants.Null = "null" -> string! +const Microsoft.OpenApi.OpenApiConstants.Nullable = "nullable" -> string! +const Microsoft.OpenApi.OpenApiConstants.NullableExtension = "x-nullable" -> string! +const Microsoft.OpenApi.OpenApiConstants.OneOf = "oneOf" -> string! +const Microsoft.OpenApi.OpenApiConstants.OpenApi = "openapi" -> string! +const Microsoft.OpenApi.OpenApiConstants.OpenIdConnectUrl = "openIdConnectUrl" -> string! +const Microsoft.OpenApi.OpenApiConstants.OperationId = "operationId" -> string! +const Microsoft.OpenApi.OpenApiConstants.OperationRef = "operationRef" -> string! +const Microsoft.OpenApi.OpenApiConstants.Options = "options" -> string! +const Microsoft.OpenApi.OpenApiConstants.Parameters = "parameters" -> string! +const Microsoft.OpenApi.OpenApiConstants.Password = "password" -> string! +const Microsoft.OpenApi.OpenApiConstants.Patch = "patch" -> string! +const Microsoft.OpenApi.OpenApiConstants.PathItems = "pathItems" -> string! +const Microsoft.OpenApi.OpenApiConstants.Paths = "paths" -> string! +const Microsoft.OpenApi.OpenApiConstants.Pattern = "pattern" -> string! +const Microsoft.OpenApi.OpenApiConstants.PatternProperties = "patternProperties" -> string! +const Microsoft.OpenApi.OpenApiConstants.Post = "post" -> string! +const Microsoft.OpenApi.OpenApiConstants.Prefix = "prefix" -> string! +const Microsoft.OpenApi.OpenApiConstants.PrefixEncoding = "prefixEncoding" -> string! +const Microsoft.OpenApi.OpenApiConstants.Produces = "produces" -> string! +const Microsoft.OpenApi.OpenApiConstants.Properties = "properties" -> string! +const Microsoft.OpenApi.OpenApiConstants.PropertyName = "propertyName" -> string! +const Microsoft.OpenApi.OpenApiConstants.Put = "put" -> string! +const Microsoft.OpenApi.OpenApiConstants.ReadOnly = "readOnly" -> string! +const Microsoft.OpenApi.OpenApiConstants.RecursiveAnchor = "$recursiveAnchor" -> string! +const Microsoft.OpenApi.OpenApiConstants.RecursiveRef = "$recursiveRef" -> string! +const Microsoft.OpenApi.OpenApiConstants.RefreshUrl = "refreshUrl" -> string! +const Microsoft.OpenApi.OpenApiConstants.RequestBodies = "requestBodies" -> string! +const Microsoft.OpenApi.OpenApiConstants.RequestBody = "requestBody" -> string! +const Microsoft.OpenApi.OpenApiConstants.Required = "required" -> string! +const Microsoft.OpenApi.OpenApiConstants.Responses = "responses" -> string! +const Microsoft.OpenApi.OpenApiConstants.Schema = "schema" -> string! +const Microsoft.OpenApi.OpenApiConstants.Schemas = "schemas" -> string! +const Microsoft.OpenApi.OpenApiConstants.Scheme = "scheme" -> string! +const Microsoft.OpenApi.OpenApiConstants.Schemes = "schemes" -> string! +const Microsoft.OpenApi.OpenApiConstants.Scopes = "scopes" -> string! +const Microsoft.OpenApi.OpenApiConstants.Security = "security" -> string! +const Microsoft.OpenApi.OpenApiConstants.SecurityDefinitions = "securityDefinitions" -> string! +const Microsoft.OpenApi.OpenApiConstants.SecuritySchemes = "securitySchemes" -> string! +const Microsoft.OpenApi.OpenApiConstants.Self = "$self" -> string! +const Microsoft.OpenApi.OpenApiConstants.SerializedValue = "serializedValue" -> string! +const Microsoft.OpenApi.OpenApiConstants.Server = "server" -> string! +const Microsoft.OpenApi.OpenApiConstants.Servers = "servers" -> string! +const Microsoft.OpenApi.OpenApiConstants.Style = "style" -> string! +const Microsoft.OpenApi.OpenApiConstants.Summary = "summary" -> string! +const Microsoft.OpenApi.OpenApiConstants.Swagger = "swagger" -> string! +const Microsoft.OpenApi.OpenApiConstants.Tags = "tags" -> string! +const Microsoft.OpenApi.OpenApiConstants.TermsOfService = "termsOfService" -> string! +const Microsoft.OpenApi.OpenApiConstants.Title = "title" -> string! +const Microsoft.OpenApi.OpenApiConstants.TokenUrl = "tokenUrl" -> string! +const Microsoft.OpenApi.OpenApiConstants.Trace = "trace" -> string! +const Microsoft.OpenApi.OpenApiConstants.Type = "type" -> string! +const Microsoft.OpenApi.OpenApiConstants.UnevaluatedProperties = "unevaluatedProperties" -> string! +const Microsoft.OpenApi.OpenApiConstants.UniqueItems = "uniqueItems" -> string! +const Microsoft.OpenApi.OpenApiConstants.UnrecognizedKeywords = "unrecognizedKeywords" -> string! +const Microsoft.OpenApi.OpenApiConstants.Url = "url" -> string! +const Microsoft.OpenApi.OpenApiConstants.V2ReferenceUri = "https://registry/definitions/" -> string! +const Microsoft.OpenApi.OpenApiConstants.V31ExclusiveMaximum = "exclusiveMaximum" -> string! +const Microsoft.OpenApi.OpenApiConstants.V31ExclusiveMinimum = "exclusiveMinimum" -> string! +const Microsoft.OpenApi.OpenApiConstants.V3ReferenceUri = "https://registry/components/schemas/" -> string! +const Microsoft.OpenApi.OpenApiConstants.Value = "value" -> string! +const Microsoft.OpenApi.OpenApiConstants.Variables = "variables" -> string! +const Microsoft.OpenApi.OpenApiConstants.Version = "version" -> string! +const Microsoft.OpenApi.OpenApiConstants.Vocabulary = "$vocabulary" -> string! +const Microsoft.OpenApi.OpenApiConstants.Webhooks = "webhooks" -> string! +const Microsoft.OpenApi.OpenApiConstants.Wrapped = "wrapped" -> string! +const Microsoft.OpenApi.OpenApiConstants.WriteOnly = "writeOnly" -> string! +const Microsoft.OpenApi.OpenApiConstants.Xml = "xml" -> string! +const Microsoft.OpenApi.OpenApiConstants.Yaml = "yaml" -> string! +const Microsoft.OpenApi.OpenApiConstants.Yml = "yml" -> string! +const Microsoft.OpenApi.OpenApiWriterBase.IndentationString = " " -> string! +const Microsoft.OpenApi.PathExpression.Path = "path." -> string! +const Microsoft.OpenApi.QueryExpression.Query = "query." -> string! +const Microsoft.OpenApi.RequestExpression.Request = "$request." -> string! +const Microsoft.OpenApi.ResponseExpression.Response = "$response." -> string! +const Microsoft.OpenApi.RuntimeExpression.Prefix = "$" -> string! +const Microsoft.OpenApi.StatusCodeExpression.StatusCode = "$statusCode" -> string! +const Microsoft.OpenApi.UrlExpression.Url = "$url" -> string! +Microsoft.OpenApi.BaseOpenApiReference +Microsoft.OpenApi.BaseOpenApiReference.BaseOpenApiReference() -> void +Microsoft.OpenApi.BaseOpenApiReference.BaseOpenApiReference(Microsoft.OpenApi.BaseOpenApiReference! reference) -> void +Microsoft.OpenApi.BaseOpenApiReference.ExternalResource.get -> string? +Microsoft.OpenApi.BaseOpenApiReference.ExternalResource.init -> void +Microsoft.OpenApi.BaseOpenApiReference.HostDocument.get -> Microsoft.OpenApi.OpenApiDocument? +Microsoft.OpenApi.BaseOpenApiReference.HostDocument.init -> void +Microsoft.OpenApi.BaseOpenApiReference.Id.get -> string? +Microsoft.OpenApi.BaseOpenApiReference.Id.init -> void +Microsoft.OpenApi.BaseOpenApiReference.IsExternal.get -> bool +Microsoft.OpenApi.BaseOpenApiReference.IsFragment.get -> bool +Microsoft.OpenApi.BaseOpenApiReference.IsFragment.init -> void +Microsoft.OpenApi.BaseOpenApiReference.IsLocal.get -> bool +Microsoft.OpenApi.BaseOpenApiReference.ReferenceV2.get -> string? +Microsoft.OpenApi.BaseOpenApiReference.ReferenceV3.get -> string? +Microsoft.OpenApi.BaseOpenApiReference.Type.get -> Microsoft.OpenApi.ReferenceType +Microsoft.OpenApi.BaseOpenApiReference.Type.init -> void +Microsoft.OpenApi.BaseOpenApiReferenceHolder +Microsoft.OpenApi.BaseOpenApiReferenceHolder.BaseOpenApiReferenceHolder(Microsoft.OpenApi.BaseOpenApiReferenceHolder! source) -> void +Microsoft.OpenApi.BaseOpenApiReferenceHolder.BaseOpenApiReferenceHolder(string! referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument, Microsoft.OpenApi.ReferenceType referenceType, string? externalResource) -> void +Microsoft.OpenApi.BaseOpenApiReferenceHolder.RecursiveTarget.get -> T? +Microsoft.OpenApi.BaseOpenApiReferenceHolder.Reference.get -> V! +Microsoft.OpenApi.BaseOpenApiReferenceHolder.Reference.init -> void +Microsoft.OpenApi.BaseOpenApiReferenceHolder.UnresolvedReference.get -> bool +Microsoft.OpenApi.BodyExpression +Microsoft.OpenApi.BodyExpression.BodyExpression() -> void +Microsoft.OpenApi.BodyExpression.BodyExpression(Microsoft.OpenApi.JsonPointer? pointer) -> void +Microsoft.OpenApi.BodyExpression.Fragment.get -> string? +Microsoft.OpenApi.CompositeExpression +Microsoft.OpenApi.CompositeExpression.CompositeExpression(string! expression) -> void +Microsoft.OpenApi.CompositeExpression.ContainedExpressions.get -> System.Collections.Generic.List! +Microsoft.OpenApi.CurrentKeys +Microsoft.OpenApi.CurrentKeys.Callback.get -> string? +Microsoft.OpenApi.CurrentKeys.Content.get -> string? +Microsoft.OpenApi.CurrentKeys.CurrentKeys() -> void +Microsoft.OpenApi.CurrentKeys.Encoding.get -> string? +Microsoft.OpenApi.CurrentKeys.Example.get -> string? +Microsoft.OpenApi.CurrentKeys.Extension.get -> string? +Microsoft.OpenApi.CurrentKeys.Header.get -> string? +Microsoft.OpenApi.CurrentKeys.Link.get -> string? +Microsoft.OpenApi.CurrentKeys.Operation.get -> System.Net.Http.HttpMethod? +Microsoft.OpenApi.CurrentKeys.Path.get -> string? +Microsoft.OpenApi.CurrentKeys.Response.get -> string? +Microsoft.OpenApi.CurrentKeys.ServerVariable.get -> string? +Microsoft.OpenApi.DisplayAttribute +Microsoft.OpenApi.DisplayAttribute.DisplayAttribute(string! name) -> void +Microsoft.OpenApi.DisplayAttribute.Name.get -> string! +Microsoft.OpenApi.EnumExtensions +Microsoft.OpenApi.FormattingStreamWriter +Microsoft.OpenApi.FormattingStreamWriter.FormattingStreamWriter(System.IO.Stream! stream, System.IFormatProvider! formatProvider) -> void +Microsoft.OpenApi.HeaderExpression +Microsoft.OpenApi.HeaderExpression.HeaderExpression(string! token) -> void +Microsoft.OpenApi.HeaderExpression.Token.get -> string? +Microsoft.OpenApi.IMetadataContainer +Microsoft.OpenApi.IMetadataContainer.Metadata.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.IMetadataContainer.Metadata.set -> void +Microsoft.OpenApi.IOpenApiCallback +Microsoft.OpenApi.IOpenApiCallback.PathItems.get -> System.Collections.Generic.Dictionary? +Microsoft.OpenApi.IOpenApiDescribedElement +Microsoft.OpenApi.IOpenApiDescribedElement.Description.get -> string? +Microsoft.OpenApi.IOpenApiDescribedElement.Description.set -> void +Microsoft.OpenApi.IOpenApiElement +Microsoft.OpenApi.IOpenApiExample +Microsoft.OpenApi.IOpenApiExample.DataValue.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.IOpenApiExample.ExternalValue.get -> string? +Microsoft.OpenApi.IOpenApiExample.SerializedValue.get -> string? +Microsoft.OpenApi.IOpenApiExample.Value.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.IOpenApiExtensible +Microsoft.OpenApi.IOpenApiExtensible.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.IOpenApiExtensible.Extensions.set -> void +Microsoft.OpenApi.IOpenApiExtension +Microsoft.OpenApi.IOpenApiExtension.Write(Microsoft.OpenApi.IOpenApiWriter! writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion) -> void +Microsoft.OpenApi.IOpenApiHeader +Microsoft.OpenApi.IOpenApiHeader.AllowEmptyValue.get -> bool +Microsoft.OpenApi.IOpenApiHeader.AllowReserved.get -> bool +Microsoft.OpenApi.IOpenApiHeader.Content.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.IOpenApiHeader.Deprecated.get -> bool +Microsoft.OpenApi.IOpenApiHeader.Example.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.IOpenApiHeader.Examples.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.IOpenApiHeader.Explode.get -> bool +Microsoft.OpenApi.IOpenApiHeader.Required.get -> bool +Microsoft.OpenApi.IOpenApiHeader.Schema.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.IOpenApiHeader.Style.get -> Microsoft.OpenApi.ParameterStyle? +Microsoft.OpenApi.IOpenApiLink +Microsoft.OpenApi.IOpenApiLink.OperationId.get -> string? +Microsoft.OpenApi.IOpenApiLink.OperationRef.get -> string? +Microsoft.OpenApi.IOpenApiLink.Parameters.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.IOpenApiLink.RequestBody.get -> Microsoft.OpenApi.RuntimeExpressionAnyWrapper? +Microsoft.OpenApi.IOpenApiLink.Server.get -> Microsoft.OpenApi.OpenApiServer? +Microsoft.OpenApi.IOpenApiMediaType +Microsoft.OpenApi.IOpenApiMediaType.Encoding.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.IOpenApiMediaType.Example.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.IOpenApiMediaType.Examples.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.IOpenApiMediaType.ItemEncoding.get -> Microsoft.OpenApi.OpenApiEncoding? +Microsoft.OpenApi.IOpenApiMediaType.ItemSchema.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.IOpenApiMediaType.PrefixEncoding.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.IOpenApiMediaType.Schema.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.IOpenApiParameter +Microsoft.OpenApi.IOpenApiParameter.AllowEmptyValue.get -> bool +Microsoft.OpenApi.IOpenApiParameter.AllowReserved.get -> bool +Microsoft.OpenApi.IOpenApiParameter.Content.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.IOpenApiParameter.Deprecated.get -> bool +Microsoft.OpenApi.IOpenApiParameter.Example.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.IOpenApiParameter.Examples.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.IOpenApiParameter.Explode.get -> bool +Microsoft.OpenApi.IOpenApiParameter.In.get -> Microsoft.OpenApi.ParameterLocation? +Microsoft.OpenApi.IOpenApiParameter.Name.get -> string? +Microsoft.OpenApi.IOpenApiParameter.Required.get -> bool +Microsoft.OpenApi.IOpenApiParameter.Schema.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.IOpenApiParameter.Style.get -> Microsoft.OpenApi.ParameterStyle? +Microsoft.OpenApi.IOpenApiPathItem +Microsoft.OpenApi.IOpenApiPathItem.Operations.get -> System.Collections.Generic.Dictionary? +Microsoft.OpenApi.IOpenApiPathItem.Parameters.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.IOpenApiPathItem.Servers.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.IOpenApiReader +Microsoft.OpenApi.IOpenApiReader.Read(System.IO.MemoryStream! input, System.Uri! location, Microsoft.OpenApi.Reader.OpenApiReaderSettings! settings) -> Microsoft.OpenApi.Reader.ReadResult! +Microsoft.OpenApi.IOpenApiReader.ReadAsync(System.IO.Stream! input, System.Uri! location, Microsoft.OpenApi.Reader.OpenApiReaderSettings! settings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +Microsoft.OpenApi.IOpenApiReader.ReadFragment(System.IO.MemoryStream! input, Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.OpenApiDocument! openApiDocument, out Microsoft.OpenApi.Reader.OpenApiDiagnostic! diagnostic, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null) -> T? +Microsoft.OpenApi.IOpenApiReadOnlyDescribedElement +Microsoft.OpenApi.IOpenApiReadOnlyDescribedElement.Description.get -> string? +Microsoft.OpenApi.IOpenApiReadOnlyExtensible +Microsoft.OpenApi.IOpenApiReadOnlyExtensible.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.IOpenApiReferenceable +Microsoft.OpenApi.IOpenApiReferenceHolder +Microsoft.OpenApi.IOpenApiReferenceHolder.UnresolvedReference.get -> bool +Microsoft.OpenApi.IOpenApiReferenceHolder +Microsoft.OpenApi.IOpenApiReferenceHolder.CopyReferenceAsTargetElementWithOverrides(U source) -> U +Microsoft.OpenApi.IOpenApiReferenceHolder.RecursiveTarget.get -> T? +Microsoft.OpenApi.IOpenApiReferenceHolder.Target.get -> U? +Microsoft.OpenApi.IOpenApiReferenceHolder +Microsoft.OpenApi.IOpenApiReferenceHolder.Reference.get -> V! +Microsoft.OpenApi.IOpenApiReferenceHolder.Reference.init -> void +Microsoft.OpenApi.IOpenApiRequestBody +Microsoft.OpenApi.IOpenApiRequestBody.Content.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.IOpenApiRequestBody.ConvertToBodyParameter(Microsoft.OpenApi.IOpenApiWriter! writer) -> Microsoft.OpenApi.IOpenApiParameter? +Microsoft.OpenApi.IOpenApiRequestBody.ConvertToFormDataParameters(Microsoft.OpenApi.IOpenApiWriter! writer) -> System.Collections.Generic.IEnumerable? +Microsoft.OpenApi.IOpenApiRequestBody.Required.get -> bool +Microsoft.OpenApi.IOpenApiResponse +Microsoft.OpenApi.IOpenApiResponse.Content.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.IOpenApiResponse.Headers.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.IOpenApiResponse.Links.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.IOpenApiSchema +Microsoft.OpenApi.IOpenApiSchema.AdditionalProperties.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.IOpenApiSchema.AdditionalPropertiesAllowed.get -> bool +Microsoft.OpenApi.IOpenApiSchema.AllOf.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.IOpenApiSchema.AnyOf.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.IOpenApiSchema.Comment.get -> string? +Microsoft.OpenApi.IOpenApiSchema.Const.get -> string? +Microsoft.OpenApi.IOpenApiSchema.Default.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.IOpenApiSchema.Definitions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.IOpenApiSchema.DependentRequired.get -> System.Collections.Generic.IDictionary!>? +Microsoft.OpenApi.IOpenApiSchema.Deprecated.get -> bool +Microsoft.OpenApi.IOpenApiSchema.Discriminator.get -> Microsoft.OpenApi.OpenApiDiscriminator? +Microsoft.OpenApi.IOpenApiSchema.DynamicAnchor.get -> string? +Microsoft.OpenApi.IOpenApiSchema.DynamicRef.get -> string? +Microsoft.OpenApi.IOpenApiSchema.Enum.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.IOpenApiSchema.Example.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.IOpenApiSchema.Examples.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.IOpenApiSchema.ExclusiveMaximum.get -> string? +Microsoft.OpenApi.IOpenApiSchema.ExclusiveMinimum.get -> string? +Microsoft.OpenApi.IOpenApiSchema.ExternalDocs.get -> Microsoft.OpenApi.OpenApiExternalDocs? +Microsoft.OpenApi.IOpenApiSchema.Format.get -> string? +Microsoft.OpenApi.IOpenApiSchema.Id.get -> string? +Microsoft.OpenApi.IOpenApiSchema.Items.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.IOpenApiSchema.Maximum.get -> string? +Microsoft.OpenApi.IOpenApiSchema.MaxItems.get -> int? +Microsoft.OpenApi.IOpenApiSchema.MaxLength.get -> int? +Microsoft.OpenApi.IOpenApiSchema.MaxProperties.get -> int? +Microsoft.OpenApi.IOpenApiSchema.Minimum.get -> string? +Microsoft.OpenApi.IOpenApiSchema.MinItems.get -> int? +Microsoft.OpenApi.IOpenApiSchema.MinLength.get -> int? +Microsoft.OpenApi.IOpenApiSchema.MinProperties.get -> int? +Microsoft.OpenApi.IOpenApiSchema.MultipleOf.get -> decimal? +Microsoft.OpenApi.IOpenApiSchema.Not.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.IOpenApiSchema.OneOf.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.IOpenApiSchema.Pattern.get -> string? +Microsoft.OpenApi.IOpenApiSchema.PatternProperties.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.IOpenApiSchema.Properties.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.IOpenApiSchema.ReadOnly.get -> bool +Microsoft.OpenApi.IOpenApiSchema.Required.get -> System.Collections.Generic.ISet? +Microsoft.OpenApi.IOpenApiSchema.Schema.get -> System.Uri? +Microsoft.OpenApi.IOpenApiSchema.Title.get -> string? +Microsoft.OpenApi.IOpenApiSchema.Type.get -> Microsoft.OpenApi.JsonSchemaType? +Microsoft.OpenApi.IOpenApiSchema.UnevaluatedProperties.get -> bool +Microsoft.OpenApi.IOpenApiSchema.UniqueItems.get -> bool? +Microsoft.OpenApi.IOpenApiSchema.UnrecognizedKeywords.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.IOpenApiSchema.Vocabulary.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.IOpenApiSchema.WriteOnly.get -> bool +Microsoft.OpenApi.IOpenApiSchema.Xml.get -> Microsoft.OpenApi.OpenApiXml? +Microsoft.OpenApi.IOpenApiSecurityScheme +Microsoft.OpenApi.IOpenApiSecurityScheme.BearerFormat.get -> string? +Microsoft.OpenApi.IOpenApiSecurityScheme.Deprecated.get -> bool +Microsoft.OpenApi.IOpenApiSecurityScheme.Flows.get -> Microsoft.OpenApi.OpenApiOAuthFlows? +Microsoft.OpenApi.IOpenApiSecurityScheme.In.get -> Microsoft.OpenApi.ParameterLocation? +Microsoft.OpenApi.IOpenApiSecurityScheme.Name.get -> string? +Microsoft.OpenApi.IOpenApiSecurityScheme.OpenIdConnectUrl.get -> System.Uri? +Microsoft.OpenApi.IOpenApiSecurityScheme.Scheme.get -> string? +Microsoft.OpenApi.IOpenApiSecurityScheme.Type.get -> Microsoft.OpenApi.SecuritySchemeType? +Microsoft.OpenApi.IOpenApiSerializable +Microsoft.OpenApi.IOpenApiSerializable.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.IOpenApiSerializable.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.IOpenApiSerializable.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.IOpenApiSerializable.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.IOpenApiSummarizedElement +Microsoft.OpenApi.IOpenApiSummarizedElement.Summary.get -> string? +Microsoft.OpenApi.IOpenApiSummarizedElement.Summary.set -> void +Microsoft.OpenApi.IOpenApiTag +Microsoft.OpenApi.IOpenApiTag.ExternalDocs.get -> Microsoft.OpenApi.OpenApiExternalDocs? +Microsoft.OpenApi.IOpenApiTag.Kind.get -> string? +Microsoft.OpenApi.IOpenApiTag.Name.get -> string? +Microsoft.OpenApi.IOpenApiTag.Parent.get -> Microsoft.OpenApi.OpenApiTagReference? +Microsoft.OpenApi.IOpenApiTag.Summary.get -> string? +Microsoft.OpenApi.IOpenApiWriter +Microsoft.OpenApi.IOpenApiWriter.FlushAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +Microsoft.OpenApi.IOpenApiWriter.WriteEndArray() -> void +Microsoft.OpenApi.IOpenApiWriter.WriteEndObject() -> void +Microsoft.OpenApi.IOpenApiWriter.WriteNull() -> void +Microsoft.OpenApi.IOpenApiWriter.WritePropertyName(string! name) -> void +Microsoft.OpenApi.IOpenApiWriter.WriteRaw(string! value) -> void +Microsoft.OpenApi.IOpenApiWriter.WriteStartArray() -> void +Microsoft.OpenApi.IOpenApiWriter.WriteStartObject() -> void +Microsoft.OpenApi.IOpenApiWriter.WriteValue(bool value) -> void +Microsoft.OpenApi.IOpenApiWriter.WriteValue(decimal value) -> void +Microsoft.OpenApi.IOpenApiWriter.WriteValue(int value) -> void +Microsoft.OpenApi.IOpenApiWriter.WriteValue(object! value) -> void +Microsoft.OpenApi.IOpenApiWriter.WriteValue(string! value) -> void +Microsoft.OpenApi.IShallowCopyable +Microsoft.OpenApi.IShallowCopyable.CreateShallowCopy() -> T +Microsoft.OpenApi.IStreamLoader +Microsoft.OpenApi.IStreamLoader.LoadAsync(System.Uri! baseUrl, System.Uri! uri, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +Microsoft.OpenApi.IValidationContext +Microsoft.OpenApi.IValidationContext.AddError(Microsoft.OpenApi.OpenApiValidatorError! error) -> void +Microsoft.OpenApi.IValidationContext.AddWarning(Microsoft.OpenApi.OpenApiValidatorWarning! warning) -> void +Microsoft.OpenApi.IValidationContext.Enter(string! segment) -> void +Microsoft.OpenApi.IValidationContext.Exit() -> void +Microsoft.OpenApi.IValidationContext.PathString.get -> string! +Microsoft.OpenApi.JsonNodeExtension +Microsoft.OpenApi.JsonNodeExtension.JsonNodeExtension(System.Text.Json.Nodes.JsonNode! jsonNode) -> void +Microsoft.OpenApi.JsonNodeExtension.Node.get -> System.Text.Json.Nodes.JsonNode! +Microsoft.OpenApi.JsonNodeExtension.Write(Microsoft.OpenApi.IOpenApiWriter! writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion) -> void +Microsoft.OpenApi.JsonNullSentinel +Microsoft.OpenApi.JsonPointer +Microsoft.OpenApi.JsonPointer.JsonPointer(string! pointer) -> void +Microsoft.OpenApi.JsonPointer.ParentPointer.get -> Microsoft.OpenApi.JsonPointer? +Microsoft.OpenApi.JsonPointer.Tokens.get -> string![]! +Microsoft.OpenApi.JsonSchemaReference +Microsoft.OpenApi.JsonSchemaReference.Default.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.JsonSchemaReference.Default.set -> void +Microsoft.OpenApi.JsonSchemaReference.Deprecated.get -> bool? +Microsoft.OpenApi.JsonSchemaReference.Deprecated.set -> void +Microsoft.OpenApi.JsonSchemaReference.Examples.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.JsonSchemaReference.Examples.set -> void +Microsoft.OpenApi.JsonSchemaReference.JsonSchemaReference() -> void +Microsoft.OpenApi.JsonSchemaReference.JsonSchemaReference(Microsoft.OpenApi.JsonSchemaReference! reference) -> void +Microsoft.OpenApi.JsonSchemaReference.ReadOnly.get -> bool? +Microsoft.OpenApi.JsonSchemaReference.ReadOnly.set -> void +Microsoft.OpenApi.JsonSchemaReference.Title.get -> string? +Microsoft.OpenApi.JsonSchemaReference.Title.set -> void +Microsoft.OpenApi.JsonSchemaReference.WriteOnly.get -> bool? +Microsoft.OpenApi.JsonSchemaReference.WriteOnly.set -> void +Microsoft.OpenApi.JsonSchemaType +Microsoft.OpenApi.JsonSchemaType.Array = 64 -> Microsoft.OpenApi.JsonSchemaType +Microsoft.OpenApi.JsonSchemaType.Boolean = 2 -> Microsoft.OpenApi.JsonSchemaType +Microsoft.OpenApi.JsonSchemaType.Integer = 4 -> Microsoft.OpenApi.JsonSchemaType +Microsoft.OpenApi.JsonSchemaType.Null = 1 -> Microsoft.OpenApi.JsonSchemaType +Microsoft.OpenApi.JsonSchemaType.Number = 8 -> Microsoft.OpenApi.JsonSchemaType +Microsoft.OpenApi.JsonSchemaType.Object = 32 -> Microsoft.OpenApi.JsonSchemaType +Microsoft.OpenApi.JsonSchemaType.String = 16 -> Microsoft.OpenApi.JsonSchemaType +Microsoft.OpenApi.MethodExpression +Microsoft.OpenApi.MethodExpression.MethodExpression() -> void +Microsoft.OpenApi.MicrosoftExtensions.EnumDescription +Microsoft.OpenApi.MicrosoftExtensions.EnumDescription.Description.get -> string! +Microsoft.OpenApi.MicrosoftExtensions.EnumDescription.Description.set -> void +Microsoft.OpenApi.MicrosoftExtensions.EnumDescription.EnumDescription() -> void +Microsoft.OpenApi.MicrosoftExtensions.EnumDescription.EnumDescription(System.Text.Json.Nodes.JsonObject! source) -> void +Microsoft.OpenApi.MicrosoftExtensions.EnumDescription.Name.get -> string! +Microsoft.OpenApi.MicrosoftExtensions.EnumDescription.Name.set -> void +Microsoft.OpenApi.MicrosoftExtensions.EnumDescription.Value.get -> string! +Microsoft.OpenApi.MicrosoftExtensions.EnumDescription.Value.set -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiDeprecationExtension +Microsoft.OpenApi.MicrosoftExtensions.OpenApiDeprecationExtension.Date.get -> System.DateTimeOffset? +Microsoft.OpenApi.MicrosoftExtensions.OpenApiDeprecationExtension.Date.set -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiDeprecationExtension.Description.get -> string! +Microsoft.OpenApi.MicrosoftExtensions.OpenApiDeprecationExtension.Description.set -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiDeprecationExtension.OpenApiDeprecationExtension() -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiDeprecationExtension.RemovalDate.get -> System.DateTimeOffset? +Microsoft.OpenApi.MicrosoftExtensions.OpenApiDeprecationExtension.RemovalDate.set -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiDeprecationExtension.Version.get -> string! +Microsoft.OpenApi.MicrosoftExtensions.OpenApiDeprecationExtension.Version.set -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiDeprecationExtension.Write(Microsoft.OpenApi.IOpenApiWriter! writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion) -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiEnumFlagsExtension +Microsoft.OpenApi.MicrosoftExtensions.OpenApiEnumFlagsExtension.IsFlags.get -> bool +Microsoft.OpenApi.MicrosoftExtensions.OpenApiEnumFlagsExtension.IsFlags.set -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiEnumFlagsExtension.OpenApiEnumFlagsExtension() -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiEnumFlagsExtension.Write(Microsoft.OpenApi.IOpenApiWriter! writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion) -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiEnumValuesDescriptionExtension +Microsoft.OpenApi.MicrosoftExtensions.OpenApiEnumValuesDescriptionExtension.EnumName.get -> string! +Microsoft.OpenApi.MicrosoftExtensions.OpenApiEnumValuesDescriptionExtension.EnumName.set -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiEnumValuesDescriptionExtension.OpenApiEnumValuesDescriptionExtension() -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiEnumValuesDescriptionExtension.ValuesDescriptions.get -> System.Collections.Generic.List! +Microsoft.OpenApi.MicrosoftExtensions.OpenApiEnumValuesDescriptionExtension.ValuesDescriptions.set -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiEnumValuesDescriptionExtension.Write(Microsoft.OpenApi.IOpenApiWriter! writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion) -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiPagingExtension +Microsoft.OpenApi.MicrosoftExtensions.OpenApiPagingExtension.ItemName.get -> string! +Microsoft.OpenApi.MicrosoftExtensions.OpenApiPagingExtension.ItemName.set -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiPagingExtension.NextLinkName.get -> string! +Microsoft.OpenApi.MicrosoftExtensions.OpenApiPagingExtension.NextLinkName.set -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiPagingExtension.OpenApiPagingExtension() -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiPagingExtension.OperationName.get -> string! +Microsoft.OpenApi.MicrosoftExtensions.OpenApiPagingExtension.OperationName.set -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiPagingExtension.Write(Microsoft.OpenApi.IOpenApiWriter! writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion) -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiPrimaryErrorMessageExtension +Microsoft.OpenApi.MicrosoftExtensions.OpenApiPrimaryErrorMessageExtension.IsPrimaryErrorMessage.get -> bool +Microsoft.OpenApi.MicrosoftExtensions.OpenApiPrimaryErrorMessageExtension.IsPrimaryErrorMessage.set -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiPrimaryErrorMessageExtension.OpenApiPrimaryErrorMessageExtension() -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiPrimaryErrorMessageExtension.Write(Microsoft.OpenApi.IOpenApiWriter! writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion) -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiReservedParameterExtension +Microsoft.OpenApi.MicrosoftExtensions.OpenApiReservedParameterExtension.IsReserved.get -> bool? +Microsoft.OpenApi.MicrosoftExtensions.OpenApiReservedParameterExtension.IsReserved.set -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiReservedParameterExtension.OpenApiReservedParameterExtension() -> void +Microsoft.OpenApi.MicrosoftExtensions.OpenApiReservedParameterExtension.Write(Microsoft.OpenApi.IOpenApiWriter! writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion) -> void +Microsoft.OpenApi.OpenApiCallback +Microsoft.OpenApi.OpenApiCallback.AddPathItem(Microsoft.OpenApi.RuntimeExpression! expression, Microsoft.OpenApi.IOpenApiPathItem! pathItem) -> void +Microsoft.OpenApi.OpenApiCallback.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiCallback! +Microsoft.OpenApi.OpenApiCallback.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiCallback.Extensions.set -> void +Microsoft.OpenApi.OpenApiCallback.OpenApiCallback() -> void +Microsoft.OpenApi.OpenApiCallback.PathItems.get -> System.Collections.Generic.Dictionary? +Microsoft.OpenApi.OpenApiCallback.PathItems.set -> void +Microsoft.OpenApi.OpenApiCallbackReference +Microsoft.OpenApi.OpenApiCallbackReference.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiCallback! +Microsoft.OpenApi.OpenApiCallbackReference.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiCallbackReference.OpenApiCallbackReference(string! referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) -> void +Microsoft.OpenApi.OpenApiCallbackReference.PathItems.get -> System.Collections.Generic.Dictionary? +Microsoft.OpenApi.OpenApiComponents +Microsoft.OpenApi.OpenApiComponents.Callbacks.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiComponents.Callbacks.set -> void +Microsoft.OpenApi.OpenApiComponents.Examples.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiComponents.Examples.set -> void +Microsoft.OpenApi.OpenApiComponents.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiComponents.Extensions.set -> void +Microsoft.OpenApi.OpenApiComponents.Headers.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiComponents.Headers.set -> void +Microsoft.OpenApi.OpenApiComponents.Links.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiComponents.Links.set -> void +Microsoft.OpenApi.OpenApiComponents.MediaTypes.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiComponents.MediaTypes.set -> void +Microsoft.OpenApi.OpenApiComponents.OpenApiComponents() -> void +Microsoft.OpenApi.OpenApiComponents.OpenApiComponents(Microsoft.OpenApi.OpenApiComponents? components) -> void +Microsoft.OpenApi.OpenApiComponents.Parameters.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiComponents.Parameters.set -> void +Microsoft.OpenApi.OpenApiComponents.PathItems.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiComponents.PathItems.set -> void +Microsoft.OpenApi.OpenApiComponents.RequestBodies.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiComponents.RequestBodies.set -> void +Microsoft.OpenApi.OpenApiComponents.Responses.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiComponents.Responses.set -> void +Microsoft.OpenApi.OpenApiComponents.Schemas.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiComponents.Schemas.set -> void +Microsoft.OpenApi.OpenApiComponents.SecuritySchemes.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiComponents.SecuritySchemes.set -> void +Microsoft.OpenApi.OpenApiComponentsRules +Microsoft.OpenApi.OpenApiConstants +Microsoft.OpenApi.OpenApiContact +Microsoft.OpenApi.OpenApiContact.Email.get -> string? +Microsoft.OpenApi.OpenApiContact.Email.set -> void +Microsoft.OpenApi.OpenApiContact.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiContact.Extensions.set -> void +Microsoft.OpenApi.OpenApiContact.Name.get -> string? +Microsoft.OpenApi.OpenApiContact.Name.set -> void +Microsoft.OpenApi.OpenApiContact.OpenApiContact() -> void +Microsoft.OpenApi.OpenApiContact.OpenApiContact(Microsoft.OpenApi.OpenApiContact! contact) -> void +Microsoft.OpenApi.OpenApiContact.Url.get -> System.Uri? +Microsoft.OpenApi.OpenApiContact.Url.set -> void +Microsoft.OpenApi.OpenApiContactRules +Microsoft.OpenApi.OpenApiDiscriminator +Microsoft.OpenApi.OpenApiDiscriminator.DefaultMapping.get -> Microsoft.OpenApi.OpenApiSchemaReference? +Microsoft.OpenApi.OpenApiDiscriminator.DefaultMapping.set -> void +Microsoft.OpenApi.OpenApiDiscriminator.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiDiscriminator.Extensions.set -> void +Microsoft.OpenApi.OpenApiDiscriminator.Mapping.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiDiscriminator.Mapping.set -> void +Microsoft.OpenApi.OpenApiDiscriminator.OpenApiDiscriminator() -> void +Microsoft.OpenApi.OpenApiDiscriminator.OpenApiDiscriminator(Microsoft.OpenApi.OpenApiDiscriminator! discriminator) -> void +Microsoft.OpenApi.OpenApiDiscriminator.PropertyName.get -> string? +Microsoft.OpenApi.OpenApiDiscriminator.PropertyName.set -> void +Microsoft.OpenApi.OpenApiDiscriminator.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiDiscriminator.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiDiscriminator.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiDiscriminator.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiDocument +Microsoft.OpenApi.OpenApiDocument.AddComponent(string! id, T componentToRegister) -> bool +Microsoft.OpenApi.OpenApiDocument.BaseUri.get -> System.Uri! +Microsoft.OpenApi.OpenApiDocument.Components.get -> Microsoft.OpenApi.OpenApiComponents? +Microsoft.OpenApi.OpenApiDocument.Components.set -> void +Microsoft.OpenApi.OpenApiDocument.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiDocument.Extensions.set -> void +Microsoft.OpenApi.OpenApiDocument.ExternalDocs.get -> Microsoft.OpenApi.OpenApiExternalDocs? +Microsoft.OpenApi.OpenApiDocument.ExternalDocs.set -> void +Microsoft.OpenApi.OpenApiDocument.GetHashCodeAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +Microsoft.OpenApi.OpenApiDocument.Info.get -> Microsoft.OpenApi.OpenApiInfo! +Microsoft.OpenApi.OpenApiDocument.Info.set -> void +Microsoft.OpenApi.OpenApiDocument.JsonSchemaDialect.get -> System.Uri? +Microsoft.OpenApi.OpenApiDocument.JsonSchemaDialect.set -> void +Microsoft.OpenApi.OpenApiDocument.Metadata.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiDocument.Metadata.set -> void +Microsoft.OpenApi.OpenApiDocument.OpenApiDocument() -> void +Microsoft.OpenApi.OpenApiDocument.OpenApiDocument(Microsoft.OpenApi.OpenApiDocument? document) -> void +Microsoft.OpenApi.OpenApiDocument.Paths.get -> Microsoft.OpenApi.OpenApiPaths! +Microsoft.OpenApi.OpenApiDocument.Paths.set -> void +Microsoft.OpenApi.OpenApiDocument.RegisterComponents() -> void +Microsoft.OpenApi.OpenApiDocument.Security.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiDocument.Security.set -> void +Microsoft.OpenApi.OpenApiDocument.Self.get -> System.Uri? +Microsoft.OpenApi.OpenApiDocument.Self.set -> void +Microsoft.OpenApi.OpenApiDocument.SerializeAs(Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiDocument.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiDocument.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiDocument.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiDocument.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiDocument.Servers.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiDocument.Servers.set -> void +Microsoft.OpenApi.OpenApiDocument.SetReferenceHostDocument() -> void +Microsoft.OpenApi.OpenApiDocument.Tags.get -> System.Collections.Generic.ISet? +Microsoft.OpenApi.OpenApiDocument.Tags.set -> void +Microsoft.OpenApi.OpenApiDocument.Webhooks.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiDocument.Webhooks.set -> void +Microsoft.OpenApi.OpenApiDocument.Workspace.get -> Microsoft.OpenApi.OpenApiWorkspace? +Microsoft.OpenApi.OpenApiDocument.Workspace.set -> void +Microsoft.OpenApi.OpenApiDocumentRules +Microsoft.OpenApi.OpenApiElementExtensions +Microsoft.OpenApi.OpenApiEncoding +Microsoft.OpenApi.OpenApiEncoding.AllowReserved.get -> bool? +Microsoft.OpenApi.OpenApiEncoding.AllowReserved.set -> void +Microsoft.OpenApi.OpenApiEncoding.ContentType.get -> string? +Microsoft.OpenApi.OpenApiEncoding.ContentType.set -> void +Microsoft.OpenApi.OpenApiEncoding.Encoding.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiEncoding.Encoding.set -> void +Microsoft.OpenApi.OpenApiEncoding.Explode.get -> bool? +Microsoft.OpenApi.OpenApiEncoding.Explode.set -> void +Microsoft.OpenApi.OpenApiEncoding.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiEncoding.Extensions.set -> void +Microsoft.OpenApi.OpenApiEncoding.Headers.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiEncoding.Headers.set -> void +Microsoft.OpenApi.OpenApiEncoding.ItemEncoding.get -> Microsoft.OpenApi.OpenApiEncoding? +Microsoft.OpenApi.OpenApiEncoding.ItemEncoding.set -> void +Microsoft.OpenApi.OpenApiEncoding.OpenApiEncoding() -> void +Microsoft.OpenApi.OpenApiEncoding.OpenApiEncoding(Microsoft.OpenApi.OpenApiEncoding! encoding) -> void +Microsoft.OpenApi.OpenApiEncoding.PrefixEncoding.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiEncoding.PrefixEncoding.set -> void +Microsoft.OpenApi.OpenApiEncoding.Style.get -> Microsoft.OpenApi.ParameterStyle? +Microsoft.OpenApi.OpenApiEncoding.Style.set -> void +Microsoft.OpenApi.OpenApiError +Microsoft.OpenApi.OpenApiError.Message.get -> string! +Microsoft.OpenApi.OpenApiError.Message.set -> void +Microsoft.OpenApi.OpenApiError.OpenApiError(Microsoft.OpenApi.OpenApiError! error) -> void +Microsoft.OpenApi.OpenApiError.OpenApiError(Microsoft.OpenApi.OpenApiException! exception) -> void +Microsoft.OpenApi.OpenApiError.OpenApiError(string? pointer, string! message) -> void +Microsoft.OpenApi.OpenApiError.Pointer.get -> string? +Microsoft.OpenApi.OpenApiError.Pointer.set -> void +Microsoft.OpenApi.OpenApiExample +Microsoft.OpenApi.OpenApiExample.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiExample! +Microsoft.OpenApi.OpenApiExample.DataValue.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.OpenApiExample.DataValue.set -> void +Microsoft.OpenApi.OpenApiExample.Description.get -> string? +Microsoft.OpenApi.OpenApiExample.Description.set -> void +Microsoft.OpenApi.OpenApiExample.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiExample.Extensions.set -> void +Microsoft.OpenApi.OpenApiExample.ExternalValue.get -> string? +Microsoft.OpenApi.OpenApiExample.ExternalValue.set -> void +Microsoft.OpenApi.OpenApiExample.OpenApiExample() -> void +Microsoft.OpenApi.OpenApiExample.SerializedValue.get -> string? +Microsoft.OpenApi.OpenApiExample.SerializedValue.set -> void +Microsoft.OpenApi.OpenApiExample.Summary.get -> string? +Microsoft.OpenApi.OpenApiExample.Summary.set -> void +Microsoft.OpenApi.OpenApiExample.Value.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.OpenApiExample.Value.set -> void +Microsoft.OpenApi.OpenApiExampleReference +Microsoft.OpenApi.OpenApiExampleReference.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiExample! +Microsoft.OpenApi.OpenApiExampleReference.DataValue.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.OpenApiExampleReference.Description.get -> string? +Microsoft.OpenApi.OpenApiExampleReference.Description.set -> void +Microsoft.OpenApi.OpenApiExampleReference.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiExampleReference.ExternalValue.get -> string? +Microsoft.OpenApi.OpenApiExampleReference.OpenApiExampleReference(string! referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) -> void +Microsoft.OpenApi.OpenApiExampleReference.SerializedValue.get -> string? +Microsoft.OpenApi.OpenApiExampleReference.Summary.get -> string? +Microsoft.OpenApi.OpenApiExampleReference.Summary.set -> void +Microsoft.OpenApi.OpenApiExampleReference.Value.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.OpenApiException +Microsoft.OpenApi.OpenApiException.OpenApiException() -> void +Microsoft.OpenApi.OpenApiException.OpenApiException(string! message) -> void +Microsoft.OpenApi.OpenApiException.OpenApiException(string! message, System.Exception? innerException) -> void +Microsoft.OpenApi.OpenApiException.Pointer.get -> string? +Microsoft.OpenApi.OpenApiException.Pointer.set -> void +Microsoft.OpenApi.OpenApiExtensibleDictionary +Microsoft.OpenApi.OpenApiExtensibleDictionary.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiExtensibleDictionary.Extensions.set -> void +Microsoft.OpenApi.OpenApiExtensibleDictionary.OpenApiExtensibleDictionary() -> void +Microsoft.OpenApi.OpenApiExtensibleDictionary.OpenApiExtensibleDictionary(System.Collections.Generic.Dictionary! dictionary, System.Collections.Generic.Dictionary? extensions = null) -> void +Microsoft.OpenApi.OpenApiExtensibleDictionary.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiExtensibleDictionary.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiExtensibleDictionary.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiExtensibleDictionary.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiExtensibleExtensions +Microsoft.OpenApi.OpenApiExtensibleRules +Microsoft.OpenApi.OpenApiExternalDocs +Microsoft.OpenApi.OpenApiExternalDocs.Description.get -> string? +Microsoft.OpenApi.OpenApiExternalDocs.Description.set -> void +Microsoft.OpenApi.OpenApiExternalDocs.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiExternalDocs.Extensions.set -> void +Microsoft.OpenApi.OpenApiExternalDocs.OpenApiExternalDocs() -> void +Microsoft.OpenApi.OpenApiExternalDocs.OpenApiExternalDocs(Microsoft.OpenApi.OpenApiExternalDocs! externalDocs) -> void +Microsoft.OpenApi.OpenApiExternalDocs.Url.get -> System.Uri? +Microsoft.OpenApi.OpenApiExternalDocs.Url.set -> void +Microsoft.OpenApi.OpenApiExternalDocsRules +Microsoft.OpenApi.OpenApiFilterService +Microsoft.OpenApi.OpenApiHeader +Microsoft.OpenApi.OpenApiHeader.AllowEmptyValue.get -> bool +Microsoft.OpenApi.OpenApiHeader.AllowEmptyValue.set -> void +Microsoft.OpenApi.OpenApiHeader.AllowReserved.get -> bool +Microsoft.OpenApi.OpenApiHeader.AllowReserved.set -> void +Microsoft.OpenApi.OpenApiHeader.Content.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiHeader.Content.set -> void +Microsoft.OpenApi.OpenApiHeader.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiHeader! +Microsoft.OpenApi.OpenApiHeader.Deprecated.get -> bool +Microsoft.OpenApi.OpenApiHeader.Deprecated.set -> void +Microsoft.OpenApi.OpenApiHeader.Description.get -> string? +Microsoft.OpenApi.OpenApiHeader.Description.set -> void +Microsoft.OpenApi.OpenApiHeader.Example.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.OpenApiHeader.Example.set -> void +Microsoft.OpenApi.OpenApiHeader.Examples.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiHeader.Examples.set -> void +Microsoft.OpenApi.OpenApiHeader.Explode.get -> bool +Microsoft.OpenApi.OpenApiHeader.Explode.set -> void +Microsoft.OpenApi.OpenApiHeader.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiHeader.Extensions.set -> void +Microsoft.OpenApi.OpenApiHeader.OpenApiHeader() -> void +Microsoft.OpenApi.OpenApiHeader.Required.get -> bool +Microsoft.OpenApi.OpenApiHeader.Required.set -> void +Microsoft.OpenApi.OpenApiHeader.Schema.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.OpenApiHeader.Schema.set -> void +Microsoft.OpenApi.OpenApiHeader.Style.get -> Microsoft.OpenApi.ParameterStyle? +Microsoft.OpenApi.OpenApiHeader.Style.set -> void +Microsoft.OpenApi.OpenApiHeaderReference +Microsoft.OpenApi.OpenApiHeaderReference.AllowEmptyValue.get -> bool +Microsoft.OpenApi.OpenApiHeaderReference.AllowReserved.get -> bool +Microsoft.OpenApi.OpenApiHeaderReference.Content.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiHeaderReference.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiHeader! +Microsoft.OpenApi.OpenApiHeaderReference.Deprecated.get -> bool +Microsoft.OpenApi.OpenApiHeaderReference.Description.get -> string? +Microsoft.OpenApi.OpenApiHeaderReference.Description.set -> void +Microsoft.OpenApi.OpenApiHeaderReference.Example.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.OpenApiHeaderReference.Examples.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiHeaderReference.Explode.get -> bool +Microsoft.OpenApi.OpenApiHeaderReference.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiHeaderReference.OpenApiHeaderReference(string! referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) -> void +Microsoft.OpenApi.OpenApiHeaderReference.Required.get -> bool +Microsoft.OpenApi.OpenApiHeaderReference.Schema.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.OpenApiHeaderReference.Style.get -> Microsoft.OpenApi.ParameterStyle? +Microsoft.OpenApi.OpenApiInfo +Microsoft.OpenApi.OpenApiInfo.Contact.get -> Microsoft.OpenApi.OpenApiContact? +Microsoft.OpenApi.OpenApiInfo.Contact.set -> void +Microsoft.OpenApi.OpenApiInfo.Description.get -> string? +Microsoft.OpenApi.OpenApiInfo.Description.set -> void +Microsoft.OpenApi.OpenApiInfo.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiInfo.Extensions.set -> void +Microsoft.OpenApi.OpenApiInfo.License.get -> Microsoft.OpenApi.OpenApiLicense? +Microsoft.OpenApi.OpenApiInfo.License.set -> void +Microsoft.OpenApi.OpenApiInfo.OpenApiInfo() -> void +Microsoft.OpenApi.OpenApiInfo.OpenApiInfo(Microsoft.OpenApi.OpenApiInfo! info) -> void +Microsoft.OpenApi.OpenApiInfo.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiInfo.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiInfo.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiInfo.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiInfo.Summary.get -> string? +Microsoft.OpenApi.OpenApiInfo.Summary.set -> void +Microsoft.OpenApi.OpenApiInfo.TermsOfService.get -> System.Uri? +Microsoft.OpenApi.OpenApiInfo.TermsOfService.set -> void +Microsoft.OpenApi.OpenApiInfo.Title.get -> string? +Microsoft.OpenApi.OpenApiInfo.Title.set -> void +Microsoft.OpenApi.OpenApiInfo.Version.get -> string? +Microsoft.OpenApi.OpenApiInfo.Version.set -> void +Microsoft.OpenApi.OpenApiInfoRules +Microsoft.OpenApi.OpenApiJsonWriter +Microsoft.OpenApi.OpenApiJsonWriter.OpenApiJsonWriter(System.IO.TextWriter! textWriter) -> void +Microsoft.OpenApi.OpenApiJsonWriter.OpenApiJsonWriter(System.IO.TextWriter! textWriter, Microsoft.OpenApi.OpenApiJsonWriterSettings! settings) -> void +Microsoft.OpenApi.OpenApiJsonWriter.OpenApiJsonWriter(System.IO.TextWriter! textWriter, Microsoft.OpenApi.OpenApiWriterSettings? settings) -> void +Microsoft.OpenApi.OpenApiJsonWriter.OpenApiJsonWriter(System.IO.TextWriter! textWriter, Microsoft.OpenApi.OpenApiWriterSettings? settings, bool terseOutput) -> void +Microsoft.OpenApi.OpenApiJsonWriterSettings +Microsoft.OpenApi.OpenApiJsonWriterSettings.OpenApiJsonWriterSettings() -> void +Microsoft.OpenApi.OpenApiJsonWriterSettings.Terse.get -> bool +Microsoft.OpenApi.OpenApiJsonWriterSettings.Terse.set -> void +Microsoft.OpenApi.OpenApiLicense +Microsoft.OpenApi.OpenApiLicense.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiLicense.Extensions.set -> void +Microsoft.OpenApi.OpenApiLicense.Identifier.get -> string? +Microsoft.OpenApi.OpenApiLicense.Identifier.set -> void +Microsoft.OpenApi.OpenApiLicense.Name.get -> string? +Microsoft.OpenApi.OpenApiLicense.Name.set -> void +Microsoft.OpenApi.OpenApiLicense.OpenApiLicense() -> void +Microsoft.OpenApi.OpenApiLicense.OpenApiLicense(Microsoft.OpenApi.OpenApiLicense! license) -> void +Microsoft.OpenApi.OpenApiLicense.Url.get -> System.Uri? +Microsoft.OpenApi.OpenApiLicense.Url.set -> void +Microsoft.OpenApi.OpenApiLicenseRules +Microsoft.OpenApi.OpenApiLink +Microsoft.OpenApi.OpenApiLink.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiLink! +Microsoft.OpenApi.OpenApiLink.Description.get -> string? +Microsoft.OpenApi.OpenApiLink.Description.set -> void +Microsoft.OpenApi.OpenApiLink.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiLink.Extensions.set -> void +Microsoft.OpenApi.OpenApiLink.OpenApiLink() -> void +Microsoft.OpenApi.OpenApiLink.OperationId.get -> string? +Microsoft.OpenApi.OpenApiLink.OperationId.set -> void +Microsoft.OpenApi.OpenApiLink.OperationRef.get -> string? +Microsoft.OpenApi.OpenApiLink.OperationRef.set -> void +Microsoft.OpenApi.OpenApiLink.Parameters.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiLink.Parameters.set -> void +Microsoft.OpenApi.OpenApiLink.RequestBody.get -> Microsoft.OpenApi.RuntimeExpressionAnyWrapper? +Microsoft.OpenApi.OpenApiLink.RequestBody.set -> void +Microsoft.OpenApi.OpenApiLink.Server.get -> Microsoft.OpenApi.OpenApiServer? +Microsoft.OpenApi.OpenApiLink.Server.set -> void +Microsoft.OpenApi.OpenApiLinkReference +Microsoft.OpenApi.OpenApiLinkReference.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiLink! +Microsoft.OpenApi.OpenApiLinkReference.Description.get -> string? +Microsoft.OpenApi.OpenApiLinkReference.Description.set -> void +Microsoft.OpenApi.OpenApiLinkReference.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiLinkReference.OpenApiLinkReference(string! referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) -> void +Microsoft.OpenApi.OpenApiLinkReference.OperationId.get -> string? +Microsoft.OpenApi.OpenApiLinkReference.OperationRef.get -> string? +Microsoft.OpenApi.OpenApiLinkReference.Parameters.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiLinkReference.RequestBody.get -> Microsoft.OpenApi.RuntimeExpressionAnyWrapper? +Microsoft.OpenApi.OpenApiLinkReference.Server.get -> Microsoft.OpenApi.OpenApiServer? +Microsoft.OpenApi.OpenApiMediaType +Microsoft.OpenApi.OpenApiMediaType.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiMediaType! +Microsoft.OpenApi.OpenApiMediaType.Encoding.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiMediaType.Encoding.set -> void +Microsoft.OpenApi.OpenApiMediaType.Example.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.OpenApiMediaType.Example.set -> void +Microsoft.OpenApi.OpenApiMediaType.Examples.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiMediaType.Examples.set -> void +Microsoft.OpenApi.OpenApiMediaType.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiMediaType.Extensions.set -> void +Microsoft.OpenApi.OpenApiMediaType.ItemEncoding.get -> Microsoft.OpenApi.OpenApiEncoding? +Microsoft.OpenApi.OpenApiMediaType.ItemEncoding.set -> void +Microsoft.OpenApi.OpenApiMediaType.ItemSchema.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.OpenApiMediaType.ItemSchema.set -> void +Microsoft.OpenApi.OpenApiMediaType.OpenApiMediaType() -> void +Microsoft.OpenApi.OpenApiMediaType.OpenApiMediaType(Microsoft.OpenApi.OpenApiMediaType? mediaType) -> void +Microsoft.OpenApi.OpenApiMediaType.PrefixEncoding.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiMediaType.PrefixEncoding.set -> void +Microsoft.OpenApi.OpenApiMediaType.Schema.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.OpenApiMediaType.Schema.set -> void +Microsoft.OpenApi.OpenApiMediaTypeReference +Microsoft.OpenApi.OpenApiMediaTypeReference.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiMediaType! +Microsoft.OpenApi.OpenApiMediaTypeReference.Encoding.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiMediaTypeReference.Example.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.OpenApiMediaTypeReference.Examples.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiMediaTypeReference.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiMediaTypeReference.ItemEncoding.get -> Microsoft.OpenApi.OpenApiEncoding? +Microsoft.OpenApi.OpenApiMediaTypeReference.ItemSchema.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.OpenApiMediaTypeReference.OpenApiMediaTypeReference(string! referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) -> void +Microsoft.OpenApi.OpenApiMediaTypeReference.PrefixEncoding.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiMediaTypeReference.Schema.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.OpenApiNonDefaultRules +Microsoft.OpenApi.OpenApiOAuthFlow +Microsoft.OpenApi.OpenApiOAuthFlow.AuthorizationUrl.get -> System.Uri? +Microsoft.OpenApi.OpenApiOAuthFlow.AuthorizationUrl.set -> void +Microsoft.OpenApi.OpenApiOAuthFlow.DeviceAuthorizationUrl.get -> System.Uri? +Microsoft.OpenApi.OpenApiOAuthFlow.DeviceAuthorizationUrl.set -> void +Microsoft.OpenApi.OpenApiOAuthFlow.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiOAuthFlow.Extensions.set -> void +Microsoft.OpenApi.OpenApiOAuthFlow.OpenApiOAuthFlow() -> void +Microsoft.OpenApi.OpenApiOAuthFlow.OpenApiOAuthFlow(Microsoft.OpenApi.OpenApiOAuthFlow! oAuthFlow) -> void +Microsoft.OpenApi.OpenApiOAuthFlow.RefreshUrl.get -> System.Uri? +Microsoft.OpenApi.OpenApiOAuthFlow.RefreshUrl.set -> void +Microsoft.OpenApi.OpenApiOAuthFlow.Scopes.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiOAuthFlow.Scopes.set -> void +Microsoft.OpenApi.OpenApiOAuthFlow.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiOAuthFlow.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiOAuthFlow.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiOAuthFlow.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiOAuthFlow.TokenUrl.get -> System.Uri? +Microsoft.OpenApi.OpenApiOAuthFlow.TokenUrl.set -> void +Microsoft.OpenApi.OpenApiOAuthFlowRules +Microsoft.OpenApi.OpenApiOAuthFlows +Microsoft.OpenApi.OpenApiOAuthFlows.AuthorizationCode.get -> Microsoft.OpenApi.OpenApiOAuthFlow? +Microsoft.OpenApi.OpenApiOAuthFlows.AuthorizationCode.set -> void +Microsoft.OpenApi.OpenApiOAuthFlows.ClientCredentials.get -> Microsoft.OpenApi.OpenApiOAuthFlow? +Microsoft.OpenApi.OpenApiOAuthFlows.ClientCredentials.set -> void +Microsoft.OpenApi.OpenApiOAuthFlows.DeviceAuthorization.get -> Microsoft.OpenApi.OpenApiOAuthFlow? +Microsoft.OpenApi.OpenApiOAuthFlows.DeviceAuthorization.set -> void +Microsoft.OpenApi.OpenApiOAuthFlows.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiOAuthFlows.Extensions.set -> void +Microsoft.OpenApi.OpenApiOAuthFlows.Implicit.get -> Microsoft.OpenApi.OpenApiOAuthFlow? +Microsoft.OpenApi.OpenApiOAuthFlows.Implicit.set -> void +Microsoft.OpenApi.OpenApiOAuthFlows.OpenApiOAuthFlows() -> void +Microsoft.OpenApi.OpenApiOAuthFlows.OpenApiOAuthFlows(Microsoft.OpenApi.OpenApiOAuthFlows! oAuthFlows) -> void +Microsoft.OpenApi.OpenApiOAuthFlows.Password.get -> Microsoft.OpenApi.OpenApiOAuthFlow? +Microsoft.OpenApi.OpenApiOAuthFlows.Password.set -> void +Microsoft.OpenApi.OpenApiOperation +Microsoft.OpenApi.OpenApiOperation.Callbacks.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiOperation.Callbacks.set -> void +Microsoft.OpenApi.OpenApiOperation.Deprecated.get -> bool +Microsoft.OpenApi.OpenApiOperation.Deprecated.set -> void +Microsoft.OpenApi.OpenApiOperation.Description.get -> string? +Microsoft.OpenApi.OpenApiOperation.Description.set -> void +Microsoft.OpenApi.OpenApiOperation.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiOperation.Extensions.set -> void +Microsoft.OpenApi.OpenApiOperation.ExternalDocs.get -> Microsoft.OpenApi.OpenApiExternalDocs? +Microsoft.OpenApi.OpenApiOperation.ExternalDocs.set -> void +Microsoft.OpenApi.OpenApiOperation.Metadata.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiOperation.Metadata.set -> void +Microsoft.OpenApi.OpenApiOperation.OpenApiOperation() -> void +Microsoft.OpenApi.OpenApiOperation.OpenApiOperation(Microsoft.OpenApi.OpenApiOperation! operation) -> void +Microsoft.OpenApi.OpenApiOperation.OperationId.get -> string? +Microsoft.OpenApi.OpenApiOperation.OperationId.set -> void +Microsoft.OpenApi.OpenApiOperation.Parameters.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiOperation.Parameters.set -> void +Microsoft.OpenApi.OpenApiOperation.RequestBody.get -> Microsoft.OpenApi.IOpenApiRequestBody? +Microsoft.OpenApi.OpenApiOperation.RequestBody.set -> void +Microsoft.OpenApi.OpenApiOperation.Responses.get -> Microsoft.OpenApi.OpenApiResponses? +Microsoft.OpenApi.OpenApiOperation.Responses.set -> void +Microsoft.OpenApi.OpenApiOperation.Security.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiOperation.Security.set -> void +Microsoft.OpenApi.OpenApiOperation.Servers.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiOperation.Servers.set -> void +Microsoft.OpenApi.OpenApiOperation.Summary.get -> string? +Microsoft.OpenApi.OpenApiOperation.Summary.set -> void +Microsoft.OpenApi.OpenApiOperation.Tags.get -> System.Collections.Generic.ISet? +Microsoft.OpenApi.OpenApiOperation.Tags.set -> void +Microsoft.OpenApi.OpenApiParameter +Microsoft.OpenApi.OpenApiParameter.AllowEmptyValue.get -> bool +Microsoft.OpenApi.OpenApiParameter.AllowEmptyValue.set -> void +Microsoft.OpenApi.OpenApiParameter.AllowReserved.get -> bool +Microsoft.OpenApi.OpenApiParameter.AllowReserved.set -> void +Microsoft.OpenApi.OpenApiParameter.Content.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiParameter.Content.set -> void +Microsoft.OpenApi.OpenApiParameter.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiParameter! +Microsoft.OpenApi.OpenApiParameter.Deprecated.get -> bool +Microsoft.OpenApi.OpenApiParameter.Deprecated.set -> void +Microsoft.OpenApi.OpenApiParameter.Description.get -> string? +Microsoft.OpenApi.OpenApiParameter.Description.set -> void +Microsoft.OpenApi.OpenApiParameter.Example.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.OpenApiParameter.Example.set -> void +Microsoft.OpenApi.OpenApiParameter.Examples.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiParameter.Examples.set -> void +Microsoft.OpenApi.OpenApiParameter.Explode.get -> bool +Microsoft.OpenApi.OpenApiParameter.Explode.set -> void +Microsoft.OpenApi.OpenApiParameter.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiParameter.Extensions.set -> void +Microsoft.OpenApi.OpenApiParameter.In.get -> Microsoft.OpenApi.ParameterLocation? +Microsoft.OpenApi.OpenApiParameter.In.set -> void +Microsoft.OpenApi.OpenApiParameter.Name.get -> string? +Microsoft.OpenApi.OpenApiParameter.Name.set -> void +Microsoft.OpenApi.OpenApiParameter.OpenApiParameter() -> void +Microsoft.OpenApi.OpenApiParameter.Required.get -> bool +Microsoft.OpenApi.OpenApiParameter.Required.set -> void +Microsoft.OpenApi.OpenApiParameter.Schema.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.OpenApiParameter.Schema.set -> void +Microsoft.OpenApi.OpenApiParameter.Style.get -> Microsoft.OpenApi.ParameterStyle? +Microsoft.OpenApi.OpenApiParameter.Style.set -> void +Microsoft.OpenApi.OpenApiParameterReference +Microsoft.OpenApi.OpenApiParameterReference.AllowEmptyValue.get -> bool +Microsoft.OpenApi.OpenApiParameterReference.AllowReserved.get -> bool +Microsoft.OpenApi.OpenApiParameterReference.Content.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiParameterReference.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiParameter! +Microsoft.OpenApi.OpenApiParameterReference.Deprecated.get -> bool +Microsoft.OpenApi.OpenApiParameterReference.Description.get -> string? +Microsoft.OpenApi.OpenApiParameterReference.Description.set -> void +Microsoft.OpenApi.OpenApiParameterReference.Example.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.OpenApiParameterReference.Examples.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiParameterReference.Explode.get -> bool +Microsoft.OpenApi.OpenApiParameterReference.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiParameterReference.In.get -> Microsoft.OpenApi.ParameterLocation? +Microsoft.OpenApi.OpenApiParameterReference.Name.get -> string? +Microsoft.OpenApi.OpenApiParameterReference.OpenApiParameterReference(string! referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) -> void +Microsoft.OpenApi.OpenApiParameterReference.Required.get -> bool +Microsoft.OpenApi.OpenApiParameterReference.Schema.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.OpenApiParameterReference.Style.get -> Microsoft.OpenApi.ParameterStyle? +Microsoft.OpenApi.OpenApiParameterRules +Microsoft.OpenApi.OpenApiPathItem +Microsoft.OpenApi.OpenApiPathItem.AddOperation(System.Net.Http.HttpMethod! operationType, Microsoft.OpenApi.OpenApiOperation! operation) -> void +Microsoft.OpenApi.OpenApiPathItem.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiPathItem! +Microsoft.OpenApi.OpenApiPathItem.Description.get -> string? +Microsoft.OpenApi.OpenApiPathItem.Description.set -> void +Microsoft.OpenApi.OpenApiPathItem.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiPathItem.Extensions.set -> void +Microsoft.OpenApi.OpenApiPathItem.OpenApiPathItem() -> void +Microsoft.OpenApi.OpenApiPathItem.Operations.get -> System.Collections.Generic.Dictionary? +Microsoft.OpenApi.OpenApiPathItem.Operations.set -> void +Microsoft.OpenApi.OpenApiPathItem.Parameters.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiPathItem.Parameters.set -> void +Microsoft.OpenApi.OpenApiPathItem.Servers.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiPathItem.Servers.set -> void +Microsoft.OpenApi.OpenApiPathItem.Summary.get -> string? +Microsoft.OpenApi.OpenApiPathItem.Summary.set -> void +Microsoft.OpenApi.OpenApiPathItemReference +Microsoft.OpenApi.OpenApiPathItemReference.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiPathItem! +Microsoft.OpenApi.OpenApiPathItemReference.Description.get -> string? +Microsoft.OpenApi.OpenApiPathItemReference.Description.set -> void +Microsoft.OpenApi.OpenApiPathItemReference.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiPathItemReference.OpenApiPathItemReference(string! referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) -> void +Microsoft.OpenApi.OpenApiPathItemReference.Operations.get -> System.Collections.Generic.Dictionary? +Microsoft.OpenApi.OpenApiPathItemReference.Parameters.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiPathItemReference.Servers.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiPathItemReference.Summary.get -> string? +Microsoft.OpenApi.OpenApiPathItemReference.Summary.set -> void +Microsoft.OpenApi.OpenApiPaths +Microsoft.OpenApi.OpenApiPaths.OpenApiPaths() -> void +Microsoft.OpenApi.OpenApiPaths.OpenApiPaths(Microsoft.OpenApi.OpenApiPaths! paths) -> void +Microsoft.OpenApi.OpenApiPathsRules +Microsoft.OpenApi.OpenApiReaderException +Microsoft.OpenApi.OpenApiReaderException.OpenApiReaderException() -> void +Microsoft.OpenApi.OpenApiReaderException.OpenApiReaderException(string! message) -> void +Microsoft.OpenApi.OpenApiReaderException.OpenApiReaderException(string! message, Microsoft.OpenApi.Reader.ParsingContext! context) -> void +Microsoft.OpenApi.OpenApiReaderException.OpenApiReaderException(string! message, System.Exception! innerException) -> void +Microsoft.OpenApi.OpenApiRecommendedRules +Microsoft.OpenApi.OpenApiReferenceError +Microsoft.OpenApi.OpenApiReferenceError.OpenApiReferenceError(Microsoft.OpenApi.BaseOpenApiReference! reference, string! message) -> void +Microsoft.OpenApi.OpenApiReferenceError.OpenApiReferenceError(Microsoft.OpenApi.OpenApiException! exception) -> void +Microsoft.OpenApi.OpenApiReferenceWithDescription +Microsoft.OpenApi.OpenApiReferenceWithDescription.Description.get -> string? +Microsoft.OpenApi.OpenApiReferenceWithDescription.Description.set -> void +Microsoft.OpenApi.OpenApiReferenceWithDescription.OpenApiReferenceWithDescription() -> void +Microsoft.OpenApi.OpenApiReferenceWithDescription.OpenApiReferenceWithDescription(Microsoft.OpenApi.OpenApiReferenceWithDescription! reference) -> void +Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary +Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary.OpenApiReferenceWithDescriptionAndSummary() -> void +Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary.OpenApiReferenceWithDescriptionAndSummary(Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary! reference) -> void +Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary.Summary.get -> string? +Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary.Summary.set -> void +Microsoft.OpenApi.OpenApiRequestBody +Microsoft.OpenApi.OpenApiRequestBody.Content.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiRequestBody.Content.set -> void +Microsoft.OpenApi.OpenApiRequestBody.ConvertToBodyParameter(Microsoft.OpenApi.IOpenApiWriter! writer) -> Microsoft.OpenApi.IOpenApiParameter! +Microsoft.OpenApi.OpenApiRequestBody.ConvertToFormDataParameters(Microsoft.OpenApi.IOpenApiWriter! writer) -> System.Collections.Generic.IEnumerable! +Microsoft.OpenApi.OpenApiRequestBody.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiRequestBody! +Microsoft.OpenApi.OpenApiRequestBody.Description.get -> string? +Microsoft.OpenApi.OpenApiRequestBody.Description.set -> void +Microsoft.OpenApi.OpenApiRequestBody.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiRequestBody.Extensions.set -> void +Microsoft.OpenApi.OpenApiRequestBody.OpenApiRequestBody() -> void +Microsoft.OpenApi.OpenApiRequestBody.Required.get -> bool +Microsoft.OpenApi.OpenApiRequestBody.Required.set -> void +Microsoft.OpenApi.OpenApiRequestBodyReference +Microsoft.OpenApi.OpenApiRequestBodyReference.Content.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiRequestBodyReference.ConvertToBodyParameter(Microsoft.OpenApi.IOpenApiWriter! writer) -> Microsoft.OpenApi.IOpenApiParameter? +Microsoft.OpenApi.OpenApiRequestBodyReference.ConvertToFormDataParameters(Microsoft.OpenApi.IOpenApiWriter! writer) -> System.Collections.Generic.IEnumerable? +Microsoft.OpenApi.OpenApiRequestBodyReference.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiRequestBody! +Microsoft.OpenApi.OpenApiRequestBodyReference.Description.get -> string? +Microsoft.OpenApi.OpenApiRequestBodyReference.Description.set -> void +Microsoft.OpenApi.OpenApiRequestBodyReference.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiRequestBodyReference.OpenApiRequestBodyReference(string! referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) -> void +Microsoft.OpenApi.OpenApiRequestBodyReference.Required.get -> bool +Microsoft.OpenApi.OpenApiResponse +Microsoft.OpenApi.OpenApiResponse.Content.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiResponse.Content.set -> void +Microsoft.OpenApi.OpenApiResponse.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiResponse! +Microsoft.OpenApi.OpenApiResponse.Description.get -> string? +Microsoft.OpenApi.OpenApiResponse.Description.set -> void +Microsoft.OpenApi.OpenApiResponse.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiResponse.Extensions.set -> void +Microsoft.OpenApi.OpenApiResponse.Headers.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiResponse.Headers.set -> void +Microsoft.OpenApi.OpenApiResponse.Links.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiResponse.Links.set -> void +Microsoft.OpenApi.OpenApiResponse.OpenApiResponse() -> void +Microsoft.OpenApi.OpenApiResponse.Summary.get -> string? +Microsoft.OpenApi.OpenApiResponse.Summary.set -> void +Microsoft.OpenApi.OpenApiResponseReference +Microsoft.OpenApi.OpenApiResponseReference.Content.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiResponseReference.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiResponse! +Microsoft.OpenApi.OpenApiResponseReference.Description.get -> string? +Microsoft.OpenApi.OpenApiResponseReference.Description.set -> void +Microsoft.OpenApi.OpenApiResponseReference.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiResponseReference.Headers.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiResponseReference.Links.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiResponseReference.OpenApiResponseReference(string! referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) -> void +Microsoft.OpenApi.OpenApiResponseReference.Summary.get -> string? +Microsoft.OpenApi.OpenApiResponseReference.Summary.set -> void +Microsoft.OpenApi.OpenApiResponseRules +Microsoft.OpenApi.OpenApiResponses +Microsoft.OpenApi.OpenApiResponses.OpenApiResponses() -> void +Microsoft.OpenApi.OpenApiResponses.OpenApiResponses(Microsoft.OpenApi.OpenApiResponses! openApiResponses) -> void +Microsoft.OpenApi.OpenApiResponsesRules +Microsoft.OpenApi.OpenApiRuleAttribute +Microsoft.OpenApi.OpenApiRuleAttribute.OpenApiRuleAttribute() -> void +Microsoft.OpenApi.OpenApiSchema +Microsoft.OpenApi.OpenApiSchema.AdditionalProperties.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.OpenApiSchema.AdditionalProperties.set -> void +Microsoft.OpenApi.OpenApiSchema.AdditionalPropertiesAllowed.get -> bool +Microsoft.OpenApi.OpenApiSchema.AdditionalPropertiesAllowed.set -> void +Microsoft.OpenApi.OpenApiSchema.AllOf.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiSchema.AllOf.set -> void +Microsoft.OpenApi.OpenApiSchema.AnyOf.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiSchema.AnyOf.set -> void +Microsoft.OpenApi.OpenApiSchema.Comment.get -> string? +Microsoft.OpenApi.OpenApiSchema.Comment.set -> void +Microsoft.OpenApi.OpenApiSchema.Const.get -> string? +Microsoft.OpenApi.OpenApiSchema.Const.set -> void +Microsoft.OpenApi.OpenApiSchema.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiSchema! +Microsoft.OpenApi.OpenApiSchema.Default.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.OpenApiSchema.Default.set -> void +Microsoft.OpenApi.OpenApiSchema.Definitions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiSchema.Definitions.set -> void +Microsoft.OpenApi.OpenApiSchema.DependentRequired.get -> System.Collections.Generic.IDictionary!>? +Microsoft.OpenApi.OpenApiSchema.DependentRequired.set -> void +Microsoft.OpenApi.OpenApiSchema.Deprecated.get -> bool +Microsoft.OpenApi.OpenApiSchema.Deprecated.set -> void +Microsoft.OpenApi.OpenApiSchema.Description.get -> string? +Microsoft.OpenApi.OpenApiSchema.Description.set -> void +Microsoft.OpenApi.OpenApiSchema.Discriminator.get -> Microsoft.OpenApi.OpenApiDiscriminator? +Microsoft.OpenApi.OpenApiSchema.Discriminator.set -> void +Microsoft.OpenApi.OpenApiSchema.DynamicAnchor.get -> string? +Microsoft.OpenApi.OpenApiSchema.DynamicAnchor.set -> void +Microsoft.OpenApi.OpenApiSchema.DynamicRef.get -> string? +Microsoft.OpenApi.OpenApiSchema.DynamicRef.set -> void +Microsoft.OpenApi.OpenApiSchema.Enum.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiSchema.Enum.set -> void +Microsoft.OpenApi.OpenApiSchema.Example.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.OpenApiSchema.Example.set -> void +Microsoft.OpenApi.OpenApiSchema.Examples.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiSchema.Examples.set -> void +Microsoft.OpenApi.OpenApiSchema.ExclusiveMaximum.get -> string? +Microsoft.OpenApi.OpenApiSchema.ExclusiveMaximum.set -> void +Microsoft.OpenApi.OpenApiSchema.ExclusiveMinimum.get -> string? +Microsoft.OpenApi.OpenApiSchema.ExclusiveMinimum.set -> void +Microsoft.OpenApi.OpenApiSchema.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiSchema.Extensions.set -> void +Microsoft.OpenApi.OpenApiSchema.ExternalDocs.get -> Microsoft.OpenApi.OpenApiExternalDocs? +Microsoft.OpenApi.OpenApiSchema.ExternalDocs.set -> void +Microsoft.OpenApi.OpenApiSchema.Format.get -> string? +Microsoft.OpenApi.OpenApiSchema.Format.set -> void +Microsoft.OpenApi.OpenApiSchema.Id.get -> string? +Microsoft.OpenApi.OpenApiSchema.Id.set -> void +Microsoft.OpenApi.OpenApiSchema.Items.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.OpenApiSchema.Items.set -> void +Microsoft.OpenApi.OpenApiSchema.Maximum.get -> string? +Microsoft.OpenApi.OpenApiSchema.Maximum.set -> void +Microsoft.OpenApi.OpenApiSchema.MaxItems.get -> int? +Microsoft.OpenApi.OpenApiSchema.MaxItems.set -> void +Microsoft.OpenApi.OpenApiSchema.MaxLength.get -> int? +Microsoft.OpenApi.OpenApiSchema.MaxLength.set -> void +Microsoft.OpenApi.OpenApiSchema.MaxProperties.get -> int? +Microsoft.OpenApi.OpenApiSchema.MaxProperties.set -> void +Microsoft.OpenApi.OpenApiSchema.Metadata.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiSchema.Metadata.set -> void +Microsoft.OpenApi.OpenApiSchema.Minimum.get -> string? +Microsoft.OpenApi.OpenApiSchema.Minimum.set -> void +Microsoft.OpenApi.OpenApiSchema.MinItems.get -> int? +Microsoft.OpenApi.OpenApiSchema.MinItems.set -> void +Microsoft.OpenApi.OpenApiSchema.MinLength.get -> int? +Microsoft.OpenApi.OpenApiSchema.MinLength.set -> void +Microsoft.OpenApi.OpenApiSchema.MinProperties.get -> int? +Microsoft.OpenApi.OpenApiSchema.MinProperties.set -> void +Microsoft.OpenApi.OpenApiSchema.MultipleOf.get -> decimal? +Microsoft.OpenApi.OpenApiSchema.MultipleOf.set -> void +Microsoft.OpenApi.OpenApiSchema.Not.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.OpenApiSchema.Not.set -> void +Microsoft.OpenApi.OpenApiSchema.OneOf.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiSchema.OneOf.set -> void +Microsoft.OpenApi.OpenApiSchema.OpenApiSchema() -> void +Microsoft.OpenApi.OpenApiSchema.Pattern.get -> string? +Microsoft.OpenApi.OpenApiSchema.Pattern.set -> void +Microsoft.OpenApi.OpenApiSchema.PatternProperties.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiSchema.PatternProperties.set -> void +Microsoft.OpenApi.OpenApiSchema.Properties.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiSchema.Properties.set -> void +Microsoft.OpenApi.OpenApiSchema.ReadOnly.get -> bool +Microsoft.OpenApi.OpenApiSchema.ReadOnly.set -> void +Microsoft.OpenApi.OpenApiSchema.Required.get -> System.Collections.Generic.ISet? +Microsoft.OpenApi.OpenApiSchema.Required.set -> void +Microsoft.OpenApi.OpenApiSchema.Schema.get -> System.Uri? +Microsoft.OpenApi.OpenApiSchema.Schema.set -> void +Microsoft.OpenApi.OpenApiSchema.Title.get -> string? +Microsoft.OpenApi.OpenApiSchema.Title.set -> void +Microsoft.OpenApi.OpenApiSchema.Type.get -> Microsoft.OpenApi.JsonSchemaType? +Microsoft.OpenApi.OpenApiSchema.Type.set -> void +Microsoft.OpenApi.OpenApiSchema.UnevaluatedProperties.get -> bool +Microsoft.OpenApi.OpenApiSchema.UnevaluatedProperties.set -> void +Microsoft.OpenApi.OpenApiSchema.UniqueItems.get -> bool? +Microsoft.OpenApi.OpenApiSchema.UniqueItems.set -> void +Microsoft.OpenApi.OpenApiSchema.UnrecognizedKeywords.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiSchema.UnrecognizedKeywords.set -> void +Microsoft.OpenApi.OpenApiSchema.Vocabulary.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiSchema.Vocabulary.set -> void +Microsoft.OpenApi.OpenApiSchema.WriteOnly.get -> bool +Microsoft.OpenApi.OpenApiSchema.WriteOnly.set -> void +Microsoft.OpenApi.OpenApiSchema.Xml.get -> Microsoft.OpenApi.OpenApiXml? +Microsoft.OpenApi.OpenApiSchema.Xml.set -> void +Microsoft.OpenApi.OpenApiSchemaReference +Microsoft.OpenApi.OpenApiSchemaReference.AdditionalProperties.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.OpenApiSchemaReference.AdditionalPropertiesAllowed.get -> bool +Microsoft.OpenApi.OpenApiSchemaReference.AllOf.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiSchemaReference.AnyOf.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiSchemaReference.Comment.get -> string? +Microsoft.OpenApi.OpenApiSchemaReference.Const.get -> string? +Microsoft.OpenApi.OpenApiSchemaReference.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiSchema! +Microsoft.OpenApi.OpenApiSchemaReference.Default.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.OpenApiSchemaReference.Default.set -> void +Microsoft.OpenApi.OpenApiSchemaReference.Definitions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiSchemaReference.DependentRequired.get -> System.Collections.Generic.IDictionary!>? +Microsoft.OpenApi.OpenApiSchemaReference.Deprecated.get -> bool +Microsoft.OpenApi.OpenApiSchemaReference.Deprecated.set -> void +Microsoft.OpenApi.OpenApiSchemaReference.Description.get -> string? +Microsoft.OpenApi.OpenApiSchemaReference.Description.set -> void +Microsoft.OpenApi.OpenApiSchemaReference.Discriminator.get -> Microsoft.OpenApi.OpenApiDiscriminator? +Microsoft.OpenApi.OpenApiSchemaReference.DynamicAnchor.get -> string? +Microsoft.OpenApi.OpenApiSchemaReference.DynamicRef.get -> string? +Microsoft.OpenApi.OpenApiSchemaReference.Enum.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiSchemaReference.Example.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.OpenApiSchemaReference.Examples.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiSchemaReference.Examples.set -> void +Microsoft.OpenApi.OpenApiSchemaReference.ExclusiveMaximum.get -> string? +Microsoft.OpenApi.OpenApiSchemaReference.ExclusiveMinimum.get -> string? +Microsoft.OpenApi.OpenApiSchemaReference.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiSchemaReference.ExternalDocs.get -> Microsoft.OpenApi.OpenApiExternalDocs? +Microsoft.OpenApi.OpenApiSchemaReference.Format.get -> string? +Microsoft.OpenApi.OpenApiSchemaReference.Id.get -> string? +Microsoft.OpenApi.OpenApiSchemaReference.Items.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.OpenApiSchemaReference.Maximum.get -> string? +Microsoft.OpenApi.OpenApiSchemaReference.MaxItems.get -> int? +Microsoft.OpenApi.OpenApiSchemaReference.MaxLength.get -> int? +Microsoft.OpenApi.OpenApiSchemaReference.MaxProperties.get -> int? +Microsoft.OpenApi.OpenApiSchemaReference.Minimum.get -> string? +Microsoft.OpenApi.OpenApiSchemaReference.MinItems.get -> int? +Microsoft.OpenApi.OpenApiSchemaReference.MinLength.get -> int? +Microsoft.OpenApi.OpenApiSchemaReference.MinProperties.get -> int? +Microsoft.OpenApi.OpenApiSchemaReference.MultipleOf.get -> decimal? +Microsoft.OpenApi.OpenApiSchemaReference.Not.get -> Microsoft.OpenApi.IOpenApiSchema? +Microsoft.OpenApi.OpenApiSchemaReference.OneOf.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.OpenApiSchemaReference.OpenApiSchemaReference(string! referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) -> void +Microsoft.OpenApi.OpenApiSchemaReference.Pattern.get -> string? +Microsoft.OpenApi.OpenApiSchemaReference.PatternProperties.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiSchemaReference.Properties.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiSchemaReference.ReadOnly.get -> bool +Microsoft.OpenApi.OpenApiSchemaReference.ReadOnly.set -> void +Microsoft.OpenApi.OpenApiSchemaReference.Required.get -> System.Collections.Generic.ISet? +Microsoft.OpenApi.OpenApiSchemaReference.Schema.get -> System.Uri? +Microsoft.OpenApi.OpenApiSchemaReference.Title.get -> string? +Microsoft.OpenApi.OpenApiSchemaReference.Title.set -> void +Microsoft.OpenApi.OpenApiSchemaReference.Type.get -> Microsoft.OpenApi.JsonSchemaType? +Microsoft.OpenApi.OpenApiSchemaReference.UnevaluatedProperties.get -> bool +Microsoft.OpenApi.OpenApiSchemaReference.UniqueItems.get -> bool? +Microsoft.OpenApi.OpenApiSchemaReference.UnrecognizedKeywords.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiSchemaReference.Vocabulary.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiSchemaReference.WriteOnly.get -> bool +Microsoft.OpenApi.OpenApiSchemaReference.WriteOnly.set -> void +Microsoft.OpenApi.OpenApiSchemaReference.Xml.get -> Microsoft.OpenApi.OpenApiXml? +Microsoft.OpenApi.OpenApiSchemaRules +Microsoft.OpenApi.OpenApiSecurityRequirement +Microsoft.OpenApi.OpenApiSecurityRequirement.OpenApiSecurityRequirement() -> void +Microsoft.OpenApi.OpenApiSecurityScheme +Microsoft.OpenApi.OpenApiSecurityScheme.BearerFormat.get -> string? +Microsoft.OpenApi.OpenApiSecurityScheme.BearerFormat.set -> void +Microsoft.OpenApi.OpenApiSecurityScheme.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiSecurityScheme! +Microsoft.OpenApi.OpenApiSecurityScheme.Deprecated.get -> bool +Microsoft.OpenApi.OpenApiSecurityScheme.Deprecated.set -> void +Microsoft.OpenApi.OpenApiSecurityScheme.Description.get -> string? +Microsoft.OpenApi.OpenApiSecurityScheme.Description.set -> void +Microsoft.OpenApi.OpenApiSecurityScheme.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiSecurityScheme.Extensions.set -> void +Microsoft.OpenApi.OpenApiSecurityScheme.Flows.get -> Microsoft.OpenApi.OpenApiOAuthFlows? +Microsoft.OpenApi.OpenApiSecurityScheme.Flows.set -> void +Microsoft.OpenApi.OpenApiSecurityScheme.In.get -> Microsoft.OpenApi.ParameterLocation? +Microsoft.OpenApi.OpenApiSecurityScheme.In.set -> void +Microsoft.OpenApi.OpenApiSecurityScheme.Name.get -> string? +Microsoft.OpenApi.OpenApiSecurityScheme.Name.set -> void +Microsoft.OpenApi.OpenApiSecurityScheme.OpenApiSecurityScheme() -> void +Microsoft.OpenApi.OpenApiSecurityScheme.OpenIdConnectUrl.get -> System.Uri? +Microsoft.OpenApi.OpenApiSecurityScheme.OpenIdConnectUrl.set -> void +Microsoft.OpenApi.OpenApiSecurityScheme.Scheme.get -> string? +Microsoft.OpenApi.OpenApiSecurityScheme.Scheme.set -> void +Microsoft.OpenApi.OpenApiSecurityScheme.Type.get -> Microsoft.OpenApi.SecuritySchemeType? +Microsoft.OpenApi.OpenApiSecurityScheme.Type.set -> void +Microsoft.OpenApi.OpenApiSecuritySchemeReference +Microsoft.OpenApi.OpenApiSecuritySchemeReference.BearerFormat.get -> string? +Microsoft.OpenApi.OpenApiSecuritySchemeReference.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiSecurityScheme! +Microsoft.OpenApi.OpenApiSecuritySchemeReference.Deprecated.get -> bool +Microsoft.OpenApi.OpenApiSecuritySchemeReference.Description.get -> string? +Microsoft.OpenApi.OpenApiSecuritySchemeReference.Description.set -> void +Microsoft.OpenApi.OpenApiSecuritySchemeReference.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiSecuritySchemeReference.Flows.get -> Microsoft.OpenApi.OpenApiOAuthFlows? +Microsoft.OpenApi.OpenApiSecuritySchemeReference.In.get -> Microsoft.OpenApi.ParameterLocation? +Microsoft.OpenApi.OpenApiSecuritySchemeReference.Name.get -> string? +Microsoft.OpenApi.OpenApiSecuritySchemeReference.OpenApiSecuritySchemeReference(string! referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) -> void +Microsoft.OpenApi.OpenApiSecuritySchemeReference.OpenIdConnectUrl.get -> System.Uri? +Microsoft.OpenApi.OpenApiSecuritySchemeReference.Scheme.get -> string? +Microsoft.OpenApi.OpenApiSecuritySchemeReference.Type.get -> Microsoft.OpenApi.SecuritySchemeType? +Microsoft.OpenApi.OpenApiSerializableExtensions +Microsoft.OpenApi.OpenApiServer +Microsoft.OpenApi.OpenApiServer.Description.get -> string? +Microsoft.OpenApi.OpenApiServer.Description.set -> void +Microsoft.OpenApi.OpenApiServer.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiServer.Extensions.set -> void +Microsoft.OpenApi.OpenApiServer.Name.get -> string? +Microsoft.OpenApi.OpenApiServer.Name.set -> void +Microsoft.OpenApi.OpenApiServer.OpenApiServer() -> void +Microsoft.OpenApi.OpenApiServer.OpenApiServer(Microsoft.OpenApi.OpenApiServer! server) -> void +Microsoft.OpenApi.OpenApiServer.Url.get -> string? +Microsoft.OpenApi.OpenApiServer.Url.set -> void +Microsoft.OpenApi.OpenApiServer.Variables.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiServer.Variables.set -> void +Microsoft.OpenApi.OpenApiServerExtensions +Microsoft.OpenApi.OpenApiServerRules +Microsoft.OpenApi.OpenApiServerVariable +Microsoft.OpenApi.OpenApiServerVariable.Default.get -> string? +Microsoft.OpenApi.OpenApiServerVariable.Default.set -> void +Microsoft.OpenApi.OpenApiServerVariable.Description.get -> string? +Microsoft.OpenApi.OpenApiServerVariable.Description.set -> void +Microsoft.OpenApi.OpenApiServerVariable.Enum.get -> System.Collections.Generic.List? +Microsoft.OpenApi.OpenApiServerVariable.Enum.set -> void +Microsoft.OpenApi.OpenApiServerVariable.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiServerVariable.Extensions.set -> void +Microsoft.OpenApi.OpenApiServerVariable.OpenApiServerVariable() -> void +Microsoft.OpenApi.OpenApiServerVariable.OpenApiServerVariable(Microsoft.OpenApi.OpenApiServerVariable! serverVariable) -> void +Microsoft.OpenApi.OpenApiServerVariable.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiServerVariable.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiServerVariable.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiServerVariable.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.OpenApiSpecVersion +Microsoft.OpenApi.OpenApiSpecVersion.OpenApi2_0 = 0 -> Microsoft.OpenApi.OpenApiSpecVersion +Microsoft.OpenApi.OpenApiSpecVersion.OpenApi3_0 = 1 -> Microsoft.OpenApi.OpenApiSpecVersion +Microsoft.OpenApi.OpenApiSpecVersion.OpenApi3_1 = 2 -> Microsoft.OpenApi.OpenApiSpecVersion +Microsoft.OpenApi.OpenApiSpecVersion.OpenApi3_2 = 3 -> Microsoft.OpenApi.OpenApiSpecVersion +Microsoft.OpenApi.OpenApiTag +Microsoft.OpenApi.OpenApiTag.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiTag! +Microsoft.OpenApi.OpenApiTag.Description.get -> string? +Microsoft.OpenApi.OpenApiTag.Description.set -> void +Microsoft.OpenApi.OpenApiTag.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiTag.Extensions.set -> void +Microsoft.OpenApi.OpenApiTag.ExternalDocs.get -> Microsoft.OpenApi.OpenApiExternalDocs? +Microsoft.OpenApi.OpenApiTag.ExternalDocs.set -> void +Microsoft.OpenApi.OpenApiTag.Kind.get -> string? +Microsoft.OpenApi.OpenApiTag.Kind.set -> void +Microsoft.OpenApi.OpenApiTag.Name.get -> string? +Microsoft.OpenApi.OpenApiTag.Name.set -> void +Microsoft.OpenApi.OpenApiTag.OpenApiTag() -> void +Microsoft.OpenApi.OpenApiTag.Parent.get -> Microsoft.OpenApi.OpenApiTagReference? +Microsoft.OpenApi.OpenApiTag.Parent.set -> void +Microsoft.OpenApi.OpenApiTag.Summary.get -> string? +Microsoft.OpenApi.OpenApiTag.Summary.set -> void +Microsoft.OpenApi.OpenApiTagReference +Microsoft.OpenApi.OpenApiTagReference.CreateShallowCopy() -> Microsoft.OpenApi.IOpenApiTag! +Microsoft.OpenApi.OpenApiTagReference.Description.get -> string? +Microsoft.OpenApi.OpenApiTagReference.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiTagReference.ExternalDocs.get -> Microsoft.OpenApi.OpenApiExternalDocs? +Microsoft.OpenApi.OpenApiTagReference.Kind.get -> string? +Microsoft.OpenApi.OpenApiTagReference.Name.get -> string? +Microsoft.OpenApi.OpenApiTagReference.OpenApiTagReference(string! referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) -> void +Microsoft.OpenApi.OpenApiTagReference.Parent.get -> Microsoft.OpenApi.OpenApiTagReference? +Microsoft.OpenApi.OpenApiTagReference.Summary.get -> string? +Microsoft.OpenApi.OpenApiTagRules +Microsoft.OpenApi.OpenApiTypeMapper +Microsoft.OpenApi.OpenApiUnsupportedSpecVersionException +Microsoft.OpenApi.OpenApiUnsupportedSpecVersionException.OpenApiUnsupportedSpecVersionException(string! specificationVersion) -> void +Microsoft.OpenApi.OpenApiUnsupportedSpecVersionException.OpenApiUnsupportedSpecVersionException(string! specificationVersion, System.Exception! innerException) -> void +Microsoft.OpenApi.OpenApiUnsupportedSpecVersionException.SpecificationVersion.get -> string! +Microsoft.OpenApi.OpenApiUrlTreeNode +Microsoft.OpenApi.OpenApiUrlTreeNode.AddAdditionalData(System.Collections.Generic.Dictionary!>! additionalData) -> void +Microsoft.OpenApi.OpenApiUrlTreeNode.AdditionalData.get -> System.Collections.Generic.IDictionary!>! +Microsoft.OpenApi.OpenApiUrlTreeNode.AdditionalData.set -> void +Microsoft.OpenApi.OpenApiUrlTreeNode.Attach(Microsoft.OpenApi.OpenApiDocument! doc, string! label) -> void +Microsoft.OpenApi.OpenApiUrlTreeNode.Attach(string! path, Microsoft.OpenApi.IOpenApiPathItem! pathItem, string! label) -> Microsoft.OpenApi.OpenApiUrlTreeNode! +Microsoft.OpenApi.OpenApiUrlTreeNode.Children.get -> System.Collections.Generic.IDictionary! +Microsoft.OpenApi.OpenApiUrlTreeNode.HasOperations(string! label) -> bool +Microsoft.OpenApi.OpenApiUrlTreeNode.IsParameter.get -> bool +Microsoft.OpenApi.OpenApiUrlTreeNode.Path.get -> string! +Microsoft.OpenApi.OpenApiUrlTreeNode.Path.set -> void +Microsoft.OpenApi.OpenApiUrlTreeNode.PathItems.get -> System.Collections.Generic.IDictionary! +Microsoft.OpenApi.OpenApiUrlTreeNode.Segment.get -> string! +Microsoft.OpenApi.OpenApiUrlTreeNode.WriteMermaid(System.IO.TextWriter! writer) -> void +Microsoft.OpenApi.OpenApiValidator +Microsoft.OpenApi.OpenApiValidator.AddError(Microsoft.OpenApi.OpenApiValidatorError! error) -> void +Microsoft.OpenApi.OpenApiValidator.AddWarning(Microsoft.OpenApi.OpenApiValidatorWarning! warning) -> void +Microsoft.OpenApi.OpenApiValidator.Errors.get -> System.Collections.Generic.IEnumerable! +Microsoft.OpenApi.OpenApiValidator.OpenApiValidator(Microsoft.OpenApi.ValidationRuleSet! ruleSet) -> void +Microsoft.OpenApi.OpenApiValidator.Warnings.get -> System.Collections.Generic.IEnumerable! +Microsoft.OpenApi.OpenApiValidatorError +Microsoft.OpenApi.OpenApiValidatorError.OpenApiValidatorError(string! ruleName, string! pointer, string! message) -> void +Microsoft.OpenApi.OpenApiValidatorError.RuleName.get -> string! +Microsoft.OpenApi.OpenApiValidatorError.RuleName.set -> void +Microsoft.OpenApi.OpenApiValidatorWarning +Microsoft.OpenApi.OpenApiValidatorWarning.OpenApiValidatorWarning(string! ruleName, string! pointer, string! message) -> void +Microsoft.OpenApi.OpenApiValidatorWarning.RuleName.get -> string! +Microsoft.OpenApi.OpenApiValidatorWarning.RuleName.set -> void +Microsoft.OpenApi.OpenApiVisitorBase +Microsoft.OpenApi.OpenApiVisitorBase.CurrentKeys.get -> Microsoft.OpenApi.CurrentKeys! +Microsoft.OpenApi.OpenApiVisitorBase.OpenApiVisitorBase() -> void +Microsoft.OpenApi.OpenApiVisitorBase.PathString.get -> string! +Microsoft.OpenApi.OpenApiWalker +Microsoft.OpenApi.OpenApiWalker.OpenApiWalker(Microsoft.OpenApi.OpenApiVisitorBase! visitor) -> void +Microsoft.OpenApi.OpenApiWalker.Walk(Microsoft.OpenApi.OpenApiDocument? doc) -> void +Microsoft.OpenApi.OpenApiWorkspace +Microsoft.OpenApi.OpenApiWorkspace.AddDocumentId(string? key, System.Uri? value) -> void +Microsoft.OpenApi.OpenApiWorkspace.BaseUrl.get -> System.Uri? +Microsoft.OpenApi.OpenApiWorkspace.ComponentsCount() -> int +Microsoft.OpenApi.OpenApiWorkspace.Contains(string! location) -> bool +Microsoft.OpenApi.OpenApiWorkspace.GetDocumentId(string? key) -> System.Uri? +Microsoft.OpenApi.OpenApiWorkspace.OpenApiWorkspace() -> void +Microsoft.OpenApi.OpenApiWorkspace.OpenApiWorkspace(Microsoft.OpenApi.OpenApiWorkspace! workspace) -> void +Microsoft.OpenApi.OpenApiWorkspace.OpenApiWorkspace(System.Uri! baseUrl) -> void +Microsoft.OpenApi.OpenApiWorkspace.RegisterComponentForDocument(Microsoft.OpenApi.OpenApiDocument! openApiDocument, T componentToRegister, string! id) -> bool +Microsoft.OpenApi.OpenApiWorkspace.RegisterComponents(Microsoft.OpenApi.OpenApiDocument! document) -> void +Microsoft.OpenApi.OpenApiWorkspace.ResolveReference(string! location) -> T? +Microsoft.OpenApi.OpenApiWriterAnyExtensions +Microsoft.OpenApi.OpenApiWriterBase +Microsoft.OpenApi.OpenApiWriterBase.CurrentScope() -> Microsoft.OpenApi.Scope? +Microsoft.OpenApi.OpenApiWriterBase.EndScope(Microsoft.OpenApi.ScopeType type) -> Microsoft.OpenApi.Scope! +Microsoft.OpenApi.OpenApiWriterBase.FlushAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +Microsoft.OpenApi.OpenApiWriterBase.IsArrayScope() -> bool +Microsoft.OpenApi.OpenApiWriterBase.IsObjectScope() -> bool +Microsoft.OpenApi.OpenApiWriterBase.IsTopLevelScope() -> bool +Microsoft.OpenApi.OpenApiWriterBase.OpenApiWriterBase(System.IO.TextWriter! textWriter) -> void +Microsoft.OpenApi.OpenApiWriterBase.OpenApiWriterBase(System.IO.TextWriter! textWriter, Microsoft.OpenApi.OpenApiWriterSettings? settings) -> void +Microsoft.OpenApi.OpenApiWriterBase.Settings.get -> Microsoft.OpenApi.OpenApiWriterSettings! +Microsoft.OpenApi.OpenApiWriterBase.Settings.set -> void +Microsoft.OpenApi.OpenApiWriterBase.StartScope(Microsoft.OpenApi.ScopeType type) -> Microsoft.OpenApi.Scope! +Microsoft.OpenApi.OpenApiWriterBase.VerifyCanWritePropertyName(string! name) -> void +Microsoft.OpenApi.OpenApiWriterBase.Writer.get -> System.IO.TextWriter! +Microsoft.OpenApi.OpenApiWriterException +Microsoft.OpenApi.OpenApiWriterException.OpenApiWriterException() -> void +Microsoft.OpenApi.OpenApiWriterException.OpenApiWriterException(string! message) -> void +Microsoft.OpenApi.OpenApiWriterException.OpenApiWriterException(string! message, System.Exception? innerException) -> void +Microsoft.OpenApi.OpenApiWriterExtensions +Microsoft.OpenApi.OpenApiWriterSettings +Microsoft.OpenApi.OpenApiWriterSettings.InlineExternalReferences.get -> bool +Microsoft.OpenApi.OpenApiWriterSettings.InlineExternalReferences.set -> void +Microsoft.OpenApi.OpenApiWriterSettings.InlineLocalReferences.get -> bool +Microsoft.OpenApi.OpenApiWriterSettings.InlineLocalReferences.set -> void +Microsoft.OpenApi.OpenApiWriterSettings.OpenApiWriterSettings() -> void +Microsoft.OpenApi.OpenApiXml +Microsoft.OpenApi.OpenApiXml.Extensions.get -> System.Collections.Generic.IDictionary? +Microsoft.OpenApi.OpenApiXml.Extensions.set -> void +Microsoft.OpenApi.OpenApiXml.Name.get -> string? +Microsoft.OpenApi.OpenApiXml.Name.set -> void +Microsoft.OpenApi.OpenApiXml.Namespace.get -> System.Uri? +Microsoft.OpenApi.OpenApiXml.Namespace.set -> void +Microsoft.OpenApi.OpenApiXml.NodeType.get -> Microsoft.OpenApi.OpenApiXmlNodeType? +Microsoft.OpenApi.OpenApiXml.NodeType.set -> void +Microsoft.OpenApi.OpenApiXml.OpenApiXml() -> void +Microsoft.OpenApi.OpenApiXml.OpenApiXml(Microsoft.OpenApi.OpenApiXml! xml) -> void +Microsoft.OpenApi.OpenApiXml.Prefix.get -> string? +Microsoft.OpenApi.OpenApiXml.Prefix.set -> void +Microsoft.OpenApi.OpenApiXmlNodeType +Microsoft.OpenApi.OpenApiXmlNodeType.Attribute = 1 -> Microsoft.OpenApi.OpenApiXmlNodeType +Microsoft.OpenApi.OpenApiXmlNodeType.Cdata = 3 -> Microsoft.OpenApi.OpenApiXmlNodeType +Microsoft.OpenApi.OpenApiXmlNodeType.Element = 0 -> Microsoft.OpenApi.OpenApiXmlNodeType +Microsoft.OpenApi.OpenApiXmlNodeType.None = 4 -> Microsoft.OpenApi.OpenApiXmlNodeType +Microsoft.OpenApi.OpenApiXmlNodeType.Text = 2 -> Microsoft.OpenApi.OpenApiXmlNodeType +Microsoft.OpenApi.OpenApiYamlWriter +Microsoft.OpenApi.OpenApiYamlWriter.OpenApiYamlWriter(System.IO.TextWriter! textWriter) -> void +Microsoft.OpenApi.OpenApiYamlWriter.OpenApiYamlWriter(System.IO.TextWriter! textWriter, Microsoft.OpenApi.OpenApiWriterSettings? settings) -> void +Microsoft.OpenApi.OpenApiYamlWriter.UseLiteralStyle.get -> bool +Microsoft.OpenApi.OpenApiYamlWriter.UseLiteralStyle.set -> void +Microsoft.OpenApi.OperationSearch +Microsoft.OpenApi.OperationSearch.OperationSearch(System.Func! predicate) -> void +Microsoft.OpenApi.OperationSearch.SearchResults.get -> System.Collections.Generic.IList! +Microsoft.OpenApi.ParameterLocation +Microsoft.OpenApi.ParameterLocation.Cookie = 3 -> Microsoft.OpenApi.ParameterLocation +Microsoft.OpenApi.ParameterLocation.Header = 1 -> Microsoft.OpenApi.ParameterLocation +Microsoft.OpenApi.ParameterLocation.Path = 2 -> Microsoft.OpenApi.ParameterLocation +Microsoft.OpenApi.ParameterLocation.Query = 0 -> Microsoft.OpenApi.ParameterLocation +Microsoft.OpenApi.ParameterLocation.QueryString = 4 -> Microsoft.OpenApi.ParameterLocation +Microsoft.OpenApi.ParameterStyle +Microsoft.OpenApi.ParameterStyle.Cookie = 7 -> Microsoft.OpenApi.ParameterStyle +Microsoft.OpenApi.ParameterStyle.DeepObject = 6 -> Microsoft.OpenApi.ParameterStyle +Microsoft.OpenApi.ParameterStyle.Form = 2 -> Microsoft.OpenApi.ParameterStyle +Microsoft.OpenApi.ParameterStyle.Label = 1 -> Microsoft.OpenApi.ParameterStyle +Microsoft.OpenApi.ParameterStyle.Matrix = 0 -> Microsoft.OpenApi.ParameterStyle +Microsoft.OpenApi.ParameterStyle.PipeDelimited = 5 -> Microsoft.OpenApi.ParameterStyle +Microsoft.OpenApi.ParameterStyle.Simple = 3 -> Microsoft.OpenApi.ParameterStyle +Microsoft.OpenApi.ParameterStyle.SpaceDelimited = 4 -> Microsoft.OpenApi.ParameterStyle +Microsoft.OpenApi.PathExpression +Microsoft.OpenApi.PathExpression.Name.get -> string? +Microsoft.OpenApi.PathExpression.PathExpression(string! name) -> void +Microsoft.OpenApi.QueryExpression +Microsoft.OpenApi.QueryExpression.Name.get -> string? +Microsoft.OpenApi.QueryExpression.QueryExpression(string! name) -> void +Microsoft.OpenApi.Reader.DefaultStreamLoader +Microsoft.OpenApi.Reader.DefaultStreamLoader.DefaultStreamLoader(System.Net.Http.HttpClient! httpClient) -> void +Microsoft.OpenApi.Reader.DefaultStreamLoader.LoadAsync(System.Uri! baseUrl, System.Uri! uri, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +Microsoft.OpenApi.Reader.JsonPointerExtensions +Microsoft.OpenApi.Reader.OpenApiDiagnostic +Microsoft.OpenApi.Reader.OpenApiDiagnostic.AppendDiagnostic(Microsoft.OpenApi.Reader.OpenApiDiagnostic! diagnosticToAdd, string? fileNameToAdd = null) -> void +Microsoft.OpenApi.Reader.OpenApiDiagnostic.Errors.get -> System.Collections.Generic.IList! +Microsoft.OpenApi.Reader.OpenApiDiagnostic.Errors.set -> void +Microsoft.OpenApi.Reader.OpenApiDiagnostic.Format.get -> string? +Microsoft.OpenApi.Reader.OpenApiDiagnostic.Format.set -> void +Microsoft.OpenApi.Reader.OpenApiDiagnostic.OpenApiDiagnostic() -> void +Microsoft.OpenApi.Reader.OpenApiDiagnostic.SpecificationVersion.get -> Microsoft.OpenApi.OpenApiSpecVersion +Microsoft.OpenApi.Reader.OpenApiDiagnostic.SpecificationVersion.set -> void +Microsoft.OpenApi.Reader.OpenApiDiagnostic.Warnings.get -> System.Collections.Generic.IList! +Microsoft.OpenApi.Reader.OpenApiDiagnostic.Warnings.set -> void +Microsoft.OpenApi.Reader.OpenApiJsonReader +Microsoft.OpenApi.Reader.OpenApiJsonReader.OpenApiJsonReader() -> void +Microsoft.OpenApi.Reader.OpenApiJsonReader.Read(System.IO.MemoryStream! input, System.Uri! location, Microsoft.OpenApi.Reader.OpenApiReaderSettings! settings) -> Microsoft.OpenApi.Reader.ReadResult! +Microsoft.OpenApi.Reader.OpenApiJsonReader.Read(System.Text.Json.Nodes.JsonNode! jsonNode, System.Uri! location, Microsoft.OpenApi.Reader.OpenApiReaderSettings! settings) -> Microsoft.OpenApi.Reader.ReadResult! +Microsoft.OpenApi.Reader.OpenApiJsonReader.ReadAsync(System.IO.Stream! input, System.Uri! location, Microsoft.OpenApi.Reader.OpenApiReaderSettings! settings, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +Microsoft.OpenApi.Reader.OpenApiJsonReader.ReadFragment(System.IO.MemoryStream! input, Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.OpenApiDocument! openApiDocument, out Microsoft.OpenApi.Reader.OpenApiDiagnostic! diagnostic, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null) -> T? +Microsoft.OpenApi.Reader.OpenApiJsonReader.ReadFragment(System.Text.Json.Nodes.JsonNode! input, Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.OpenApiDocument! openApiDocument, out Microsoft.OpenApi.Reader.OpenApiDiagnostic! diagnostic, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null) -> T? +Microsoft.OpenApi.Reader.OpenApiModelFactory +Microsoft.OpenApi.Reader.OpenApiReaderSettings +Microsoft.OpenApi.Reader.OpenApiReaderSettings.AddJsonReader() -> void +Microsoft.OpenApi.Reader.OpenApiReaderSettings.AddMicrosoftExtensionParsers() -> void +Microsoft.OpenApi.Reader.OpenApiReaderSettings.BaseUrl.get -> System.Uri? +Microsoft.OpenApi.Reader.OpenApiReaderSettings.BaseUrl.set -> void +Microsoft.OpenApi.Reader.OpenApiReaderSettings.CustomExternalLoader.get -> Microsoft.OpenApi.IStreamLoader? +Microsoft.OpenApi.Reader.OpenApiReaderSettings.CustomExternalLoader.set -> void +Microsoft.OpenApi.Reader.OpenApiReaderSettings.DefaultContentType.get -> System.Collections.Generic.List? +Microsoft.OpenApi.Reader.OpenApiReaderSettings.DefaultContentType.set -> void +Microsoft.OpenApi.Reader.OpenApiReaderSettings.ExtensionParsers.get -> System.Collections.Generic.Dictionary!>? +Microsoft.OpenApi.Reader.OpenApiReaderSettings.ExtensionParsers.set -> void +Microsoft.OpenApi.Reader.OpenApiReaderSettings.HttpClient.init -> void +Microsoft.OpenApi.Reader.OpenApiReaderSettings.LeaveStreamOpen.get -> bool +Microsoft.OpenApi.Reader.OpenApiReaderSettings.LeaveStreamOpen.set -> void +Microsoft.OpenApi.Reader.OpenApiReaderSettings.LoadExternalRefs.get -> bool +Microsoft.OpenApi.Reader.OpenApiReaderSettings.LoadExternalRefs.set -> void +Microsoft.OpenApi.Reader.OpenApiReaderSettings.OpenApiReaderSettings() -> void +Microsoft.OpenApi.Reader.OpenApiReaderSettings.Readers.get -> System.Collections.Generic.Dictionary! +Microsoft.OpenApi.Reader.OpenApiReaderSettings.Readers.init -> void +Microsoft.OpenApi.Reader.OpenApiReaderSettings.RuleSet.get -> Microsoft.OpenApi.ValidationRuleSet! +Microsoft.OpenApi.Reader.OpenApiReaderSettings.RuleSet.set -> void +Microsoft.OpenApi.Reader.OpenApiReaderSettings.TryAddReader(string! format, Microsoft.OpenApi.IOpenApiReader! reader) -> bool +Microsoft.OpenApi.Reader.OpenApiVersionExtensionMethods +Microsoft.OpenApi.Reader.ParsingContext +Microsoft.OpenApi.Reader.ParsingContext.BaseUrl.get -> System.Uri? +Microsoft.OpenApi.Reader.ParsingContext.BaseUrl.set -> void +Microsoft.OpenApi.Reader.ParsingContext.DefaultContentType.get -> System.Collections.Generic.List? +Microsoft.OpenApi.Reader.ParsingContext.DefaultContentType.set -> void +Microsoft.OpenApi.Reader.ParsingContext.Diagnostic.get -> Microsoft.OpenApi.Reader.OpenApiDiagnostic! +Microsoft.OpenApi.Reader.ParsingContext.EndObject() -> void +Microsoft.OpenApi.Reader.ParsingContext.ExtensionParsers.get -> System.Collections.Generic.Dictionary!>? +Microsoft.OpenApi.Reader.ParsingContext.ExtensionParsers.set -> void +Microsoft.OpenApi.Reader.ParsingContext.GetFromTempStorage(string! key, object? scope = null) -> T? +Microsoft.OpenApi.Reader.ParsingContext.GetLocation() -> string! +Microsoft.OpenApi.Reader.ParsingContext.Parse(System.Text.Json.Nodes.JsonNode! jsonNode, System.Uri! location) -> Microsoft.OpenApi.OpenApiDocument! +Microsoft.OpenApi.Reader.ParsingContext.ParseFragment(System.Text.Json.Nodes.JsonNode! jsonNode, Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.OpenApiDocument! openApiDocument) -> T? +Microsoft.OpenApi.Reader.ParsingContext.ParsingContext(Microsoft.OpenApi.Reader.OpenApiDiagnostic! diagnostic) -> void +Microsoft.OpenApi.Reader.ParsingContext.SetTempStorage(string! key, object? value, object? scope = null) -> void +Microsoft.OpenApi.Reader.ParsingContext.StartObject(string! objectName) -> void +Microsoft.OpenApi.Reader.ReadResult +Microsoft.OpenApi.Reader.ReadResult.Deconstruct(out Microsoft.OpenApi.OpenApiDocument? document, out Microsoft.OpenApi.Reader.OpenApiDiagnostic? diagnostic) -> void +Microsoft.OpenApi.Reader.ReadResult.Diagnostic.get -> Microsoft.OpenApi.Reader.OpenApiDiagnostic? +Microsoft.OpenApi.Reader.ReadResult.Diagnostic.set -> void +Microsoft.OpenApi.Reader.ReadResult.Document.get -> Microsoft.OpenApi.OpenApiDocument? +Microsoft.OpenApi.Reader.ReadResult.Document.set -> void +Microsoft.OpenApi.Reader.ReadResult.ReadResult() -> void +Microsoft.OpenApi.ReferenceType +Microsoft.OpenApi.ReferenceType.Callback = 8 -> Microsoft.OpenApi.ReferenceType +Microsoft.OpenApi.ReferenceType.Example = 3 -> Microsoft.OpenApi.ReferenceType +Microsoft.OpenApi.ReferenceType.Header = 5 -> Microsoft.OpenApi.ReferenceType +Microsoft.OpenApi.ReferenceType.Link = 7 -> Microsoft.OpenApi.ReferenceType +Microsoft.OpenApi.ReferenceType.MediaType = 11 -> Microsoft.OpenApi.ReferenceType +Microsoft.OpenApi.ReferenceType.Parameter = 2 -> Microsoft.OpenApi.ReferenceType +Microsoft.OpenApi.ReferenceType.PathItem = 10 -> Microsoft.OpenApi.ReferenceType +Microsoft.OpenApi.ReferenceType.RequestBody = 4 -> Microsoft.OpenApi.ReferenceType +Microsoft.OpenApi.ReferenceType.Response = 1 -> Microsoft.OpenApi.ReferenceType +Microsoft.OpenApi.ReferenceType.Schema = 0 -> Microsoft.OpenApi.ReferenceType +Microsoft.OpenApi.ReferenceType.SecurityScheme = 6 -> Microsoft.OpenApi.ReferenceType +Microsoft.OpenApi.ReferenceType.Tag = 9 -> Microsoft.OpenApi.ReferenceType +Microsoft.OpenApi.RequestExpression +Microsoft.OpenApi.RequestExpression.RequestExpression(Microsoft.OpenApi.SourceExpression! source) -> void +Microsoft.OpenApi.RequestExpression.Source.get -> Microsoft.OpenApi.SourceExpression! +Microsoft.OpenApi.ResponseExpression +Microsoft.OpenApi.ResponseExpression.ResponseExpression(Microsoft.OpenApi.SourceExpression! source) -> void +Microsoft.OpenApi.ResponseExpression.Source.get -> Microsoft.OpenApi.SourceExpression! +Microsoft.OpenApi.RuntimeExpression +Microsoft.OpenApi.RuntimeExpression.Equals(Microsoft.OpenApi.RuntimeExpression? other) -> bool +Microsoft.OpenApi.RuntimeExpression.RuntimeExpression() -> void +Microsoft.OpenApi.RuntimeExpressionAnyWrapper +Microsoft.OpenApi.RuntimeExpressionAnyWrapper.Any.get -> System.Text.Json.Nodes.JsonNode? +Microsoft.OpenApi.RuntimeExpressionAnyWrapper.Any.set -> void +Microsoft.OpenApi.RuntimeExpressionAnyWrapper.Expression.get -> Microsoft.OpenApi.RuntimeExpression? +Microsoft.OpenApi.RuntimeExpressionAnyWrapper.Expression.set -> void +Microsoft.OpenApi.RuntimeExpressionAnyWrapper.RuntimeExpressionAnyWrapper() -> void +Microsoft.OpenApi.RuntimeExpressionAnyWrapper.RuntimeExpressionAnyWrapper(Microsoft.OpenApi.RuntimeExpressionAnyWrapper! runtimeExpressionAnyWrapper) -> void +Microsoft.OpenApi.RuntimeExpressionAnyWrapper.WriteValue(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +Microsoft.OpenApi.Scope +Microsoft.OpenApi.Scope.IsInArray.get -> bool +Microsoft.OpenApi.Scope.IsInArray.set -> void +Microsoft.OpenApi.Scope.ObjectCount.get -> int +Microsoft.OpenApi.Scope.ObjectCount.set -> void +Microsoft.OpenApi.Scope.Scope(Microsoft.OpenApi.ScopeType type) -> void +Microsoft.OpenApi.Scope.Type.get -> Microsoft.OpenApi.ScopeType +Microsoft.OpenApi.ScopeType +Microsoft.OpenApi.ScopeType.Array = 1 -> Microsoft.OpenApi.ScopeType +Microsoft.OpenApi.ScopeType.Object = 0 -> Microsoft.OpenApi.ScopeType +Microsoft.OpenApi.SearchResult +Microsoft.OpenApi.SearchResult.CurrentKeys.get -> Microsoft.OpenApi.CurrentKeys? +Microsoft.OpenApi.SearchResult.CurrentKeys.set -> void +Microsoft.OpenApi.SearchResult.Operation.get -> Microsoft.OpenApi.OpenApiOperation? +Microsoft.OpenApi.SearchResult.Operation.set -> void +Microsoft.OpenApi.SearchResult.Parameters.get -> System.Collections.Generic.IList? +Microsoft.OpenApi.SearchResult.Parameters.set -> void +Microsoft.OpenApi.SearchResult.SearchResult() -> void +Microsoft.OpenApi.SecuritySchemeType +Microsoft.OpenApi.SecuritySchemeType.ApiKey = 0 -> Microsoft.OpenApi.SecuritySchemeType +Microsoft.OpenApi.SecuritySchemeType.Http = 1 -> Microsoft.OpenApi.SecuritySchemeType +Microsoft.OpenApi.SecuritySchemeType.MutualTLS = 4 -> Microsoft.OpenApi.SecuritySchemeType +Microsoft.OpenApi.SecuritySchemeType.OAuth2 = 2 -> Microsoft.OpenApi.SecuritySchemeType +Microsoft.OpenApi.SecuritySchemeType.OpenIdConnect = 3 -> Microsoft.OpenApi.SecuritySchemeType +Microsoft.OpenApi.SourceExpression +Microsoft.OpenApi.SourceExpression.SourceExpression(string? value) -> void +Microsoft.OpenApi.SourceExpression.Value.get -> string? +Microsoft.OpenApi.SpecialCharacterStringExtensions +Microsoft.OpenApi.StatusCodeExpression +Microsoft.OpenApi.StatusCodeExpression.StatusCodeExpression() -> void +Microsoft.OpenApi.UrlExpression +Microsoft.OpenApi.UrlExpression.UrlExpression() -> void +Microsoft.OpenApi.ValidationContextExtensions +Microsoft.OpenApi.ValidationRule +Microsoft.OpenApi.ValidationRule.Name.get -> string! +Microsoft.OpenApi.ValidationRule +Microsoft.OpenApi.ValidationRule.ValidationRule(string! name, System.Action! validate) -> void +Microsoft.OpenApi.ValidationRuleSet +Microsoft.OpenApi.ValidationRuleSet.Add(System.Type! key, Microsoft.OpenApi.ValidationRule! rule) -> void +Microsoft.OpenApi.ValidationRuleSet.Add(System.Type! key, System.Collections.Generic.List! rules) -> void +Microsoft.OpenApi.ValidationRuleSet.Clear() -> void +Microsoft.OpenApi.ValidationRuleSet.Contains(System.Type! key, Microsoft.OpenApi.ValidationRule! rule) -> bool +Microsoft.OpenApi.ValidationRuleSet.ContainsKey(System.Type! key) -> bool +Microsoft.OpenApi.ValidationRuleSet.Count.get -> int +Microsoft.OpenApi.ValidationRuleSet.FindRules(System.Type! type) -> System.Collections.Generic.IList! +Microsoft.OpenApi.ValidationRuleSet.GetEnumerator() -> System.Collections.Generic.IEnumerator! +Microsoft.OpenApi.ValidationRuleSet.Remove(Microsoft.OpenApi.ValidationRule! rule) -> bool +Microsoft.OpenApi.ValidationRuleSet.Remove(string! ruleName) -> void +Microsoft.OpenApi.ValidationRuleSet.Remove(System.Type! key) -> bool +Microsoft.OpenApi.ValidationRuleSet.Remove(System.Type! key, Microsoft.OpenApi.ValidationRule! rule) -> bool +Microsoft.OpenApi.ValidationRuleSet.Rules.get -> System.Collections.Generic.IList! +Microsoft.OpenApi.ValidationRuleSet.TryGetValue(System.Type! key, out System.Collections.Generic.List? rules) -> bool +Microsoft.OpenApi.ValidationRuleSet.Update(System.Type! key, Microsoft.OpenApi.ValidationRule! newRule, Microsoft.OpenApi.ValidationRule! oldRule) -> bool +Microsoft.OpenApi.ValidationRuleSet.ValidationRuleSet() -> void +Microsoft.OpenApi.ValidationRuleSet.ValidationRuleSet(Microsoft.OpenApi.ValidationRuleSet! ruleSet) -> void +Microsoft.OpenApi.ValidationRuleSet.ValidationRuleSet(System.Collections.Generic.Dictionary!>! rules) -> void +override Microsoft.OpenApi.BodyExpression.Expression.get -> string! +override Microsoft.OpenApi.CompositeExpression.Expression.get -> string! +override Microsoft.OpenApi.FormattingStreamWriter.FormatProvider.get -> System.IFormatProvider! +override Microsoft.OpenApi.HeaderExpression.Expression.get -> string! +override Microsoft.OpenApi.JsonPointer.ToString() -> string! +override Microsoft.OpenApi.JsonSchemaReference.SerializeAdditionalV31Properties(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +override Microsoft.OpenApi.JsonSchemaReference.SerializeAdditionalV32Properties(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +override Microsoft.OpenApi.JsonSchemaReference.SetAdditional31MetadataFromMapNode(System.Text.Json.Nodes.JsonObject! jsonObject) -> void +override Microsoft.OpenApi.MethodExpression.Expression.get -> string! +override Microsoft.OpenApi.OpenApiCallbackReference.CopyReference(Microsoft.OpenApi.BaseOpenApiReference! sourceReference) -> Microsoft.OpenApi.BaseOpenApiReference! +override Microsoft.OpenApi.OpenApiCallbackReference.CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiCallback! source) -> Microsoft.OpenApi.IOpenApiCallback! +override Microsoft.OpenApi.OpenApiCallbackReference.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +override Microsoft.OpenApi.OpenApiError.ToString() -> string! +override Microsoft.OpenApi.OpenApiExampleReference.CopyReference(Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary! sourceReference) -> Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary! +override Microsoft.OpenApi.OpenApiExampleReference.CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiExample! source) -> Microsoft.OpenApi.IOpenApiExample! +override Microsoft.OpenApi.OpenApiExampleReference.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +override Microsoft.OpenApi.OpenApiHeaderReference.CopyReference(Microsoft.OpenApi.OpenApiReferenceWithDescription! sourceReference) -> Microsoft.OpenApi.OpenApiReferenceWithDescription! +override Microsoft.OpenApi.OpenApiHeaderReference.CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiHeader! source) -> Microsoft.OpenApi.IOpenApiHeader! +override Microsoft.OpenApi.OpenApiJsonWriter.BaseIndentation.get -> int +override Microsoft.OpenApi.OpenApiJsonWriter.WriteEndArray() -> void +override Microsoft.OpenApi.OpenApiJsonWriter.WriteEndObject() -> void +override Microsoft.OpenApi.OpenApiJsonWriter.WriteIndentation() -> void +override Microsoft.OpenApi.OpenApiJsonWriter.WriteNull() -> void +override Microsoft.OpenApi.OpenApiJsonWriter.WritePropertyName(string! name) -> void +override Microsoft.OpenApi.OpenApiJsonWriter.WriteRaw(string! value) -> void +override Microsoft.OpenApi.OpenApiJsonWriter.WriteStartArray() -> void +override Microsoft.OpenApi.OpenApiJsonWriter.WriteStartObject() -> void +override Microsoft.OpenApi.OpenApiJsonWriter.WriteValue(string! value) -> void +override Microsoft.OpenApi.OpenApiJsonWriter.WriteValueSeparator() -> void +override Microsoft.OpenApi.OpenApiLinkReference.CopyReference(Microsoft.OpenApi.OpenApiReferenceWithDescription! sourceReference) -> Microsoft.OpenApi.OpenApiReferenceWithDescription! +override Microsoft.OpenApi.OpenApiLinkReference.CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiLink! source) -> Microsoft.OpenApi.IOpenApiLink! +override Microsoft.OpenApi.OpenApiLinkReference.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +override Microsoft.OpenApi.OpenApiMediaTypeReference.CopyReference(Microsoft.OpenApi.BaseOpenApiReference! sourceReference) -> Microsoft.OpenApi.BaseOpenApiReference! +override Microsoft.OpenApi.OpenApiMediaTypeReference.CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiMediaType! source) -> Microsoft.OpenApi.IOpenApiMediaType! +override Microsoft.OpenApi.OpenApiMediaTypeReference.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +override Microsoft.OpenApi.OpenApiMediaTypeReference.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +override Microsoft.OpenApi.OpenApiParameterReference.CopyReference(Microsoft.OpenApi.OpenApiReferenceWithDescription! sourceReference) -> Microsoft.OpenApi.OpenApiReferenceWithDescription! +override Microsoft.OpenApi.OpenApiParameterReference.CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiParameter! source) -> Microsoft.OpenApi.IOpenApiParameter! +override Microsoft.OpenApi.OpenApiPathItemReference.CopyReference(Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary! sourceReference) -> Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary! +override Microsoft.OpenApi.OpenApiPathItemReference.CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiPathItem! source) -> Microsoft.OpenApi.IOpenApiPathItem! +override Microsoft.OpenApi.OpenApiPathItemReference.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +override Microsoft.OpenApi.OpenApiReferenceWithDescription.SerializeAdditionalV31Properties(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +override Microsoft.OpenApi.OpenApiReferenceWithDescription.SerializeAdditionalV32Properties(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +override Microsoft.OpenApi.OpenApiReferenceWithDescription.SetAdditional31MetadataFromMapNode(System.Text.Json.Nodes.JsonObject! jsonObject) -> void +override Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary.SerializeAdditionalV31Properties(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +override Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary.SerializeAdditionalV32Properties(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +override Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary.SetAdditional31MetadataFromMapNode(System.Text.Json.Nodes.JsonObject! jsonObject) -> void +override Microsoft.OpenApi.OpenApiRequestBodyReference.CopyReference(Microsoft.OpenApi.OpenApiReferenceWithDescription! sourceReference) -> Microsoft.OpenApi.OpenApiReferenceWithDescription! +override Microsoft.OpenApi.OpenApiRequestBodyReference.CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiRequestBody! source) -> Microsoft.OpenApi.IOpenApiRequestBody! +override Microsoft.OpenApi.OpenApiRequestBodyReference.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +override Microsoft.OpenApi.OpenApiResponseReference.CopyReference(Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary! sourceReference) -> Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary! +override Microsoft.OpenApi.OpenApiResponseReference.CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiResponse! source) -> Microsoft.OpenApi.IOpenApiResponse! +override Microsoft.OpenApi.OpenApiSchemaReference.CopyReference(Microsoft.OpenApi.JsonSchemaReference! sourceReference) -> Microsoft.OpenApi.JsonSchemaReference! +override Microsoft.OpenApi.OpenApiSchemaReference.CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiSchema! source) -> Microsoft.OpenApi.IOpenApiSchema! +override Microsoft.OpenApi.OpenApiSchemaReference.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +override Microsoft.OpenApi.OpenApiSchemaReference.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +override Microsoft.OpenApi.OpenApiSchemaReference.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +override Microsoft.OpenApi.OpenApiSecuritySchemeReference.CopyReference(Microsoft.OpenApi.OpenApiReferenceWithDescription! sourceReference) -> Microsoft.OpenApi.OpenApiReferenceWithDescription! +override Microsoft.OpenApi.OpenApiSecuritySchemeReference.CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiSecurityScheme! source) -> Microsoft.OpenApi.IOpenApiSecurityScheme! +override Microsoft.OpenApi.OpenApiTagReference.CopyReference(Microsoft.OpenApi.BaseOpenApiReference! sourceReference) -> Microsoft.OpenApi.BaseOpenApiReference! +override Microsoft.OpenApi.OpenApiTagReference.CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiTag! source) -> Microsoft.OpenApi.IOpenApiTag! +override Microsoft.OpenApi.OpenApiTagReference.Target.get -> Microsoft.OpenApi.IOpenApiTag? +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.IOpenApiCallback! callback) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.IOpenApiExample! example) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.IOpenApiExtensible! openApiExtensible) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.IOpenApiExtension! openApiExtension) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.IOpenApiHeader! header) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.IOpenApiLink! link) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.IOpenApiMediaType! mediaType) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.IOpenApiParameter! parameter) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.IOpenApiPathItem! pathItem) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.IOpenApiRequestBody! requestBody) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.IOpenApiResponse! response) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.IOpenApiSchema! schema) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.IOpenApiSecurityScheme! securityScheme) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.OpenApiComponents! components) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.OpenApiContact! contact) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.OpenApiDocument! doc) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.OpenApiEncoding! encoding) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.OpenApiExternalDocs! externalDocs) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.OpenApiInfo! info) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.OpenApiLicense! license) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.OpenApiOAuthFlow! openApiOAuthFlow) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.OpenApiOperation! operation) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.OpenApiPaths! paths) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.OpenApiResponses! response) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.OpenApiSecurityRequirement! securityRequirement) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.OpenApiServer! server) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.OpenApiServerVariable! serverVariable) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(Microsoft.OpenApi.OpenApiTag! tag) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(System.Collections.Generic.IDictionary! callbacks) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(System.Collections.Generic.IDictionary! examples) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(System.Collections.Generic.IDictionary! headers) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(System.Collections.Generic.IDictionary! links) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(System.Collections.Generic.IDictionary! content) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(System.Collections.Generic.IDictionary! encodings) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(System.Collections.Generic.IDictionary! serverVariables) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(System.Collections.Generic.IDictionary! operations) -> void +override Microsoft.OpenApi.OpenApiValidator.Visit(System.Collections.Generic.List! example) -> void +override Microsoft.OpenApi.OpenApiYamlWriter.BaseIndentation.get -> int +override Microsoft.OpenApi.OpenApiYamlWriter.WriteEndArray() -> void +override Microsoft.OpenApi.OpenApiYamlWriter.WriteEndObject() -> void +override Microsoft.OpenApi.OpenApiYamlWriter.WriteNull() -> void +override Microsoft.OpenApi.OpenApiYamlWriter.WritePropertyName(string! name) -> void +override Microsoft.OpenApi.OpenApiYamlWriter.WriteRaw(string! value) -> void +override Microsoft.OpenApi.OpenApiYamlWriter.WriteStartArray() -> void +override Microsoft.OpenApi.OpenApiYamlWriter.WriteStartObject() -> void +override Microsoft.OpenApi.OpenApiYamlWriter.WriteValue(string! value) -> void +override Microsoft.OpenApi.OpenApiYamlWriter.WriteValueSeparator() -> void +override Microsoft.OpenApi.OperationSearch.Visit(Microsoft.OpenApi.IOpenApiPathItem! pathItem) -> void +override Microsoft.OpenApi.OperationSearch.Visit(System.Collections.Generic.IList! parameters) -> void +override Microsoft.OpenApi.PathExpression.Expression.get -> string! +override Microsoft.OpenApi.QueryExpression.Expression.get -> string! +override Microsoft.OpenApi.RequestExpression.Expression.get -> string! +override Microsoft.OpenApi.ResponseExpression.Expression.get -> string! +override Microsoft.OpenApi.RuntimeExpression.Equals(object? obj) -> bool +override Microsoft.OpenApi.RuntimeExpression.GetHashCode() -> int +override Microsoft.OpenApi.RuntimeExpression.ToString() -> string! +override Microsoft.OpenApi.StatusCodeExpression.Expression.get -> string! +override Microsoft.OpenApi.UrlExpression.Expression.get -> string! +readonly Microsoft.OpenApi.OpenApiReferenceError.Reference -> Microsoft.OpenApi.BaseOpenApiReference? +readonly Microsoft.OpenApi.OpenApiWriterBase.Scopes -> System.Collections.Generic.Stack! +static Microsoft.OpenApi.BaseOpenApiReference.GetPropertyValueFromNode(System.Text.Json.Nodes.JsonObject! jsonObject, string! key) -> string? +static Microsoft.OpenApi.EnumExtensions.GetAttributeOfType(this System.Enum! enumValue) -> T? +static Microsoft.OpenApi.EnumExtensions.GetDisplayName(this System.Enum! enumValue) -> string! +static Microsoft.OpenApi.JsonNullSentinel.IsJsonNullSentinel(this System.Text.Json.Nodes.JsonNode? node) -> bool +static Microsoft.OpenApi.JsonNullSentinel.JsonNull.get -> System.Text.Json.Nodes.JsonValue! +static Microsoft.OpenApi.MicrosoftExtensions.OpenApiDeprecationExtension.Name.get -> string! +static Microsoft.OpenApi.MicrosoftExtensions.OpenApiDeprecationExtension.Parse(System.Text.Json.Nodes.JsonNode! source) -> Microsoft.OpenApi.MicrosoftExtensions.OpenApiDeprecationExtension! +static Microsoft.OpenApi.MicrosoftExtensions.OpenApiEnumFlagsExtension.Name.get -> string! +static Microsoft.OpenApi.MicrosoftExtensions.OpenApiEnumFlagsExtension.Parse(System.Text.Json.Nodes.JsonNode! source) -> Microsoft.OpenApi.MicrosoftExtensions.OpenApiEnumFlagsExtension! +static Microsoft.OpenApi.MicrosoftExtensions.OpenApiEnumValuesDescriptionExtension.Name.get -> string! +static Microsoft.OpenApi.MicrosoftExtensions.OpenApiEnumValuesDescriptionExtension.Parse(System.Text.Json.Nodes.JsonNode! source) -> Microsoft.OpenApi.MicrosoftExtensions.OpenApiEnumValuesDescriptionExtension! +static Microsoft.OpenApi.MicrosoftExtensions.OpenApiPagingExtension.Name.get -> string! +static Microsoft.OpenApi.MicrosoftExtensions.OpenApiPagingExtension.Parse(System.Text.Json.Nodes.JsonNode! source) -> Microsoft.OpenApi.MicrosoftExtensions.OpenApiPagingExtension! +static Microsoft.OpenApi.MicrosoftExtensions.OpenApiPrimaryErrorMessageExtension.Name.get -> string! +static Microsoft.OpenApi.MicrosoftExtensions.OpenApiPrimaryErrorMessageExtension.Parse(System.Text.Json.Nodes.JsonNode! source) -> Microsoft.OpenApi.MicrosoftExtensions.OpenApiPrimaryErrorMessageExtension! +static Microsoft.OpenApi.MicrosoftExtensions.OpenApiReservedParameterExtension.Name.get -> string! +static Microsoft.OpenApi.MicrosoftExtensions.OpenApiReservedParameterExtension.Parse(System.Text.Json.Nodes.JsonNode! source) -> Microsoft.OpenApi.MicrosoftExtensions.OpenApiReservedParameterExtension! +static Microsoft.OpenApi.OpenApiComponentsRules.KeyMustBeRegularExpression.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiContactRules.EmailMustBeEmailFormat.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiDocument.Load(System.IO.MemoryStream! stream, string? format = null, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null) -> Microsoft.OpenApi.Reader.ReadResult! +static Microsoft.OpenApi.OpenApiDocument.LoadAsync(string! url, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +static Microsoft.OpenApi.OpenApiDocument.LoadAsync(System.IO.Stream! stream, string? format = null, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +static Microsoft.OpenApi.OpenApiDocument.Parse(string! input, string? format = null, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null) -> Microsoft.OpenApi.Reader.ReadResult! +static Microsoft.OpenApi.OpenApiDocumentRules.OpenApiDocumentFieldIsMissing.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiDocumentRules.OpenApiDocumentReferencesAreValid.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiElementExtensions.Validate(this Microsoft.OpenApi.IOpenApiElement! element, Microsoft.OpenApi.ValidationRuleSet! ruleSet) -> System.Collections.Generic.IEnumerable! +static Microsoft.OpenApi.OpenApiExtensibleExtensions.AddExtension(this T element, string! name, Microsoft.OpenApi.IOpenApiExtension! any) -> void +static Microsoft.OpenApi.OpenApiExtensibleRules.ExtensionNameMustStartWithXDash.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiExternalDocsRules.UrlIsRequired.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiFilterService.CreateFilteredDocument(Microsoft.OpenApi.OpenApiDocument! source, System.Func! predicate) -> Microsoft.OpenApi.OpenApiDocument! +static Microsoft.OpenApi.OpenApiFilterService.CreateOpenApiUrlTreeNode(System.Collections.Generic.Dictionary! sources) -> Microsoft.OpenApi.OpenApiUrlTreeNode! +static Microsoft.OpenApi.OpenApiFilterService.CreatePredicate(string? operationIds = null, string? tags = null, System.Collections.Generic.Dictionary!>? requestUrls = null, Microsoft.OpenApi.OpenApiDocument? source = null) -> System.Func! +static Microsoft.OpenApi.OpenApiInfoRules.InfoRequiredFields.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiLicenseRules.LicenseRequiredFields.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiNonDefaultRules.HeaderMismatchedDataType.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiNonDefaultRules.MediaTypeMismatchedDataType.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiNonDefaultRules.ParameterMismatchedDataType.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiNonDefaultRules.SchemaMismatchedDataType.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiOAuthFlowRules.OAuthFlowRequiredFields.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiParameterRules.ParameterRequiredFields.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiParameterRules.PathParameterShouldBeInThePath.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiParameterRules.RequiredMustBeTrueWhenInIsPath.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiPathsRules.PathMustBeUnique.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiPathsRules.PathNameMustBeginWithSlash.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiRecommendedRules.GetOperationShouldNotHaveRequestBody.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiResponseRules.ResponseRequiredFields.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiResponsesRules.ResponsesMustBeIdentifiedByDefaultOrStatusCode.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiResponsesRules.ResponsesMustContainAtLeastOneResponse.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiSchemaRules.TraverseSchemaElements(string! discriminatorName, System.Collections.Generic.IList? childSchema) -> bool +static Microsoft.OpenApi.OpenApiSchemaRules.ValidateChildSchemaAgainstDiscriminator(Microsoft.OpenApi.IOpenApiSchema! schema, string? discriminatorName) -> bool +static Microsoft.OpenApi.OpenApiSchemaRules.ValidateSchemaDiscriminator.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiSchemaRules.ValidateSchemaPropertyHasValue.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiSerializableExtensions.SerializeAsJsonAsync(this T element, Microsoft.OpenApi.OpenApiSpecVersion specVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +static Microsoft.OpenApi.OpenApiSerializableExtensions.SerializeAsJsonAsync(this T element, System.IO.Stream! stream, Microsoft.OpenApi.OpenApiSpecVersion specVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +static Microsoft.OpenApi.OpenApiSerializableExtensions.SerializeAsYamlAsync(this T element, Microsoft.OpenApi.OpenApiSpecVersion specVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +static Microsoft.OpenApi.OpenApiSerializableExtensions.SerializeAsYamlAsync(this T element, System.IO.Stream! stream, Microsoft.OpenApi.OpenApiSpecVersion specVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +static Microsoft.OpenApi.OpenApiSerializableExtensions.SerializeAsync(this T element, Microsoft.OpenApi.IOpenApiWriter! writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +static Microsoft.OpenApi.OpenApiSerializableExtensions.SerializeAsync(this T element, Microsoft.OpenApi.OpenApiSpecVersion specVersion, string! format, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +static Microsoft.OpenApi.OpenApiSerializableExtensions.SerializeAsync(this T element, System.IO.Stream! stream, Microsoft.OpenApi.OpenApiSpecVersion specVersion, string! format, Microsoft.OpenApi.OpenApiWriterSettings? settings = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +static Microsoft.OpenApi.OpenApiSerializableExtensions.SerializeAsync(this T element, System.IO.Stream! stream, Microsoft.OpenApi.OpenApiSpecVersion specVersion, string! format, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +static Microsoft.OpenApi.OpenApiServerExtensions.ReplaceServerUrlVariables(this Microsoft.OpenApi.OpenApiServer! server, System.Collections.Generic.Dictionary? values = null) -> string? +static Microsoft.OpenApi.OpenApiServerRules.ServerRequiredFields.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiTagRules.TagRequiredFields.get -> Microsoft.OpenApi.ValidationRule! +static Microsoft.OpenApi.OpenApiTypeMapper.MapOpenApiPrimitiveTypeToSimpleType(this Microsoft.OpenApi.OpenApiSchema! schema) -> System.Type! +static Microsoft.OpenApi.OpenApiTypeMapper.MapTypeToOpenApiPrimitiveType(this System.Type! type) -> Microsoft.OpenApi.OpenApiSchema! +static Microsoft.OpenApi.OpenApiTypeMapper.ToIdentifiers(this Microsoft.OpenApi.JsonSchemaType schemaType) -> string![]! +static Microsoft.OpenApi.OpenApiTypeMapper.ToIdentifiers(this Microsoft.OpenApi.JsonSchemaType? schemaType) -> string![]? +static Microsoft.OpenApi.OpenApiTypeMapper.ToJsonSchemaType(this string! identifier) -> Microsoft.OpenApi.JsonSchemaType +static Microsoft.OpenApi.OpenApiTypeMapper.ToJsonSchemaType(this string![]! identifier) -> Microsoft.OpenApi.JsonSchemaType? +static Microsoft.OpenApi.OpenApiUrlTreeNode.Create() -> Microsoft.OpenApi.OpenApiUrlTreeNode! +static Microsoft.OpenApi.OpenApiUrlTreeNode.Create(Microsoft.OpenApi.OpenApiDocument! doc, string! label) -> Microsoft.OpenApi.OpenApiUrlTreeNode! +static Microsoft.OpenApi.OpenApiWriterAnyExtensions.WriteAny(this Microsoft.OpenApi.IOpenApiWriter! writer, System.Text.Json.Nodes.JsonNode? node) -> void +static Microsoft.OpenApi.OpenApiWriterAnyExtensions.WriteExtensions(this Microsoft.OpenApi.IOpenApiWriter! writer, System.Collections.Generic.IDictionary? extensions, Microsoft.OpenApi.OpenApiSpecVersion specVersion) -> void +static Microsoft.OpenApi.OpenApiWriterBase.WriteV2Examples(Microsoft.OpenApi.IOpenApiWriter! writer, Microsoft.OpenApi.OpenApiExample! example, Microsoft.OpenApi.OpenApiSpecVersion version) -> void +static Microsoft.OpenApi.OpenApiWriterExtensions.WriteOptionalCollection(this Microsoft.OpenApi.IOpenApiWriter! writer, string! name, System.Collections.Generic.IEnumerable? elements, System.Action! action) -> void +static Microsoft.OpenApi.OpenApiWriterExtensions.WriteOptionalCollection(this Microsoft.OpenApi.IOpenApiWriter! writer, string! name, System.Collections.Generic.IEnumerable? elements, System.Action! action) -> void +static Microsoft.OpenApi.OpenApiWriterExtensions.WriteOptionalMap(this Microsoft.OpenApi.IOpenApiWriter! writer, string! name, System.Collections.Generic.IDictionary? elements, System.Action! action) -> void +static Microsoft.OpenApi.OpenApiWriterExtensions.WriteOptionalMap(this Microsoft.OpenApi.IOpenApiWriter! writer, string! name, System.Collections.Generic.IDictionary? elements, System.Action! action) -> void +static Microsoft.OpenApi.OpenApiWriterExtensions.WriteOptionalMap(this Microsoft.OpenApi.IOpenApiWriter! writer, string! name, System.Collections.Generic.IDictionary!>? elements, System.Action!>! action) -> void +static Microsoft.OpenApi.OpenApiWriterExtensions.WriteOptionalMap(this Microsoft.OpenApi.IOpenApiWriter! writer, string! name, System.Collections.Generic.IDictionary? elements, System.Action! action) -> void +static Microsoft.OpenApi.OpenApiWriterExtensions.WriteOptionalMap(this Microsoft.OpenApi.IOpenApiWriter! writer, string! name, System.Collections.Generic.IDictionary? elements, System.Action! action) -> void +static Microsoft.OpenApi.OpenApiWriterExtensions.WriteOptionalMap(this Microsoft.OpenApi.IOpenApiWriter! writer, string! name, System.Collections.Generic.IDictionary? elements, System.Action! action) -> void +static Microsoft.OpenApi.OpenApiWriterExtensions.WriteOptionalObject(this Microsoft.OpenApi.IOpenApiWriter! writer, string! name, T? value, System.Action! action) -> void +static Microsoft.OpenApi.OpenApiWriterExtensions.WriteOptionalOrEmptyCollection(this Microsoft.OpenApi.IOpenApiWriter! writer, string! name, System.Collections.Generic.IEnumerable? elements, System.Action! action) -> void +static Microsoft.OpenApi.OpenApiWriterExtensions.WriteProperty(this Microsoft.OpenApi.IOpenApiWriter! writer, string! name, bool value, bool defaultValue = false) -> void +static Microsoft.OpenApi.OpenApiWriterExtensions.WriteProperty(this Microsoft.OpenApi.IOpenApiWriter! writer, string! name, bool? value, bool defaultValue = false) -> void +static Microsoft.OpenApi.OpenApiWriterExtensions.WriteProperty(this Microsoft.OpenApi.IOpenApiWriter! writer, string! name, string? value) -> void +static Microsoft.OpenApi.OpenApiWriterExtensions.WriteProperty(this Microsoft.OpenApi.IOpenApiWriter! writer, string! name, T value) -> void +static Microsoft.OpenApi.OpenApiWriterExtensions.WriteProperty(this Microsoft.OpenApi.IOpenApiWriter! writer, string! name, T? value) -> void +static Microsoft.OpenApi.OpenApiWriterExtensions.WriteRequiredCollection(this Microsoft.OpenApi.IOpenApiWriter! writer, string! name, System.Collections.Generic.IEnumerable! elements, System.Action! action) -> void +static Microsoft.OpenApi.OpenApiWriterExtensions.WriteRequiredMap(this Microsoft.OpenApi.IOpenApiWriter! writer, string! name, System.Collections.Generic.IDictionary? elements, System.Action! action) -> void +static Microsoft.OpenApi.OpenApiWriterExtensions.WriteRequiredMap(this Microsoft.OpenApi.IOpenApiWriter! writer, string! name, System.Collections.Generic.IDictionary? elements, System.Action! action) -> void +static Microsoft.OpenApi.OpenApiWriterExtensions.WriteRequiredObject(this Microsoft.OpenApi.IOpenApiWriter! writer, string! name, T? value, System.Action! action) -> void +static Microsoft.OpenApi.OpenApiWriterExtensions.WriteRequiredProperty(this Microsoft.OpenApi.IOpenApiWriter! writer, string! name, string? value) -> void +static Microsoft.OpenApi.Reader.JsonPointerExtensions.Find(this Microsoft.OpenApi.JsonPointer! currentPointer, System.Text.Json.Nodes.JsonNode! baseJsonNode) -> System.Text.Json.Nodes.JsonNode? +static Microsoft.OpenApi.Reader.OpenApiModelFactory.Load(System.IO.MemoryStream! stream, string? format = null, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null) -> Microsoft.OpenApi.Reader.ReadResult! +static Microsoft.OpenApi.Reader.OpenApiModelFactory.Load(System.IO.MemoryStream! input, Microsoft.OpenApi.OpenApiSpecVersion version, string? format, Microsoft.OpenApi.OpenApiDocument! openApiDocument, out Microsoft.OpenApi.Reader.OpenApiDiagnostic! diagnostic, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null) -> T? +static Microsoft.OpenApi.Reader.OpenApiModelFactory.LoadAsync(string! url, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +static Microsoft.OpenApi.Reader.OpenApiModelFactory.LoadAsync(System.IO.Stream! input, string? format = null, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +static Microsoft.OpenApi.Reader.OpenApiModelFactory.LoadAsync(string! url, Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.OpenApiDocument! openApiDocument, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +static Microsoft.OpenApi.Reader.OpenApiModelFactory.LoadAsync(System.IO.Stream! input, Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.OpenApiDocument! openApiDocument, string? format = null, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task! +static Microsoft.OpenApi.Reader.OpenApiModelFactory.Parse(string! input, string? format = null, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null) -> Microsoft.OpenApi.Reader.ReadResult! +static Microsoft.OpenApi.Reader.OpenApiModelFactory.Parse(string! input, Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.OpenApiDocument! openApiDocument, out Microsoft.OpenApi.Reader.OpenApiDiagnostic! diagnostic, string? format = null, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null) -> T? +static Microsoft.OpenApi.Reader.OpenApiVersionExtensionMethods.is2_0(this string! version) -> bool +static Microsoft.OpenApi.Reader.OpenApiVersionExtensionMethods.is3_0(this string! version) -> bool +static Microsoft.OpenApi.Reader.OpenApiVersionExtensionMethods.is3_1(this string! version) -> bool +static Microsoft.OpenApi.Reader.OpenApiVersionExtensionMethods.is3_2(this string! version) -> bool +static Microsoft.OpenApi.RuntimeExpression.Build(string! expression) -> Microsoft.OpenApi.RuntimeExpression! +static Microsoft.OpenApi.SourceExpression.Build(string! expression) -> Microsoft.OpenApi.SourceExpression! +static Microsoft.OpenApi.ValidationContextExtensions.CreateError(this Microsoft.OpenApi.IValidationContext! context, string! ruleName, string! message) -> void +static Microsoft.OpenApi.ValidationContextExtensions.CreateWarning(this Microsoft.OpenApi.IValidationContext! context, string! ruleName, string! message) -> void +static Microsoft.OpenApi.ValidationRuleSet.AddValidationRules(Microsoft.OpenApi.ValidationRuleSet! ruleSet, System.Collections.Generic.Dictionary!>! rules) -> void +static Microsoft.OpenApi.ValidationRuleSet.GetDefaultRuleSet() -> Microsoft.OpenApi.ValidationRuleSet! +static Microsoft.OpenApi.ValidationRuleSet.GetEmptyRuleSet() -> Microsoft.OpenApi.ValidationRuleSet! +static readonly Microsoft.OpenApi.OpenApiConstants.defaultUrl -> System.Uri! +static readonly Microsoft.OpenApi.OpenApiConstants.version2_0 -> System.Version! +static readonly Microsoft.OpenApi.OpenApiConstants.version3_0_0 -> System.Version! +virtual Microsoft.OpenApi.BaseOpenApiReference.SerializeAdditionalV31Properties(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.BaseOpenApiReference.SerializeAdditionalV32Properties(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.BaseOpenApiReference.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.BaseOpenApiReference.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.BaseOpenApiReference.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.BaseOpenApiReference.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.BaseOpenApiReference.SetAdditional31MetadataFromMapNode(System.Text.Json.Nodes.JsonObject! jsonObject) -> void +virtual Microsoft.OpenApi.BaseOpenApiReferenceHolder.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.BaseOpenApiReferenceHolder.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.BaseOpenApiReferenceHolder.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.BaseOpenApiReferenceHolder.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.BaseOpenApiReferenceHolder.Target.get -> U? +virtual Microsoft.OpenApi.OpenApiCallback.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiCallback.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiCallback.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiCallback.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiComponents.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiComponents.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiComponents.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiComponents.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiContact.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiContact.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiContact.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiContact.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiEncoding.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiEncoding.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiEncoding.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiEncoding.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiExample.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiExample.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiExample.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiExample.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiExternalDocs.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiExternalDocs.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiExternalDocs.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiExternalDocs.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiHeader.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiHeader.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiHeader.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiHeader.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiLicense.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiLicense.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiLicense.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiLicense.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiLink.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiLink.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiLink.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiLink.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiMediaType.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiMediaType.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiMediaType.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiMediaType.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiOAuthFlows.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiOAuthFlows.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiOAuthFlows.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiOAuthFlows.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiOperation.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiOperation.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiOperation.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiOperation.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiParameter.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiParameter.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiParameter.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiParameter.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiPathItem.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiPathItem.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiPathItem.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiPathItem.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiRequestBody.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiRequestBody.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiRequestBody.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiRequestBody.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiResponse.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiResponse.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiResponse.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiResponse.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiSchema.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiSchema.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiSchema.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiSchema.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiSecurityRequirement.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiSecurityRequirement.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiSecurityRequirement.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiSecurityRequirement.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiSecurityScheme.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiSecurityScheme.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiSecurityScheme.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiSecurityScheme.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiServer.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiServer.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiServer.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiServer.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiTag.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiTag.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiTag.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiTag.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Enter(string! segment) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Exit() -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.IOpenApiCallback! callback) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.IOpenApiExample! example) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.IOpenApiExtensible! openApiExtensible) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.IOpenApiExtension! openApiExtension) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.IOpenApiHeader! header) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.IOpenApiLink! link) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.IOpenApiMediaType! mediaType) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.IOpenApiParameter! parameter) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.IOpenApiPathItem! pathItem) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.IOpenApiReferenceHolder! referenceHolder) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.IOpenApiRequestBody! requestBody) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.IOpenApiResponse! response) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.IOpenApiSchema! schema) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.IOpenApiSecurityScheme! securityScheme) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.OpenApiComponents! components) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.OpenApiContact! contact) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.OpenApiDocument! doc) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.OpenApiEncoding! encoding) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.OpenApiExternalDocs! externalDocs) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.OpenApiInfo! info) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.OpenApiLicense! license) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.OpenApiOAuthFlow! openApiOAuthFlow) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.OpenApiOperation! operation) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.OpenApiPaths! paths) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.OpenApiResponses! response) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.OpenApiSecurityRequirement! securityRequirement) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.OpenApiServer! server) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.OpenApiServerVariable! serverVariable) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.OpenApiTag! tag) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(Microsoft.OpenApi.OpenApiTagReference! tag) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(System.Collections.Generic.IDictionary! callbacks) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(System.Collections.Generic.IDictionary! examples) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(System.Collections.Generic.IDictionary! headers) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(System.Collections.Generic.IDictionary! links) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(System.Collections.Generic.IDictionary! content) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(System.Collections.Generic.IDictionary! webhooks) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(System.Collections.Generic.IDictionary! encodings) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(System.Collections.Generic.IDictionary! serverVariables) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(System.Collections.Generic.IDictionary! operations) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(System.Collections.Generic.IList! parameters) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(System.Collections.Generic.IList! openApiSecurityRequirements) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(System.Collections.Generic.IList! servers) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(System.Collections.Generic.ISet! openApiTags) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(System.Collections.Generic.ISet! openApiTags) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(System.Collections.Generic.List! example) -> void +virtual Microsoft.OpenApi.OpenApiVisitorBase.Visit(System.Text.Json.Nodes.JsonNode! node) -> void +virtual Microsoft.OpenApi.OpenApiWriterBase.DecreaseIndentation() -> void +virtual Microsoft.OpenApi.OpenApiWriterBase.IncreaseIndentation() -> void +virtual Microsoft.OpenApi.OpenApiWriterBase.WriteEnumerable(System.Collections.Generic.IEnumerable! collection) -> void +virtual Microsoft.OpenApi.OpenApiWriterBase.WriteIndentation() -> void +virtual Microsoft.OpenApi.OpenApiWriterBase.WriteValue(bool value) -> void +virtual Microsoft.OpenApi.OpenApiWriterBase.WriteValue(decimal value) -> void +virtual Microsoft.OpenApi.OpenApiWriterBase.WriteValue(double value) -> void +virtual Microsoft.OpenApi.OpenApiWriterBase.WriteValue(float value) -> void +virtual Microsoft.OpenApi.OpenApiWriterBase.WriteValue(int value) -> void +virtual Microsoft.OpenApi.OpenApiWriterBase.WriteValue(long value) -> void +virtual Microsoft.OpenApi.OpenApiWriterBase.WriteValue(object? value) -> void +virtual Microsoft.OpenApi.OpenApiWriterBase.WriteValue(System.DateTime value) -> void +virtual Microsoft.OpenApi.OpenApiWriterBase.WriteValue(System.DateTimeOffset value) -> void +virtual Microsoft.OpenApi.OpenApiXml.SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiXml.SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiXml.SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter! writer) -> void +virtual Microsoft.OpenApi.OpenApiXml.SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter! writer) -> void diff --git a/src/Microsoft.OpenApi/PublicAPI.Unshipped.txt b/src/Microsoft.OpenApi/PublicAPI.Unshipped.txt new file mode 100644 index 000000000..7dc5c5811 --- /dev/null +++ b/src/Microsoft.OpenApi/PublicAPI.Unshipped.txt @@ -0,0 +1 @@ +#nullable enable diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 8792e4404..afbdb2222 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -18,7 +18,6 @@ - diff --git a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt deleted file mode 100644 index 59f1bce31..000000000 --- a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt +++ /dev/null @@ -1,2153 +0,0 @@ -[assembly: System.Reflection.AssemblyMetadata("IsTrimmable", "True")] -[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/Microsoft/OpenAPI.NET")] -[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"Microsoft.OpenApi.Hidi, PublicKey=0024000004800000940000000602000000240000525341310004000001000100957cb48387b2a5f54f5ce39255f18f26d32a39990db27cf48737afc6bc62759ba996b8a2bfb675d4e39f3d06ecb55a178b1b4031dcb2a767e29977d88cce864a0d16bfc1b3bebb0edf9fe285f10fffc0a85f93d664fa05af07faa3aad2e545182dbf787e3fd32b56aca95df1a3c4e75dec164a3f1a4c653d971b01ffc39eb3c4")] -[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"Microsoft.OpenApi.Readers.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100957cb48387b2a5f54f5ce39255f18f26d32a39990db27cf48737afc6bc62759ba996b8a2bfb675d4e39f3d06ecb55a178b1b4031dcb2a767e29977d88cce864a0d16bfc1b3bebb0edf9fe285f10fffc0a85f93d664fa05af07faa3aad2e545182dbf787e3fd32b56aca95df1a3c4e75dec164a3f1a4c653d971b01ffc39eb3c4")] -[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"Microsoft.OpenApi.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100957cb48387b2a5f54f5ce39255f18f26d32a39990db27cf48737afc6bc62759ba996b8a2bfb675d4e39f3d06ecb55a178b1b4031dcb2a767e29977d88cce864a0d16bfc1b3bebb0edf9fe285f10fffc0a85f93d664fa05af07faa3aad2e545182dbf787e3fd32b56aca95df1a3c4e75dec164a3f1a4c653d971b01ffc39eb3c4")] -[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")] -namespace Microsoft.OpenApi -{ - public class BaseOpenApiReference : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiSerializable - { - public BaseOpenApiReference() { } - public BaseOpenApiReference(Microsoft.OpenApi.BaseOpenApiReference reference) { } - public string? ExternalResource { get; init; } - public Microsoft.OpenApi.OpenApiDocument? HostDocument { get; init; } - public string? Id { get; init; } - public bool IsExternal { get; } - public bool IsFragment { get; init; } - public bool IsLocal { get; } - public string? ReferenceV2 { get; } - public string? ReferenceV3 { get; } - public Microsoft.OpenApi.ReferenceType Type { get; init; } - protected virtual void SerializeAdditionalV31Properties(Microsoft.OpenApi.IOpenApiWriter writer) { } - protected virtual void SerializeAdditionalV32Properties(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - protected virtual void SetAdditional31MetadataFromMapNode(System.Text.Json.Nodes.JsonObject jsonObject) { } - protected static string? GetPropertyValueFromNode(System.Text.Json.Nodes.JsonObject jsonObject, string key) { } - } - public abstract class BaseOpenApiReferenceHolder : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiSerializable - where T : class, Microsoft.OpenApi.IOpenApiReferenceable, U - where U : Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable - where V : Microsoft.OpenApi.BaseOpenApiReference, new () - { - protected BaseOpenApiReferenceHolder(Microsoft.OpenApi.BaseOpenApiReferenceHolder source) { } - protected BaseOpenApiReferenceHolder(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument, Microsoft.OpenApi.ReferenceType referenceType, string? externalResource) { } - public T RecursiveTarget { get; } - public V Reference { get; init; } - public virtual U Target { get; } - public bool UnresolvedReference { get; } - protected abstract V CopyReference(V sourceReference); - public abstract U CopyReferenceAsTargetElementWithOverrides(U source); - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public sealed class BodyExpression : Microsoft.OpenApi.SourceExpression - { - public const string Body = "body"; - public const string PointerPrefix = "#"; - public BodyExpression() { } - public BodyExpression(Microsoft.OpenApi.JsonPointer? pointer) { } - public override string Expression { get; } - public string? Fragment { get; } - } - public class CompositeExpression : Microsoft.OpenApi.RuntimeExpression - { - public CompositeExpression(string expression) { } - public System.Collections.Generic.List ContainedExpressions { get; } - public override string Expression { get; } - } - public class CurrentKeys - { - public CurrentKeys() { } - public string? Callback { get; } - public string? Content { get; } - public string? Encoding { get; } - public string? Example { get; } - public string? Extension { get; } - public string? Header { get; } - public string? Link { get; } - public System.Net.Http.HttpMethod? Operation { get; } - public string? Path { get; } - public string? Response { get; } - public string? ServerVariable { get; } - } - [System.AttributeUsage(System.AttributeTargets.Property | System.AttributeTargets.Field)] - public class DisplayAttribute : System.Attribute - { - public DisplayAttribute(string name) { } - public string Name { get; } - } - public static class EnumExtensions - { - [System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("Trimming", "IL2075", Justification="Fields are never trimmed for enum types.")] - public static T? GetAttributeOfType(this System.Enum enumValue) - where T : System.Attribute { } - public static string GetDisplayName(this System.Enum enumValue) { } - } - public class FormattingStreamWriter : System.IO.StreamWriter - { - public FormattingStreamWriter(System.IO.Stream stream, System.IFormatProvider formatProvider) { } - public override System.IFormatProvider FormatProvider { get; } - } - public class HeaderExpression : Microsoft.OpenApi.SourceExpression - { - public const string Header = "header."; - public HeaderExpression(string token) { } - public override string Expression { get; } - public string? Token { get; } - } - public interface IMetadataContainer - { - System.Collections.Generic.IDictionary? Metadata { get; set; } - } - public interface IOpenApiCallback : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - System.Collections.Generic.Dictionary? PathItems { get; } - } - public interface IOpenApiDescribedElement : Microsoft.OpenApi.IOpenApiElement - { - string? Description { get; set; } - } - public interface IOpenApiElement { } - public interface IOpenApiExample : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable - { - System.Text.Json.Nodes.JsonNode? DataValue { get; } - string? ExternalValue { get; } - string? SerializedValue { get; } - System.Text.Json.Nodes.JsonNode? Value { get; } - } - public interface IOpenApiExtensible : Microsoft.OpenApi.IOpenApiElement - { - System.Collections.Generic.IDictionary? Extensions { get; set; } - } - public interface IOpenApiExtension - { - void Write(Microsoft.OpenApi.IOpenApiWriter writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion); - } - public interface IOpenApiHeader : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - bool AllowEmptyValue { get; } - bool AllowReserved { get; } - System.Collections.Generic.IDictionary? Content { get; } - bool Deprecated { get; } - System.Text.Json.Nodes.JsonNode? Example { get; } - System.Collections.Generic.IDictionary? Examples { get; } - bool Explode { get; } - bool Required { get; } - Microsoft.OpenApi.IOpenApiSchema? Schema { get; } - Microsoft.OpenApi.ParameterStyle? Style { get; } - } - public interface IOpenApiLink : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - string? OperationId { get; } - string? OperationRef { get; } - System.Collections.Generic.IDictionary? Parameters { get; } - Microsoft.OpenApi.RuntimeExpressionAnyWrapper? RequestBody { get; } - Microsoft.OpenApi.OpenApiServer? Server { get; } - } - public interface IOpenApiMediaType : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - System.Collections.Generic.IDictionary? Encoding { get; } - System.Text.Json.Nodes.JsonNode? Example { get; } - System.Collections.Generic.IDictionary? Examples { get; } - Microsoft.OpenApi.OpenApiEncoding? ItemEncoding { get; } - Microsoft.OpenApi.IOpenApiSchema? ItemSchema { get; } - System.Collections.Generic.IList? PrefixEncoding { get; } - Microsoft.OpenApi.IOpenApiSchema? Schema { get; } - } - public interface IOpenApiParameter : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - bool AllowEmptyValue { get; } - bool AllowReserved { get; } - System.Collections.Generic.IDictionary? Content { get; } - bool Deprecated { get; } - System.Text.Json.Nodes.JsonNode? Example { get; } - System.Collections.Generic.IDictionary? Examples { get; } - bool Explode { get; } - Microsoft.OpenApi.ParameterLocation? In { get; } - string? Name { get; } - bool Required { get; } - Microsoft.OpenApi.IOpenApiSchema? Schema { get; } - Microsoft.OpenApi.ParameterStyle? Style { get; } - } - public interface IOpenApiPathItem : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable - { - System.Collections.Generic.Dictionary? Operations { get; } - System.Collections.Generic.IList? Parameters { get; } - System.Collections.Generic.IList? Servers { get; } - } - public interface IOpenApiReadOnlyDescribedElement : Microsoft.OpenApi.IOpenApiElement - { - string? Description { get; } - } - public interface IOpenApiReadOnlyExtensible - { - System.Collections.Generic.IDictionary? Extensions { get; } - } - public interface IOpenApiReader - { - Microsoft.OpenApi.Reader.ReadResult Read(System.IO.MemoryStream input, System.Uri location, Microsoft.OpenApi.Reader.OpenApiReaderSettings settings); - System.Threading.Tasks.Task ReadAsync(System.IO.Stream input, System.Uri location, Microsoft.OpenApi.Reader.OpenApiReaderSettings settings, System.Threading.CancellationToken cancellationToken = default); - T? ReadFragment(System.IO.MemoryStream input, Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.OpenApiDocument openApiDocument, out Microsoft.OpenApi.Reader.OpenApiDiagnostic diagnostic, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null) - where T : Microsoft.OpenApi.IOpenApiElement; - } - public interface IOpenApiReferenceHolder : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiSerializable - { - bool UnresolvedReference { get; } - } - public interface IOpenApiReferenceHolder : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiSerializable - where V : Microsoft.OpenApi.BaseOpenApiReference, new () - { - V Reference { get; init; } - } - public interface IOpenApiReferenceHolder : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiSerializable - where out T : Microsoft.OpenApi.IOpenApiReferenceable, U - where V : Microsoft.OpenApi.BaseOpenApiReference, new () - { - T RecursiveTarget { get; } - U Target { get; } - U CopyReferenceAsTargetElementWithOverrides(U source); - } - public interface IOpenApiReferenceable : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiSerializable { } - public interface IOpenApiRequestBody : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - System.Collections.Generic.IDictionary? Content { get; } - bool Required { get; } - Microsoft.OpenApi.IOpenApiParameter? ConvertToBodyParameter(Microsoft.OpenApi.IOpenApiWriter writer); - System.Collections.Generic.IEnumerable? ConvertToFormDataParameters(Microsoft.OpenApi.IOpenApiWriter writer); - } - public interface IOpenApiResponse : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable - { - System.Collections.Generic.IDictionary? Content { get; } - System.Collections.Generic.IDictionary? Headers { get; } - System.Collections.Generic.IDictionary? Links { get; } - } - public interface IOpenApiSchema : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - Microsoft.OpenApi.IOpenApiSchema? AdditionalProperties { get; } - bool AdditionalPropertiesAllowed { get; } - System.Collections.Generic.IList? AllOf { get; } - System.Collections.Generic.IList? AnyOf { get; } - string? Comment { get; } - string? Const { get; } - System.Text.Json.Nodes.JsonNode? Default { get; } - System.Collections.Generic.IDictionary? Definitions { get; } - System.Collections.Generic.IDictionary>? DependentRequired { get; } - bool Deprecated { get; } - Microsoft.OpenApi.OpenApiDiscriminator? Discriminator { get; } - string? DynamicAnchor { get; } - string? DynamicRef { get; } - System.Collections.Generic.IList? Enum { get; } - System.Text.Json.Nodes.JsonNode? Example { get; } - System.Collections.Generic.IList? Examples { get; } - string? ExclusiveMaximum { get; } - string? ExclusiveMinimum { get; } - Microsoft.OpenApi.OpenApiExternalDocs? ExternalDocs { get; } - string? Format { get; } - string? Id { get; } - Microsoft.OpenApi.IOpenApiSchema? Items { get; } - int? MaxItems { get; } - int? MaxLength { get; } - int? MaxProperties { get; } - string? Maximum { get; } - int? MinItems { get; } - int? MinLength { get; } - int? MinProperties { get; } - string? Minimum { get; } - decimal? MultipleOf { get; } - Microsoft.OpenApi.IOpenApiSchema? Not { get; } - System.Collections.Generic.IList? OneOf { get; } - string? Pattern { get; } - System.Collections.Generic.IDictionary? PatternProperties { get; } - System.Collections.Generic.IDictionary? Properties { get; } - bool ReadOnly { get; } - System.Collections.Generic.ISet? Required { get; } - System.Uri? Schema { get; } - string? Title { get; } - Microsoft.OpenApi.JsonSchemaType? Type { get; } - bool UnevaluatedProperties { get; } - bool? UniqueItems { get; } - System.Collections.Generic.IDictionary? UnrecognizedKeywords { get; } - System.Collections.Generic.IDictionary? Vocabulary { get; } - bool WriteOnly { get; } - Microsoft.OpenApi.OpenApiXml? Xml { get; } - } - public interface IOpenApiSecurityScheme : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - string? BearerFormat { get; } - bool Deprecated { get; } - Microsoft.OpenApi.OpenApiOAuthFlows? Flows { get; } - Microsoft.OpenApi.ParameterLocation? In { get; } - string? Name { get; } - System.Uri? OpenIdConnectUrl { get; } - string? Scheme { get; } - Microsoft.OpenApi.SecuritySchemeType? Type { get; } - } - public interface IOpenApiSerializable : Microsoft.OpenApi.IOpenApiElement - { - void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer); - void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer); - void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer); - void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer); - } - public interface IOpenApiSummarizedElement : Microsoft.OpenApi.IOpenApiElement - { - string? Summary { get; set; } - } - public interface IOpenApiTag : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyDescribedElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - Microsoft.OpenApi.OpenApiExternalDocs? ExternalDocs { get; } - string? Kind { get; } - string? Name { get; } - Microsoft.OpenApi.OpenApiTagReference? Parent { get; } - string? Summary { get; } - } - public interface IOpenApiWriter - { - System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken = default); - void WriteEndArray(); - void WriteEndObject(); - void WriteNull(); - void WritePropertyName(string name); - void WriteRaw(string value); - void WriteStartArray(); - void WriteStartObject(); - void WriteValue(bool value); - void WriteValue(decimal value); - void WriteValue(int value); - void WriteValue(object value); - void WriteValue(string value); - } - public interface IShallowCopyable - { - T CreateShallowCopy(); - } - public interface IStreamLoader - { - System.Threading.Tasks.Task LoadAsync(System.Uri baseUrl, System.Uri uri, System.Threading.CancellationToken cancellationToken = default); - } - public interface IValidationContext - { - string PathString { get; } - void AddError(Microsoft.OpenApi.OpenApiValidatorError error); - void AddWarning(Microsoft.OpenApi.OpenApiValidatorWarning warning); - void Enter(string segment); - void Exit(); - } - public class JsonNodeExtension : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtension - { - public JsonNodeExtension(System.Text.Json.Nodes.JsonNode jsonNode) { } - public System.Text.Json.Nodes.JsonNode Node { get; } - public void Write(Microsoft.OpenApi.IOpenApiWriter writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion) { } - } - public static class JsonNullSentinel - { - public static System.Text.Json.Nodes.JsonValue JsonNull { get; } - public static bool IsJsonNullSentinel(this System.Text.Json.Nodes.JsonNode? node) { } - } - public class JsonPointer - { - public JsonPointer(string pointer) { } - public Microsoft.OpenApi.JsonPointer? ParentPointer { get; } - public string[] Tokens { get; } - public override string ToString() { } - } - public class JsonSchemaReference : Microsoft.OpenApi.OpenApiReferenceWithDescription - { - public JsonSchemaReference() { } - public JsonSchemaReference(Microsoft.OpenApi.JsonSchemaReference reference) { } - public System.Text.Json.Nodes.JsonNode? Default { get; set; } - public bool? Deprecated { get; set; } - public System.Collections.Generic.IList? Examples { get; set; } - public bool? ReadOnly { get; set; } - public string? Title { get; set; } - public bool? WriteOnly { get; set; } - protected override void SerializeAdditionalV31Properties(Microsoft.OpenApi.IOpenApiWriter writer) { } - protected override void SerializeAdditionalV32Properties(Microsoft.OpenApi.IOpenApiWriter writer) { } - protected override void SetAdditional31MetadataFromMapNode(System.Text.Json.Nodes.JsonObject jsonObject) { } - } - [System.Flags] - public enum JsonSchemaType - { - Null = 1, - Boolean = 2, - Integer = 4, - Number = 8, - String = 16, - Object = 32, - Array = 64, - } - public sealed class MethodExpression : Microsoft.OpenApi.RuntimeExpression - { - public const string Method = "$method"; - public MethodExpression() { } - public override string Expression { get; } - } - public class OpenApiCallback : Microsoft.OpenApi.IOpenApiCallback, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiCallback() { } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public System.Collections.Generic.Dictionary? PathItems { get; set; } - public void AddPathItem(Microsoft.OpenApi.RuntimeExpression expression, Microsoft.OpenApi.IOpenApiPathItem pathItem) { } - public Microsoft.OpenApi.IOpenApiCallback CreateShallowCopy() { } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiCallbackReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiCallback, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiCallbackReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } - public System.Collections.Generic.IDictionary? Extensions { get; } - public System.Collections.Generic.Dictionary? PathItems { get; } - protected override Microsoft.OpenApi.BaseOpenApiReference CopyReference(Microsoft.OpenApi.BaseOpenApiReference sourceReference) { } - public override Microsoft.OpenApi.IOpenApiCallback CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiCallback source) { } - public Microsoft.OpenApi.IOpenApiCallback CreateShallowCopy() { } - public override void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiComponents : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiSerializable - { - public OpenApiComponents() { } - public OpenApiComponents(Microsoft.OpenApi.OpenApiComponents? components) { } - public System.Collections.Generic.IDictionary? Callbacks { get; set; } - public System.Collections.Generic.IDictionary? Examples { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public System.Collections.Generic.IDictionary? Headers { get; set; } - public System.Collections.Generic.IDictionary? Links { get; set; } - public System.Collections.Generic.IDictionary? MediaTypes { get; set; } - public System.Collections.Generic.IDictionary? Parameters { get; set; } - public System.Collections.Generic.IDictionary? PathItems { get; set; } - public System.Collections.Generic.IDictionary? RequestBodies { get; set; } - public System.Collections.Generic.IDictionary? Responses { get; set; } - public System.Collections.Generic.IDictionary? Schemas { get; set; } - public System.Collections.Generic.IDictionary? SecuritySchemes { get; set; } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - [Microsoft.OpenApi.OpenApiRule] - public static class OpenApiComponentsRules - { - public static Microsoft.OpenApi.ValidationRule KeyMustBeRegularExpression { get; } - } - public static class OpenApiConstants - { - public const string AccessCode = "accessCode"; - public const string AdditionalOperations = "additionalOperations"; - public const string AdditionalProperties = "additionalProperties"; - public const string AllOf = "allOf"; - public const string AllowEmptyValue = "allowEmptyValue"; - public const string AllowReserved = "allowReserved"; - public const string AnyOf = "anyOf"; - public const string Application = "application"; - public const string Attribute = "attribute"; - public const string AuthorizationCode = "authorizationCode"; - public const string AuthorizationUrl = "authorizationUrl"; - public const string BasePath = "basePath"; - public const string BaseRegistryUri = "https://openapi.net/"; - public const string Basic = "basic"; - public const string Bearer = "bearer"; - public const string BearerFormat = "bearerFormat"; - public const string BodyName = "x-bodyName"; - public const string Callbacks = "callbacks"; - public const string ClientCredentials = "clientCredentials"; - public const string Comment = "$comment"; - public const string Components = "components"; - public const string ComponentsSegment = "/components/"; - public const string Const = "const"; - public const string Consumes = "consumes"; - public const string Contact = "contact"; - public const string Content = "content"; - public const string ContentType = "contentType"; - public const string DataValue = "dataValue"; - public const string Default = "default"; - public const string DefaultDefault = "Default Default"; - public const string DefaultDescription = "Default Description"; - public const string DefaultName = "Default Name"; - public const string DefaultTitle = "Default Title"; - public const string Definitions = "definitions"; - public const string Defs = "$defs"; - public const string Delete = "delete"; - public const string DependentRequired = "dependentRequired"; - public const string Deprecated = "deprecated"; - public const string Description = "description"; - public const string DeviceAuthorization = "deviceAuthorization"; - public const string DeviceAuthorizationUrl = "deviceAuthorizationUrl"; - public const string Discriminator = "discriminator"; - public const string DollarRef = "$ref"; - public const string DollarSchema = "$schema"; - public const string DynamicAnchor = "$dynamicAnchor"; - public const string DynamicRef = "$dynamicRef"; - public const string Email = "email"; - public const string Encoding = "encoding"; - public const string Enum = "enum"; - public const string Example = "example"; - public const string Examples = "examples"; - public const string ExamplesExtension = "x-examples"; - public const string ExclusiveMaximum = "exclusiveMaximum"; - public const string ExclusiveMinimum = "exclusiveMinimum"; - public const string Explode = "explode"; - public const string ExtensionFieldNamePrefix = "x-"; - public const string ExternalDocs = "externalDocs"; - public const string ExternalValue = "externalValue"; - public const string Flow = "flow"; - public const string Flows = "flows"; - public const string Format = "format"; - public const string Get = "get"; - public const string Head = "head"; - public const string Headers = "headers"; - public const string Host = "host"; - public const string Id = "$id"; - public const string Identifier = "identifier"; - public const string Implicit = "implicit"; - public const string In = "in"; - public const string Info = "info"; - public const string ItemEncoding = "itemEncoding"; - public const string ItemSchema = "itemSchema"; - public const string Items = "items"; - public const string Json = "json"; - public const string JsonSchemaDialect = "jsonSchemaDialect"; - public const string Jwt = "JWT"; - public const string License = "license"; - public const string Links = "links"; - public const string Mapping = "mapping"; - public const string MaxItems = "maxItems"; - public const string MaxLength = "maxLength"; - public const string MaxProperties = "maxProperties"; - public const string Maximum = "maximum"; - public const string MediaTypes = "mediaTypes"; - public const string MinItems = "minItems"; - public const string MinLength = "minLength"; - public const string MinProperties = "minProperties"; - public const string Minimum = "minimum"; - public const string MultipleOf = "multipleOf"; - public const string Name = "name"; - public const string Namespace = "namespace"; - public const string NodeType = "nodeType"; - public const string Not = "not"; - public const string Null = "null"; - public const string Nullable = "nullable"; - public const string NullableExtension = "x-nullable"; - public const string OneOf = "oneOf"; - public const string OpenApi = "openapi"; - public const string OpenIdConnectUrl = "openIdConnectUrl"; - public const string OperationId = "operationId"; - public const string OperationRef = "operationRef"; - public const string Options = "options"; - public const string Parameters = "parameters"; - public const string Password = "password"; - public const string Patch = "patch"; - public const string PathItems = "pathItems"; - public const string Paths = "paths"; - public const string Pattern = "pattern"; - public const string PatternProperties = "patternProperties"; - public const string Post = "post"; - public const string Prefix = "prefix"; - public const string PrefixEncoding = "prefixEncoding"; - public const string Produces = "produces"; - public const string Properties = "properties"; - public const string PropertyName = "propertyName"; - public const string Put = "put"; - public const string ReadOnly = "readOnly"; - public const string RecursiveAnchor = "$recursiveAnchor"; - public const string RecursiveRef = "$recursiveRef"; - public const string RefreshUrl = "refreshUrl"; - public const string RequestBodies = "requestBodies"; - public const string RequestBody = "requestBody"; - public const string Required = "required"; - public const string Responses = "responses"; - public const string Schema = "schema"; - public const string Schemas = "schemas"; - public const string Scheme = "scheme"; - public const string Schemes = "schemes"; - public const string Scopes = "scopes"; - public const string Security = "security"; - public const string SecurityDefinitions = "securityDefinitions"; - public const string SecuritySchemes = "securitySchemes"; - public const string Self = "$self"; - public const string SerializedValue = "serializedValue"; - public const string Server = "server"; - public const string Servers = "servers"; - public const string Style = "style"; - public const string Summary = "summary"; - public const string Swagger = "swagger"; - public const string Tags = "tags"; - public const string TermsOfService = "termsOfService"; - public const string Title = "title"; - public const string TokenUrl = "tokenUrl"; - public const string Trace = "trace"; - public const string Type = "type"; - public const string UnevaluatedProperties = "unevaluatedProperties"; - public const string UniqueItems = "uniqueItems"; - public const string UnrecognizedKeywords = "unrecognizedKeywords"; - public const string Url = "url"; - public const string V2ReferenceUri = "https://registry/definitions/"; - public const string V31ExclusiveMaximum = "exclusiveMaximum"; - public const string V31ExclusiveMinimum = "exclusiveMinimum"; - public const string V3ReferenceUri = "https://registry/components/schemas/"; - public const string Value = "value"; - public const string Variables = "variables"; - public const string Version = "version"; - public const string Vocabulary = "$vocabulary"; - public const string Webhooks = "webhooks"; - public const string Wrapped = "wrapped"; - public const string WriteOnly = "writeOnly"; - public const string Xml = "xml"; - public const string Yaml = "yaml"; - public const string Yml = "yml"; - public static readonly System.Uri defaultUrl; - public static readonly System.Version version2_0; - public static readonly System.Version version3_0_0; - } - public class OpenApiContact : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiSerializable - { - public OpenApiContact() { } - public OpenApiContact(Microsoft.OpenApi.OpenApiContact contact) { } - public string? Email { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public string? Name { get; set; } - public System.Uri? Url { get; set; } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - [Microsoft.OpenApi.OpenApiRule] - public static class OpenApiContactRules - { - public static Microsoft.OpenApi.ValidationRule EmailMustBeEmailFormat { get; } - } - public class OpenApiDiscriminator : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiSerializable - { - public OpenApiDiscriminator() { } - public OpenApiDiscriminator(Microsoft.OpenApi.OpenApiDiscriminator discriminator) { } - public Microsoft.OpenApi.OpenApiSchemaReference? DefaultMapping { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public System.Collections.Generic.IDictionary? Mapping { get; set; } - public string? PropertyName { get; set; } - public void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiDocument : Microsoft.OpenApi.IMetadataContainer, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiSerializable - { - public OpenApiDocument() { } - public OpenApiDocument(Microsoft.OpenApi.OpenApiDocument? document) { } - public System.Uri BaseUri { get; } - public Microsoft.OpenApi.OpenApiComponents? Components { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public Microsoft.OpenApi.OpenApiExternalDocs? ExternalDocs { get; set; } - public Microsoft.OpenApi.OpenApiInfo Info { get; set; } - public System.Uri? JsonSchemaDialect { get; set; } - public System.Collections.Generic.IDictionary? Metadata { get; set; } - public Microsoft.OpenApi.OpenApiPaths Paths { get; set; } - public System.Collections.Generic.IList? Security { get; set; } - public System.Uri? Self { get; set; } - public System.Collections.Generic.IList? Servers { get; set; } - public System.Collections.Generic.ISet? Tags { get; set; } - public System.Collections.Generic.IDictionary? Webhooks { get; set; } - public Microsoft.OpenApi.OpenApiWorkspace? Workspace { get; set; } - public bool AddComponent(string id, T componentToRegister) { } - public System.Threading.Tasks.Task GetHashCodeAsync(System.Threading.CancellationToken cancellationToken = default) { } - public void RegisterComponents() { } - public void SerializeAs(Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.IOpenApiWriter writer) { } - public void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - public void SetReferenceHostDocument() { } - public static Microsoft.OpenApi.Reader.ReadResult Load(System.IO.MemoryStream stream, string? format = null, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null) { } - public static System.Threading.Tasks.Task LoadAsync(string url, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null, System.Threading.CancellationToken token = default) { } - public static System.Threading.Tasks.Task LoadAsync(System.IO.Stream stream, string? format = null, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null, System.Threading.CancellationToken cancellationToken = default) { } - public static Microsoft.OpenApi.Reader.ReadResult Parse(string input, string? format = null, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null) { } - } - [Microsoft.OpenApi.OpenApiRule] - public static class OpenApiDocumentRules - { - public static Microsoft.OpenApi.ValidationRule OpenApiDocumentFieldIsMissing { get; } - public static Microsoft.OpenApi.ValidationRule OpenApiDocumentReferencesAreValid { get; } - } - public static class OpenApiElementExtensions - { - public static System.Collections.Generic.IEnumerable Validate(this Microsoft.OpenApi.IOpenApiElement element, Microsoft.OpenApi.ValidationRuleSet ruleSet) { } - } - public class OpenApiEncoding : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiSerializable - { - public OpenApiEncoding() { } - public OpenApiEncoding(Microsoft.OpenApi.OpenApiEncoding encoding) { } - public bool? AllowReserved { get; set; } - public string? ContentType { get; set; } - public System.Collections.Generic.IDictionary? Encoding { get; set; } - public bool? Explode { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public System.Collections.Generic.IDictionary? Headers { get; set; } - public Microsoft.OpenApi.OpenApiEncoding? ItemEncoding { get; set; } - public System.Collections.Generic.IList? PrefixEncoding { get; set; } - public Microsoft.OpenApi.ParameterStyle? Style { get; set; } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiError - { - public OpenApiError(Microsoft.OpenApi.OpenApiError error) { } - public OpenApiError(Microsoft.OpenApi.OpenApiException exception) { } - public OpenApiError(string? pointer, string message) { } - public string Message { get; set; } - public string? Pointer { get; set; } - public override string ToString() { } - } - public class OpenApiExample : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExample, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiExample() { } - public System.Text.Json.Nodes.JsonNode? DataValue { get; set; } - public string? Description { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public string? ExternalValue { get; set; } - public string? SerializedValue { get; set; } - public string? Summary { get; set; } - public System.Text.Json.Nodes.JsonNode? Value { get; set; } - public Microsoft.OpenApi.IOpenApiExample CreateShallowCopy() { } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiExampleReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExample, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiExampleReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } - public System.Text.Json.Nodes.JsonNode? DataValue { get; } - public string? Description { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; } - public string? ExternalValue { get; } - public string? SerializedValue { get; } - public string? Summary { get; set; } - public System.Text.Json.Nodes.JsonNode? Value { get; } - protected override Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary CopyReference(Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary sourceReference) { } - public override Microsoft.OpenApi.IOpenApiExample CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiExample source) { } - public Microsoft.OpenApi.IOpenApiExample CreateShallowCopy() { } - public override void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiException : System.Exception - { - public OpenApiException() { } - public OpenApiException(string message) { } - public OpenApiException(string message, System.Exception? innerException) { } - public string? Pointer { get; set; } - } - public abstract class OpenApiExtensibleDictionary : System.Collections.Generic.Dictionary, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiSerializable - where T : Microsoft.OpenApi.IOpenApiSerializable - { - protected OpenApiExtensibleDictionary() { } - protected OpenApiExtensibleDictionary(System.Collections.Generic.Dictionary dictionary, System.Collections.Generic.Dictionary? extensions = null) { } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public static class OpenApiExtensibleExtensions - { - public static void AddExtension(this T element, string name, Microsoft.OpenApi.IOpenApiExtension any) - where T : Microsoft.OpenApi.IOpenApiExtensible { } - } - [Microsoft.OpenApi.OpenApiRule] - public static class OpenApiExtensibleRules - { - public static Microsoft.OpenApi.ValidationRule ExtensionNameMustStartWithXDash { get; } - } - public class OpenApiExternalDocs : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiSerializable - { - public OpenApiExternalDocs() { } - public OpenApiExternalDocs(Microsoft.OpenApi.OpenApiExternalDocs externalDocs) { } - public string? Description { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public System.Uri? Url { get; set; } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - [Microsoft.OpenApi.OpenApiRule] - public static class OpenApiExternalDocsRules - { - public static Microsoft.OpenApi.ValidationRule UrlIsRequired { get; } - } - public static class OpenApiFilterService - { - public static Microsoft.OpenApi.OpenApiDocument CreateFilteredDocument(Microsoft.OpenApi.OpenApiDocument source, System.Func predicate) { } - public static Microsoft.OpenApi.OpenApiUrlTreeNode CreateOpenApiUrlTreeNode(System.Collections.Generic.Dictionary sources) { } - public static System.Func CreatePredicate(string? operationIds = null, string? tags = null, System.Collections.Generic.Dictionary>? requestUrls = null, Microsoft.OpenApi.OpenApiDocument? source = null) { } - } - public class OpenApiHeader : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiHeader, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiHeader() { } - public bool AllowEmptyValue { get; set; } - public bool AllowReserved { get; set; } - public System.Collections.Generic.IDictionary? Content { get; set; } - public bool Deprecated { get; set; } - public string? Description { get; set; } - public System.Text.Json.Nodes.JsonNode? Example { get; set; } - public System.Collections.Generic.IDictionary? Examples { get; set; } - public bool Explode { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public bool Required { get; set; } - public Microsoft.OpenApi.IOpenApiSchema? Schema { get; set; } - public Microsoft.OpenApi.ParameterStyle? Style { get; set; } - public Microsoft.OpenApi.IOpenApiHeader CreateShallowCopy() { } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiHeaderReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiHeader, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiHeaderReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } - public bool AllowEmptyValue { get; } - public bool AllowReserved { get; } - public System.Collections.Generic.IDictionary? Content { get; } - public bool Deprecated { get; } - public string? Description { get; set; } - public System.Text.Json.Nodes.JsonNode? Example { get; } - public System.Collections.Generic.IDictionary? Examples { get; } - public bool Explode { get; } - public System.Collections.Generic.IDictionary? Extensions { get; } - public bool Required { get; } - public Microsoft.OpenApi.IOpenApiSchema? Schema { get; } - public Microsoft.OpenApi.ParameterStyle? Style { get; } - protected override Microsoft.OpenApi.OpenApiReferenceWithDescription CopyReference(Microsoft.OpenApi.OpenApiReferenceWithDescription sourceReference) { } - public override Microsoft.OpenApi.IOpenApiHeader CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiHeader source) { } - public Microsoft.OpenApi.IOpenApiHeader CreateShallowCopy() { } - } - public class OpenApiInfo : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiSerializable - { - public OpenApiInfo() { } - public OpenApiInfo(Microsoft.OpenApi.OpenApiInfo info) { } - public Microsoft.OpenApi.OpenApiContact? Contact { get; set; } - public string? Description { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public Microsoft.OpenApi.OpenApiLicense? License { get; set; } - public string? Summary { get; set; } - public System.Uri? TermsOfService { get; set; } - public string? Title { get; set; } - public string? Version { get; set; } - public void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - [Microsoft.OpenApi.OpenApiRule] - public static class OpenApiInfoRules - { - public static Microsoft.OpenApi.ValidationRule InfoRequiredFields { get; } - } - public class OpenApiJsonWriter : Microsoft.OpenApi.OpenApiWriterBase - { - public OpenApiJsonWriter(System.IO.TextWriter textWriter) { } - public OpenApiJsonWriter(System.IO.TextWriter textWriter, Microsoft.OpenApi.OpenApiJsonWriterSettings settings) { } - public OpenApiJsonWriter(System.IO.TextWriter textWriter, Microsoft.OpenApi.OpenApiWriterSettings? settings) { } - [System.Obsolete("Use OpenApiJsonWriter(TextWriter textWriter, OpenApiJsonWriterSettings settings) " + - "instead.")] - public OpenApiJsonWriter(System.IO.TextWriter textWriter, Microsoft.OpenApi.OpenApiWriterSettings? settings, bool terseOutput) { } - protected override int BaseIndentation { get; } - public override void WriteEndArray() { } - public override void WriteEndObject() { } - public override void WriteIndentation() { } - public override void WriteNull() { } - public override void WritePropertyName(string name) { } - public override void WriteRaw(string value) { } - public override void WriteStartArray() { } - public override void WriteStartObject() { } - public override void WriteValue(string value) { } - protected override void WriteValueSeparator() { } - } - public class OpenApiJsonWriterSettings : Microsoft.OpenApi.OpenApiWriterSettings - { - public OpenApiJsonWriterSettings() { } - public bool Terse { get; set; } - } - public class OpenApiLicense : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiSerializable - { - public OpenApiLicense() { } - public OpenApiLicense(Microsoft.OpenApi.OpenApiLicense license) { } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public string? Identifier { get; set; } - public string? Name { get; set; } - public System.Uri? Url { get; set; } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - [Microsoft.OpenApi.OpenApiRule] - public static class OpenApiLicenseRules - { - public static Microsoft.OpenApi.ValidationRule LicenseRequiredFields { get; } - } - public class OpenApiLink : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiLink, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiLink() { } - public string? Description { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public string? OperationId { get; set; } - public string? OperationRef { get; set; } - public System.Collections.Generic.IDictionary? Parameters { get; set; } - public Microsoft.OpenApi.RuntimeExpressionAnyWrapper? RequestBody { get; set; } - public Microsoft.OpenApi.OpenApiServer? Server { get; set; } - public Microsoft.OpenApi.IOpenApiLink CreateShallowCopy() { } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiLinkReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiLink, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiLinkReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } - public string? Description { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; } - public string? OperationId { get; } - public string? OperationRef { get; } - public System.Collections.Generic.IDictionary? Parameters { get; } - public Microsoft.OpenApi.RuntimeExpressionAnyWrapper? RequestBody { get; } - public Microsoft.OpenApi.OpenApiServer? Server { get; } - protected override Microsoft.OpenApi.OpenApiReferenceWithDescription CopyReference(Microsoft.OpenApi.OpenApiReferenceWithDescription sourceReference) { } - public override Microsoft.OpenApi.IOpenApiLink CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiLink source) { } - public Microsoft.OpenApi.IOpenApiLink CreateShallowCopy() { } - public override void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiMediaType : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiMediaType, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiMediaType() { } - public OpenApiMediaType(Microsoft.OpenApi.OpenApiMediaType? mediaType) { } - public System.Collections.Generic.IDictionary? Encoding { get; set; } - public System.Text.Json.Nodes.JsonNode? Example { get; set; } - public System.Collections.Generic.IDictionary? Examples { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public Microsoft.OpenApi.OpenApiEncoding? ItemEncoding { get; set; } - public Microsoft.OpenApi.IOpenApiSchema? ItemSchema { get; set; } - public System.Collections.Generic.IList? PrefixEncoding { get; set; } - public Microsoft.OpenApi.IOpenApiSchema? Schema { get; set; } - public Microsoft.OpenApi.IOpenApiMediaType CreateShallowCopy() { } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiMediaTypeReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiMediaType, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiMediaTypeReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } - public System.Collections.Generic.IDictionary? Encoding { get; } - public System.Text.Json.Nodes.JsonNode? Example { get; } - public System.Collections.Generic.IDictionary? Examples { get; } - public System.Collections.Generic.IDictionary? Extensions { get; } - public Microsoft.OpenApi.OpenApiEncoding? ItemEncoding { get; } - public Microsoft.OpenApi.IOpenApiSchema? ItemSchema { get; } - public System.Collections.Generic.IList? PrefixEncoding { get; } - public Microsoft.OpenApi.IOpenApiSchema? Schema { get; } - protected override Microsoft.OpenApi.BaseOpenApiReference CopyReference(Microsoft.OpenApi.BaseOpenApiReference sourceReference) { } - public override Microsoft.OpenApi.IOpenApiMediaType CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiMediaType source) { } - public Microsoft.OpenApi.IOpenApiMediaType CreateShallowCopy() { } - public override void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public override void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public static class OpenApiNonDefaultRules - { - public static Microsoft.OpenApi.ValidationRule HeaderMismatchedDataType { get; } - public static Microsoft.OpenApi.ValidationRule MediaTypeMismatchedDataType { get; } - public static Microsoft.OpenApi.ValidationRule ParameterMismatchedDataType { get; } - public static Microsoft.OpenApi.ValidationRule SchemaMismatchedDataType { get; } - } - public class OpenApiOAuthFlow : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiSerializable - { - public OpenApiOAuthFlow() { } - public OpenApiOAuthFlow(Microsoft.OpenApi.OpenApiOAuthFlow oAuthFlow) { } - public System.Uri? AuthorizationUrl { get; set; } - public System.Uri? DeviceAuthorizationUrl { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public System.Uri? RefreshUrl { get; set; } - public System.Collections.Generic.IDictionary? Scopes { get; set; } - public System.Uri? TokenUrl { get; set; } - public void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - [Microsoft.OpenApi.OpenApiRule] - public static class OpenApiOAuthFlowRules - { - public static Microsoft.OpenApi.ValidationRule OAuthFlowRequiredFields { get; } - } - public class OpenApiOAuthFlows : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiSerializable - { - public OpenApiOAuthFlows() { } - public OpenApiOAuthFlows(Microsoft.OpenApi.OpenApiOAuthFlows oAuthFlows) { } - public Microsoft.OpenApi.OpenApiOAuthFlow? AuthorizationCode { get; set; } - public Microsoft.OpenApi.OpenApiOAuthFlow? ClientCredentials { get; set; } - public Microsoft.OpenApi.OpenApiOAuthFlow? DeviceAuthorization { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public Microsoft.OpenApi.OpenApiOAuthFlow? Implicit { get; set; } - public Microsoft.OpenApi.OpenApiOAuthFlow? Password { get; set; } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiOperation : Microsoft.OpenApi.IMetadataContainer, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiSerializable - { - public OpenApiOperation() { } - public OpenApiOperation(Microsoft.OpenApi.OpenApiOperation operation) { } - public System.Collections.Generic.IDictionary? Callbacks { get; set; } - public bool Deprecated { get; set; } - public string? Description { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public Microsoft.OpenApi.OpenApiExternalDocs? ExternalDocs { get; set; } - public System.Collections.Generic.IDictionary? Metadata { get; set; } - public string? OperationId { get; set; } - public System.Collections.Generic.IList? Parameters { get; set; } - public Microsoft.OpenApi.IOpenApiRequestBody? RequestBody { get; set; } - public Microsoft.OpenApi.OpenApiResponses? Responses { get; set; } - public System.Collections.Generic.IList? Security { get; set; } - public System.Collections.Generic.IList? Servers { get; set; } - public string? Summary { get; set; } - public System.Collections.Generic.ISet? Tags { get; set; } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiParameter : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiParameter, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiParameter() { } - public bool AllowEmptyValue { get; set; } - public bool AllowReserved { get; set; } - public System.Collections.Generic.IDictionary? Content { get; set; } - public bool Deprecated { get; set; } - public string? Description { get; set; } - public System.Text.Json.Nodes.JsonNode? Example { get; set; } - public System.Collections.Generic.IDictionary? Examples { get; set; } - public bool Explode { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public Microsoft.OpenApi.ParameterLocation? In { get; set; } - public string? Name { get; set; } - public bool Required { get; set; } - public Microsoft.OpenApi.IOpenApiSchema? Schema { get; set; } - public Microsoft.OpenApi.ParameterStyle? Style { get; set; } - public Microsoft.OpenApi.IOpenApiParameter CreateShallowCopy() { } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiParameterReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiParameter, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiParameterReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } - public bool AllowEmptyValue { get; } - public bool AllowReserved { get; } - public System.Collections.Generic.IDictionary? Content { get; } - public bool Deprecated { get; } - public string? Description { get; set; } - public System.Text.Json.Nodes.JsonNode? Example { get; } - public System.Collections.Generic.IDictionary? Examples { get; } - public bool Explode { get; } - public System.Collections.Generic.IDictionary? Extensions { get; } - public Microsoft.OpenApi.ParameterLocation? In { get; } - public string? Name { get; } - public bool Required { get; } - public Microsoft.OpenApi.IOpenApiSchema? Schema { get; } - public Microsoft.OpenApi.ParameterStyle? Style { get; } - protected override Microsoft.OpenApi.OpenApiReferenceWithDescription CopyReference(Microsoft.OpenApi.OpenApiReferenceWithDescription sourceReference) { } - public override Microsoft.OpenApi.IOpenApiParameter CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiParameter source) { } - public Microsoft.OpenApi.IOpenApiParameter CreateShallowCopy() { } - } - [Microsoft.OpenApi.OpenApiRule] - public static class OpenApiParameterRules - { - public static Microsoft.OpenApi.ValidationRule ParameterRequiredFields { get; } - public static Microsoft.OpenApi.ValidationRule PathParameterShouldBeInThePath { get; } - public static Microsoft.OpenApi.ValidationRule RequiredMustBeTrueWhenInIsPath { get; } - } - public class OpenApiPathItem : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiPathItem, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiPathItem() { } - public string? Description { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public System.Collections.Generic.Dictionary? Operations { get; set; } - public System.Collections.Generic.IList? Parameters { get; set; } - public System.Collections.Generic.IList? Servers { get; set; } - public string? Summary { get; set; } - public void AddOperation(System.Net.Http.HttpMethod operationType, Microsoft.OpenApi.OpenApiOperation operation) { } - public Microsoft.OpenApi.IOpenApiPathItem CreateShallowCopy() { } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiPathItemReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiPathItem, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiPathItemReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } - public string? Description { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; } - public System.Collections.Generic.Dictionary? Operations { get; } - public System.Collections.Generic.IList? Parameters { get; } - public System.Collections.Generic.IList? Servers { get; } - public string? Summary { get; set; } - protected override Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary CopyReference(Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary sourceReference) { } - public override Microsoft.OpenApi.IOpenApiPathItem CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiPathItem source) { } - public Microsoft.OpenApi.IOpenApiPathItem CreateShallowCopy() { } - public override void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiPaths : Microsoft.OpenApi.OpenApiExtensibleDictionary - { - public OpenApiPaths() { } - public OpenApiPaths(Microsoft.OpenApi.OpenApiPaths paths) { } - } - [Microsoft.OpenApi.OpenApiRule] - public static class OpenApiPathsRules - { - public static Microsoft.OpenApi.ValidationRule PathMustBeUnique { get; } - public static Microsoft.OpenApi.ValidationRule PathNameMustBeginWithSlash { get; } - } - [System.Serializable] - public class OpenApiReaderException : Microsoft.OpenApi.OpenApiException - { - public OpenApiReaderException() { } - public OpenApiReaderException(string message) { } - public OpenApiReaderException(string message, Microsoft.OpenApi.Reader.ParsingContext context) { } - public OpenApiReaderException(string message, System.Exception innerException) { } - } - public static class OpenApiRecommendedRules - { - public static Microsoft.OpenApi.ValidationRule GetOperationShouldNotHaveRequestBody { get; } - } - public class OpenApiReferenceError : Microsoft.OpenApi.OpenApiError - { - public readonly Microsoft.OpenApi.BaseOpenApiReference? Reference; - public OpenApiReferenceError(Microsoft.OpenApi.OpenApiException exception) { } - public OpenApiReferenceError(Microsoft.OpenApi.BaseOpenApiReference reference, string message) { } - } - public class OpenApiReferenceWithDescription : Microsoft.OpenApi.BaseOpenApiReference, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement - { - public OpenApiReferenceWithDescription() { } - public OpenApiReferenceWithDescription(Microsoft.OpenApi.OpenApiReferenceWithDescription reference) { } - public string? Description { get; set; } - protected override void SerializeAdditionalV31Properties(Microsoft.OpenApi.IOpenApiWriter writer) { } - protected override void SerializeAdditionalV32Properties(Microsoft.OpenApi.IOpenApiWriter writer) { } - protected override void SetAdditional31MetadataFromMapNode(System.Text.Json.Nodes.JsonObject jsonObject) { } - } - public class OpenApiReferenceWithDescriptionAndSummary : Microsoft.OpenApi.OpenApiReferenceWithDescription, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiSummarizedElement - { - public OpenApiReferenceWithDescriptionAndSummary() { } - public OpenApiReferenceWithDescriptionAndSummary(Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary reference) { } - public string? Summary { get; set; } - protected override void SerializeAdditionalV31Properties(Microsoft.OpenApi.IOpenApiWriter writer) { } - protected override void SerializeAdditionalV32Properties(Microsoft.OpenApi.IOpenApiWriter writer) { } - protected override void SetAdditional31MetadataFromMapNode(System.Text.Json.Nodes.JsonObject jsonObject) { } - } - public class OpenApiRequestBody : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiRequestBody, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiRequestBody() { } - public System.Collections.Generic.IDictionary? Content { get; set; } - public string? Description { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public bool Required { get; set; } - public Microsoft.OpenApi.IOpenApiParameter ConvertToBodyParameter(Microsoft.OpenApi.IOpenApiWriter writer) { } - public System.Collections.Generic.IEnumerable ConvertToFormDataParameters(Microsoft.OpenApi.IOpenApiWriter writer) { } - public Microsoft.OpenApi.IOpenApiRequestBody CreateShallowCopy() { } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiRequestBodyReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiRequestBody, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiRequestBodyReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } - public System.Collections.Generic.IDictionary? Content { get; } - public string? Description { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; } - public bool Required { get; } - public Microsoft.OpenApi.IOpenApiParameter? ConvertToBodyParameter(Microsoft.OpenApi.IOpenApiWriter writer) { } - public System.Collections.Generic.IEnumerable? ConvertToFormDataParameters(Microsoft.OpenApi.IOpenApiWriter writer) { } - protected override Microsoft.OpenApi.OpenApiReferenceWithDescription CopyReference(Microsoft.OpenApi.OpenApiReferenceWithDescription sourceReference) { } - public override Microsoft.OpenApi.IOpenApiRequestBody CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiRequestBody source) { } - public Microsoft.OpenApi.IOpenApiRequestBody CreateShallowCopy() { } - public override void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiResponse : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiResponse, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiResponse() { } - public System.Collections.Generic.IDictionary? Content { get; set; } - public string? Description { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public System.Collections.Generic.IDictionary? Headers { get; set; } - public System.Collections.Generic.IDictionary? Links { get; set; } - public string? Summary { get; set; } - public Microsoft.OpenApi.IOpenApiResponse CreateShallowCopy() { } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiResponseReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiResponse, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiSummarizedElement, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiResponseReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } - public System.Collections.Generic.IDictionary? Content { get; } - public string? Description { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; } - public System.Collections.Generic.IDictionary? Headers { get; } - public System.Collections.Generic.IDictionary? Links { get; } - public string? Summary { get; set; } - protected override Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary CopyReference(Microsoft.OpenApi.OpenApiReferenceWithDescriptionAndSummary sourceReference) { } - public override Microsoft.OpenApi.IOpenApiResponse CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiResponse source) { } - public Microsoft.OpenApi.IOpenApiResponse CreateShallowCopy() { } - } - [Microsoft.OpenApi.OpenApiRule] - public static class OpenApiResponseRules - { - public static Microsoft.OpenApi.ValidationRule ResponseRequiredFields { get; } - } - public class OpenApiResponses : Microsoft.OpenApi.OpenApiExtensibleDictionary - { - public OpenApiResponses() { } - public OpenApiResponses(Microsoft.OpenApi.OpenApiResponses openApiResponses) { } - } - [Microsoft.OpenApi.OpenApiRule] - public static class OpenApiResponsesRules - { - public static Microsoft.OpenApi.ValidationRule ResponsesMustBeIdentifiedByDefaultOrStatusCode { get; } - public static Microsoft.OpenApi.ValidationRule ResponsesMustContainAtLeastOneResponse { get; } - } - [System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)] - public class OpenApiRuleAttribute : System.Attribute - { - public OpenApiRuleAttribute() { } - } - public class OpenApiSchema : Microsoft.OpenApi.IMetadataContainer, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSchema, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiSchema() { } - public Microsoft.OpenApi.IOpenApiSchema? AdditionalProperties { get; set; } - public bool AdditionalPropertiesAllowed { get; set; } - public System.Collections.Generic.IList? AllOf { get; set; } - public System.Collections.Generic.IList? AnyOf { get; set; } - public string? Comment { get; set; } - public string? Const { get; set; } - public System.Text.Json.Nodes.JsonNode? Default { get; set; } - public System.Collections.Generic.IDictionary? Definitions { get; set; } - public System.Collections.Generic.IDictionary>? DependentRequired { get; set; } - public bool Deprecated { get; set; } - public string? Description { get; set; } - public Microsoft.OpenApi.OpenApiDiscriminator? Discriminator { get; set; } - public string? DynamicAnchor { get; set; } - public string? DynamicRef { get; set; } - public System.Collections.Generic.IList? Enum { get; set; } - public System.Text.Json.Nodes.JsonNode? Example { get; set; } - public System.Collections.Generic.IList? Examples { get; set; } - public string? ExclusiveMaximum { get; set; } - public string? ExclusiveMinimum { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public Microsoft.OpenApi.OpenApiExternalDocs? ExternalDocs { get; set; } - public string? Format { get; set; } - public string? Id { get; set; } - public Microsoft.OpenApi.IOpenApiSchema? Items { get; set; } - public int? MaxItems { get; set; } - public int? MaxLength { get; set; } - public int? MaxProperties { get; set; } - public string? Maximum { get; set; } - public System.Collections.Generic.IDictionary? Metadata { get; set; } - public int? MinItems { get; set; } - public int? MinLength { get; set; } - public int? MinProperties { get; set; } - public string? Minimum { get; set; } - public decimal? MultipleOf { get; set; } - public Microsoft.OpenApi.IOpenApiSchema? Not { get; set; } - public System.Collections.Generic.IList? OneOf { get; set; } - public string? Pattern { get; set; } - public System.Collections.Generic.IDictionary? PatternProperties { get; set; } - public System.Collections.Generic.IDictionary? Properties { get; set; } - public bool ReadOnly { get; set; } - public System.Collections.Generic.ISet? Required { get; set; } - public System.Uri? Schema { get; set; } - public string? Title { get; set; } - public Microsoft.OpenApi.JsonSchemaType? Type { get; set; } - public bool UnevaluatedProperties { get; set; } - public bool? UniqueItems { get; set; } - public System.Collections.Generic.IDictionary? UnrecognizedKeywords { get; set; } - public System.Collections.Generic.IDictionary? Vocabulary { get; set; } - public bool WriteOnly { get; set; } - public Microsoft.OpenApi.OpenApiXml? Xml { get; set; } - public Microsoft.OpenApi.IOpenApiSchema CreateShallowCopy() { } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiSchemaReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSchema, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiSchemaReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } - public Microsoft.OpenApi.IOpenApiSchema? AdditionalProperties { get; } - public bool AdditionalPropertiesAllowed { get; } - public System.Collections.Generic.IList? AllOf { get; } - public System.Collections.Generic.IList? AnyOf { get; } - public string? Comment { get; } - public string? Const { get; } - public System.Text.Json.Nodes.JsonNode? Default { get; set; } - public System.Collections.Generic.IDictionary? Definitions { get; } - public System.Collections.Generic.IDictionary>? DependentRequired { get; } - public bool Deprecated { get; set; } - public string? Description { get; set; } - public Microsoft.OpenApi.OpenApiDiscriminator? Discriminator { get; } - public string? DynamicAnchor { get; } - public string? DynamicRef { get; } - public System.Collections.Generic.IList? Enum { get; } - public System.Text.Json.Nodes.JsonNode? Example { get; } - public System.Collections.Generic.IList? Examples { get; set; } - public string? ExclusiveMaximum { get; } - public string? ExclusiveMinimum { get; } - public System.Collections.Generic.IDictionary? Extensions { get; } - public Microsoft.OpenApi.OpenApiExternalDocs? ExternalDocs { get; } - public string? Format { get; } - public string? Id { get; } - public Microsoft.OpenApi.IOpenApiSchema? Items { get; } - public int? MaxItems { get; } - public int? MaxLength { get; } - public int? MaxProperties { get; } - public string? Maximum { get; } - public int? MinItems { get; } - public int? MinLength { get; } - public int? MinProperties { get; } - public string? Minimum { get; } - public decimal? MultipleOf { get; } - public Microsoft.OpenApi.IOpenApiSchema? Not { get; } - public System.Collections.Generic.IList? OneOf { get; } - public string? Pattern { get; } - public System.Collections.Generic.IDictionary? PatternProperties { get; } - public System.Collections.Generic.IDictionary? Properties { get; } - public bool ReadOnly { get; set; } - public System.Collections.Generic.ISet? Required { get; } - public System.Uri? Schema { get; } - public string? Title { get; set; } - public Microsoft.OpenApi.JsonSchemaType? Type { get; } - public bool UnevaluatedProperties { get; } - public bool? UniqueItems { get; } - public System.Collections.Generic.IDictionary? UnrecognizedKeywords { get; } - public System.Collections.Generic.IDictionary? Vocabulary { get; } - public bool WriteOnly { get; set; } - public Microsoft.OpenApi.OpenApiXml? Xml { get; } - protected override Microsoft.OpenApi.JsonSchemaReference CopyReference(Microsoft.OpenApi.JsonSchemaReference sourceReference) { } - public override Microsoft.OpenApi.IOpenApiSchema CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiSchema source) { } - public Microsoft.OpenApi.IOpenApiSchema CreateShallowCopy() { } - public override void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public override void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public override void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - [Microsoft.OpenApi.OpenApiRule] - public static class OpenApiSchemaRules - { - public static Microsoft.OpenApi.ValidationRule ValidateSchemaDiscriminator { get; } - public static Microsoft.OpenApi.ValidationRule ValidateSchemaPropertyHasValue { get; } - [System.ComponentModel.Browsable(false)] - [System.Obsolete("This method will be made private in future versions.")] - public static bool TraverseSchemaElements(string discriminatorName, System.Collections.Generic.IList? childSchema) { } - [System.ComponentModel.Browsable(false)] - [System.Obsolete("This method will be made private in future versions.")] - public static bool ValidateChildSchemaAgainstDiscriminator(Microsoft.OpenApi.IOpenApiSchema schema, string? discriminatorName) { } - } - public class OpenApiSecurityRequirement : System.Collections.Generic.Dictionary>, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiSerializable - { - public OpenApiSecurityRequirement() { } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiSecurityScheme : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSecurityScheme, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiSecurityScheme() { } - public string? BearerFormat { get; set; } - public bool Deprecated { get; set; } - public string? Description { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public Microsoft.OpenApi.OpenApiOAuthFlows? Flows { get; set; } - public Microsoft.OpenApi.ParameterLocation? In { get; set; } - public string? Name { get; set; } - public System.Uri? OpenIdConnectUrl { get; set; } - public string? Scheme { get; set; } - public Microsoft.OpenApi.SecuritySchemeType? Type { get; set; } - public Microsoft.OpenApi.IOpenApiSecurityScheme CreateShallowCopy() { } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiSecuritySchemeReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSecurityScheme, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiSecuritySchemeReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } - public string? BearerFormat { get; } - public bool Deprecated { get; } - public string? Description { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; } - public Microsoft.OpenApi.OpenApiOAuthFlows? Flows { get; } - public Microsoft.OpenApi.ParameterLocation? In { get; } - public string? Name { get; } - public System.Uri? OpenIdConnectUrl { get; } - public string? Scheme { get; } - public Microsoft.OpenApi.SecuritySchemeType? Type { get; } - protected override Microsoft.OpenApi.OpenApiReferenceWithDescription CopyReference(Microsoft.OpenApi.OpenApiReferenceWithDescription sourceReference) { } - public override Microsoft.OpenApi.IOpenApiSecurityScheme CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiSecurityScheme source) { } - public Microsoft.OpenApi.IOpenApiSecurityScheme CreateShallowCopy() { } - } - public static class OpenApiSerializableExtensions - { - public static System.Threading.Tasks.Task SerializeAsJsonAsync(this T element, Microsoft.OpenApi.OpenApiSpecVersion specVersion, System.Threading.CancellationToken cancellationToken = default) - where T : Microsoft.OpenApi.IOpenApiSerializable { } - public static System.Threading.Tasks.Task SerializeAsJsonAsync(this T element, System.IO.Stream stream, Microsoft.OpenApi.OpenApiSpecVersion specVersion, System.Threading.CancellationToken cancellationToken = default) - where T : Microsoft.OpenApi.IOpenApiSerializable { } - public static System.Threading.Tasks.Task SerializeAsYamlAsync(this T element, Microsoft.OpenApi.OpenApiSpecVersion specVersion, System.Threading.CancellationToken cancellationToken = default) - where T : Microsoft.OpenApi.IOpenApiSerializable { } - public static System.Threading.Tasks.Task SerializeAsYamlAsync(this T element, System.IO.Stream stream, Microsoft.OpenApi.OpenApiSpecVersion specVersion, System.Threading.CancellationToken cancellationToken = default) - where T : Microsoft.OpenApi.IOpenApiSerializable { } - public static System.Threading.Tasks.Task SerializeAsync(this T element, Microsoft.OpenApi.IOpenApiWriter writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion, System.Threading.CancellationToken cancellationToken = default) - where T : Microsoft.OpenApi.IOpenApiSerializable { } - public static System.Threading.Tasks.Task SerializeAsync(this T element, Microsoft.OpenApi.OpenApiSpecVersion specVersion, string format, System.Threading.CancellationToken cancellationToken = default) - where T : Microsoft.OpenApi.IOpenApiSerializable { } - public static System.Threading.Tasks.Task SerializeAsync(this T element, System.IO.Stream stream, Microsoft.OpenApi.OpenApiSpecVersion specVersion, string format, System.Threading.CancellationToken cancellationToken = default) - where T : Microsoft.OpenApi.IOpenApiSerializable { } - public static System.Threading.Tasks.Task SerializeAsync(this T element, System.IO.Stream stream, Microsoft.OpenApi.OpenApiSpecVersion specVersion, string format, Microsoft.OpenApi.OpenApiWriterSettings? settings = null, System.Threading.CancellationToken cancellationToken = default) - where T : Microsoft.OpenApi.IOpenApiSerializable { } - } - public class OpenApiServer : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiSerializable - { - public OpenApiServer() { } - public OpenApiServer(Microsoft.OpenApi.OpenApiServer server) { } - public string? Description { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public string? Name { get; set; } - public string? Url { get; set; } - public System.Collections.Generic.IDictionary? Variables { get; set; } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public static class OpenApiServerExtensions - { - public static string? ReplaceServerUrlVariables(this Microsoft.OpenApi.OpenApiServer server, System.Collections.Generic.Dictionary? values = null) { } - } - [Microsoft.OpenApi.OpenApiRule] - public static class OpenApiServerRules - { - public static Microsoft.OpenApi.ValidationRule ServerRequiredFields { get; } - } - public class OpenApiServerVariable : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiSerializable - { - public OpenApiServerVariable() { } - public OpenApiServerVariable(Microsoft.OpenApi.OpenApiServerVariable serverVariable) { } - public string? Default { get; set; } - public string? Description { get; set; } - public System.Collections.Generic.List? Enum { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public enum OpenApiSpecVersion - { - OpenApi2_0 = 0, - OpenApi3_0 = 1, - OpenApi3_1 = 2, - OpenApi3_2 = 3, - } - public class OpenApiTag : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiReadOnlyDescribedElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiTag, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiTag() { } - public string? Description { get; set; } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public Microsoft.OpenApi.OpenApiExternalDocs? ExternalDocs { get; set; } - public string? Kind { get; set; } - public string? Name { get; set; } - public Microsoft.OpenApi.OpenApiTagReference? Parent { get; set; } - public string? Summary { get; set; } - public Microsoft.OpenApi.IOpenApiTag CreateShallowCopy() { } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public class OpenApiTagReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder, Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiReadOnlyDescribedElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IOpenApiSerializable, Microsoft.OpenApi.IOpenApiTag, Microsoft.OpenApi.IShallowCopyable - { - public OpenApiTagReference(string referenceId, Microsoft.OpenApi.OpenApiDocument? hostDocument = null, string? externalResource = null) { } - public string? Description { get; } - public System.Collections.Generic.IDictionary? Extensions { get; } - public Microsoft.OpenApi.OpenApiExternalDocs? ExternalDocs { get; } - public string? Kind { get; } - public string? Name { get; } - public Microsoft.OpenApi.OpenApiTagReference? Parent { get; } - public string? Summary { get; } - public override Microsoft.OpenApi.IOpenApiTag? Target { get; } - protected override Microsoft.OpenApi.BaseOpenApiReference CopyReference(Microsoft.OpenApi.BaseOpenApiReference sourceReference) { } - public override Microsoft.OpenApi.IOpenApiTag CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.IOpenApiTag source) { } - public Microsoft.OpenApi.IOpenApiTag CreateShallowCopy() { } - } - [Microsoft.OpenApi.OpenApiRule] - public static class OpenApiTagRules - { - public static Microsoft.OpenApi.ValidationRule TagRequiredFields { get; } - } - public static class OpenApiTypeMapper - { - public static System.Type MapOpenApiPrimitiveTypeToSimpleType(this Microsoft.OpenApi.OpenApiSchema schema) { } - public static Microsoft.OpenApi.OpenApiSchema MapTypeToOpenApiPrimitiveType(this System.Type type) { } - public static string[] ToIdentifiers(this Microsoft.OpenApi.JsonSchemaType schemaType) { } - public static string[]? ToIdentifiers(this Microsoft.OpenApi.JsonSchemaType? schemaType) { } - public static Microsoft.OpenApi.JsonSchemaType ToJsonSchemaType(this string identifier) { } - public static Microsoft.OpenApi.JsonSchemaType? ToJsonSchemaType(this string[] identifier) { } - } - [System.Serializable] - public class OpenApiUnsupportedSpecVersionException : System.Exception - { - public OpenApiUnsupportedSpecVersionException(string specificationVersion) { } - public OpenApiUnsupportedSpecVersionException(string specificationVersion, System.Exception innerException) { } - public string SpecificationVersion { get; } - } - public class OpenApiUrlTreeNode - { - public System.Collections.Generic.IDictionary> AdditionalData { get; set; } - public System.Collections.Generic.IDictionary Children { get; } - public bool IsParameter { get; } - public string Path { get; set; } - public System.Collections.Generic.IDictionary PathItems { get; } - public string Segment { get; } - public void AddAdditionalData(System.Collections.Generic.Dictionary> additionalData) { } - public void Attach(Microsoft.OpenApi.OpenApiDocument doc, string label) { } - public Microsoft.OpenApi.OpenApiUrlTreeNode Attach(string path, Microsoft.OpenApi.IOpenApiPathItem pathItem, string label) { } - public bool HasOperations(string label) { } - public void WriteMermaid(System.IO.TextWriter writer) { } - public static Microsoft.OpenApi.OpenApiUrlTreeNode Create() { } - public static Microsoft.OpenApi.OpenApiUrlTreeNode Create(Microsoft.OpenApi.OpenApiDocument doc, string label) { } - } - public class OpenApiValidator : Microsoft.OpenApi.OpenApiVisitorBase, Microsoft.OpenApi.IValidationContext - { - public OpenApiValidator(Microsoft.OpenApi.ValidationRuleSet ruleSet) { } - public System.Collections.Generic.IEnumerable Errors { get; } - public System.Collections.Generic.IEnumerable Warnings { get; } - public void AddError(Microsoft.OpenApi.OpenApiValidatorError error) { } - public void AddWarning(Microsoft.OpenApi.OpenApiValidatorWarning warning) { } - public override void Visit(Microsoft.OpenApi.IOpenApiCallback callback) { } - public override void Visit(Microsoft.OpenApi.IOpenApiExample example) { } - public override void Visit(Microsoft.OpenApi.IOpenApiExtensible openApiExtensible) { } - public override void Visit(Microsoft.OpenApi.IOpenApiExtension openApiExtension) { } - public override void Visit(Microsoft.OpenApi.IOpenApiHeader header) { } - public override void Visit(Microsoft.OpenApi.IOpenApiLink link) { } - public override void Visit(Microsoft.OpenApi.IOpenApiMediaType mediaType) { } - public override void Visit(Microsoft.OpenApi.IOpenApiParameter parameter) { } - public override void Visit(Microsoft.OpenApi.IOpenApiPathItem pathItem) { } - public override void Visit(Microsoft.OpenApi.IOpenApiRequestBody requestBody) { } - public override void Visit(Microsoft.OpenApi.IOpenApiResponse response) { } - public override void Visit(Microsoft.OpenApi.IOpenApiSchema schema) { } - public override void Visit(Microsoft.OpenApi.IOpenApiSecurityScheme securityScheme) { } - public override void Visit(Microsoft.OpenApi.OpenApiComponents components) { } - public override void Visit(Microsoft.OpenApi.OpenApiContact contact) { } - public override void Visit(Microsoft.OpenApi.OpenApiDocument doc) { } - public override void Visit(Microsoft.OpenApi.OpenApiEncoding encoding) { } - public override void Visit(Microsoft.OpenApi.OpenApiExternalDocs externalDocs) { } - public override void Visit(Microsoft.OpenApi.OpenApiInfo info) { } - public override void Visit(Microsoft.OpenApi.OpenApiLicense license) { } - public override void Visit(Microsoft.OpenApi.OpenApiOAuthFlow openApiOAuthFlow) { } - public override void Visit(Microsoft.OpenApi.OpenApiOperation operation) { } - public override void Visit(Microsoft.OpenApi.OpenApiPaths paths) { } - public override void Visit(Microsoft.OpenApi.OpenApiResponses response) { } - public override void Visit(Microsoft.OpenApi.OpenApiSecurityRequirement securityRequirement) { } - public override void Visit(Microsoft.OpenApi.OpenApiServer server) { } - public override void Visit(Microsoft.OpenApi.OpenApiServerVariable serverVariable) { } - public override void Visit(Microsoft.OpenApi.OpenApiTag tag) { } - public override void Visit(System.Collections.Generic.IDictionary operations) { } - public override void Visit(System.Collections.Generic.IDictionary callbacks) { } - public override void Visit(System.Collections.Generic.IDictionary examples) { } - public override void Visit(System.Collections.Generic.IDictionary headers) { } - public override void Visit(System.Collections.Generic.IDictionary links) { } - public override void Visit(System.Collections.Generic.IDictionary content) { } - public override void Visit(System.Collections.Generic.IDictionary encodings) { } - public override void Visit(System.Collections.Generic.IDictionary serverVariables) { } - public override void Visit(System.Collections.Generic.List example) { } - } - public class OpenApiValidatorError : Microsoft.OpenApi.OpenApiError - { - public OpenApiValidatorError(string ruleName, string pointer, string message) { } - public string RuleName { get; set; } - } - public class OpenApiValidatorWarning : Microsoft.OpenApi.OpenApiError - { - public OpenApiValidatorWarning(string ruleName, string pointer, string message) { } - public string RuleName { get; set; } - } - public abstract class OpenApiVisitorBase - { - protected OpenApiVisitorBase() { } - public Microsoft.OpenApi.CurrentKeys CurrentKeys { get; } - public string PathString { get; } - public virtual void Enter(string segment) { } - public virtual void Exit() { } - public virtual void Visit(Microsoft.OpenApi.IOpenApiCallback callback) { } - public virtual void Visit(Microsoft.OpenApi.IOpenApiExample example) { } - public virtual void Visit(Microsoft.OpenApi.IOpenApiExtensible openApiExtensible) { } - public virtual void Visit(Microsoft.OpenApi.IOpenApiExtension openApiExtension) { } - public virtual void Visit(Microsoft.OpenApi.IOpenApiHeader header) { } - public virtual void Visit(Microsoft.OpenApi.IOpenApiLink link) { } - public virtual void Visit(Microsoft.OpenApi.IOpenApiMediaType mediaType) { } - public virtual void Visit(Microsoft.OpenApi.IOpenApiParameter parameter) { } - public virtual void Visit(Microsoft.OpenApi.IOpenApiPathItem pathItem) { } - public virtual void Visit(Microsoft.OpenApi.IOpenApiReferenceHolder referenceHolder) { } - public virtual void Visit(Microsoft.OpenApi.IOpenApiRequestBody requestBody) { } - public virtual void Visit(Microsoft.OpenApi.IOpenApiResponse response) { } - public virtual void Visit(Microsoft.OpenApi.IOpenApiSchema schema) { } - public virtual void Visit(Microsoft.OpenApi.IOpenApiSecurityScheme securityScheme) { } - public virtual void Visit(Microsoft.OpenApi.OpenApiComponents components) { } - public virtual void Visit(Microsoft.OpenApi.OpenApiContact contact) { } - public virtual void Visit(Microsoft.OpenApi.OpenApiDocument doc) { } - public virtual void Visit(Microsoft.OpenApi.OpenApiEncoding encoding) { } - public virtual void Visit(Microsoft.OpenApi.OpenApiExternalDocs externalDocs) { } - public virtual void Visit(Microsoft.OpenApi.OpenApiInfo info) { } - public virtual void Visit(Microsoft.OpenApi.OpenApiLicense license) { } - public virtual void Visit(Microsoft.OpenApi.OpenApiOAuthFlow openApiOAuthFlow) { } - public virtual void Visit(Microsoft.OpenApi.OpenApiOperation operation) { } - public virtual void Visit(Microsoft.OpenApi.OpenApiPaths paths) { } - public virtual void Visit(Microsoft.OpenApi.OpenApiResponses response) { } - public virtual void Visit(Microsoft.OpenApi.OpenApiSecurityRequirement securityRequirement) { } - public virtual void Visit(Microsoft.OpenApi.OpenApiServer server) { } - public virtual void Visit(Microsoft.OpenApi.OpenApiServerVariable serverVariable) { } - public virtual void Visit(Microsoft.OpenApi.OpenApiTag tag) { } - public virtual void Visit(Microsoft.OpenApi.OpenApiTagReference tag) { } - public virtual void Visit(System.Collections.Generic.IDictionary operations) { } - public virtual void Visit(System.Collections.Generic.IDictionary callbacks) { } - public virtual void Visit(System.Collections.Generic.IDictionary examples) { } - public virtual void Visit(System.Collections.Generic.IDictionary headers) { } - public virtual void Visit(System.Collections.Generic.IDictionary links) { } - public virtual void Visit(System.Collections.Generic.IDictionary content) { } - public virtual void Visit(System.Collections.Generic.IDictionary webhooks) { } - public virtual void Visit(System.Collections.Generic.IDictionary encodings) { } - public virtual void Visit(System.Collections.Generic.IDictionary serverVariables) { } - public virtual void Visit(System.Collections.Generic.IList parameters) { } - public virtual void Visit(System.Collections.Generic.IList openApiSecurityRequirements) { } - public virtual void Visit(System.Collections.Generic.IList servers) { } - public virtual void Visit(System.Collections.Generic.ISet openApiTags) { } - public virtual void Visit(System.Collections.Generic.ISet openApiTags) { } - public virtual void Visit(System.Collections.Generic.List example) { } - public virtual void Visit(System.Text.Json.Nodes.JsonNode node) { } - } - public class OpenApiWalker - { - public OpenApiWalker(Microsoft.OpenApi.OpenApiVisitorBase visitor) { } - public void Walk(Microsoft.OpenApi.OpenApiDocument? doc) { } - } - public class OpenApiWorkspace - { - public OpenApiWorkspace() { } - public OpenApiWorkspace(Microsoft.OpenApi.OpenApiWorkspace workspace) { } - public OpenApiWorkspace(System.Uri baseUrl) { } - public System.Uri? BaseUrl { get; } - public void AddDocumentId(string? key, System.Uri? value) { } - public int ComponentsCount() { } - public bool Contains(string location) { } - public System.Uri? GetDocumentId(string? key) { } - public bool RegisterComponentForDocument(Microsoft.OpenApi.OpenApiDocument openApiDocument, T componentToRegister, string id) { } - public void RegisterComponents(Microsoft.OpenApi.OpenApiDocument document) { } - public T? ResolveReference(string location) { } - } - public static class OpenApiWriterAnyExtensions - { - public static void WriteAny(this Microsoft.OpenApi.IOpenApiWriter writer, System.Text.Json.Nodes.JsonNode? node) { } - public static void WriteExtensions(this Microsoft.OpenApi.IOpenApiWriter writer, System.Collections.Generic.IDictionary? extensions, Microsoft.OpenApi.OpenApiSpecVersion specVersion) { } - } - public abstract class OpenApiWriterBase : Microsoft.OpenApi.IOpenApiWriter - { - protected const string IndentationString = " "; - protected readonly System.Collections.Generic.Stack Scopes; - protected OpenApiWriterBase(System.IO.TextWriter textWriter) { } - protected OpenApiWriterBase(System.IO.TextWriter textWriter, Microsoft.OpenApi.OpenApiWriterSettings? settings) { } - protected abstract int BaseIndentation { get; } - public Microsoft.OpenApi.OpenApiWriterSettings Settings { get; set; } - protected System.IO.TextWriter Writer { get; } - protected Microsoft.OpenApi.Scope? CurrentScope() { } - public virtual void DecreaseIndentation() { } - protected Microsoft.OpenApi.Scope EndScope(Microsoft.OpenApi.ScopeType type) { } - public System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken = default) { } - public virtual void IncreaseIndentation() { } - protected bool IsArrayScope() { } - protected bool IsObjectScope() { } - protected bool IsTopLevelScope() { } - protected Microsoft.OpenApi.Scope StartScope(Microsoft.OpenApi.ScopeType type) { } - protected void VerifyCanWritePropertyName(string name) { } - public abstract void WriteEndArray(); - public abstract void WriteEndObject(); - public virtual void WriteEnumerable(System.Collections.Generic.IEnumerable collection) { } - public virtual void WriteIndentation() { } - public abstract void WriteNull(); - public abstract void WritePropertyName(string name); - public abstract void WriteRaw(string value); - public abstract void WriteStartArray(); - public abstract void WriteStartObject(); - public virtual void WriteValue(System.DateTime value) { } - public virtual void WriteValue(System.DateTimeOffset value) { } - public virtual void WriteValue(bool value) { } - public virtual void WriteValue(decimal value) { } - public virtual void WriteValue(double value) { } - public virtual void WriteValue(float value) { } - public virtual void WriteValue(int value) { } - public virtual void WriteValue(long value) { } - public virtual void WriteValue(object? value) { } - public abstract void WriteValue(string value); - protected abstract void WriteValueSeparator(); - public static void WriteV2Examples(Microsoft.OpenApi.IOpenApiWriter writer, Microsoft.OpenApi.OpenApiExample example, Microsoft.OpenApi.OpenApiSpecVersion version) { } - } - public class OpenApiWriterException : Microsoft.OpenApi.OpenApiException - { - public OpenApiWriterException() { } - public OpenApiWriterException(string message) { } - public OpenApiWriterException(string message, System.Exception? innerException) { } - } - public static class OpenApiWriterExtensions - { - public static void WriteOptionalCollection(this Microsoft.OpenApi.IOpenApiWriter writer, string name, System.Collections.Generic.IEnumerable? elements, System.Action action) { } - public static void WriteOptionalCollection(this Microsoft.OpenApi.IOpenApiWriter writer, string name, System.Collections.Generic.IEnumerable? elements, System.Action action) { } - public static void WriteOptionalMap(this Microsoft.OpenApi.IOpenApiWriter writer, string name, System.Collections.Generic.IDictionary>? elements, System.Action> action) { } - public static void WriteOptionalMap(this Microsoft.OpenApi.IOpenApiWriter writer, string name, System.Collections.Generic.IDictionary? elements, System.Action action) { } - public static void WriteOptionalMap(this Microsoft.OpenApi.IOpenApiWriter writer, string name, System.Collections.Generic.IDictionary? elements, System.Action action) { } - public static void WriteOptionalMap(this Microsoft.OpenApi.IOpenApiWriter writer, string name, System.Collections.Generic.IDictionary? elements, System.Action action) { } - public static void WriteOptionalMap(this Microsoft.OpenApi.IOpenApiWriter writer, string name, System.Collections.Generic.IDictionary? elements, System.Action action) - where T : Microsoft.OpenApi.IOpenApiElement { } - public static void WriteOptionalMap(this Microsoft.OpenApi.IOpenApiWriter writer, string name, System.Collections.Generic.IDictionary? elements, System.Action action) - where T : Microsoft.OpenApi.IOpenApiElement { } - public static void WriteOptionalObject(this Microsoft.OpenApi.IOpenApiWriter writer, string name, T? value, System.Action action) { } - public static void WriteOptionalOrEmptyCollection(this Microsoft.OpenApi.IOpenApiWriter writer, string name, System.Collections.Generic.IEnumerable? elements, System.Action action) { } - public static void WriteProperty(this Microsoft.OpenApi.IOpenApiWriter writer, string name, string? value) { } - public static void WriteProperty(this Microsoft.OpenApi.IOpenApiWriter writer, string name, bool value, bool defaultValue = false) { } - public static void WriteProperty(this Microsoft.OpenApi.IOpenApiWriter writer, string name, bool? value, bool defaultValue = false) { } - public static void WriteProperty(this Microsoft.OpenApi.IOpenApiWriter writer, string name, T value) - where T : struct { } - public static void WriteProperty(this Microsoft.OpenApi.IOpenApiWriter writer, string name, T? value) - where T : struct { } - public static void WriteRequiredCollection(this Microsoft.OpenApi.IOpenApiWriter writer, string name, System.Collections.Generic.IEnumerable elements, System.Action action) - where T : Microsoft.OpenApi.IOpenApiElement { } - public static void WriteRequiredMap(this Microsoft.OpenApi.IOpenApiWriter writer, string name, System.Collections.Generic.IDictionary? elements, System.Action action) { } - public static void WriteRequiredMap(this Microsoft.OpenApi.IOpenApiWriter writer, string name, System.Collections.Generic.IDictionary? elements, System.Action action) - where T : Microsoft.OpenApi.IOpenApiElement { } - public static void WriteRequiredObject(this Microsoft.OpenApi.IOpenApiWriter writer, string name, T? value, System.Action action) { } - public static void WriteRequiredProperty(this Microsoft.OpenApi.IOpenApiWriter writer, string name, string? value) { } - } - public class OpenApiWriterSettings - { - public OpenApiWriterSettings() { } - public bool InlineExternalReferences { get; set; } - public bool InlineLocalReferences { get; set; } - } - public class OpenApiXml : Microsoft.OpenApi.IOpenApiElement, Microsoft.OpenApi.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiSerializable - { - public OpenApiXml() { } - public OpenApiXml(Microsoft.OpenApi.OpenApiXml xml) { } - public System.Collections.Generic.IDictionary? Extensions { get; set; } - public string? Name { get; set; } - public System.Uri? Namespace { get; set; } - public Microsoft.OpenApi.OpenApiXmlNodeType? NodeType { get; set; } - public string? Prefix { get; set; } - public virtual void SerializeAsV2(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.IOpenApiWriter writer) { } - public virtual void SerializeAsV32(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public enum OpenApiXmlNodeType - { - [Microsoft.OpenApi.Display("element")] - Element = 0, - [Microsoft.OpenApi.Display("attribute")] - Attribute = 1, - [Microsoft.OpenApi.Display("text")] - Text = 2, - [Microsoft.OpenApi.Display("cdata")] - Cdata = 3, - [Microsoft.OpenApi.Display("none")] - None = 4, - } - public class OpenApiYamlWriter : Microsoft.OpenApi.OpenApiWriterBase - { - public OpenApiYamlWriter(System.IO.TextWriter textWriter) { } - public OpenApiYamlWriter(System.IO.TextWriter textWriter, Microsoft.OpenApi.OpenApiWriterSettings? settings) { } - protected override int BaseIndentation { get; } - public bool UseLiteralStyle { get; set; } - public override void WriteEndArray() { } - public override void WriteEndObject() { } - public override void WriteNull() { } - public override void WritePropertyName(string name) { } - public override void WriteRaw(string value) { } - public override void WriteStartArray() { } - public override void WriteStartObject() { } - public override void WriteValue(string value) { } - protected override void WriteValueSeparator() { } - } - public class OperationSearch : Microsoft.OpenApi.OpenApiVisitorBase - { - public OperationSearch(System.Func predicate) { } - public System.Collections.Generic.IList SearchResults { get; } - public override void Visit(Microsoft.OpenApi.IOpenApiPathItem pathItem) { } - public override void Visit(System.Collections.Generic.IList parameters) { } - } - public enum ParameterLocation - { - [Microsoft.OpenApi.Display("query")] - Query = 0, - [Microsoft.OpenApi.Display("header")] - Header = 1, - [Microsoft.OpenApi.Display("path")] - Path = 2, - [Microsoft.OpenApi.Display("cookie")] - Cookie = 3, - [Microsoft.OpenApi.Display("querystring")] - QueryString = 4, - } - public enum ParameterStyle - { - [Microsoft.OpenApi.Display("matrix")] - Matrix = 0, - [Microsoft.OpenApi.Display("label")] - Label = 1, - [Microsoft.OpenApi.Display("form")] - Form = 2, - [Microsoft.OpenApi.Display("simple")] - Simple = 3, - [Microsoft.OpenApi.Display("spaceDelimited")] - SpaceDelimited = 4, - [Microsoft.OpenApi.Display("pipeDelimited")] - PipeDelimited = 5, - [Microsoft.OpenApi.Display("deepObject")] - DeepObject = 6, - [Microsoft.OpenApi.Display("cookie")] - Cookie = 7, - } - public sealed class PathExpression : Microsoft.OpenApi.SourceExpression - { - public const string Path = "path."; - public PathExpression(string name) { } - public override string Expression { get; } - public string? Name { get; } - } - public sealed class QueryExpression : Microsoft.OpenApi.SourceExpression - { - public const string Query = "query."; - public QueryExpression(string name) { } - public override string Expression { get; } - public string? Name { get; } - } - public enum ReferenceType - { - [Microsoft.OpenApi.Display("schemas")] - Schema = 0, - [Microsoft.OpenApi.Display("responses")] - Response = 1, - [Microsoft.OpenApi.Display("parameters")] - Parameter = 2, - [Microsoft.OpenApi.Display("examples")] - Example = 3, - [Microsoft.OpenApi.Display("requestBodies")] - RequestBody = 4, - [Microsoft.OpenApi.Display("headers")] - Header = 5, - [Microsoft.OpenApi.Display("securitySchemes")] - SecurityScheme = 6, - [Microsoft.OpenApi.Display("links")] - Link = 7, - [Microsoft.OpenApi.Display("callbacks")] - Callback = 8, - [Microsoft.OpenApi.Display("tags")] - Tag = 9, - [Microsoft.OpenApi.Display("pathItems")] - PathItem = 10, - [Microsoft.OpenApi.Display("mediaTypes")] - MediaType = 11, - } - public sealed class RequestExpression : Microsoft.OpenApi.RuntimeExpression - { - public const string Request = "$request."; - public RequestExpression(Microsoft.OpenApi.SourceExpression source) { } - public override string Expression { get; } - public Microsoft.OpenApi.SourceExpression Source { get; } - } - public sealed class ResponseExpression : Microsoft.OpenApi.RuntimeExpression - { - public const string Response = "$response."; - public ResponseExpression(Microsoft.OpenApi.SourceExpression source) { } - public override string Expression { get; } - public Microsoft.OpenApi.SourceExpression Source { get; } - } - public abstract class RuntimeExpression : System.IEquatable - { - public const string Prefix = "$"; - protected RuntimeExpression() { } - public abstract string Expression { get; } - public bool Equals(Microsoft.OpenApi.RuntimeExpression? other) { } - public override bool Equals(object? obj) { } - public override int GetHashCode() { } - public override string ToString() { } - public static Microsoft.OpenApi.RuntimeExpression Build(string expression) { } - } - public class RuntimeExpressionAnyWrapper : Microsoft.OpenApi.IOpenApiElement - { - public RuntimeExpressionAnyWrapper() { } - public RuntimeExpressionAnyWrapper(Microsoft.OpenApi.RuntimeExpressionAnyWrapper runtimeExpressionAnyWrapper) { } - public System.Text.Json.Nodes.JsonNode? Any { get; set; } - public Microsoft.OpenApi.RuntimeExpression? Expression { get; set; } - public void WriteValue(Microsoft.OpenApi.IOpenApiWriter writer) { } - } - public sealed class Scope - { - public Scope(Microsoft.OpenApi.ScopeType type) { } - public bool IsInArray { get; set; } - public int ObjectCount { get; set; } - public Microsoft.OpenApi.ScopeType Type { get; } - } - public enum ScopeType - { - Object = 0, - Array = 1, - } - public class SearchResult - { - public SearchResult() { } - public Microsoft.OpenApi.CurrentKeys? CurrentKeys { get; set; } - public Microsoft.OpenApi.OpenApiOperation? Operation { get; set; } - public System.Collections.Generic.IList? Parameters { get; set; } - } - public enum SecuritySchemeType - { - [Microsoft.OpenApi.Display("apiKey")] - ApiKey = 0, - [Microsoft.OpenApi.Display("http")] - Http = 1, - [Microsoft.OpenApi.Display("oauth2")] - OAuth2 = 2, - [Microsoft.OpenApi.Display("openIdConnect")] - OpenIdConnect = 3, - [Microsoft.OpenApi.Display("mutualTLS")] - MutualTLS = 4, - } - public abstract class SourceExpression : Microsoft.OpenApi.RuntimeExpression - { - protected SourceExpression(string? value) { } - protected string? Value { get; } - public new static Microsoft.OpenApi.SourceExpression Build(string expression) { } - } - public static class SpecialCharacterStringExtensions { } - public sealed class StatusCodeExpression : Microsoft.OpenApi.RuntimeExpression - { - public const string StatusCode = "$statusCode"; - public StatusCodeExpression() { } - public override string Expression { get; } - } - public sealed class UrlExpression : Microsoft.OpenApi.RuntimeExpression - { - public const string Url = "$url"; - public UrlExpression() { } - public override string Expression { get; } - } - public static class ValidationContextExtensions - { - public static void CreateError(this Microsoft.OpenApi.IValidationContext context, string ruleName, string message) { } - public static void CreateWarning(this Microsoft.OpenApi.IValidationContext context, string ruleName, string message) { } - } - public abstract class ValidationRule - { - public string Name { get; } - } - public sealed class ValidationRuleSet - { - public ValidationRuleSet() { } - public ValidationRuleSet(Microsoft.OpenApi.ValidationRuleSet ruleSet) { } - public ValidationRuleSet(System.Collections.Generic.Dictionary> rules) { } - public int Count { get; } - public System.Collections.Generic.IList Rules { get; } - public void Add(System.Type key, Microsoft.OpenApi.ValidationRule rule) { } - public void Add(System.Type key, System.Collections.Generic.List rules) { } - public void Clear() { } - public bool Contains(System.Type key, Microsoft.OpenApi.ValidationRule rule) { } - public bool ContainsKey(System.Type key) { } - public System.Collections.Generic.IList FindRules(System.Type type) { } - public System.Collections.Generic.IEnumerator GetEnumerator() { } - public bool Remove(Microsoft.OpenApi.ValidationRule rule) { } - public bool Remove(System.Type key) { } - public void Remove(string ruleName) { } - public bool Remove(System.Type key, Microsoft.OpenApi.ValidationRule rule) { } - public bool TryGetValue(System.Type key, out System.Collections.Generic.List? rules) { } - public bool Update(System.Type key, Microsoft.OpenApi.ValidationRule newRule, Microsoft.OpenApi.ValidationRule oldRule) { } - public static void AddValidationRules(Microsoft.OpenApi.ValidationRuleSet ruleSet, System.Collections.Generic.Dictionary> rules) { } - public static Microsoft.OpenApi.ValidationRuleSet GetDefaultRuleSet() { } - public static Microsoft.OpenApi.ValidationRuleSet GetEmptyRuleSet() { } - } - public class ValidationRule : Microsoft.OpenApi.ValidationRule - { - public ValidationRule(string name, System.Action validate) { } - } -} -namespace Microsoft.OpenApi.MicrosoftExtensions -{ - public class EnumDescription : Microsoft.OpenApi.IOpenApiElement - { - public EnumDescription() { } - public EnumDescription(System.Text.Json.Nodes.JsonObject source) { } - public string Description { get; set; } - public string Name { get; set; } - public string Value { get; set; } - } - public class OpenApiDeprecationExtension : Microsoft.OpenApi.IOpenApiExtension - { - public OpenApiDeprecationExtension() { } - public System.DateTimeOffset? Date { get; set; } - public string Description { get; set; } - public System.DateTimeOffset? RemovalDate { get; set; } - public string Version { get; set; } - public static string Name { get; } - public void Write(Microsoft.OpenApi.IOpenApiWriter writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion) { } - public static Microsoft.OpenApi.MicrosoftExtensions.OpenApiDeprecationExtension Parse(System.Text.Json.Nodes.JsonNode source) { } - } - public class OpenApiEnumFlagsExtension : Microsoft.OpenApi.IOpenApiExtension - { - public OpenApiEnumFlagsExtension() { } - public bool IsFlags { get; set; } - public static string Name { get; } - public void Write(Microsoft.OpenApi.IOpenApiWriter writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion) { } - public static Microsoft.OpenApi.MicrosoftExtensions.OpenApiEnumFlagsExtension Parse(System.Text.Json.Nodes.JsonNode source) { } - } - public class OpenApiEnumValuesDescriptionExtension : Microsoft.OpenApi.IOpenApiExtension - { - public OpenApiEnumValuesDescriptionExtension() { } - public string EnumName { get; set; } - public System.Collections.Generic.List ValuesDescriptions { get; set; } - public static string Name { get; } - public void Write(Microsoft.OpenApi.IOpenApiWriter writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion) { } - public static Microsoft.OpenApi.MicrosoftExtensions.OpenApiEnumValuesDescriptionExtension Parse(System.Text.Json.Nodes.JsonNode source) { } - } - public class OpenApiPagingExtension : Microsoft.OpenApi.IOpenApiExtension - { - public OpenApiPagingExtension() { } - public string ItemName { get; set; } - public string NextLinkName { get; set; } - public string OperationName { get; set; } - public static string Name { get; } - public void Write(Microsoft.OpenApi.IOpenApiWriter writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion) { } - public static Microsoft.OpenApi.MicrosoftExtensions.OpenApiPagingExtension Parse(System.Text.Json.Nodes.JsonNode source) { } - } - public class OpenApiPrimaryErrorMessageExtension : Microsoft.OpenApi.IOpenApiExtension - { - public OpenApiPrimaryErrorMessageExtension() { } - public bool IsPrimaryErrorMessage { get; set; } - public static string Name { get; } - public void Write(Microsoft.OpenApi.IOpenApiWriter writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion) { } - public static Microsoft.OpenApi.MicrosoftExtensions.OpenApiPrimaryErrorMessageExtension Parse(System.Text.Json.Nodes.JsonNode source) { } - } - public class OpenApiReservedParameterExtension : Microsoft.OpenApi.IOpenApiExtension - { - public OpenApiReservedParameterExtension() { } - public bool? IsReserved { get; set; } - public static string Name { get; } - public void Write(Microsoft.OpenApi.IOpenApiWriter writer, Microsoft.OpenApi.OpenApiSpecVersion specVersion) { } - public static Microsoft.OpenApi.MicrosoftExtensions.OpenApiReservedParameterExtension Parse(System.Text.Json.Nodes.JsonNode source) { } - } -} -namespace Microsoft.OpenApi.Reader -{ - public class DefaultStreamLoader : Microsoft.OpenApi.IStreamLoader - { - public DefaultStreamLoader(System.Net.Http.HttpClient httpClient) { } - public System.Threading.Tasks.Task LoadAsync(System.Uri baseUrl, System.Uri uri, System.Threading.CancellationToken cancellationToken = default) { } - } - public static class JsonPointerExtensions - { - public static System.Text.Json.Nodes.JsonNode? Find(this Microsoft.OpenApi.JsonPointer currentPointer, System.Text.Json.Nodes.JsonNode baseJsonNode) { } - } - public class OpenApiDiagnostic - { - public OpenApiDiagnostic() { } - public System.Collections.Generic.IList Errors { get; set; } - public string? Format { get; set; } - public Microsoft.OpenApi.OpenApiSpecVersion SpecificationVersion { get; set; } - public System.Collections.Generic.IList Warnings { get; set; } - public void AppendDiagnostic(Microsoft.OpenApi.Reader.OpenApiDiagnostic diagnosticToAdd, string? fileNameToAdd = null) { } - } - public class OpenApiJsonReader : Microsoft.OpenApi.IOpenApiReader - { - public OpenApiJsonReader() { } - public Microsoft.OpenApi.Reader.ReadResult Read(System.IO.MemoryStream input, System.Uri location, Microsoft.OpenApi.Reader.OpenApiReaderSettings settings) { } - public Microsoft.OpenApi.Reader.ReadResult Read(System.Text.Json.Nodes.JsonNode jsonNode, System.Uri location, Microsoft.OpenApi.Reader.OpenApiReaderSettings settings) { } - public System.Threading.Tasks.Task ReadAsync(System.IO.Stream input, System.Uri location, Microsoft.OpenApi.Reader.OpenApiReaderSettings settings, System.Threading.CancellationToken cancellationToken = default) { } - public T? ReadFragment(System.IO.MemoryStream input, Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.OpenApiDocument openApiDocument, out Microsoft.OpenApi.Reader.OpenApiDiagnostic diagnostic, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null) - where T : Microsoft.OpenApi.IOpenApiElement { } - public T? ReadFragment(System.Text.Json.Nodes.JsonNode input, Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.OpenApiDocument openApiDocument, out Microsoft.OpenApi.Reader.OpenApiDiagnostic diagnostic, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null) - where T : Microsoft.OpenApi.IOpenApiElement { } - } - public static class OpenApiModelFactory - { - public static Microsoft.OpenApi.Reader.ReadResult Load(System.IO.MemoryStream stream, string? format = null, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null) { } - public static T? Load(System.IO.MemoryStream input, Microsoft.OpenApi.OpenApiSpecVersion version, string? format, Microsoft.OpenApi.OpenApiDocument openApiDocument, out Microsoft.OpenApi.Reader.OpenApiDiagnostic diagnostic, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null) - where T : Microsoft.OpenApi.IOpenApiElement { } - public static System.Threading.Tasks.Task LoadAsync(string url, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null, System.Threading.CancellationToken token = default) { } - public static System.Threading.Tasks.Task LoadAsync(System.IO.Stream input, string? format = null, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null, System.Threading.CancellationToken cancellationToken = default) { } - public static System.Threading.Tasks.Task LoadAsync(string url, Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.OpenApiDocument openApiDocument, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null, System.Threading.CancellationToken token = default) - where T : Microsoft.OpenApi.IOpenApiElement { } - public static System.Threading.Tasks.Task LoadAsync(System.IO.Stream input, Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.OpenApiDocument openApiDocument, string? format = null, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null, System.Threading.CancellationToken token = default) - where T : Microsoft.OpenApi.IOpenApiElement { } - public static Microsoft.OpenApi.Reader.ReadResult Parse(string input, string? format = null, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null) { } - public static T? Parse(string input, Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.OpenApiDocument openApiDocument, out Microsoft.OpenApi.Reader.OpenApiDiagnostic diagnostic, string? format = null, Microsoft.OpenApi.Reader.OpenApiReaderSettings? settings = null) - where T : Microsoft.OpenApi.IOpenApiElement { } - } - public class OpenApiReaderSettings - { - public OpenApiReaderSettings() { } - public System.Uri? BaseUrl { get; set; } - public Microsoft.OpenApi.IStreamLoader? CustomExternalLoader { get; set; } - public System.Collections.Generic.List? DefaultContentType { get; set; } - public System.Collections.Generic.Dictionary>? ExtensionParsers { get; set; } - public System.Net.Http.HttpClient HttpClient { init; } - public bool LeaveStreamOpen { get; set; } - public bool LoadExternalRefs { get; set; } - public System.Collections.Generic.Dictionary Readers { get; init; } - public Microsoft.OpenApi.ValidationRuleSet RuleSet { get; set; } - public void AddJsonReader() { } - public void AddMicrosoftExtensionParsers() { } - public bool TryAddReader(string format, Microsoft.OpenApi.IOpenApiReader reader) { } - } - public static class OpenApiVersionExtensionMethods - { - public static bool is2_0(this string version) { } - public static bool is3_0(this string version) { } - public static bool is3_1(this string version) { } - public static bool is3_2(this string version) { } - } - public class ParsingContext - { - public ParsingContext(Microsoft.OpenApi.Reader.OpenApiDiagnostic diagnostic) { } - public System.Uri? BaseUrl { get; set; } - public System.Collections.Generic.List? DefaultContentType { get; set; } - public Microsoft.OpenApi.Reader.OpenApiDiagnostic Diagnostic { get; } - public System.Collections.Generic.Dictionary>? ExtensionParsers { get; set; } - public void EndObject() { } - public T? GetFromTempStorage(string key, object? scope = null) { } - public string GetLocation() { } - public Microsoft.OpenApi.OpenApiDocument Parse(System.Text.Json.Nodes.JsonNode jsonNode, System.Uri location) { } - public T? ParseFragment(System.Text.Json.Nodes.JsonNode jsonNode, Microsoft.OpenApi.OpenApiSpecVersion version, Microsoft.OpenApi.OpenApiDocument openApiDocument) - where T : Microsoft.OpenApi.IOpenApiElement { } - public void SetTempStorage(string key, object? value, object? scope = null) { } - public void StartObject(string objectName) { } - } - public class ReadResult - { - public ReadResult() { } - public Microsoft.OpenApi.Reader.OpenApiDiagnostic? Diagnostic { get; set; } - public Microsoft.OpenApi.OpenApiDocument? Document { get; set; } - public void Deconstruct(out Microsoft.OpenApi.OpenApiDocument? document, out Microsoft.OpenApi.Reader.OpenApiDiagnostic? diagnostic) { } - } -} \ No newline at end of file diff --git a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApiTests.cs b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApiTests.cs deleted file mode 100755 index ebaad90e4..000000000 --- a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApiTests.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System.IO; -using PublicApiGenerator; -using Xunit; -using Xunit.Abstractions; - -namespace Microsoft.OpenApi.Tests.PublicApi -{ - [Collection("DefaultSettings")] - public class PublicApiTests - { - private readonly ITestOutputHelper _output; - - public PublicApiTests(ITestOutputHelper output) - { - _output = output; - } - - [Fact] - public void ReviewPublicApiChanges() - { - // This test is a safety check when you modify the public api surface. - // If it fails, it means you changed something public. This is not always a problem! - // It takes a human to read the change, determine if it is breaking and update the PublicApi.approved.txt with the new approved API surface - - // Arrange - var publicApi = typeof(OpenApiSpecVersion).Assembly.GeneratePublicApi(new() { AllowNamespacePrefixes = new[] { "Microsoft.OpenApi" } } ); - - // Act - var approvedFilePath = Path.Combine("PublicApi", "PublicApi.approved.txt"); - - if (!File.Exists(approvedFilePath)) - using (var _ = File.CreateText(approvedFilePath)) { } - - var approvedApi = File.ReadAllText(approvedFilePath); - - if (!approvedApi.Equals(publicApi)) - { - _output.WriteLine("This test is a safety check when you modify the public api surface."); - _output.WriteLine("It has failed. This means you changed something public. This is not always a problem!"); - _output.WriteLine("It takes a human to read the change, determine if it is breaking and update the PublicApi.approved.txt with the new approved API surface."); - _output.WriteLine("The new API surface can be found in PublicApi.current.txt"); - _output.WriteLine(string.Empty); - _output.WriteLine("The new public api is:"); - _output.WriteLine(publicApi); - - File.WriteAllText(Path.Combine("PublicApi", "PublicApi.current.txt"), publicApi); - } - - // Assert - Assert.Equal(approvedApi, publicApi); - } - } -} From 2e6c5141ede85ea2d9f64a38daf9a0f19f426a36 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 27 Jan 2026 15:52:40 -0500 Subject: [PATCH 054/388] ci: adds unshipped APIs validation before creating the release Signed-off-by: Vincent Biret --- .github/workflows/release-please-gha.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/release-please-gha.yml b/.github/workflows/release-please-gha.yml index c905a3f48..6e2c9825d 100644 --- a/.github/workflows/release-please-gha.yml +++ b/.github/workflows/release-please-gha.yml @@ -27,6 +27,30 @@ jobs: steps: - uses: actions/checkout@v6 + - name: Validate PublicAPI.Unshipped.txt files are empty + shell: pwsh + run: | + $unshippedFiles = Get-ChildItem 'src/ ' -Recurse -Filter *.Unshipped.txt | Select -ExpandProperty FullName + + $hasUnshippedAPIs = $false + + foreach ($file in $unshippedFiles) { + $content = Get-Content -Path $file -Raw + # Remove the #nullable enable line and any whitespace + $trimmedContent = $content -replace '^\s*#nullable enable\s*$', '' -replace '^\s+', '' + + if ($trimmedContent -ne '') { + Write-Error "❌ $file contains unshipped APIs. Please promote them to PublicAPI.Shipped.txt before releasing.`nContent:`n$content" + $hasUnshippedAPIs = $true + } + } + + if ($hasUnshippedAPIs) { + exit 1 + } + + Write-Output "✅ All PublicAPI.Unshipped.txt files are clean" + - name: Generate GitHub App token id: app-token uses: actions/create-github-app-token@v2 From 10bd37807dbd512596781cc2104d9c5965404f0b Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 29 Jan 2026 13:26:07 -0500 Subject: [PATCH 055/388] docs: adds container information for hidi --- src/Microsoft.OpenApi.Hidi/readme.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.OpenApi.Hidi/readme.md b/src/Microsoft.OpenApi.Hidi/readme.md index 38efe66ae..95aba5f10 100644 --- a/src/Microsoft.OpenApi.Hidi/readme.md +++ b/src/Microsoft.OpenApi.Hidi/readme.md @@ -14,7 +14,7 @@ Hidi has these key capabilities that enable you to build different scenarios off ## Installation Install [Microsoft.OpenApi.Hidi](https://www.nuget.org/packages/Microsoft.OpenApi.Hidi/1.0.0-preview4) package from NuGet by running the following command: - + ### .NET CLI(Global) ```bash @@ -23,12 +23,18 @@ dotnet tool install --global Microsoft.OpenApi.Hidi --prerelease ### .NET CLI(local) -```bash +```bash dotnet new tool-manifest #if you are setting up the OpenAPI.NET repo dotnet tool install --local Microsoft.OpenApi.Hidi --prerelease ``` - - + +### Docker + +Hidi is also available as a Docker image: + +```bash +docker pull mcr.microsoft.com/openapi/hidi +``` ## How to use Hidi From c771cd62ede4e14b05ff6dfe94440633eaf3e6a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 21:25:54 +0000 Subject: [PATCH 056/388] Bump Microsoft.SourceLink.GitHub from 8.0.0 to 10.0.102 --- updated-dependencies: - dependency-name: Microsoft.SourceLink.GitHub dependency-version: 10.0.102 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 13c72dd49..017554b2c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -19,6 +19,6 @@ true - + \ No newline at end of file From ad95d0e435fd4aa5868546676f36b18b9dc02151 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Feb 2026 00:08:23 +0000 Subject: [PATCH 057/388] Bump FluentAssertions from 7.2.0 to 7.2.1 --- updated-dependencies: - dependency-name: FluentAssertions dependency-version: 7.2.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .../Microsoft.OpenApi.Readers.Tests.csproj | 2 +- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj index 95365132f..b309c958c 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj +++ b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj @@ -18,7 +18,7 @@ - + diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index afbdb2222..a9f59d7eb 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -10,7 +10,7 @@ - + From 27b3384176d9a98b7ab7904701db9e830a89883d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Feb 2026 21:25:11 +0000 Subject: [PATCH 058/388] chore(deps): bump dotnet-sdk from 8.0.417 to 8.0.418 Bumps [dotnet-sdk](https://github.com/dotnet/sdk) from 8.0.417 to 8.0.418. - [Release notes](https://github.com/dotnet/sdk/releases) - [Commits](https://github.com/dotnet/sdk/compare/v8.0.417...v8.0.418) --- updated-dependencies: - dependency-name: dotnet-sdk dependency-version: 8.0.418 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 4ca757b0e..459fe3e6e 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "8.0.417" + "version": "8.0.418" } } \ No newline at end of file From c8b5c3d5da85b840de7cd1e753699327541aae8e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Feb 2026 21:27:02 +0000 Subject: [PATCH 059/388] Bump the microsoftextensions group with 6 updates Bumps Microsoft.Extensions.DependencyInjection from 10.0.2 to 10.0.3 Bumps Microsoft.Extensions.Logging from 10.0.2 to 10.0.3 Bumps Microsoft.Extensions.Logging.Abstractions from 10.0.2 to 10.0.3 Bumps Microsoft.Extensions.Logging.Console from 10.0.2 to 10.0.3 Bumps Microsoft.Extensions.Logging.Debug from 10.0.2 to 10.0.3 Bumps System.Text.Json from 10.0.2 to 10.0.3 --- updated-dependencies: - dependency-name: Microsoft.Extensions.DependencyInjection dependency-version: 10.0.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging dependency-version: 10.0.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging dependency-version: 10.0.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging.Abstractions dependency-version: 10.0.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging.Console dependency-version: 10.0.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: System.Text.Json dependency-version: 10.0.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging.Console dependency-version: 10.0.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging.Debug dependency-version: 10.0.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging.Debug dependency-version: 10.0.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions ... Signed-off-by: dependabot[bot] --- performance/resultsComparer/resultsComparer.csproj | 10 +++++----- .../Microsoft.OpenApi.Hidi.csproj | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/performance/resultsComparer/resultsComparer.csproj b/performance/resultsComparer/resultsComparer.csproj index 248caf5fa..892a4b627 100644 --- a/performance/resultsComparer/resultsComparer.csproj +++ b/performance/resultsComparer/resultsComparer.csproj @@ -8,12 +8,12 @@ - - - - + + + + - + diff --git a/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj b/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj index 2e955f3a6..475f4ce67 100644 --- a/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj +++ b/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj @@ -29,10 +29,10 @@ - - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all From 103abfac3a75ff03a651410ea8b98c6660375dbc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Feb 2026 21:28:31 +0000 Subject: [PATCH 060/388] Bump Microsoft.SourceLink.GitHub from 10.0.102 to 10.0.103 --- updated-dependencies: - dependency-name: Microsoft.SourceLink.GitHub dependency-version: 10.0.103 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 017554b2c..97bc7f633 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -19,6 +19,6 @@ true - + \ No newline at end of file From fe5300765f5ca19ea70eae8fbfa84fc0cf7934d3 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 11 Feb 2026 07:36:57 -0500 Subject: [PATCH 061/388] chore: upgrades system.text.json to align versions --- .../Microsoft.OpenApi.Readers.Tests.csproj | 2 +- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj index b309c958c..b4e679779 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj +++ b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj @@ -19,7 +19,7 @@ - + diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index a9f59d7eb..214b74062 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -13,7 +13,7 @@ - + From 3d583f5432805fef0e401ec80b903dc88b726803 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Feb 2026 21:26:53 +0000 Subject: [PATCH 062/388] Bump coverlet.msbuild from 6.0.4 to 8.0.0 --- updated-dependencies: - dependency-name: coverlet.msbuild dependency-version: 8.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: coverlet.msbuild dependency-version: 8.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .../Microsoft.OpenApi.Hidi.Tests.csproj | 2 +- .../Microsoft.OpenApi.Readers.Tests.csproj | 2 +- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj b/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj index b7153019d..a238b2556 100644 --- a/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj +++ b/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj @@ -13,7 +13,7 @@ - + diff --git a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj index b4e679779..7c440349b 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj +++ b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj @@ -16,7 +16,7 @@ - + diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 214b74062..1b3887fb5 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -9,7 +9,7 @@ - + From 754499bb1708c79b6ec11450bc8fde1a2acaf375 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 17 Feb 2026 15:02:29 -0500 Subject: [PATCH 063/388] ci: adds copilot instructions --- .github/copilot-instructions.md | 63 +++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 000000000..12f65c04f --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,63 @@ +# Copilot Instructions + +## Commit Message Format + +Always use conventional commits format when creating commits. Follow this structure: + +``` +(): + +[optional body] + +[optional footer(s)] +``` + +### Types + +- **feat**: A new feature +- **fix**: A bug fix +- **docs**: Documentation only changes +- **style**: Changes that do not affect the meaning of the code (white-space, formatting, etc) +- **refactor**: A code change that neither fixes a bug nor adds a feature +- **perf**: A code change that improves performance +- **test**: Adding missing tests or correcting existing tests +- **build**: Changes that affect the build system or external dependencies +- **ci**: Changes to CI configuration files and scripts +- **chore**: Other changes that don't modify src or test files + +### Scope + +The scope should indicate the package or area affected (e.g., `library`, `yaml-reader`, `hidi`). + +### Examples + +``` +feat(library): add support for pattern properties +fix(yaml-reader): updates boolean serialization +docs(README): update installation instructions +ci(release): configure automated release workflow +``` + +### Breaking Changes + +If a commit introduces a breaking change, add `BREAKING CHANGE:` in the footer or append `!` after the type/scope: + +``` +feat(identity-emitter)!: change output format for models + +BREAKING CHANGE: The emitter now generates TypeScript interfaces instead of types +``` + + +## Updating the benchmark information + +The user might request you update the benchmark information. You might do it on your own if a previous change added new properties to models under **src/Microsoft.OpenApi/Models**. Always use a separate commit for this change. + +To do so, run the following script: + +```shell +cd performance/benchmark +dotnet run -c Release +``` + +Then commit the report files using a "chore" commit. \ No newline at end of file From 7c13fb3910685b5c17897cd7799b9ef1bba7f80d Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Feb 2026 16:09:18 -0600 Subject: [PATCH 064/388] fix: implement unevaluatedProperties as schema per JSON Schema 2020-12 (#2728) * Initial plan * feat: add UnevaluatedPropertiesSchema support to IOpenApiSchema - Create IOpenApiSchemaWithUnevaluatedProperties interface for binary compatibility - Add UnevaluatedPropertiesSchema property to OpenApiSchema - Update OpenApiSchemaReference to implement new interface - Update serialization to handle both boolean and schema cases - Update V31 deserialization to handle both boolean and schema cases - Add comprehensive documentation with TODO markers for next major version Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> * test: add comprehensive tests for UnevaluatedProperties - Add serialization tests for boolean and schema cases - Add deserialization tests for V3.1 - Add copy constructor test - Fix default value to true (allowing unevaluated properties by default) Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> * fix: correct deserialization and test for UnevaluatedPropertiesSchema - Fix deserialization to use ValueNode check like AdditionalProperties - Fix copy constructor test to properly cast before modifying - Update PublicAPI.Unshipped.txt with new API surface - Update global.json to use available SDK version - All UnevaluatedProperties tests now passing Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> * fix: address PR feedback on UnevaluatedProperties implementation - Simplify copy constructor using pattern matching - Add V3.2 deserialization support for UnevaluatedPropertiesSchema - Add test for default value (no property set, defaults to true) - Emit as x-jsonschema-unevaluatedProperties extension for versions < 3.1 - Add comprehensive tests for extension serialization in V2 and V3.0 - Add V3.2 deserialization tests Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> * refactor: use OpenApiConstants for extension name - Added UnevaluatedPropertiesExtension constant to OpenApiConstants - Replaced hardcoded "x-jsonschema-unevaluatedProperties" strings with constant - Updated both V3.0 and V2.0 serialization paths - Updated PublicAPI.Unshipped.txt with new constant Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> * chore: reverts dotnet version change * chore: update benchmark reports Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> Co-authored-by: Vincent Biret --- .../performance.Descriptions-report-github.md | 22 +-- .../performance.Descriptions-report.csv | 8 +- .../performance.Descriptions-report.html | 22 +-- .../performance.Descriptions-report.json | 2 +- .../performance.EmptyModels-report-github.md | 70 +++---- .../performance.EmptyModels-report.csv | 58 +++--- .../performance.EmptyModels-report.html | 70 +++---- .../performance.EmptyModels-report.json | 2 +- .../Models/Interfaces/IOpenApiSchema.cs | 11 +- ...IOpenApiSchemaWithUnevaluatedProperties.cs | 32 +++ .../Models/OpenApiConstants.cs | 5 + src/Microsoft.OpenApi/Models/OpenApiSchema.cs | 61 +++++- .../References/OpenApiSchemaReference.cs | 6 +- src/Microsoft.OpenApi/PublicAPI.Unshipped.txt | 6 + .../Reader/V31/OpenApiSchemaDeserializer.cs | 17 +- .../Reader/V32/OpenApiSchemaDeserializer.cs | 17 +- .../V31Tests/OpenApiSchemaTests.cs | 137 +++++++++++++ .../V32Tests/OpenApiSchemaTests.cs | 86 ++++++++ .../Models/OpenApiSchemaTests.cs | 185 ++++++++++++++++++ 19 files changed, 675 insertions(+), 142 deletions(-) create mode 100644 src/Microsoft.OpenApi/Models/Interfaces/IOpenApiSchemaWithUnevaluatedProperties.cs diff --git a/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report-github.md b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report-github.md index 993b5da5e..60d452842 100644 --- a/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report-github.md +++ b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report-github.md @@ -1,18 +1,18 @@ ``` -BenchmarkDotNet v0.15.4, Windows 11 (10.0.26200.6899) -11th Gen Intel Core i7-1185G7 3.00GHz, 1 CPU, 8 logical and 4 physical cores -.NET SDK 8.0.415 - [Host] : .NET 8.0.21 (8.0.21, 8.0.2125.47513), X64 RyuJIT x86-64-v4 - ShortRun : .NET 8.0.21 (8.0.21, 8.0.2125.47513), X64 RyuJIT x86-64-v4 +BenchmarkDotNet v0.15.8, Linux Ubuntu 24.04.3 LTS (Noble Numbat) +AMD EPYC 7763 2.45GHz, 1 CPU, 4 logical and 2 physical cores +.NET SDK 8.0.417 + [Host] : .NET 8.0.23 (8.0.23, 8.0.2325.60607), X64 RyuJIT x86-64-v3 + ShortRun : .NET 8.0.23 (8.0.23, 8.0.2325.60607), X64 RyuJIT x86-64-v3 Job=ShortRun IterationCount=3 LaunchCount=1 WarmupCount=3 ``` -| Method | Mean | Error | StdDev | Gen0 | Gen1 | Gen2 | Allocated | -|------------- |---------------:|---------------:|--------------:|-----------:|-----------:|----------:|-------------:| -| PetStoreYaml | 913.5 μs | 3,348.1 μs | 183.52 μs | 58.5938 | 11.7188 | - | 361.25 KB | -| PetStoreJson | 425.1 μs | 327.5 μs | 17.95 μs | 35.1563 | 5.8594 | - | 223.39 KB | -| GHESYaml | 1,765,825.8 μs | 5,036,336.6 μs | 276,058.60 μs | 60000.0000 | 23000.0000 | 4000.0000 | 345082.98 KB | -| GHESJson | 848,197.4 μs | 1,381,723.6 μs | 75,736.93 μs | 33000.0000 | 12000.0000 | 2000.0000 | 206597.63 KB | +| Method | Mean | Error | StdDev | Gen0 | Gen1 | Gen2 | Allocated | +|------------- |---------------:|--------------:|------------:|-----------:|-----------:|----------:|------------:| +| PetStoreYaml | 506.2 μs | 95.21 μs | 5.22 μs | 19.5313 | 3.9063 | - | 361.38 KB | +| PetStoreJson | 227.4 μs | 158.42 μs | 8.68 μs | 11.7188 | 1.9531 | - | 223.24 KB | +| GHESYaml | 1,077,570.1 μs | 87,375.79 μs | 4,789.36 μs | 24000.0000 | 19000.0000 | 3000.0000 | 345338.7 KB | +| GHESJson | 478,591.0 μs | 114,328.37 μs | 6,266.72 μs | 13000.0000 | 9000.0000 | 2000.0000 | 206861.5 KB | diff --git a/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report.csv b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report.csv index ec3b99fae..18dde949a 100644 --- a/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report.csv +++ b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report.csv @@ -1,5 +1,5 @@ Method,Job,AnalyzeLaunchVariance,EvaluateOverhead,MaxAbsoluteError,MaxRelativeError,MinInvokeCount,MinIterationTime,OutlierMode,Affinity,EnvironmentVariables,Jit,LargeAddressAware,Platform,PowerPlanMode,Runtime,AllowVeryLargeObjects,Concurrent,CpuGroups,Force,HeapAffinitizeMask,HeapCount,NoAffinitize,RetainVm,Server,Arguments,BuildConfiguration,Clock,EngineFactory,NuGetReferences,Toolchain,IsMutator,InvocationCount,IterationCount,IterationTime,LaunchCount,MaxIterationCount,MaxWarmupIterationCount,MemoryRandomization,MinIterationCount,MinWarmupIterationCount,RunStrategy,UnrollFactor,WarmupCount,Mean,Error,StdDev,Gen0,Gen1,Gen2,Allocated -PetStoreYaml,ShortRun,False,Default,Default,Default,Default,Default,Default,11111111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,913.5 μs,"3,348.1 μs",183.52 μs,58.5938,11.7188,0.0000,361.25 KB -PetStoreJson,ShortRun,False,Default,Default,Default,Default,Default,Default,11111111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,425.1 μs,327.5 μs,17.95 μs,35.1563,5.8594,0.0000,223.39 KB -GHESYaml,ShortRun,False,Default,Default,Default,Default,Default,Default,11111111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,"1,765,825.8 μs","5,036,336.6 μs","276,058.60 μs",60000.0000,23000.0000,4000.0000,345082.98 KB -GHESJson,ShortRun,False,Default,Default,Default,Default,Default,Default,11111111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,"848,197.4 μs","1,381,723.6 μs","75,736.93 μs",33000.0000,12000.0000,2000.0000,206597.63 KB +PetStoreYaml,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,506.2 μs,95.21 μs,5.22 μs,19.5313,3.9063,0.0000,361.38 KB +PetStoreJson,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,227.4 μs,158.42 μs,8.68 μs,11.7188,1.9531,0.0000,223.24 KB +GHESYaml,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,"1,077,570.1 μs","87,375.79 μs","4,789.36 μs",24000.0000,19000.0000,3000.0000,345338.7 KB +GHESJson,ShortRun,False,Default,Default,Default,Default,Default,Default,1111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,"478,591.0 μs","114,328.37 μs","6,266.72 μs",13000.0000,9000.0000,2000.0000,206861.5 KB diff --git a/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report.html b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report.html index feb037f9f..6d0c68bfe 100644 --- a/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report.html +++ b/performance/benchmark/BenchmarkDotNet.Artifacts/results/performance.Descriptions-report.html @@ -2,7 +2,7 @@ -performance.Descriptions-20251024-100447 +performance.Descriptions-20260217-210541 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Workbench/Themes/Metro/Styles.WPF.xaml b/src/Microsoft.OpenApi.Workbench/Themes/Metro/Styles.WPF.xaml deleted file mode 100644 index 988e787b8..000000000 --- a/src/Microsoft.OpenApi.Workbench/Themes/Metro/Styles.WPF.xaml +++ /dev/null @@ -1,830 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Visible - - - - - - - - - - - Visible - - - - - - - - - - - - - - Visible - - - - - - - - - - - Visible - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Workbench/Themes/Metro/Theme.Colors.xaml b/src/Microsoft.OpenApi.Workbench/Themes/Metro/Theme.Colors.xaml deleted file mode 100644 index 02babe07a..000000000 --- a/src/Microsoft.OpenApi.Workbench/Themes/Metro/Theme.Colors.xaml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - #FF282828 - #FF3F3F3F - #FF565656 - #FF858585 - #FFB9B9B9 - #FFD7D7D7 - #FFE7E7E7 - #FFF4F4F4 - #FFF9F9F9 - #FFFFFFFF - - - #E5FFFFFF - #BFFFFFFF - #99FFFFFF - #72FFFFFF - #4CFFFFFF - #00FFFFFF - - - #72000000 - #4C000000 - #26000000 - #00000000 - #66E2E2E2 - - - #FF0086AF - #FF00AADE - #FF80D5EF - #FFB2E1EF - #2600AADE - - - #FFD0284C - #FFF55E7F - #FFFFCAD5 - - - #FF006481 - #FF8A9B0F - #FF3E4700 - #FFF14D0F - #FF8D2E00 - #FF81106B - #FF410135 - #FFFCA910 - #FF8D4902 - #FF037A54 - #FF003F2A - #FF154D85 - #FF02284D - #FF543511 - #FF211303 - #FF89806D - #FF393225 - #FF58458B - #FF211347 - #7FB9B9B9 - #33565656 - #7F3F3F3F - #FF686868 - #8000AADE - #CC3F3F3F - - - - #FF0092BE - #FF00AADE - #FF2BB9E5 - #FF55C8EB - #FF80D7F2 - - \ No newline at end of file From afd4967a9e6db390175e2df9e6f34ff77168d19d Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 11 Sep 2026 12:04:07 -0700 Subject: [PATCH 332/388] Omit null OpenAPI response descriptions (#3077) * Initial plan fix(openapi): omit null response descriptions Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> * test(models): update response serialization expectation Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> --- .../Models/OpenApiResponse.cs | 8 +++---- .../OpenApiResponseSerializationTests.cs | 22 +++++++++++++++++++ .../Models/OpenApiOperationTests.cs | 4 ---- .../Models/OpenApiResponseTests.cs | 4 +--- 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/src/Microsoft.OpenApi/Models/OpenApiResponse.cs b/src/Microsoft.OpenApi/Models/OpenApiResponse.cs index 4ee39336e..6bd02af25 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiResponse.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiResponse.cs @@ -73,7 +73,7 @@ public virtual void SerializeAsV3(IOpenApiWriter writer) SerializeInternal(writer, OpenApiSpecVersion.OpenApi3_0, (writer, element) => element.SerializeAsV3(writer)); } - private void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, + private void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, Action callback) { Utils.CheckArgumentNull(writer); @@ -87,7 +87,7 @@ private void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version } // description - writer.WriteRequiredProperty(OpenApiConstants.Description, Description); + writer.WriteProperty(OpenApiConstants.Description, Description); // headers writer.WriteOptionalMap(OpenApiConstants.Headers, Headers, callback); @@ -120,7 +120,7 @@ public virtual void SerializeAsV2(IOpenApiWriter writer) writer.WriteStartObject(); // description - writer.WriteRequiredProperty(OpenApiConstants.Description, Description); + writer.WriteProperty(OpenApiConstants.Description, Description); var extensionsClone = Extensions is not null ? new Dictionary(Extensions) : null; @@ -177,7 +177,7 @@ public virtual void SerializeAsV2(IOpenApiWriter writer) // so remove it from the cloned collection so we don't write it again. extensionsClone?.Remove(key); } - } + } } } diff --git a/test/Microsoft.OpenApi.Tests/Mocks/OpenApiResponseSerializationTests.cs b/test/Microsoft.OpenApi.Tests/Mocks/OpenApiResponseSerializationTests.cs index 27246fa7e..95a5a6980 100644 --- a/test/Microsoft.OpenApi.Tests/Mocks/OpenApiResponseSerializationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Mocks/OpenApiResponseSerializationTests.cs @@ -1,5 +1,7 @@ using System.IO; using System.Net.Http; +using System.Text.Json.Nodes; +using System.Threading.Tasks; using Moq; using Xunit; @@ -61,5 +63,25 @@ public void SerializeAsV3_DoesNotCallV31OrV2Serialization() _linkMock.Verify(l => l.SerializeAsV31(It.IsAny()), Times.Never); _linkMock.Verify(l => l.SerializeAsV2(It.IsAny()), Times.Never); } + + [Theory] + [InlineData(OpenApiSpecVersion.OpenApi2_0)] + [InlineData(OpenApiSpecVersion.OpenApi3_0)] + [InlineData(OpenApiSpecVersion.OpenApi3_1)] + [InlineData(OpenApiSpecVersion.OpenApi3_2)] + public async Task SerializeResponseWithoutDescriptionAsJsonDoesNotWriteNullDescription(OpenApiSpecVersion specVersion) + { + // Arrange + var response = new OpenApiResponse(); + + // Act + var actual = await response.SerializeAsJsonAsync(specVersion, TestContext.Current.CancellationToken); + + // Assert + var node = JsonNode.Parse(actual); + Assert.NotNull(node); + var responseObject = Assert.IsType(node); + Assert.False(responseObject.ContainsKey(OpenApiConstants.Description)); + } } } diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs index 4dab19e76..d281f4437 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs @@ -343,7 +343,6 @@ public async Task SerializeOperationWithBodyAsV3JsonWorks() "$ref": "#/components/responses/response1" }, "400": { - "description": null, "content": { "application/json": { "schema": { @@ -416,7 +415,6 @@ public async Task SerializeAdvancedOperationWithTagAndSecurityAsV3JsonWorks() "$ref": "#/components/responses/response1" }, "400": { - "description": null, "content": { "application/json": { "schema": { @@ -648,7 +646,6 @@ public async Task SerializeOperationWithBodyAsV2JsonWorks() "$ref": "#/responses/response1" }, "400": { - "description": null, "schema": { "type": "number", "maximum": 10, @@ -718,7 +715,6 @@ public async Task SerializeAdvancedOperationWithTagAndSecurityAsV2JsonWorks() "$ref": "#/responses/response1" }, "400": { - "description": null, "schema": { "type": "number", "maximum": 10, diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.cs index 450058fe1..fdd291162 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponseTests.cs @@ -193,9 +193,7 @@ public async Task SerializeBasicResponseWorks( string format) { // Arrange - var expected = format == OpenApiConstants.Json ? @"{ - ""description"": null -}" : @"description: null"; + var expected = @"{ }"; // Act var actual = await BasicResponse.SerializeAsync(version, format, TestContext.Current.CancellationToken); From c35be9bbe33dbb038f5b3d45f12f49dba8859e66 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Sep 2026 05:36:05 -0400 Subject: [PATCH 333/388] Bump Microsoft.SourceLink.GitHub from 10.0.400 to 10.0.401 (#3085) --- updated-dependencies: - dependency-name: Microsoft.SourceLink.GitHub dependency-version: 10.0.401 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index da0a45c5d..5c2dfa48a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -19,6 +19,6 @@ true - + \ No newline at end of file From 413f0aa52e1cede721b70a99cc8b92ec5d4984a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Sep 2026 05:36:47 -0400 Subject: [PATCH 334/388] Bump the microsoftextensions group with 6 updates (#3084) Bumps Microsoft.Extensions.DependencyInjection from 10.0.11 to 10.0.12 Bumps Microsoft.Extensions.Logging from 10.0.11 to 10.0.12 Bumps Microsoft.Extensions.Logging.Abstractions from 10.0.11 to 10.0.12 Bumps Microsoft.Extensions.Logging.Console from 10.0.11 to 10.0.12 Bumps Microsoft.Extensions.Logging.Debug from 10.0.11 to 10.0.12 Bumps System.Text.Json from 10.0.11 to 10.0.12 --- updated-dependencies: - dependency-name: Microsoft.Extensions.DependencyInjection dependency-version: 10.0.12 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging dependency-version: 10.0.12 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging dependency-version: 10.0.12 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging.Abstractions dependency-version: 10.0.12 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging.Console dependency-version: 10.0.12 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: System.Text.Json dependency-version: 10.0.12 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging.Console dependency-version: 10.0.12 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging.Debug dependency-version: 10.0.12 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging.Debug dependency-version: 10.0.12 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- performance/resultsComparer/resultsComparer.csproj | 10 +++++----- .../Microsoft.OpenApi.Hidi.csproj | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/performance/resultsComparer/resultsComparer.csproj b/performance/resultsComparer/resultsComparer.csproj index c6a0f2d33..9767a28ba 100644 --- a/performance/resultsComparer/resultsComparer.csproj +++ b/performance/resultsComparer/resultsComparer.csproj @@ -8,12 +8,12 @@ - - - - + + + + - + diff --git a/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj b/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj index 5e2fd04ed..fab3173fd 100644 --- a/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj +++ b/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj @@ -29,10 +29,10 @@ - - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all From fb595ec43c7ef66d2adbf47d60cfa70a573b1394 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Sep 2026 05:37:11 -0400 Subject: [PATCH 335/388] chore(deps): bump dotnet-sdk from 10.0.400 to 10.0.401 (#3083) Bumps [dotnet-sdk](https://github.com/dotnet/sdk) from 10.0.400 to 10.0.401. - [Release notes](https://github.com/dotnet/sdk/releases) - [Commits](https://github.com/dotnet/sdk/compare/v10.0.400...v10.0.401) --- updated-dependencies: - dependency-name: dotnet-sdk dependency-version: 10.0.401 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 2f38dd557..7494875e1 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "10.0.400" + "version": "10.0.401" }, "test": { "runner": "Microsoft.Testing.Platform" From 0afae131bf68a03b7133818b24584ac6d956fc73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Sep 2026 05:47:47 -0400 Subject: [PATCH 336/388] chore(deps): bump actions/setup-java from 6.0.0 to 6.0.1 (#3087) Bumps [actions/setup-java](https://github.com/actions/setup-java) from 6.0.0 to 6.0.1. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/dd06d9cba3e5552c54d9f8ea23572deb30010f7c...de7274f081f381c8f8158605e0321c36c376e2e6) --- updated-dependencies: - dependency-name: actions/setup-java dependency-version: 6.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/sonarcloud.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index a75019cfd..a6954d70d 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -35,7 +35,7 @@ jobs: runs-on: windows-latest steps: - name: Set up JDK 17 - uses: actions/setup-java@dd06d9cba3e5552c54d9f8ea23572deb30010f7c # v6.0.0 + uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1 with: distribution: 'temurin' java-version: 17 From 3ced884842911823d597072d4e786872d2cc44ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Sep 2026 05:58:28 -0400 Subject: [PATCH 337/388] Bump the testing group with 1 update (#3088) Bumps Microsoft.NET.Test.Sdk from 18.9.0 to 18.10.0 --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.10.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: testing - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.10.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: testing ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Microsoft.OpenApi.Hidi.Tests.csproj | 2 +- .../Microsoft.OpenApi.Readers.Tests.csproj | 2 +- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj b/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj index 2271cbb81..3e5f82aa4 100644 --- a/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj +++ b/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj @@ -15,7 +15,7 @@ - + diff --git a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj index e3601ba20..9598b058d 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj +++ b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj @@ -17,7 +17,7 @@ - + diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 0a681a46c..1185dd65c 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -10,7 +10,7 @@ - + From 7adeb08e04bb1c4338399eb24742b728fd47dd5c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Sep 2026 05:59:03 -0400 Subject: [PATCH 338/388] chore(deps): bump the codeql group with 2 updates (#3086) Bumps the codeql group with 2 updates: [github/codeql-action/init](https://github.com/github/codeql-action) and [github/codeql-action/analyze](https://github.com/github/codeql-action). Updates `github/codeql-action/init` from 4.37.9 to 4.38.0 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/cdf488f595d80d6e07e03d4674febd5ab45fa938...b96794f015dfd88f77b49b1c93e0fa7110f94c63) Updates `github/codeql-action/analyze` from 4.37.9 to 4.38.0 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/cdf488f595d80d6e07e03d4674febd5ab45fa938...b96794f015dfd88f77b49b1c93e0fa7110f94c63) --- updated-dependencies: - dependency-name: github/codeql-action/init dependency-version: 4.38.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: codeql - dependency-name: github/codeql-action/analyze dependency-version: 4.38.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: codeql ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index cb35bda68..e3cb62f4a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -34,7 +34,7 @@ jobs: - name: Initialize CodeQL id: init_codeql - uses: github/codeql-action/init@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9 + uses: github/codeql-action/init@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v4.38.0 with: queries: security-and-quality @@ -54,6 +54,6 @@ jobs: - name: Perform CodeQL Analysis id: analyze_codeql - uses: github/codeql-action/analyze@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9 + uses: github/codeql-action/analyze@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v4.38.0 # Built with ❤ by [Pipeline Foundation](https://pipeline.foundation) \ No newline at end of file From fde81d9200c89a501094d47a75904f9896fb27f5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Sep 2026 07:03:28 -0400 Subject: [PATCH 339/388] Bump the testing group with 1 update (#3090) Bumps xunit.v3 from 4.0.0 to 4.0.1 --- updated-dependencies: - dependency-name: xunit.v3 dependency-version: 4.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: testing - dependency-name: xunit.v3 dependency-version: 4.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: testing ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Microsoft.OpenApi.Hidi.Tests.csproj | 2 +- .../Microsoft.OpenApi.Readers.Tests.csproj | 2 +- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj b/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj index 3e5f82aa4..64690e433 100644 --- a/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj +++ b/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj @@ -19,7 +19,7 @@ - + diff --git a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj index 9598b058d..eea3476a0 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj +++ b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj @@ -20,7 +20,7 @@ - + diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 1185dd65c..5275f1ba8 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -15,7 +15,7 @@ - + From 4450d5fff83c29e4717214c4777d77e987585a3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Sep 2026 10:20:15 -0700 Subject: [PATCH 340/388] Bump Verify.XunitV3 from 32.0.0 to 33.0.2 (#3091) * Bump Verify.XunitV3 from 32.0.0 to 33.0.2 --- updated-dependencies: - dependency-name: Verify.XunitV3 dependency-version: 33.0.2 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * chore(dependencies): declare Verify open source exemption Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> --- Directory.Build.props | 2 ++ test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 5c2dfa48a..1971fa2c6 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -8,6 +8,8 @@ https://github.com/Microsoft/OpenAPI.NET https://github.com/microsoft/OpenAPI.NET/releases true + OpenSource + 2027-09 http://go.microsoft.com/fwlink/?LinkID=288890 https://github.com/Microsoft/OpenAPI.NET © Microsoft Corporation. All rights reserved. diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 5275f1ba8..07876a331 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -14,7 +14,7 @@ - + From f262b83ddbab37f3b04475876e058dae869dfc17 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Sep 2026 17:35:33 -0400 Subject: [PATCH 341/388] Bump the testing group with 1 update (#3092) Bumps Microsoft.NET.Test.Sdk from 18.10.0 to 18.10.1 --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.10.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: testing - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.10.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: testing ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Microsoft.OpenApi.Hidi.Tests.csproj | 2 +- .../Microsoft.OpenApi.Readers.Tests.csproj | 2 +- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj b/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj index 64690e433..5e9e7ede9 100644 --- a/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj +++ b/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj @@ -15,7 +15,7 @@ - + diff --git a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj index eea3476a0..4ec972381 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj +++ b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj @@ -17,7 +17,7 @@ - + diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 07876a331..4c7ecf73b 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -10,7 +10,7 @@ - + From 5c2db299ccb729226a243cd577361c4a32e4e069 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Sep 2026 17:46:12 -0400 Subject: [PATCH 342/388] Bump the testing group with 2 updates (#3093) Bumps Microsoft.Testing.Extensions.AzureDevOpsReport from 2.4.0 to 2.4.1 Bumps Microsoft.Testing.Extensions.GitHubActionsReport from 2.4.0 to 2.4.1 --- updated-dependencies: - dependency-name: Microsoft.Testing.Extensions.AzureDevOpsReport dependency-version: 2.4.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: testing - dependency-name: Microsoft.Testing.Extensions.AzureDevOpsReport dependency-version: 2.4.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: testing - dependency-name: Microsoft.Testing.Extensions.GitHubActionsReport dependency-version: 2.4.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: testing - dependency-name: Microsoft.Testing.Extensions.GitHubActionsReport dependency-version: 2.4.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: testing ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Microsoft.OpenApi.Hidi.Tests.csproj | 4 ++-- .../Microsoft.OpenApi.Readers.Tests.csproj | 4 ++-- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj b/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj index 5e9e7ede9..a32deb9b6 100644 --- a/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj +++ b/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj @@ -16,8 +16,8 @@ - - + + diff --git a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj index 4ec972381..e75ef4bcb 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj +++ b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj @@ -18,8 +18,8 @@ - - + + diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 4c7ecf73b..32e6a5056 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -11,8 +11,8 @@ - - + + From efede53130f56ccf7737204fa3d8630507cddd0d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Sep 2026 06:59:35 -0400 Subject: [PATCH 343/388] chore(deps): bump the codeql group with 2 updates (#3094) Bumps the codeql group with 2 updates: [github/codeql-action/init](https://github.com/github/codeql-action) and [github/codeql-action/analyze](https://github.com/github/codeql-action). Updates `github/codeql-action/init` from 4.38.0 to 4.38.1 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/b96794f015dfd88f77b49b1c93e0fa7110f94c63...1c5b675653bb5c22dbe9b12b556ec555138e09fd) Updates `github/codeql-action/analyze` from 4.38.0 to 4.38.1 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/b96794f015dfd88f77b49b1c93e0fa7110f94c63...1c5b675653bb5c22dbe9b12b556ec555138e09fd) --- updated-dependencies: - dependency-name: github/codeql-action/init dependency-version: 4.38.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: codeql - dependency-name: github/codeql-action/analyze dependency-version: 4.38.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: codeql ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index e3cb62f4a..e3ac2cc16 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -34,7 +34,7 @@ jobs: - name: Initialize CodeQL id: init_codeql - uses: github/codeql-action/init@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v4.38.0 + uses: github/codeql-action/init@1c5b675653bb5c22dbe9b12b556ec555138e09fd # v4.38.1 with: queries: security-and-quality @@ -54,6 +54,6 @@ jobs: - name: Perform CodeQL Analysis id: analyze_codeql - uses: github/codeql-action/analyze@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v4.38.0 + uses: github/codeql-action/analyze@1c5b675653bb5c22dbe9b12b556ec555138e09fd # v4.38.1 # Built with ❤ by [Pipeline Foundation](https://pipeline.foundation) \ No newline at end of file From c719c42443db950eef44f8f6ce0c317f2ee98117 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Mon, 28 Sep 2026 14:36:28 -0400 Subject: [PATCH 344/388] ci: Change auto-merge strategy for Dependabot PRs (#3095) --- .github/workflows/auto-merge-dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-merge-dependabot.yml b/.github/workflows/auto-merge-dependabot.yml index a3343774e..f6dafa170 100644 --- a/.github/workflows/auto-merge-dependabot.yml +++ b/.github/workflows/auto-merge-dependabot.yml @@ -26,7 +26,7 @@ jobs: - name: Enable auto-merge for Dependabot PRs # Only if version bump is not a major version change if: ${{steps.metadata.outputs.update-type != 'version-update:semver-major'}} - run: gh pr merge --auto --merge "$PR_URL" + run: gh pr merge --auto --squash "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} From 2fc1ed9aa9074fee02f2de1e7a49f56398f39d1c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Sep 2026 19:33:28 -0400 Subject: [PATCH 345/388] Bump Verify.XunitV3 from 33.0.2 to 33.1.1 (#3096) --- updated-dependencies: - dependency-name: Verify.XunitV3 dependency-version: 33.1.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 32e6a5056..92745edea 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -14,7 +14,7 @@ - + From eebc63ccd29f89b850f5fd43f56f733b77aed985 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Oct 2026 06:55:36 -0400 Subject: [PATCH 346/388] chore(deps): bump the codeql group with 2 updates (#3097) Bumps the codeql group with 2 updates: [github/codeql-action/init](https://github.com/github/codeql-action) and [github/codeql-action/analyze](https://github.com/github/codeql-action). Updates `github/codeql-action/init` from 4.38.1 to 4.38.2 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/1c5b675653bb5c22dbe9b12b556ec555138e09fd...2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2) Updates `github/codeql-action/analyze` from 4.38.1 to 4.38.2 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/1c5b675653bb5c22dbe9b12b556ec555138e09fd...2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2) --- updated-dependencies: - dependency-name: github/codeql-action/init dependency-version: 4.38.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: codeql - dependency-name: github/codeql-action/analyze dependency-version: 4.38.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: codeql ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index e3ac2cc16..b2311adf8 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -34,7 +34,7 @@ jobs: - name: Initialize CodeQL id: init_codeql - uses: github/codeql-action/init@1c5b675653bb5c22dbe9b12b556ec555138e09fd # v4.38.1 + uses: github/codeql-action/init@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2 with: queries: security-and-quality @@ -54,6 +54,6 @@ jobs: - name: Perform CodeQL Analysis id: analyze_codeql - uses: github/codeql-action/analyze@1c5b675653bb5c22dbe9b12b556ec555138e09fd # v4.38.1 + uses: github/codeql-action/analyze@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2 # Built with ❤ by [Pipeline Foundation](https://pipeline.foundation) \ No newline at end of file From 887bad8eb68c147a432eaabe1223d9293769474b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Oct 2026 06:57:05 -0400 Subject: [PATCH 347/388] Bump Moq from 4.20.72 to 4.21.0 (#3098) --- updated-dependencies: - dependency-name: Moq dependency-version: 4.21.0 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: Moq dependency-version: 4.21.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Microsoft.OpenApi.Hidi.Tests.csproj | 2 +- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj b/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj index a32deb9b6..6daa7906a 100644 --- a/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj +++ b/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj @@ -18,7 +18,7 @@ - + diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 92745edea..469d2cd08 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -13,7 +13,7 @@ - + From 1a7054e6e12edf45e5780cec9a15d2508cb9d9d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Oct 2026 07:04:10 -0400 Subject: [PATCH 348/388] Bump Verify.XunitV3 from 33.1.1 to 33.1.4 (#3099) --- updated-dependencies: - dependency-name: Verify.XunitV3 dependency-version: 33.1.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 469d2cd08..56730da5b 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -14,7 +14,7 @@ - + From 61203495a9721929d39d93ce7928d98067ce051b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Oct 2026 06:49:29 -0400 Subject: [PATCH 349/388] Bump the testing group with 1 update (#3103) Bumps coverlet.MTP from 10.0.1 to 10.1.0 --- updated-dependencies: - dependency-name: coverlet.MTP dependency-version: 10.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: testing - dependency-name: coverlet.MTP dependency-version: 10.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: testing ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Microsoft.OpenApi.Hidi.Tests.csproj | 2 +- .../Microsoft.OpenApi.Readers.Tests.csproj | 2 +- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj b/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj index 6daa7906a..c5adf7adc 100644 --- a/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj +++ b/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj @@ -14,7 +14,7 @@ - + diff --git a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj index e75ef4bcb..ccddceff0 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj +++ b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj @@ -16,7 +16,7 @@ - + diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 56730da5b..35744dc95 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -9,7 +9,7 @@ - + From 3d0cd0b416f592c12f1dcfd89b38c9ca37714970 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Oct 2026 06:51:08 -0400 Subject: [PATCH 350/388] chore(deps): bump actions/upload-code-coverage from 1.4.2 to 1.4.3 (#3102) Bumps [actions/upload-code-coverage](https://github.com/actions/upload-code-coverage) from 1.4.2 to 1.4.3. - [Release notes](https://github.com/actions/upload-code-coverage/releases) - [Changelog](https://github.com/actions/upload-code-coverage/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/upload-code-coverage/compare/d8e329117199404bba6fc81efe8093dc7c015e34...bfa741d815a28cb064a8e3a0837e577457a017d5) --- updated-dependencies: - dependency-name: actions/upload-code-coverage dependency-version: 1.4.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 60207f6cc..f62a71594 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -64,7 +64,7 @@ jobs: - name: Upload coverage report if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]') || (github.event_name != 'pull_request' && github.ref_name == github.event.repository.default_branch) - uses: actions/upload-code-coverage@d8e329117199404bba6fc81efe8093dc7c015e34 # v1.4.2 + uses: actions/upload-code-coverage@bfa741d815a28cb064a8e3a0837e577457a017d5 # v1.4.3 with: file: ./reports/coverage/Cobertura.xml language: CSharp From cdc3c07ad55fd3b2f44d3a7aee2c518d76112f3f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Oct 2026 06:51:36 -0400 Subject: [PATCH 351/388] Bump Verify.XunitV3 from 33.1.4 to 33.1.5 (#3104) --- updated-dependencies: - dependency-name: Verify.XunitV3 dependency-version: 33.1.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 35744dc95..299a888f5 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -14,7 +14,7 @@ - + From 8460814f250ce38282e02497f0bbc5e59ec04c31 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Oct 2026 05:54:20 -0400 Subject: [PATCH 352/388] Bump Verify.XunitV3 from 33.1.5 to 33.2.0 (#3105) --- updated-dependencies: - dependency-name: Verify.XunitV3 dependency-version: 33.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 299a888f5..e79f44dba 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -14,7 +14,7 @@ - + From 15dca965af7d53ed2de8afc855de45b3455a0238 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Oct 2026 18:23:15 -0400 Subject: [PATCH 353/388] chore(deps): bump actions/upload-code-coverage from 1.4.3 to 1.4.4 (#3106) Bumps [actions/upload-code-coverage](https://github.com/actions/upload-code-coverage) from 1.4.3 to 1.4.4. - [Release notes](https://github.com/actions/upload-code-coverage/releases) - [Changelog](https://github.com/actions/upload-code-coverage/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/upload-code-coverage/compare/bfa741d815a28cb064a8e3a0837e577457a017d5...2b21a77928be8d5168c2b9581a67f2adbebacc52) --- updated-dependencies: - dependency-name: actions/upload-code-coverage dependency-version: 1.4.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index f62a71594..4ae9e6ae0 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -64,7 +64,7 @@ jobs: - name: Upload coverage report if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]') || (github.event_name != 'pull_request' && github.ref_name == github.event.repository.default_branch) - uses: actions/upload-code-coverage@bfa741d815a28cb064a8e3a0837e577457a017d5 # v1.4.3 + uses: actions/upload-code-coverage@2b21a77928be8d5168c2b9581a67f2adbebacc52 # v1.4.4 with: file: ./reports/coverage/Cobertura.xml language: CSharp From e1a75437b76ebfc7c9eb446e9fd0b59a21afb14b Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 9 Oct 2026 09:18:48 -0600 Subject: [PATCH 354/388] ci(release): publish NuGet via ESRP and authenticate Hidi Docker restores (#3107) * ci(release): publish OpenAPI packages and symbols through ESRP Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> * ci(hidi): authenticate Docker restores using a BuildKit secret Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> * ci(release): share authenticated private-feed version checks Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> --- .azure-pipelines/ci-build.yml | 198 ++++++++++++++++++---- Dockerfile | 4 +- scripts/check-nuget-package-published.ps1 | 84 +++++++++ 3 files changed, 256 insertions(+), 30 deletions(-) create mode 100644 scripts/check-nuget-package-published.ps1 diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 2c8cb8735..5e8a40e98 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -21,6 +21,8 @@ pr: variables: buildPlatform: 'Any CPU' buildConfiguration: 'Release' + NuGetOrganizationName: 'openapinet' + privateFeedBaseUrl: 'https://microsoftgraph.pkgs.visualstudio.com/0985d294-5762-4bc2-a565-161ef349ca3e/_packaging/GraphDeveloperExperiences_Public' ProductBinPath: '$(Build.SourcesDirectory)\src\Microsoft.OpenApi\bin\$(BuildConfiguration)' REGISTRY: 'msgraphprodregistry.azurecr.io' IMAGE_NAME: 'public/openapi/hidi' @@ -88,7 +90,7 @@ extends: - + "@ | Set-Content -Path "$(Build.SourcesDirectory)/nuget.config" -Encoding UTF8 @@ -226,7 +228,16 @@ extends: inputs: targetFolder: $(Build.ArtifactStagingDirectory)/Nugets sourceFolder: $(Build.ArtifactStagingDirectory) - content: '*.nupkg' + Contents: | + *.nupkg + *.snupkg + + - task: CopyFiles@2 + displayName: 'Include version-check script in Nugets artifact' + inputs: + SourceFolder: '$(Build.SourcesDirectory)/scripts' + Contents: 'check-nuget-package-published.ps1' + TargetFolder: '$(Build.ArtifactStagingDirectory)/Nugets/scripts' # Copy repository files to be used in the deploy stage - task: CopyFiles@2 @@ -265,13 +276,46 @@ extends: pool: vmImage: ubuntu-latest steps: - - task: 1ES.PublishNuget@1 - displayName: 'NuGet push' + - task: PowerShell@2 + displayName: 'Check whether NuGet package version already published (idempotent)' + inputs: + targetType: filePath + filePath: '$(Pipeline.Workspace)/scripts/check-nuget-package-published.ps1' + arguments: '-PackageId "Microsoft.OpenApi.Hidi" -PackageDirectory "$(Pipeline.Workspace)" -NuGetServiceIndexUrl "$(privateFeedBaseUrl)/nuget/v3/index.json"' + pwsh: true + env: + FEED_ACCESS_TOKEN: $(System.AccessToken) + - task: CopyFiles@2 + displayName: 'Stage Hidi NuGet packages for ESRP release' + condition: and(succeeded(), ne(variables['nugetAlreadyPublished'], 'true')) + inputs: + SourceFolder: '$(Pipeline.Workspace)' + Contents: | + Microsoft.OpenApi.Hidi.*.nupkg + Microsoft.OpenApi.Hidi.*.snupkg + TargetFolder: '$(Pipeline.Workspace)/nuget-packages/$(NuGetOrganizationName)/hidi' + CleanTargetFolder: true + - task: EsrpRelease@14 + displayName: 'ESRP Release - Hidi NuGet' + condition: and(succeeded(), ne(variables['nugetAlreadyPublished'], 'true')) inputs: - packagesToPush: '$(Pipeline.Workspace)/Microsoft.OpenApi.Hidi.*.nupkg' - packageParentPath: '$(Pipeline.Workspace)' - nuGetFeedType: external - publishFeedCredentials: 'OpenAPI Nuget Connection' + connectedservicename: 'Federated DevX ESRP Managed Identity Connection' + usemanagedidentity: false + keyvaultname: 'akv-prod-eastus' + authcertname: 'ReferenceLibraryPrivateCert' + signcertname: 'ReferencePackagePublisherCertificate' + clientid: '65035b7f-7357-4f29-bf25-c5ee5c3949f8' + intent: 'packagedistribution' + contenttype: 'NuGet' + organizationname: '$(NuGetOrganizationName)' + contentsource: 'Folder' + folderlocation: '$(Pipeline.Workspace)/nuget-packages/$(NuGetOrganizationName)/hidi' + waitforreleasecompletion: true + owners: 'christiano@microsoft.com,ramsess@microsoft.com,gavinbarron@microsoft.com,jingjingjia@microsoft.com,peombwa@microsoft.com,treicys@microsoft.com' + approvers: 'christiano@microsoft.com,ramsess@microsoft.com,gavinbarron@microsoft.com,jingjingjia@microsoft.com,peombwa@microsoft.com,treicys@microsoft.com' + serviceendpointurl: 'https://api.esrp.microsoft.com/' + mainpublisher: 'ESRPRELPACMAN' + domaintenantid: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2' - deployment: deploy_lib condition: and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded()) @@ -290,21 +334,48 @@ extends: pool: vmImage: ubuntu-latest steps: - - pwsh: | - $fileNames = "$(Pipeline.Workspace)/Microsoft.OpenApi.Hidi.*.nupkg", "$(Pipeline.Workspace)/Microsoft.OpenApi.YamlReader.*.nupkg" - foreach($fileName in $fileNames) { - if(Test-Path $fileName) { - Remove-Item $fileName -Verbose - } - } - displayName: remove other nupkgs to avoid duplication - - task: 1ES.PublishNuget@1 - displayName: 'NuGet push' + - task: PowerShell@2 + displayName: 'Check whether NuGet package version already published (idempotent)' + inputs: + targetType: filePath + filePath: '$(Pipeline.Workspace)/scripts/check-nuget-package-published.ps1' + arguments: '-PackageId "Microsoft.OpenApi" -PackageDirectory "$(Pipeline.Workspace)" -NuGetServiceIndexUrl "$(privateFeedBaseUrl)/nuget/v3/index.json"' + pwsh: true + env: + FEED_ACCESS_TOKEN: $(System.AccessToken) + - task: CopyFiles@2 + displayName: 'Stage OpenAPI NuGet packages for ESRP release' + condition: and(succeeded(), ne(variables['nugetAlreadyPublished'], 'true')) + inputs: + SourceFolder: '$(Pipeline.Workspace)' + Contents: | + Microsoft.OpenApi.*.nupkg + Microsoft.OpenApi.*.snupkg + !Microsoft.OpenApi.Hidi.* + !Microsoft.OpenApi.YamlReader.* + TargetFolder: '$(Pipeline.Workspace)/nuget-packages/$(NuGetOrganizationName)/openapi' + CleanTargetFolder: true + - task: EsrpRelease@14 + displayName: 'ESRP Release - OpenAPI NuGet' + condition: and(succeeded(), ne(variables['nugetAlreadyPublished'], 'true')) inputs: - packagesToPush: '$(Pipeline.Workspace)/Microsoft.OpenApi.*.nupkg' - packageParentPath: '$(Pipeline.Workspace)' - nuGetFeedType: external - publishFeedCredentials: 'OpenAPI Nuget Connection' + connectedservicename: 'Federated DevX ESRP Managed Identity Connection' + usemanagedidentity: false + keyvaultname: 'akv-prod-eastus' + authcertname: 'ReferenceLibraryPrivateCert' + signcertname: 'ReferencePackagePublisherCertificate' + clientid: '65035b7f-7357-4f29-bf25-c5ee5c3949f8' + intent: 'packagedistribution' + contenttype: 'NuGet' + organizationname: '$(NuGetOrganizationName)' + contentsource: 'Folder' + folderlocation: '$(Pipeline.Workspace)/nuget-packages/$(NuGetOrganizationName)/openapi' + waitforreleasecompletion: true + owners: 'christiano@microsoft.com,ramsess@microsoft.com,gavinbarron@microsoft.com,jingjingjia@microsoft.com,peombwa@microsoft.com,treicys@microsoft.com' + approvers: 'christiano@microsoft.com,ramsess@microsoft.com,gavinbarron@microsoft.com,jingjingjia@microsoft.com,peombwa@microsoft.com,treicys@microsoft.com' + serviceendpointurl: 'https://api.esrp.microsoft.com/' + mainpublisher: 'ESRPRELPACMAN' + domaintenantid: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2' - deployment: deploy_yaml_reader condition: and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded()) @@ -323,13 +394,46 @@ extends: pool: vmImage: ubuntu-latest steps: - - task: 1ES.PublishNuget@1 - displayName: 'NuGet push' + - task: PowerShell@2 + displayName: 'Check whether NuGet package version already published (idempotent)' inputs: - packagesToPush: '$(Pipeline.Workspace)/Microsoft.OpenApi.YamlReader.*.nupkg' - packageParentPath: '$(Pipeline.Workspace)' - nuGetFeedType: external - publishFeedCredentials: 'OpenAPI Nuget Connection' + targetType: filePath + filePath: '$(Pipeline.Workspace)/scripts/check-nuget-package-published.ps1' + arguments: '-PackageId "Microsoft.OpenApi.YamlReader" -PackageDirectory "$(Pipeline.Workspace)" -NuGetServiceIndexUrl "$(privateFeedBaseUrl)/nuget/v3/index.json"' + pwsh: true + env: + FEED_ACCESS_TOKEN: $(System.AccessToken) + - task: CopyFiles@2 + displayName: 'Stage YAML reader NuGet packages for ESRP release' + condition: and(succeeded(), ne(variables['nugetAlreadyPublished'], 'true')) + inputs: + SourceFolder: '$(Pipeline.Workspace)' + Contents: | + Microsoft.OpenApi.YamlReader.*.nupkg + Microsoft.OpenApi.YamlReader.*.snupkg + TargetFolder: '$(Pipeline.Workspace)/nuget-packages/$(NuGetOrganizationName)/yaml-reader' + CleanTargetFolder: true + - task: EsrpRelease@14 + displayName: 'ESRP Release - YAML reader NuGet' + condition: and(succeeded(), ne(variables['nugetAlreadyPublished'], 'true')) + inputs: + connectedservicename: 'Federated DevX ESRP Managed Identity Connection' + usemanagedidentity: false + keyvaultname: 'akv-prod-eastus' + authcertname: 'ReferenceLibraryPrivateCert' + signcertname: 'ReferencePackagePublisherCertificate' + clientid: '65035b7f-7357-4f29-bf25-c5ee5c3949f8' + intent: 'packagedistribution' + contenttype: 'NuGet' + organizationname: '$(NuGetOrganizationName)' + contentsource: 'Folder' + folderlocation: '$(Pipeline.Workspace)/nuget-packages/$(NuGetOrganizationName)/yaml-reader' + waitforreleasecompletion: true + owners: 'christiano@microsoft.com,ramsess@microsoft.com,gavinbarron@microsoft.com,jingjingjia@microsoft.com,peombwa@microsoft.com,treicys@microsoft.com' + approvers: 'christiano@microsoft.com,ramsess@microsoft.com,gavinbarron@microsoft.com,jingjingjia@microsoft.com,peombwa@microsoft.com,treicys@microsoft.com' + serviceendpointurl: 'https://api.esrp.microsoft.com/' + mainpublisher: 'ESRPRELPACMAN' + domaintenantid: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2' - deployment: create_github_release condition: and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded()) @@ -459,7 +563,33 @@ extends: displayName: 'Get current date' name: setdate condition: eq(variables['Build.SourceBranch'], variables['PREVIEW_BRANCH']) - + + # Keep feed credentials out of the Docker build context and image layers. + - pwsh: | + if ([string]::IsNullOrWhiteSpace($env:FEED_ACCESS_TOKEN)) { + throw "No Azure Artifacts access token available for the Docker build." + } + $feedAccessToken = [System.Security.SecurityElement]::Escape($env:FEED_ACCESS_TOKEN) + @" + + + + + + + + + + + + + + + "@ | Set-Content -Path "$(Agent.TempDirectory)/hidi-docker.nuget.config" -Encoding UTF8 + displayName: 'Create Docker NuGet config (central feed)' + env: + FEED_ACCESS_TOKEN: $(System.AccessToken) + - script: | docker run --privileged --rm msgraphprodregistry.azurecr.io/tonistiigi/binfmt --install all displayName: "Enable multi-platform builds" @@ -478,6 +608,7 @@ extends: # Using quotes around tags to prevent flag interpretation docker buildx build \ --platform linux/amd64,linux/arm64/v8 \ + --secret id=nuget_config,src="$(Agent.TempDirectory)/hidi-docker.nuget.config" \ --push \ -t "$(REGISTRY)/$(IMAGE_NAME):nightly" \ -t "$(REGISTRY)/$(IMAGE_NAME):${VERSION}.${BUILDDATE}${RUNNUMBER}" \ @@ -490,6 +621,7 @@ extends: echo "Building Docker image for release..." docker buildx build\ --platform linux/amd64,linux/arm64/v8 \ + --secret id=nuget_config,src="$(Agent.TempDirectory)/hidi-docker.nuget.config" \ --push \ -t "$(REGISTRY)/$(IMAGE_NAME):latest" \ -t "$(REGISTRY)/$(IMAGE_NAME):${VERSION}" \ @@ -497,6 +629,14 @@ extends: displayName: 'Build and Push Release Image' condition: contains(variables['Build.SourceBranch'], 'refs/tags/v') + - pwsh: | + $configPath = "$(Agent.TempDirectory)/hidi-docker.nuget.config" + if (Test-Path $configPath) { + Remove-Item $configPath -Force + } + displayName: 'Remove Docker NuGet config' + condition: always() + # once the nuget has been released, fill this form to get the public documentation updated. # https://dev.azure.com/msft-skilling/Content/_workitems/create/User%20Story?templateId=39fb91e3-64a2-4c8a-83db-b2bdf3603dd3&ownerId=c4a28f90-17ae-4384-b514-7273392b082b # https://learn.microsoft.com/en-us/dotnet/api/microsoft.openapi diff --git a/Dockerfile b/Dockerfile index 46cb00637..4e932b975 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,9 @@ COPY ./src ./hidi/src COPY ./Directory.Build.props ./hidi/Directory.Build.props COPY ./README.md ./hidi/README.md WORKDIR /app/hidi -RUN dotnet publish ./src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj -c Release +# CI supplies the private feed config as a secret; local builds use default NuGet sources. +RUN --mount=type=secret,id=nuget_config,target=/app/hidi/NuGet.Config \ + dotnet publish ./src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj -c Release FROM mcr.microsoft.com/dotnet/runtime:8.0-jammy-chiseled AS runtime WORKDIR /app diff --git a/scripts/check-nuget-package-published.ps1 b/scripts/check-nuget-package-published.ps1 new file mode 100644 index 000000000..84f45419d --- /dev/null +++ b/scripts/check-nuget-package-published.ps1 @@ -0,0 +1,84 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +<# +.SYNOPSIS +Checks whether a NuGet artifact's version exists in an authenticated Azure Artifacts feed. +.DESCRIPTION +Resolves the package content endpoint from the private feed's NuGet v3 service index. +Sets nugetAlreadyPublished for the ESRP release steps; only a missing package or version +permits publishing. Feed authentication and other lookup failures fail the step. +#> +[CmdletBinding()] +param( + [Parameter(Mandatory = $true)] + [string]$PackageDirectory, + [Parameter(Mandatory = $true)] + [string]$PackageId, + [Parameter(Mandatory = $true)] + [string]$NuGetServiceIndexUrl, + [string]$FeedAccessToken = $env:FEED_ACCESS_TOKEN +) + +$ErrorActionPreference = 'Stop' + +function Assert-PrivateFeedUrl { + param([string]$Url) + + $uri = [uri]$Url + if (-not $uri.IsAbsoluteUri -or $uri.Scheme -ne 'https' -or + ($uri.Host -ne 'pkgs.dev.azure.com' -and -not $uri.Host.EndsWith('.pkgs.visualstudio.com'))) { + throw "NuGet lookups must use an HTTPS Azure Artifacts feed: $Url" + } +} + +Assert-PrivateFeedUrl -Url $NuGetServiceIndexUrl +if ([string]::IsNullOrWhiteSpace($FeedAccessToken)) { + throw 'FEED_ACCESS_TOKEN is required to query the private NuGet feed.' +} + +$packagePattern = '^' + [regex]::Escape($PackageId) + '\.(\d[\w\.\-]*)\.nupkg$' +$packages = @(Get-ChildItem -Path $PackageDirectory -File -Filter "$PackageId.*.nupkg" | + Where-Object { $_.Name -match $packagePattern }) +if ($packages.Count -ne 1) { + throw "Expected exactly one $PackageId nupkg to publish; found $($packages.Count)." +} +$version = [regex]::Match($packages[0].Name, $packagePattern, 'IgnoreCase').Groups[1].Value +$id = $PackageId.ToLowerInvariant() +$credentials = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("AzureDevOps:$FeedAccessToken")) +$headers = @{ + 'Authorization' = "Basic $credentials" + 'User-Agent' = 'openapi-azdo-pipeline' +} + +$index = Invoke-RestMethod -Uri $NuGetServiceIndexUrl -Headers $headers -MaximumRedirection 0 +$resource = $index.resources | Where-Object { $_.'@type' -eq 'PackageBaseAddress/3.0.0' } | Select-Object -First 1 +if ([string]::IsNullOrWhiteSpace($resource.'@id')) { + throw "No PackageBaseAddress resource found in the NuGet service index at $NuGetServiceIndexUrl" +} +$uri = "$($resource.'@id'.TrimEnd('/'))/$id/index.json" +Assert-PrivateFeedUrl -Url $uri + +try { + $response = Invoke-RestMethod -Uri $uri -Headers $headers -MaximumRedirection 0 + if ($null -eq $response.versions) { + throw "No versions returned for NuGet $id by the private feed." + } + $alreadyPublished = $response.versions -contains $version +} +catch { + if ([int]$_.Exception.Response.StatusCode -eq 404) { + $alreadyPublished = $false + } + else { + throw + } +} + +if ($alreadyPublished) { + Write-Host "NuGet $id $version already present in the private feed; skipping ESRP release (idempotent re-run)." +} +else { + Write-Host "NuGet $id $version not found in the private feed; will publish via ESRP." +} +Write-Host "##vso[task.setvariable variable=nugetAlreadyPublished]$($alreadyPublished.ToString().ToLowerInvariant())" From 01d472995b3c466feb5bbf61e303bcd7752da16a Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 9 Oct 2026 10:28:57 -0700 Subject: [PATCH 355/388] fix: components-key validation timeouts under load (#3108) * Initial plan * fix(library): avoid components key validation timeouts under load Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> * fix(library): use conditional regex fallback for older frameworks Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> --- agents.md | 7 +++ .../Expressions/CompositeExpression.cs | 19 +++++- .../Rules/OpenApiComponentsRules.cs | 23 +++++-- .../Expressions/RuntimeExpressionTests.cs | 22 +++++++ .../OpenApiComponentsValidationTests.cs | 63 ++++++++++++++++++- 5 files changed, 125 insertions(+), 9 deletions(-) create mode 100644 agents.md diff --git a/agents.md b/agents.md new file mode 100644 index 000000000..abeed736e --- /dev/null +++ b/agents.md @@ -0,0 +1,7 @@ +# Regex handling + +- Analyze regex patterns for matching complexity and excessive backtracking, including on long and near-matching inputs. Prefer equivalent patterns with less backtracking when available, while preserving matching semantics and target-framework compatibility. +- For fixed patterns on modern targets, use source-generated regexes with explicit match timeouts (`GeneratedRegex` under `NET8_0_OR_GREATER`). +- Use conditional compilation to provide a regular `Regex` with the same pattern and an explicit match timeout for older targets. Do not duplicate regex validation with a manually maintained character scanner. +- Older-runtime regex matching may still time out under load because timeouts use wall-clock time. If consumers encounter this limitation, recommend upgrading to a modern runtime that uses the source-generated implementation. +- Keep shared patterns in constants and reference those constants in validation diagnostics and tests. diff --git a/src/Microsoft.OpenApi/Expressions/CompositeExpression.cs b/src/Microsoft.OpenApi/Expressions/CompositeExpression.cs index cac554318..db2a97caf 100644 --- a/src/Microsoft.OpenApi/Expressions/CompositeExpression.cs +++ b/src/Microsoft.OpenApi/Expressions/CompositeExpression.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. +using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; @@ -10,10 +11,17 @@ namespace Microsoft.OpenApi /// /// String literal with embedded expressions /// - public class CompositeExpression : RuntimeExpression + public partial class CompositeExpression : RuntimeExpression { private readonly string template; - private readonly Regex expressionPattern = new(@"{(?\$[^}]*)"); + private const string ExpressionPattern = @"{(?\$[^}]*)"; + +#if NET8_0_OR_GREATER + [GeneratedRegex(ExpressionPattern, RegexOptions.None, matchTimeoutMilliseconds: 100)] + private static partial Regex ExpressionRegex(); +#else + private static readonly Regex ExpressionRegex = new(ExpressionPattern, RegexOptions.None, TimeSpan.FromMilliseconds(100)); +#endif /// /// Expressions embedded into string literal @@ -24,12 +32,17 @@ public class CompositeExpression : RuntimeExpression /// Create a composite expression from a string literal with an embedded expression /// /// + /// Extracting embedded expressions exceeds the regex match timeout. public CompositeExpression(string expression) { template = expression; // Extract subexpressions and convert to RuntimeExpressions - var matches = expressionPattern.Matches(expression); +#if NET8_0_OR_GREATER + var matches = ExpressionRegex().Matches(expression); +#else + var matches = ExpressionRegex.Matches(expression); +#endif foreach (var item in matches.Cast()) { diff --git a/src/Microsoft.OpenApi/Validations/Rules/OpenApiComponentsRules.cs b/src/Microsoft.OpenApi/Validations/Rules/OpenApiComponentsRules.cs index e3c6e1b4f..7473bce91 100644 --- a/src/Microsoft.OpenApi/Validations/Rules/OpenApiComponentsRules.cs +++ b/src/Microsoft.OpenApi/Validations/Rules/OpenApiComponentsRules.cs @@ -11,12 +11,19 @@ namespace Microsoft.OpenApi /// The validation rules for . /// [OpenApiRule] - public static class OpenApiComponentsRules + public static partial class OpenApiComponentsRules { /// - /// The key regex. + /// The key regex pattern. /// - internal static readonly Regex KeyRegex = new(@"^[a-zA-Z0-9\.\-_]+$", RegexOptions.None, TimeSpan.FromMilliseconds(100)); + internal const string KeyPattern = @"^[a-zA-Z0-9\.\-_]+$"; + +#if NET8_0_OR_GREATER + [GeneratedRegex(KeyPattern, RegexOptions.None, matchTimeoutMilliseconds: 100)] + private static partial Regex KeyRegex(); +#else + private static readonly Regex KeyRegex = new(KeyPattern, RegexOptions.None, TimeSpan.FromMilliseconds(100)); +#endif /// /// All the fixed fields declared above are objects @@ -54,12 +61,18 @@ private static void ValidateKeys(IValidationContext context, IEnumerable foreach (var key in keys) { - if (!KeyRegex.IsMatch(key)) +#if NET8_0_OR_GREATER + var isValidKey = KeyRegex().IsMatch(key); +#else + var isValidKey = KeyRegex.IsMatch(key); +#endif + if (!isValidKey) { context.CreateError(nameof(KeyMustBeRegularExpression), - string.Format(SRResource.Validation_ComponentsKeyMustMatchRegularExpr, key, component, KeyRegex.ToString())); + string.Format(SRResource.Validation_ComponentsKeyMustMatchRegularExpr, key, component, KeyPattern)); } } } + } } diff --git a/test/Microsoft.OpenApi.Tests/Expressions/RuntimeExpressionTests.cs b/test/Microsoft.OpenApi.Tests/Expressions/RuntimeExpressionTests.cs index 08a1debc0..91509184b 100644 --- a/test/Microsoft.OpenApi.Tests/Expressions/RuntimeExpressionTests.cs +++ b/test/Microsoft.OpenApi.Tests/Expressions/RuntimeExpressionTests.cs @@ -145,6 +145,28 @@ public void BuildRuntimeExpressionTwiceCreatesNewEquivalentInstances(string expr Assert.Equal(runtimeExpression1, runtimeExpression2); } + [Fact] + public void CompositeRuntimeExpressionPreservesMultilineCaptures() + { + const string expression = "prefix {$request.header.foo\nbar} {$url} suffix"; + + var composite = Assert.IsType(RuntimeExpression.Build(expression)); + + Assert.Equal(expression, composite.Expression); + Assert.Equal(new[] { "$request.header.foo\nbar", "$url" }, + composite.ContainedExpressions.Select(static item => item.Expression)); + } + + [Fact] + public void CompositeRuntimeExpressionPreservesUnterminatedCapture() + { + const string expression = "prefix {$url"; + + var composite = Assert.IsType(RuntimeExpression.Build(expression)); + + Assert.IsType(Assert.Single(composite.ContainedExpressions)); + } + [Fact] public void CompositeRuntimeExpressionContainsExpression() { diff --git a/test/Microsoft.OpenApi.Tests/Validations/OpenApiComponentsValidationTests.cs b/test/Microsoft.OpenApi.Tests/Validations/OpenApiComponentsValidationTests.cs index 68f89a2a2..8993c17a5 100644 --- a/test/Microsoft.OpenApi.Tests/Validations/OpenApiComponentsValidationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Validations/OpenApiComponentsValidationTests.cs @@ -2,7 +2,11 @@ // Licensed under the MIT license. using System.Collections.Generic; +using System.IO; using System.Linq; +using System.Text; +using System.Text.Json; +using System.Threading.Tasks; using Xunit; namespace Microsoft.OpenApi.Validations.Tests @@ -32,8 +36,65 @@ public void ValidateKeyMustMatchRegularExpressionInComponents() Assert.False(result); Assert.NotNull(errors); var error = Assert.Single(errors); - Assert.Equal(string.Format(SRResource.Validation_ComponentsKeyMustMatchRegularExpr, key, "responses", OpenApiComponentsRules.KeyRegex.ToString()), + Assert.Equal(string.Format(SRResource.Validation_ComponentsKeyMustMatchRegularExpr, key, "responses", OpenApiComponentsRules.KeyPattern), error.Message); } + + [Theory] + [InlineData("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_", true)] + [InlineData("", false)] + [InlineData("a b", false)] + [InlineData("a/b", false)] + [InlineData("é", false)] + [InlineData("12", false)] + [InlineData("a\n", true)] + [InlineData("\n", false)] + [InlineData("a\n\n", false)] + [InlineData("a\r\n", false)] + [InlineData("a\nb", false)] + [InlineData("a\0", false)] + public void ValidateComponentKeyPreservesRegexBehavior(string key, bool isValid) + { + var components = new OpenApiComponents + { + Schemas = new Dictionary + { + { key, new OpenApiSchema() } + } + }; + + var rules = new ValidationRuleSet(); + rules.Add(typeof(OpenApiComponents), OpenApiComponentsRules.KeyMustBeRegularExpression); + var errors = components.Validate(rules); + + Assert.Equal(isValid, !errors.Any()); + } + + [Theory] + [InlineData(true)] + [InlineData(false)] + public async Task LoadAsyncValidatesLongComponentKeys(bool isValid) + { + var key = new string('a', 1_000_000) + (isValid ? string.Empty : "!"); + var json = """ + {"openapi":"3.1.0","info":{"title":"Test","version":"1.0"},"paths":{},"components":{"schemas":{ + """ + JsonSerializer.Serialize(key) + ":{\"type\":\"string\"}}}}"; + using var stream = new MemoryStream(Encoding.UTF8.GetBytes(json)); + + var result = await OpenApiDocument.LoadAsync(stream, cancellationToken: TestContext.Current.CancellationToken); + + Assert.NotNull(result.Document); + Assert.NotNull(result.Diagnostic); + if (isValid) + { + Assert.Empty(result.Diagnostic.Errors); + } + else + { + var error = Assert.Single(result.Diagnostic.Errors); + Assert.Equal(string.Format(SRResource.Validation_ComponentsKeyMustMatchRegularExpr, + key, "schemas", OpenApiComponentsRules.KeyPattern), error.Message); + } + } } } From 1ff69b41d7e4bf4ccead9743b4ddb6a2b30041d9 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Fri, 9 Oct 2026 13:44:42 -0400 Subject: [PATCH 356/388] ci: ports additional validation back from yoko (#3113) --- scripts/check-nuget-package-published.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/check-nuget-package-published.ps1 b/scripts/check-nuget-package-published.ps1 index 84f45419d..0f31961ec 100644 --- a/scripts/check-nuget-package-published.ps1 +++ b/scripts/check-nuget-package-published.ps1 @@ -64,6 +64,11 @@ try { if ($null -eq $response.versions) { throw "No versions returned for NuGet $id by the private feed." } + if ($response.versions -isnot [array] -or @($response.versions | Where-Object { + $_ -isnot [string] -or $_ -notmatch '^\d[\w\.\-]*$' + }).Count -gt 0) { + throw "Invalid version list returned for NuGet $id by the private feed." + } $alreadyPublished = $response.versions -contains $version } catch { @@ -81,4 +86,4 @@ if ($alreadyPublished) { else { Write-Host "NuGet $id $version not found in the private feed; will publish via ESRP." } -Write-Host "##vso[task.setvariable variable=nugetAlreadyPublished]$($alreadyPublished.ToString().ToLowerInvariant())" +Write-Host "##vso[task.setvariable variable=nugetAlreadyPublished]$($alreadyPublished.ToString().ToLowerInvariant())" \ No newline at end of file From be0f4bd6c34ce76387614fe610f5082a4803668d Mon Sep 17 00:00:00 2001 From: Gavin Barron Date: Tue, 13 Oct 2026 12:29:13 -0700 Subject: [PATCH 357/388] refactor(hidi): remove migrated main tool resources Remove migrated Hidi source, tests, fixtures and publishing resources after verified destination handoff. Preserve OpenAPI core/YAML build, signing and publishing infrastructure. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c631d217-9378-4cee-8c7e-761043ff3ae5 --- .azure-pipelines/ci-build.yml | 261 +- .github/workflows/codeql-analysis.yml | 3 +- .vscode/launch.json | 18 - .vscode/settings.json | 1 - .vscode/tasks.json | 14 - CONTRIBUTING.md | 4 +- Dockerfile | 25 - Microsoft.OpenApi.slnx | 2 - README.md | 8 +- build.cmd | 7 - build.sh | 7 - install-tool.ps1 | 7 - src/Microsoft.OpenApi.Hidi/CsdlFilter.xslt | 22 - .../Extensions/CommandExtensions.cs | 19 - .../Extensions/OpenApiExtensibleExtensions.cs | 23 - .../Extensions/StringExtensions.cs | 46 - .../Formatters/PowerShellFormatter.cs | 251 - .../Handlers/PluginCommandHandler.cs | 53 - .../Handlers/ShowCommandHandler.cs | 53 - .../Handlers/TransformCommandHandler.cs | 53 - .../Handlers/ValidateCommandHandler.cs | 53 - src/Microsoft.OpenApi.Hidi/Logger.cs | 28 - .../Microsoft.OpenApi.Hidi.csproj | 67 - src/Microsoft.OpenApi.Hidi/OpenApiService.cs | 818 - .../OpenApiSpecVersionHelper.cs | 46 - .../Options/CommandOptions.cs | 144 - .../Options/FilterOptions.cs | 13 - .../Options/HidiOptions.cs | 65 - src/Microsoft.OpenApi.Hidi/Program.cs | 60 - src/Microsoft.OpenApi.Hidi/StatsVisitor.cs | 86 - .../Utilities/SettingsUtilities.cs | 39 - src/Microsoft.OpenApi.Hidi/readme.md | 148 - .../Properties/AssemblyInfo.cs | 3 - .../Formatters/PowerShellFormatterTests.cs | 192 - .../Microsoft.OpenApi.Hidi.Tests.csproj | 46 - .../OpenApiSpecVersionHelperTests.cs | 31 - .../Services/OpenApiFilterServiceTests.cs | 371 - .../Services/OpenApiServiceTests.cs | 380 - .../StatsVisitorTests.cs | 110 - .../Utilities/SettingsUtilitiesTests.cs | 44 - .../UtilityFiles/InvalidSampleOpenApi.yml | 19 - .../UtilityFiles/OpenApiDocumentMock.cs | 689 - .../UtilityFiles/SampleOpenApi.yml | 22 - .../UtilityFiles/Todo.xml | 21 - .../UtilityFiles/appsettingstest.json | 21 - .../docWithReusableHeadersAndExamples.yaml | 85 - .../UtilityFiles/exampleapimanifest.json | 27 - .../examplepowershellsettings.json | 22 - .../UtilityFiles/postmanCollection_ver1.json | 102 - .../UtilityFiles/postmanCollection_ver2.json | 23698 ---------------- .../UtilityFiles/postmanCollection_ver3.json | 1382 - .../UtilityFiles/postmanCollection_ver4.json | 145 - .../Microsoft.OpenApi.Tests.csproj | 1 - 53 files changed, 8 insertions(+), 29847 deletions(-) delete mode 100644 Dockerfile delete mode 100644 install-tool.ps1 delete mode 100644 src/Microsoft.OpenApi.Hidi/CsdlFilter.xslt delete mode 100644 src/Microsoft.OpenApi.Hidi/Extensions/CommandExtensions.cs delete mode 100644 src/Microsoft.OpenApi.Hidi/Extensions/OpenApiExtensibleExtensions.cs delete mode 100644 src/Microsoft.OpenApi.Hidi/Extensions/StringExtensions.cs delete mode 100644 src/Microsoft.OpenApi.Hidi/Formatters/PowerShellFormatter.cs delete mode 100644 src/Microsoft.OpenApi.Hidi/Handlers/PluginCommandHandler.cs delete mode 100644 src/Microsoft.OpenApi.Hidi/Handlers/ShowCommandHandler.cs delete mode 100644 src/Microsoft.OpenApi.Hidi/Handlers/TransformCommandHandler.cs delete mode 100644 src/Microsoft.OpenApi.Hidi/Handlers/ValidateCommandHandler.cs delete mode 100644 src/Microsoft.OpenApi.Hidi/Logger.cs delete mode 100644 src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj delete mode 100644 src/Microsoft.OpenApi.Hidi/OpenApiService.cs delete mode 100644 src/Microsoft.OpenApi.Hidi/OpenApiSpecVersionHelper.cs delete mode 100644 src/Microsoft.OpenApi.Hidi/Options/CommandOptions.cs delete mode 100644 src/Microsoft.OpenApi.Hidi/Options/FilterOptions.cs delete mode 100644 src/Microsoft.OpenApi.Hidi/Options/HidiOptions.cs delete mode 100644 src/Microsoft.OpenApi.Hidi/Program.cs delete mode 100644 src/Microsoft.OpenApi.Hidi/StatsVisitor.cs delete mode 100644 src/Microsoft.OpenApi.Hidi/Utilities/SettingsUtilities.cs delete mode 100644 src/Microsoft.OpenApi.Hidi/readme.md delete mode 100644 test/Microsoft.OpenApi.Hidi.Tests/Formatters/PowerShellFormatterTests.cs delete mode 100644 test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj delete mode 100644 test/Microsoft.OpenApi.Hidi.Tests/OpenApiSpecVersionHelperTests.cs delete mode 100644 test/Microsoft.OpenApi.Hidi.Tests/Services/OpenApiFilterServiceTests.cs delete mode 100644 test/Microsoft.OpenApi.Hidi.Tests/Services/OpenApiServiceTests.cs delete mode 100644 test/Microsoft.OpenApi.Hidi.Tests/StatsVisitorTests.cs delete mode 100644 test/Microsoft.OpenApi.Hidi.Tests/Utilities/SettingsUtilitiesTests.cs delete mode 100644 test/Microsoft.OpenApi.Hidi.Tests/UtilityFiles/InvalidSampleOpenApi.yml delete mode 100644 test/Microsoft.OpenApi.Hidi.Tests/UtilityFiles/OpenApiDocumentMock.cs delete mode 100644 test/Microsoft.OpenApi.Hidi.Tests/UtilityFiles/SampleOpenApi.yml delete mode 100644 test/Microsoft.OpenApi.Hidi.Tests/UtilityFiles/Todo.xml delete mode 100644 test/Microsoft.OpenApi.Hidi.Tests/UtilityFiles/appsettingstest.json delete mode 100644 test/Microsoft.OpenApi.Hidi.Tests/UtilityFiles/docWithReusableHeadersAndExamples.yaml delete mode 100644 test/Microsoft.OpenApi.Hidi.Tests/UtilityFiles/exampleapimanifest.json delete mode 100644 test/Microsoft.OpenApi.Hidi.Tests/UtilityFiles/examplepowershellsettings.json delete mode 100644 test/Microsoft.OpenApi.Hidi.Tests/UtilityFiles/postmanCollection_ver1.json delete mode 100644 test/Microsoft.OpenApi.Hidi.Tests/UtilityFiles/postmanCollection_ver2.json delete mode 100644 test/Microsoft.OpenApi.Hidi.Tests/UtilityFiles/postmanCollection_ver3.json delete mode 100644 test/Microsoft.OpenApi.Hidi.Tests/UtilityFiles/postmanCollection_ver4.json diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 5e8a40e98..1281acf0a 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -24,9 +24,6 @@ variables: NuGetOrganizationName: 'openapinet' privateFeedBaseUrl: 'https://microsoftgraph.pkgs.visualstudio.com/0985d294-5762-4bc2-a565-161ef349ca3e/_packaging/GraphDeveloperExperiences_Public' ProductBinPath: '$(Build.SourcesDirectory)\src\Microsoft.OpenApi\bin\$(BuildConfiguration)' - REGISTRY: 'msgraphprodregistry.azurecr.io' - IMAGE_NAME: 'public/openapi/hidi' - PREVIEW_BRANCH: 'refs/heads/main' resources: repositories: @@ -53,10 +50,6 @@ extends: displayName: 'Publish Artifact: Nugets' artifactName: Nugets targetPath: '$(Build.ArtifactStagingDirectory)/Nugets' - - output: pipelineArtifact - displayName: 'Publish Artifact: RepoFiles' - artifactName: RepoFiles - targetPath: '$(Build.ArtifactStagingDirectory)/RepoFiles' steps: - task: UseDotNet@2 displayName: 'Use .NET 6' @@ -175,10 +168,6 @@ extends: - pwsh: dotnet pack $(Build.SourcesDirectory)/src/Microsoft.OpenApi.YamlReader/Microsoft.OpenApi.YamlReader.csproj -o $(Build.ArtifactStagingDirectory) --configuration $(BuildConfiguration) --no-build --include-symbols --include-source /p:SymbolPackageFormat=snupkg displayName: 'pack YamlReader' - # Pack hidi - - pwsh: dotnet pack $(Build.SourcesDirectory)/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj -o $(Build.ArtifactStagingDirectory) --configuration $(BuildConfiguration) --no-build --include-symbols --include-source /p:SymbolPackageFormat=snupkg - displayName: 'pack Hidi' - - task: EsrpCodeSigning@6 displayName: 'ESRP CodeSigning Nuget Packages' inputs: @@ -213,16 +202,6 @@ extends: MaxRetryAttempts: '5' PendingAnalysisWaitTimeoutMinutes: '5' - # publish hidi as an .exe - - task: DotNetCoreCLI@2 - displayName: publish Hidi as executable - inputs: - command: 'publish' - arguments: -c Release --runtime win-x64 -p:RestoreConfigFile=$(Build.SourcesDirectory)\nuget.config /p:PublishSingleFile=true /p:PackAsTool=false --self-contained --output $(Build.ArtifactStagingDirectory)/Microsoft.OpenApi.Hidi - projects: 'src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj' - publishWebProjects: False - zipAfterPublish: false - - task: CopyFiles@2 displayName: Prepare staging folder for upload inputs: @@ -239,84 +218,14 @@ extends: Contents: 'check-nuget-package-published.ps1' TargetFolder: '$(Build.ArtifactStagingDirectory)/Nugets/scripts' - # Copy repository files to be used in the deploy stage - - task: CopyFiles@2 - displayName: 'Copy repository files for deploy stage' - inputs: - SourceFolder: '$(Build.SourcesDirectory)' - Contents: | - **/* - !**/bin/** - !**/obj/** - !**/.git/** - TargetFolder: '$(Build.ArtifactStagingDirectory)/RepoFiles' - - stage: deploy - condition: and(or(contains(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['Build.SourceBranch'], variables['PREVIEW_BRANCH'])), succeeded()) + condition: and(contains(variables['Build.SourceBranch'], 'refs/tags/v'), succeeded()) dependsOn: build pool: name: Azure-Pipelines-1ESPT-ExDShared os: linux image: ubuntu-latest jobs: - - deployment: deploy_hidi - condition: and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded()) - templateContext: - type: releaseJob - isProduction: true - inputs: - - input: pipelineArtifact - artifactName: Nugets - targetPath: '$(Pipeline.Workspace)' - dependsOn: [] - environment: nuget-org - strategy: - runOnce: - deploy: - pool: - vmImage: ubuntu-latest - steps: - - task: PowerShell@2 - displayName: 'Check whether NuGet package version already published (idempotent)' - inputs: - targetType: filePath - filePath: '$(Pipeline.Workspace)/scripts/check-nuget-package-published.ps1' - arguments: '-PackageId "Microsoft.OpenApi.Hidi" -PackageDirectory "$(Pipeline.Workspace)" -NuGetServiceIndexUrl "$(privateFeedBaseUrl)/nuget/v3/index.json"' - pwsh: true - env: - FEED_ACCESS_TOKEN: $(System.AccessToken) - - task: CopyFiles@2 - displayName: 'Stage Hidi NuGet packages for ESRP release' - condition: and(succeeded(), ne(variables['nugetAlreadyPublished'], 'true')) - inputs: - SourceFolder: '$(Pipeline.Workspace)' - Contents: | - Microsoft.OpenApi.Hidi.*.nupkg - Microsoft.OpenApi.Hidi.*.snupkg - TargetFolder: '$(Pipeline.Workspace)/nuget-packages/$(NuGetOrganizationName)/hidi' - CleanTargetFolder: true - - task: EsrpRelease@14 - displayName: 'ESRP Release - Hidi NuGet' - condition: and(succeeded(), ne(variables['nugetAlreadyPublished'], 'true')) - inputs: - connectedservicename: 'Federated DevX ESRP Managed Identity Connection' - usemanagedidentity: false - keyvaultname: 'akv-prod-eastus' - authcertname: 'ReferenceLibraryPrivateCert' - signcertname: 'ReferencePackagePublisherCertificate' - clientid: '65035b7f-7357-4f29-bf25-c5ee5c3949f8' - intent: 'packagedistribution' - contenttype: 'NuGet' - organizationname: '$(NuGetOrganizationName)' - contentsource: 'Folder' - folderlocation: '$(Pipeline.Workspace)/nuget-packages/$(NuGetOrganizationName)/hidi' - waitforreleasecompletion: true - owners: 'christiano@microsoft.com,ramsess@microsoft.com,gavinbarron@microsoft.com,jingjingjia@microsoft.com,peombwa@microsoft.com,treicys@microsoft.com' - approvers: 'christiano@microsoft.com,ramsess@microsoft.com,gavinbarron@microsoft.com,jingjingjia@microsoft.com,peombwa@microsoft.com,treicys@microsoft.com' - serviceendpointurl: 'https://api.esrp.microsoft.com/' - mainpublisher: 'ESRPRELPACMAN' - domaintenantid: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2' - - deployment: deploy_lib condition: and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded()) templateContext: @@ -351,7 +260,6 @@ extends: Contents: | Microsoft.OpenApi.*.nupkg Microsoft.OpenApi.*.snupkg - !Microsoft.OpenApi.Hidi.* !Microsoft.OpenApi.YamlReader.* TargetFolder: '$(Pipeline.Workspace)/nuget-packages/$(NuGetOrganizationName)/openapi' CleanTargetFolder: true @@ -468,175 +376,8 @@ extends: tagSource: userSpecifiedTag tag: 'v$(artifactVersion)' releaseNotesSource: inline - assets: '$(Pipeline.Workspace)\**\*.exe' addChangeLog: false - - deployment: deploy_docker_image - environment: docker-images-deploy - templateContext: - type: releaseJob - isProduction: true - inputs: - - input: pipelineArtifact - artifactName: RepoFiles - targetPath: '$(Pipeline.Workspace)' - strategy: - runOnce: - deploy: - pool: - vmImage: 'ubuntu-latest' - steps: - - task: AzureCLI@2 - displayName: 'Login to Azure Container Registry' - inputs: - azureSubscription: 'ACR Images Push Service Connection' - scriptType: bash - scriptLocation: inlineScript - inlineScript: | - az acr login --name $(REGISTRY) - - - pwsh: | - $content = [XML](Get-Content $(Pipeline.Workspace)/Directory.Build.props) - Write-Host "XML loaded, finding version..." - - # Handle PropertyGroup as either a single element or array - $version = $null - if ($content.Project.PropertyGroup -is [array]) { - Write-Host "PropertyGroup is an array, checking each entry..." - foreach ($pg in $content.Project.PropertyGroup) { - if ($pg.Version) { - $version = $pg.Version.ToString().Trim() - Write-Host "Found version in PropertyGroup array: $version" - break - } - } - } else { - # Single PropertyGroup - $version = $content.Project.PropertyGroup.Version - if ($version) { - $version = $version.ToString().Trim() - Write-Host "Found version in PropertyGroup: $version" - } - } - - if (-not $version) { - Write-Host "##vso[task.logissue type=error]Version not found in Directory.Build.props" - exit 1 - } - - Write-Host "Version found: $version" - Write-Host "##vso[task.setvariable variable=version;isoutput=true]$version" - Write-Host "##vso[task.setvariable variable=VERSION]$version" - displayName: 'Get version from csproj' - name: getversion - - - bash: | - # Debug output to verify version variable - echo "Version from previous step: $VERSION" - displayName: 'Verify version variable' - - - bash: | - echo "Build Number: $(Build.BuildNumber)" - # Extract the last 3 characters for the run number - runnumber=$(echo "$(Build.BuildNumber)" | grep -o '[0-9]\+$') - echo "Extracted Run Number: $runnumber" - - # If extraction fails, set a default - if [ -z "$runnumber" ]; then - echo "Extraction failed, using default value" - runnumber=$(date +"%S%N" | cut -c1-3) - echo "Generated fallback run number: $runnumber" - fi - - # Set the variable for later steps - echo "##vso[task.setvariable variable=RUNNUMBER]$runnumber" - echo "##vso[task.setvariable variable=RUNNUMBER;isOutput=true]$runnumber" - displayName: 'Get truncated run number' - name: getrunnumber - condition: eq(variables['Build.SourceBranch'], variables['PREVIEW_BRANCH']) - - - bash: | - date=$(date +'%Y%m%d') - echo "Date value: $date" - echo "##vso[task.setvariable variable=BUILDDATE;isOutput=true]$date" - echo "##vso[task.setvariable variable=BUILDDATE]$date" - displayName: 'Get current date' - name: setdate - condition: eq(variables['Build.SourceBranch'], variables['PREVIEW_BRANCH']) - - # Keep feed credentials out of the Docker build context and image layers. - - pwsh: | - if ([string]::IsNullOrWhiteSpace($env:FEED_ACCESS_TOKEN)) { - throw "No Azure Artifacts access token available for the Docker build." - } - $feedAccessToken = [System.Security.SecurityElement]::Escape($env:FEED_ACCESS_TOKEN) - @" - - - - - - - - - - - - - - - "@ | Set-Content -Path "$(Agent.TempDirectory)/hidi-docker.nuget.config" -Encoding UTF8 - displayName: 'Create Docker NuGet config (central feed)' - env: - FEED_ACCESS_TOKEN: $(System.AccessToken) - - - script: | - docker run --privileged --rm msgraphprodregistry.azurecr.io/tonistiigi/binfmt --install all - displayName: "Enable multi-platform builds" - - - script: | - docker buildx create --use --name mybuilder - displayName: "Set up Docker BuildX" - - - script: | - docker buildx inspect --bootstrap - displayName: "Ensure BuildX is working" - - - bash: | - echo "Building Docker image..." - echo "Using build date: ${BUILDDATE}" - # Using quotes around tags to prevent flag interpretation - docker buildx build \ - --platform linux/amd64,linux/arm64/v8 \ - --secret id=nuget_config,src="$(Agent.TempDirectory)/hidi-docker.nuget.config" \ - --push \ - -t "$(REGISTRY)/$(IMAGE_NAME):nightly" \ - -t "$(REGISTRY)/$(IMAGE_NAME):${VERSION}.${BUILDDATE}${RUNNUMBER}" \ - "$(Pipeline.Workspace)" - - displayName: 'Build and Push Nightly Image' - condition: eq(variables['Build.SourceBranch'], variables['PREVIEW_BRANCH']) - - - bash: | - echo "Building Docker image for release..." - docker buildx build\ - --platform linux/amd64,linux/arm64/v8 \ - --secret id=nuget_config,src="$(Agent.TempDirectory)/hidi-docker.nuget.config" \ - --push \ - -t "$(REGISTRY)/$(IMAGE_NAME):latest" \ - -t "$(REGISTRY)/$(IMAGE_NAME):${VERSION}" \ - "$(Pipeline.Workspace)" - displayName: 'Build and Push Release Image' - condition: contains(variables['Build.SourceBranch'], 'refs/tags/v') - - - pwsh: | - $configPath = "$(Agent.TempDirectory)/hidi-docker.nuget.config" - if (Test-Path $configPath) { - Remove-Item $configPath -Force - } - displayName: 'Remove Docker NuGet config' - condition: always() - # once the nuget has been released, fill this form to get the public documentation updated. # https://dev.azure.com/msft-skilling/Content/_workitems/create/User%20Story?templateId=39fb91e3-64a2-4c8a-83db-b2bdf3603dd3&ownerId=c4a28f90-17ae-4384-b514-7273392b082b # https://learn.microsoft.com/en-us/dotnet/api/microsoft.openapi diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index b2311adf8..576283c02 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -44,8 +44,7 @@ jobs: run: | $projectsArray = @( '.\src\Microsoft.OpenApi\Microsoft.OpenApi.csproj', - '.\src\Microsoft.OpenApi.YamlReader\Microsoft.OpenApi.YamlReader.csproj', - '.\src\Microsoft.OpenApi.Hidi\Microsoft.OpenApi.Hidi.csproj' + '.\src\Microsoft.OpenApi.YamlReader\Microsoft.OpenApi.YamlReader.csproj' ) $projectsArray | ForEach-Object { diff --git a/.vscode/launch.json b/.vscode/launch.json index ad2bdf11d..fb87186c4 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,24 +1,6 @@ { "version": "0.2.0", "configurations": [ - { - // Use IntelliSense to find out which attributes exist for C# debugging - // Use hover for the description of the existing attributes - // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/main/debugger-launchjson.md - "name": "Launch Hidi", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/src/Microsoft.OpenApi.Hidi/bin/Debug/net8.0/Microsoft.OpenApi.Hidi.dll", - "args": ["plugin", - "-m","${workspaceFolder}/test/Microsoft.OpenApi.Hidi.Tests/UtilityFiles/exampleapimanifest.json", - "--of","./output"], - "cwd": "${workspaceFolder}/src/Microsoft.OpenApi.Hidi", - // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console - "console": "internalConsole", - "stopAtEntry": false - }, { // Use IntelliSense to find out which attributes exist for C# debugging // Use hover for the description of the existing attributes diff --git a/.vscode/settings.json b/.vscode/settings.json index 619467ff3..4bfa8971f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,7 +6,6 @@ }, "cSpell.words": [ "csdl", - "Hidi", "Xunit" ] } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index c61ccd31c..4372c2f45 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -29,20 +29,6 @@ "--collect:\"XPlat Code Coverage\"" ], "problemMatcher": "$msCompile" - }, - { - "label": "watch", - "command": "dotnet", - "type": "process", - "group": "build", - "args": [ - "watch", - "run", - "${workspaceFolder}/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj", - "/property:GenerateFullPaths=true", - "/consoleloggerparameters:NoSummary" - ], - "problemMatcher": "$msCompile" } ] } \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7719a3839..98e928d47 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,9 @@ OpenAPI.net is a mono-repo containing source code for the following packages: |----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Microsoft.OpenAPI](./src/Microsoft.OpenAPI/README.md) | [![NuGet Version](https://img.shields.io/nuget/vpre/Microsoft.OpenAPI?label=Latest&logo=nuget)](https://www.nuget.org/packages/Microsoft.OpenAPI/) | | [Microsoft.OpenAPI.YamlReader](./src/Microsoft.OpenApi.YamlReader/README.md) | [![NuGet Version](https://img.shields.io/nuget/vpre/Microsoft.OpenAPI.YamlReader?label=Latest&logo=nuget)](https://www.nuget.org/packages/Microsoft.OpenAPI.YamlReader/) | -| [Microsoft.OpenAPI.Hidi](./src/Microsoft.OpenAPI.Hidi/README.md) | [![NuGet Version](https://img.shields.io/nuget/vpre/Microsoft.OpenAPI.Hidi?label=Latest&logo=nuget)](https://www.nuget.org/packages/Microsoft.OpenAPI.Hidi/) | + +The OpenAPI.NET v3-compatible [Microsoft.OpenApi.Hidi command line tool](https://github.com/microsoft/OpenAPI.NET.OData/blob/main/src/Microsoft.OpenApi.Hidi/readme.md) is maintained separately. +Contribute to Hidi in [OpenAPI.NET.OData's main branch](https://github.com/microsoft/OpenAPI.NET.OData/tree/main). OpenAPI.net is open to contributions. There are a couple of different recommended paths to get contributions into the released version of this library. diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 4e932b975..000000000 --- a/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build-env -WORKDIR /app - -COPY ./src ./hidi/src -COPY ./Directory.Build.props ./hidi/Directory.Build.props -COPY ./README.md ./hidi/README.md -WORKDIR /app/hidi -# CI supplies the private feed config as a secret; local builds use default NuGet sources. -RUN --mount=type=secret,id=nuget_config,target=/app/hidi/NuGet.Config \ - dotnet publish ./src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj -c Release - -FROM mcr.microsoft.com/dotnet/runtime:8.0-jammy-chiseled AS runtime -WORKDIR /app - -COPY --from=build-env /app/hidi/src/Microsoft.OpenApi.Hidi/bin/Release/net8.0 ./ - -VOLUME /app/output -VOLUME /app/openapi.yml -VOLUME /app/api.csdl -VOLUME /app/collection.json -ENV HIDI_CONTAINER=true DOTNET_TieredPGO=1 DOTNET_TC_QuickJitForLoops=1 -ENTRYPOINT ["dotnet", "Microsoft.OpenApi.Hidi.dll"] -LABEL description="# Welcome to Hidi \ -To start transforming OpenAPI documents checkout [the getting started documentation](https://github.com/microsoft/OpenAPI.NET/tree/main/src/Microsoft.OpenApi.Hidi) \ -[Source dockerfile](https://github.com/microsoft/OpenAPI.NET/blob/main/Dockerfile)" diff --git a/Microsoft.OpenApi.slnx b/Microsoft.OpenApi.slnx index 8356bb428..007071a9e 100644 --- a/Microsoft.OpenApi.slnx +++ b/Microsoft.OpenApi.slnx @@ -8,12 +8,10 @@ - - diff --git a/README.md b/README.md index 8622d64d8..a4cf4171e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ |--|--| |Models and Writers|[![nuget](https://img.shields.io/nuget/v/Microsoft.OpenApi.svg)](https://www.nuget.org/packages/Microsoft.OpenApi/) | |YamlReader | [![nuget](https://img.shields.io/nuget/v/Microsoft.OpenApi.YamlReader.svg)](https://www.nuget.org/packages/Microsoft.OpenApi.YamlReader/) | -|Hidi|[![nuget](https://img.shields.io/nuget/v/Microsoft.OpenApi.Hidi.svg)](https://www.nuget.org/packages/Microsoft.OpenApi.Hidi/) The **OpenAPI.NET** SDK contains a useful object model for OpenAPI documents in .NET along with common serializers to extract raw OpenAPI JSON and YAML documents from the model. @@ -86,10 +85,9 @@ var outputString = await openApiDocument.SerializeAsJsonAsync(OpenApiSpecVersion ``` # Validating/Testing OpenAPI descriptions -In order to test the validity of an OpenApi document, we avail the following tools: -- [Microsoft.OpenApi.Hidi](https://www.nuget.org/packages/Microsoft.OpenApi.Hidi) - - A commandline tool for validating and transforming OpenAPI descriptions. [Installation guidelines and documentation](https://github.com/microsoft/OpenAPI.NET/blob/main/src/Microsoft.OpenApi.Hidi/readme.md) +[Microsoft.OpenApi.Hidi](https://www.nuget.org/packages/Microsoft.OpenApi.Hidi) is a command line tool for validating and transforming OpenAPI descriptions. +The OpenAPI.NET v3-compatible tool is maintained in [OpenAPI.NET.OData's main branch](https://github.com/microsoft/OpenAPI.NET.OData/tree/main/src/Microsoft.OpenApi.Hidi). +See its [installation guidelines and documentation](https://github.com/microsoft/OpenAPI.NET.OData/blob/main/src/Microsoft.OpenApi.Hidi/readme.md). # Contributing diff --git a/build.cmd b/build.cmd index 07daf7b6c..4fa04e44a 100644 --- a/build.cmd +++ b/build.cmd @@ -13,11 +13,4 @@ dotnet msbuild %PROJ% /t:restore /p:Configuration=Release dotnet msbuild %PROJ% /t:build /p:Configuration=Release dotnet msbuild %PROJ% /t:pack /p:Configuration=Release;PackageOutputPath=%~dp0artifacts -Echo Building Microsoft.OpenApi.Hidi - -SET PROJ=%~dp0src\Microsoft.OpenApi.Hidi\Microsoft.OpenApi.Hidi.csproj -dotnet msbuild %PROJ% /t:restore /p:Configuration=Release -dotnet msbuild %PROJ% /t:build /p:Configuration=Release -dotnet msbuild %PROJ% /t:pack /p:Configuration=Release;PackageOutputPath=%~dp0artifacts - :end diff --git a/build.sh b/build.sh index 0de30b6df..1e6ae6313 100755 --- a/build.sh +++ b/build.sh @@ -12,11 +12,4 @@ echo "Building Microsoft.OpenApi.YamlReader" PROJ="$(dirname "$0")/src/Microsoft.OpenApi.YamlReader/Microsoft.OpenApi.YamlReader.csproj" dotnet msbuild "$PROJ" /t:restore /p:Configuration=Release dotnet msbuild "$PROJ" /t:build /p:Configuration=Release -dotnet msbuild "$PROJ" /t:pack "/p:Configuration=Release;PackageOutputPath=$(dirname "$0")/artifacts" - -echo "Building Microsoft.OpenApi.Hidi" - -PROJ="$(dirname "$0")/src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj" -dotnet msbuild "$PROJ" /t:restore /p:Configuration=Release -dotnet msbuild "$PROJ" /t:build /p:Configuration=Release dotnet msbuild "$PROJ" /t:pack "/p:Configuration=Release;PackageOutputPath=$(dirname "$0")/artifacts" \ No newline at end of file diff --git a/install-tool.ps1 b/install-tool.ps1 deleted file mode 100644 index 0b4615c67..000000000 --- a/install-tool.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$latest = Get-ChildItem .\artifacts\Microsoft.OpenApi.Hidi* | select-object -Last 1 -$version = $latest.Name.Split(".")[3..5] | join-string -Separator "." - -if (Test-Path -Path ./artifacts/hidi.exe) { - dotnet tool uninstall --tool-path artifacts Microsoft.OpenApi.Hidi -} -dotnet tool install --tool-path artifacts --add-source .\artifacts\ --version $version Microsoft.OpenApi.Hidi \ No newline at end of file diff --git a/src/Microsoft.OpenApi.Hidi/CsdlFilter.xslt b/src/Microsoft.OpenApi.Hidi/CsdlFilter.xslt deleted file mode 100644 index ee3bf0d40..000000000 --- a/src/Microsoft.OpenApi.Hidi/CsdlFilter.xslt +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/src/Microsoft.OpenApi.Hidi/Extensions/CommandExtensions.cs b/src/Microsoft.OpenApi.Hidi/Extensions/CommandExtensions.cs deleted file mode 100644 index 1a2dc477d..000000000 --- a/src/Microsoft.OpenApi.Hidi/Extensions/CommandExtensions.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System.Collections.Generic; -using System.CommandLine; - -namespace Microsoft.OpenApi.Hidi.Extensions -{ - internal static class CommandExtensions - { - public static void AddOptions(this Command command, IReadOnlyList public class OpenApiWriterSettings { + private const int DefaultMaxInlineReferenceCount = 10_000; + internal LoopDetector LoopDetector { get; } = new(); + /// /// Indicates if local references should be rendered as an inline object /// @@ -16,6 +19,12 @@ public class OpenApiWriterSettings /// public bool InlineExternalReferences { get; set; } + /// + /// Gets or sets the maximum number of references that can be expanded inline by a writer. + /// + /// The default is 10,000. + public int MaxInlineReferenceCount { get; set; } = DefaultMaxInlineReferenceCount; + internal bool ShouldInlineReference(BaseOpenApiReference reference) { return (reference.IsLocal && InlineLocalReferences) diff --git a/test/Microsoft.OpenApi.Tests/Writers/OpenApiWriterInlineReferenceTests.cs b/test/Microsoft.OpenApi.Tests/Writers/OpenApiWriterInlineReferenceTests.cs new file mode 100644 index 000000000..0c49a66d1 --- /dev/null +++ b/test/Microsoft.OpenApi.Tests/Writers/OpenApiWriterInlineReferenceTests.cs @@ -0,0 +1,337 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Text; +using Xunit; + +namespace Microsoft.OpenApi.Tests.Writers +{ + public class OpenApiWriterInlineReferenceTests + { + private const int InlineReferenceLimit = 128; + private const int OutputCharacterLimit = 100_000; + + [Theory] + [InlineData(OpenApiSpecVersion.OpenApi2_0, false)] + [InlineData(OpenApiSpecVersion.OpenApi2_0, true)] + [InlineData(OpenApiSpecVersion.OpenApi3_0, false)] + [InlineData(OpenApiSpecVersion.OpenApi3_0, true)] + [InlineData(OpenApiSpecVersion.OpenApi3_1, false)] + [InlineData(OpenApiSpecVersion.OpenApi3_1, true)] + [InlineData(OpenApiSpecVersion.OpenApi3_2, false)] + [InlineData(OpenApiSpecVersion.OpenApi3_2, true)] + public void SerializeWithRepeatedInlineReferencesStopsBeforeWriterLimit( + OpenApiSpecVersion specVersion, + bool useYaml) + { + var readResult = OpenApiDocument.Parse(CreateDocumentWithRepeatedReferences(18), "json"); + Assert.Empty(readResult.Diagnostic.Errors); + Assert.NotNull(readResult.Document); + + using var textWriter = new CharacterLimitedTextWriter(OutputCharacterLimit); + IOpenApiWriter writer = useYaml + ? new OpenApiYamlWriter(textWriter, CreateWriterSettings(InlineReferenceLimit)) + : new OpenApiJsonWriter(textWriter, CreateWriterSettings(InlineReferenceLimit)); + + var exception = Assert.Throws( + () => Serialize(readResult.Document, writer, specVersion)); + Assert.Contains(InlineReferenceLimit.ToString(CultureInfo.InvariantCulture), exception.Message); + } + + [Theory] + [InlineData(OpenApiSpecVersion.OpenApi2_0)] + [InlineData(OpenApiSpecVersion.OpenApi3_0)] + [InlineData(OpenApiSpecVersion.OpenApi3_1)] + [InlineData(OpenApiSpecVersion.OpenApi3_2)] + public void SerializeWithInlineReferencesBelowLimitWorks(OpenApiSpecVersion specVersion) + { + var readResult = OpenApiDocument.Parse(CreateDocumentWithRepeatedReferences(4), "json"); + Assert.Empty(readResult.Diagnostic.Errors); + Assert.NotNull(readResult.Document); + + using var textWriter = new StringWriter(CultureInfo.InvariantCulture); + var writer = new OpenApiJsonWriter(textWriter, CreateWriterSettings(32)); + + Serialize(readResult.Document, writer, specVersion); + + Assert.NotEmpty(textWriter.ToString()); + } + + [Fact] + public void ReusingSettingsWithNewWriterStartsANewInlineReferenceCount() + { + var largeReadResult = OpenApiDocument.Parse(CreateDocumentWithRepeatedReferences(6), "json"); + Assert.Empty(largeReadResult.Diagnostic.Errors); + Assert.NotNull(largeReadResult.Document); + var smallReadResult = OpenApiDocument.Parse(CreateDocumentWithRepeatedReferences(4), "json"); + Assert.Empty(smallReadResult.Diagnostic.Errors); + Assert.NotNull(smallReadResult.Document); + var settings = CreateWriterSettings(32); + + using var firstOutput = new StringWriter(CultureInfo.InvariantCulture); + Assert.Throws( + () => Serialize( + largeReadResult.Document, + new OpenApiJsonWriter(firstOutput, settings), + OpenApiSpecVersion.OpenApi3_0)); + + using var secondOutput = new StringWriter(CultureInfo.InvariantCulture); + Serialize( + smallReadResult.Document, + new OpenApiJsonWriter(secondOutput, settings), + OpenApiSpecVersion.OpenApi3_0); + + Assert.DoesNotContain("$ref", secondOutput.ToString()); + } + + [Theory] + [InlineData(OpenApiSpecVersion.OpenApi3_0)] + [InlineData(OpenApiSpecVersion.OpenApi3_1)] + public void SerializeMediaTypeReferenceUsesInlineReferenceCount(OpenApiSpecVersion specVersion) + { + var document = new OpenApiDocument + { + Components = new OpenApiComponents + { + MediaTypes = new Dictionary + { + ["shared"] = new OpenApiMediaType + { + Schema = new OpenApiSchema { Type = JsonSchemaType.String } + } + } + } + }; + document.Workspace.RegisterComponents(document); + var reference = new OpenApiMediaTypeReference("shared", document); + using var output = new StringWriter(CultureInfo.InvariantCulture); + var writer = new OpenApiJsonWriter(output, CreateWriterSettings(0)); + + Assert.Throws(() => Serialize(reference, writer, specVersion)); + } + + [Fact] + public void ConvertRequestBodyReferenceToV2ParameterUsesInlineReferenceCount() + { + var document = CreateDocumentWithRequestBodyComponent(); + var reference = new OpenApiRequestBodyReference("shared", document); + using var output = new StringWriter(CultureInfo.InvariantCulture); + var writer = new OpenApiJsonWriter(output, CreateWriterSettings(0)); + + Assert.Throws(() => reference.ConvertToBodyParameter(writer)); + Assert.Throws(() => reference.ConvertToFormDataParameters(writer)); + } + + [Fact] + public void SerializeV2HeaderSchemaReferenceUsesInlineReferenceCount() + { + var document = CreateDocumentWithSchemaComponent(); + var header = new OpenApiHeader + { + Schema = new OpenApiSchemaReference("shared", document) + }; + using var output = new StringWriter(CultureInfo.InvariantCulture); + var writer = new OpenApiJsonWriter(output, CreateWriterSettings(0)); + + Assert.Throws(() => header.SerializeAsV2(writer)); + } + + [Fact] + public void SerializeV2ParameterSchemaReferenceUsesInlineReferenceCount() + { + var document = CreateDocumentWithSchemaComponent(); + var parameter = new OpenApiParameter + { + Name = "value", + In = ParameterLocation.Query, + Schema = new OpenApiSchemaReference("shared", document) + }; + using var output = new StringWriter(CultureInfo.InvariantCulture); + var writer = new OpenApiJsonWriter(output, CreateWriterSettings(0)); + + Assert.Throws(() => parameter.SerializeAsV2(writer)); + } + + private static OpenApiDocument CreateDocumentWithRequestBodyComponent() + { + var document = new OpenApiDocument + { + Components = new OpenApiComponents + { + RequestBodies = new Dictionary + { + ["shared"] = new OpenApiRequestBody + { + Content = new Dictionary + { + ["application/x-www-form-urlencoded"] = new OpenApiMediaType + { + Schema = new OpenApiSchema + { + Type = JsonSchemaType.Object, + Properties = new Dictionary + { + ["value"] = new OpenApiSchema { Type = JsonSchemaType.String } + } + } + } + } + } + } + } + }; + document.Workspace.RegisterComponents(document); + return document; + } + + private static OpenApiDocument CreateDocumentWithSchemaComponent() + { + var document = new OpenApiDocument + { + Components = new OpenApiComponents + { + Schemas = new Dictionary + { + ["shared"] = new OpenApiSchema { Type = JsonSchemaType.String } + } + } + }; + document.Workspace.RegisterComponents(document); + return document; + } + + private static string CreateDocumentWithRepeatedReferences(int levels) + { + var schemas = new StringBuilder(); + for (var i = 0; i < levels; i++) + { + if (i > 0) + { + schemas.Append(','); + } + + schemas + .Append("\"s") + .Append(i.ToString(CultureInfo.InvariantCulture)) + .Append("\":{\"allOf\":[{\"$ref\":\"#/components/schemas/s") + .Append((i + 1).ToString(CultureInfo.InvariantCulture)) + .Append("\"},{\"$ref\":\"#/components/schemas/s") + .Append((i + 1).ToString(CultureInfo.InvariantCulture)) + .Append("\"}]}"); + } + + schemas + .Append(",\"s") + .Append(levels.ToString(CultureInfo.InvariantCulture)) + .Append("\":{\"type\":\"string\"}"); + + return $$""" + { + "openapi": "3.0.0", + "info": { + "title": "Repeated references", + "version": "1.0.0" + }, + "paths": { + "/test": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/s0" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + {{schemas}} + } + } + } + """; + } + + private static void Serialize( + IOpenApiSerializable serializable, + IOpenApiWriter writer, + OpenApiSpecVersion specVersion) + { + switch (specVersion) + { + case OpenApiSpecVersion.OpenApi2_0: + serializable.SerializeAsV2(writer); + break; + case OpenApiSpecVersion.OpenApi3_0: + serializable.SerializeAsV3(writer); + break; + case OpenApiSpecVersion.OpenApi3_1: + serializable.SerializeAsV31(writer); + break; + case OpenApiSpecVersion.OpenApi3_2: + serializable.SerializeAsV32(writer); + break; + default: + throw new ArgumentOutOfRangeException(nameof(specVersion), specVersion, null); + } + } + + private static OpenApiWriterSettings CreateWriterSettings(int maxInlineReferenceCount) + { + return new OpenApiWriterSettings + { + InlineLocalReferences = true, + MaxInlineReferenceCount = maxInlineReferenceCount + }; + } + + private sealed class CharacterLimitedTextWriter(int characterLimit) : TextWriter + { + private int _characterCount; + + public override Encoding Encoding => Encoding.UTF8; + + public override void Write(char value) + { + CountCharacters(1); + } + + public override void Write(string value) + { + CountCharacters(value?.Length ?? 0); + } + + public override void Write(char[] buffer, int index, int count) + { + CountCharacters(count); + } + + public override void Write(ReadOnlySpan buffer) + { + CountCharacters(buffer.Length); + } + + private void CountCharacters(int count) + { + _characterCount += count; + if (_characterCount > characterLimit) + { + throw new CharacterLimitExceededException(); + } + } + } + + private sealed class CharacterLimitExceededException : Exception; + } +} From 9bc20057e9e626c0cb07f8bc39eaa95a0e98fdde Mon Sep 17 00:00:00 2001 From: "release-please-token-provider[bot]" <225477224+release-please-token-provider[bot]@users.noreply.github.com> Date: Mon, 19 Oct 2026 17:03:20 +0000 Subject: [PATCH 366/388] automatic promotion of shipped APIs for main (#3127) chore: promote shipped APIs Co-authored-by: release-please-token-provider[bot] <225477224+release-please-token-provider[bot]@users.noreply.github.com> --- src/Microsoft.OpenApi/PublicAPI.Shipped.txt | 3 +++ src/Microsoft.OpenApi/PublicAPI.Unshipped.txt | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.OpenApi/PublicAPI.Shipped.txt b/src/Microsoft.OpenApi/PublicAPI.Shipped.txt index ba435ff4e..b36bb7d11 100644 --- a/src/Microsoft.OpenApi/PublicAPI.Shipped.txt +++ b/src/Microsoft.OpenApi/PublicAPI.Shipped.txt @@ -2287,3 +2287,6 @@ Microsoft.OpenApi.OpenApiWorkspace.GetDynamicAnchorCandidates(Microsoft.OpenApi. static Microsoft.OpenApi.OpenApiWorkspace.ResolveDynamicAnchorInContext(Microsoft.OpenApi.IOpenApiSchema? contextSchema, string! anchorName) -> Microsoft.OpenApi.IOpenApiSchema? const Microsoft.OpenApi.OpenApiConstants.JsonSchemaExamplesExtension = "x-jsonschema-examples" -> string! const Microsoft.OpenApi.OpenApiConstants.OaiLicenseIdentifier = "x-oai-license-identifier" -> string! +Microsoft.OpenApi.OpenApiDocument.GetOperationById(string! operationId) -> Microsoft.OpenApi.OpenApiOperation? +Microsoft.OpenApi.OpenApiWriterSettings.MaxInlineReferenceCount.get -> int +Microsoft.OpenApi.OpenApiWriterSettings.MaxInlineReferenceCount.set -> void diff --git a/src/Microsoft.OpenApi/PublicAPI.Unshipped.txt b/src/Microsoft.OpenApi/PublicAPI.Unshipped.txt index cb0df9c08..7dc5c5811 100644 --- a/src/Microsoft.OpenApi/PublicAPI.Unshipped.txt +++ b/src/Microsoft.OpenApi/PublicAPI.Unshipped.txt @@ -1,4 +1 @@ #nullable enable -Microsoft.OpenApi.OpenApiDocument.GetOperationById(string! operationId) -> Microsoft.OpenApi.OpenApiOperation? -Microsoft.OpenApi.OpenApiWriterSettings.MaxInlineReferenceCount.get -> int -Microsoft.OpenApi.OpenApiWriterSettings.MaxInlineReferenceCount.set -> void From 2fea8ae4ee7ce6b9c313fa0822f5c617da18c351 Mon Sep 17 00:00:00 2001 From: "release-please-token-provider[bot]" <225477224+release-please-token-provider[bot]@users.noreply.github.com> Date: Mon, 19 Oct 2026 13:04:49 -0400 Subject: [PATCH 367/388] chore(main): release 3.11.0 (#3071) Co-authored-by: release-please-token-provider[bot] <225477224+release-please-token-provider[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 15 +++++++++++++++ Directory.Build.props | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f7929cb4c..940f2ca3e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.10.2" + ".": "3.11.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 0077ae140..a3114853b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [3.11.0](https://github.com/microsoft/OpenAPI.NET/compare/v3.10.2...v3.11.0) (2026-10-19) + + +### Features + +* **document:** add GetOperationById to search operations across path… ([#3025](https://github.com/microsoft/OpenAPI.NET/issues/3025)) ([1dae1ff](https://github.com/microsoft/OpenAPI.NET/commit/1dae1fff4fcd8170f38672593a30b023a66c052c)) + + +### Bug Fixes + +* components-key validation timeouts under load ([#3108](https://github.com/microsoft/OpenAPI.NET/issues/3108)) ([01d4729](https://github.com/microsoft/OpenAPI.NET/commit/01d472995b3c466feb5bbf61e303bcd7752da16a)) +* **openapi:** omit null response descriptions ([afd4967](https://github.com/microsoft/OpenAPI.NET/commit/afd4967a9e6db390175e2df9e6f34ff77168d19d)) +* **serialization:** potential infinite loop when inlining references ([c6ef130](https://github.com/microsoft/OpenAPI.NET/commit/c6ef130bd7f3bf55c59735b25392a58a599701fc)) +* **serialization:** references inlining ([#3124](https://github.com/microsoft/OpenAPI.NET/issues/3124)) ([c6ef130](https://github.com/microsoft/OpenAPI.NET/commit/c6ef130bd7f3bf55c59735b25392a58a599701fc)) + ## [3.10.2](https://github.com/microsoft/OpenAPI.NET/compare/v3.10.1...v3.10.2) (2026-08-20) diff --git a/Directory.Build.props b/Directory.Build.props index 1971fa2c6..b460cb537 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -14,7 +14,7 @@ https://github.com/Microsoft/OpenAPI.NET © Microsoft Corporation. All rights reserved. OpenAPI .NET - 3.10.2 + 3.11.0 From 2c65eb23b327d2f0864616e6ae756fbacff296c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Oct 2026 17:49:56 -0400 Subject: [PATCH 368/388] chore(deps): bump actions/create-github-app-token from 3.2.0 to 3.3.0 (#3129) Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/actions/create-github-app-token/releases) - [Changelog](https://github.com/actions/create-github-app-token/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/create-github-app-token/compare/bcd2ba49218906704ab6c1aa796996da409d3eb1...64ab729a6294000f5aa4a4bc0b73d1f32bc45510) --- updated-dependencies: - dependency-name: actions/create-github-app-token dependency-version: 3.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/promote-shipped-apis.yml | 2 +- .github/workflows/release-please-gha.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/promote-shipped-apis.yml b/.github/workflows/promote-shipped-apis.yml index 825b8944f..a93ac994b 100644 --- a/.github/workflows/promote-shipped-apis.yml +++ b/.github/workflows/promote-shipped-apis.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Generate GitHub App token id: app-token - uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 + uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0 with: client-id: ${{ vars.RELEASE_PLEASE_TOKEN_PROVIDER_APP_ID }} private-key: ${{ secrets.RELEASE_PLEASE_TOKEN_PROVIDER_PEM }} diff --git a/.github/workflows/release-please-gha.yml b/.github/workflows/release-please-gha.yml index 74a6233fb..069cbcecb 100644 --- a/.github/workflows/release-please-gha.yml +++ b/.github/workflows/release-please-gha.yml @@ -62,7 +62,7 @@ jobs: - name: Generate GitHub App token id: app-token - uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 + uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0 with: client-id: ${{ vars.RELEASE_PLEASE_TOKEN_PROVIDER_APP_ID }} private-key: ${{ secrets.RELEASE_PLEASE_TOKEN_PROVIDER_PEM }} From 30d1296ca4d0503c788214ea6a3793b6f0cb1951 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Oct 2026 17:50:36 -0400 Subject: [PATCH 369/388] Bump Microsoft.VisualStudio.Threading.Analyzers from 18.7.23 to 18.12.1 (#3130) --- updated-dependencies: - dependency-name: Microsoft.VisualStudio.Threading.Analyzers dependency-version: 18.12.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Microsoft.OpenApi.YamlReader.csproj | 2 +- src/Microsoft.OpenApi/Microsoft.OpenApi.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.OpenApi.YamlReader/Microsoft.OpenApi.YamlReader.csproj b/src/Microsoft.OpenApi.YamlReader/Microsoft.OpenApi.YamlReader.csproj index 5a04ce302..3319526ee 100644 --- a/src/Microsoft.OpenApi.YamlReader/Microsoft.OpenApi.YamlReader.csproj +++ b/src/Microsoft.OpenApi.YamlReader/Microsoft.OpenApi.YamlReader.csproj @@ -30,7 +30,7 @@ - + diff --git a/src/Microsoft.OpenApi/Microsoft.OpenApi.csproj b/src/Microsoft.OpenApi/Microsoft.OpenApi.csproj index 8e1ebb555..5f65bd08f 100644 --- a/src/Microsoft.OpenApi/Microsoft.OpenApi.csproj +++ b/src/Microsoft.OpenApi/Microsoft.OpenApi.csproj @@ -51,7 +51,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all From 00c0a2639a3e41e495e8a3c8bec811c80d81dc08 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Oct 2026 17:53:51 -0400 Subject: [PATCH 370/388] Bump Verify.XunitV3 from 33.3.2 to 33.3.3 (#3131) --- updated-dependencies: - dependency-name: Verify.XunitV3 dependency-version: 33.3.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 5ba2701b5..66f852384 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -14,7 +14,7 @@ - + From d8684318ce83c4a573f83bcd9560c98caac1bfe7 Mon Sep 17 00:00:00 2001 From: Hardik K Date: Tue, 20 Oct 2026 23:01:21 +0530 Subject: [PATCH 371/388] fix: Support custom tag ordering and null assignment in OpenApiOperation.Tags (#3128) * fix: Support custom tag ordering and null assignment in OpenApiOperation.Tags Fixes #3115 * fix: use explicit comparer identity check --- .../Models/OpenApiOperation.cs | 18 +++- .../Models/OpenApiOperationTests.cs | 90 ++++++++++++++++++- 2 files changed, 103 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.OpenApi/Models/OpenApiOperation.cs b/src/Microsoft.OpenApi/Models/OpenApiOperation.cs index ee1afcc0a..20ce8bf53 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiOperation.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiOperation.cs @@ -1,8 +1,11 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. using System; using System.Collections.Generic; +#if NET +using System.Collections.Immutable; +#endif using System.Linq; namespace Microsoft.OpenApi @@ -27,11 +30,18 @@ public ISet? Tags { if (value is null) { + _tags = null; return; } - _tags = value is HashSet tags && tags.Comparer is OpenApiTagComparer ? - tags : - new HashSet(value, OpenApiTagComparer.Instance); + _tags = value switch + { + HashSet tags when !ReferenceEquals(tags.Comparer, EqualityComparer.Default) => value, + SortedSet => value, +#if NET + ImmutableSortedSet => value, +#endif + _ => new HashSet(value, OpenApiTagComparer.Instance), + }; } } diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs index d281f4437..46e25c183 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs @@ -1,7 +1,11 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. +using System; using System.Collections.Generic; +using System.Collections.Immutable; +using System.Diagnostics.CodeAnalysis; +using System.Linq; using System.Text.Json.Nodes; using System.Threading.Tasks; using Xunit; @@ -851,5 +855,89 @@ public void OpenApiOperationCopyConstructorWithAnnotationsSucceeds() Assert.NotEqual(baseOperation.Metadata["key1"], actualOperation.Metadata["key1"]); } + + [Fact] + public void TagsCanBeReInitializedToNull() + { + var operation = new OpenApiOperation(); + Assert.Null(operation.Tags); + operation.Tags = new HashSet(); + Assert.NotNull(operation.Tags); + operation.Tags = null; + Assert.Null(operation.Tags); + } + + [Fact] + public void TagsSupportsCustomComparer() + { + var operation = new OpenApiOperation + { + Tags = new HashSet(new CaseInsensitiveOpenApiTagReferenceEqualityComparer()), + }; + + Assert.True(operation.Tags.Add(new OpenApiTagReference("Tag1"))); + Assert.False(operation.Tags.Add(new OpenApiTagReference("tag1"))); + Assert.True(operation.Tags.Add(new OpenApiTagReference("tag2"))); + Assert.False(operation.Tags.Add(new OpenApiTagReference("TAG1"))); + Assert.Equal(2, operation.Tags.Count); + } + + private sealed class CaseInsensitiveOpenApiTagReferenceEqualityComparer : IEqualityComparer + { + public bool Equals(OpenApiTagReference x, OpenApiTagReference y) + { + return string.Equals(x?.Name, y?.Name, StringComparison.OrdinalIgnoreCase); + } + + public int GetHashCode([DisallowNull] OpenApiTagReference obj) + { + return obj.Name?.GetHashCode(StringComparison.OrdinalIgnoreCase) ?? 0; + } + } + + [Fact] + public void TagsSupportsSortedSets() + { + var operation = new OpenApiOperation + { + Tags = new SortedSet(new DescendingOpenApiTagReferenceComparer()) + { + new("tagB"), + new("tagA"), + new("tagC"), + } + }; + + var names = operation.Tags.Select(t => t.Name); + Assert.Equal(["tagC", "tagB", "tagA"], names); + Assert.IsType>(operation.Tags); + } + + private sealed class DescendingOpenApiTagReferenceComparer : IComparer + { + public int Compare(OpenApiTagReference x, OpenApiTagReference y) + { + return string.Compare(y?.Name, x?.Name, StringComparison.Ordinal); + } + } + + [Fact] + public void TagsSupportsImmutableSortedSets() + { + var operation = new OpenApiOperation + { + Tags = ImmutableSortedSet.Create( + new DescendingOpenApiTagReferenceComparer(), + [ + new OpenApiTagReference("tagB"), + new OpenApiTagReference("tagA"), + new OpenApiTagReference("tagC"), + ]), + }; + + var names = operation.Tags.Select(t => t.Name); + Assert.Equal(["tagC", "tagB", "tagA"], names); + Assert.IsType>(operation.Tags); + } } } From 51aa19aef6f4be8854fc014cfd82331fab6051d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2026 05:16:36 -0400 Subject: [PATCH 372/388] Bump System.Text.Json from 10.0.12 to 10.0.13 (#3140) --- updated-dependencies: - dependency-name: System.Text.Json dependency-version: 10.0.13 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- performance/resultsComparer/resultsComparer.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/performance/resultsComparer/resultsComparer.csproj b/performance/resultsComparer/resultsComparer.csproj index 9767a28ba..30e6a07d2 100644 --- a/performance/resultsComparer/resultsComparer.csproj +++ b/performance/resultsComparer/resultsComparer.csproj @@ -13,7 +13,7 @@ - + From 016d588b93914d49e69bfe39c5137bee1d16b166 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2026 05:16:49 -0400 Subject: [PATCH 373/388] Bump Microsoft.SourceLink.GitHub from 10.0.401 to 10.0.402 (#3138) --- updated-dependencies: - dependency-name: Microsoft.SourceLink.GitHub dependency-version: 10.0.402 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index b460cb537..063a25831 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -21,6 +21,6 @@ true - + \ No newline at end of file From ebff4a166c8a4bb48e7bad009616d087b736e55f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2026 05:17:30 -0400 Subject: [PATCH 374/388] Bump the microsoftextensions group with 5 updates (#3136) Bumps Microsoft.Extensions.DependencyInjection from 10.0.12 to 10.0.13 Bumps Microsoft.Extensions.Logging from 10.0.12 to 10.0.13 Bumps Microsoft.Extensions.Logging.Console from 10.0.12 to 10.0.13 Bumps Microsoft.Extensions.Logging.Debug from 10.0.12 to 10.0.13 Bumps System.Text.Json from 10.0.12 to 10.0.13 --- updated-dependencies: - dependency-name: Microsoft.Extensions.DependencyInjection dependency-version: 10.0.13 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging dependency-version: 10.0.13 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging.Console dependency-version: 10.0.13 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: System.Text.Json dependency-version: 10.0.13 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging.Debug dependency-version: 10.0.13 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- performance/resultsComparer/resultsComparer.csproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/performance/resultsComparer/resultsComparer.csproj b/performance/resultsComparer/resultsComparer.csproj index 30e6a07d2..453944872 100644 --- a/performance/resultsComparer/resultsComparer.csproj +++ b/performance/resultsComparer/resultsComparer.csproj @@ -8,10 +8,10 @@ - - - - + + + + From 994b3770fa50d46ea60ef53b932f4f4a929e6e64 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2026 05:18:53 -0400 Subject: [PATCH 375/388] Bump the testing group with 1 update (#3137) Bumps Microsoft.NET.Test.Sdk from 18.10.1 to 18.11.0 --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.11.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: testing - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.11.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: testing ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Microsoft.OpenApi.Readers.Tests.csproj | 2 +- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj index ec8146228..0c6d93ee0 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj +++ b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj @@ -17,7 +17,7 @@ - + diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 66f852384..b77085ac2 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -10,7 +10,7 @@ - + From 798b16120f81bb6d2ebaed3c1f541d9afc1f59d4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2026 05:31:48 -0400 Subject: [PATCH 376/388] chore(deps): bump dotnet-sdk from 10.0.401 to 10.0.402 (#3135) Bumps [dotnet-sdk](https://github.com/dotnet/sdk) from 10.0.401 to 10.0.402. - [Release notes](https://github.com/dotnet/sdk/releases) - [Commits](https://github.com/dotnet/sdk/compare/v10.0.401...v10.0.402) --- updated-dependencies: - dependency-name: dotnet-sdk dependency-version: 10.0.402 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 7494875e1..c92eedfeb 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "10.0.401" + "version": "10.0.402" }, "test": { "runner": "Microsoft.Testing.Platform" From 4f53ad590a605237817440646e3cd695d77f082d Mon Sep 17 00:00:00 2001 From: Austin Aviv Date: Wed, 21 Oct 2026 23:12:51 +0530 Subject: [PATCH 377/388] fix: support reinitializing OpenApiOperation.Tags to null and custom comparers (#3116) * fix: preserve custom tag comparers and sorted sets in OpenApiOperation copy constructor Align the OpenApiOperation copy constructor with OpenApiOperation.Tags setter to preserve custom equality comparers, sorted sets, and immutable sorted sets, and add corresponding copy constructor unit tests. * refactor: deduplicate tag normalization logic into static helper Extract CopyTags static method to deduplicate tag normalization logic between OpenApiOperation.Tags setter and the copy constructor as requested in review. --- .../Models/OpenApiOperation.cs | 29 +++++----- .../Models/OpenApiOperationTests.cs | 56 +++++++++++++++++++ 2 files changed, 71 insertions(+), 14 deletions(-) diff --git a/src/Microsoft.OpenApi/Models/OpenApiOperation.cs b/src/Microsoft.OpenApi/Models/OpenApiOperation.cs index 20ce8bf53..0a79481f0 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiOperation.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiOperation.cs @@ -28,21 +28,22 @@ public ISet? Tags } set { - if (value is null) - { - _tags = null; - return; - } - _tags = value switch - { - HashSet tags when !ReferenceEquals(tags.Comparer, EqualityComparer.Default) => value, - SortedSet => value, + _tags = CopyTags(value); + } + } + + private static ISet? CopyTags(ISet? tags, bool copy = false) + { + return tags switch + { + null => null, + HashSet hashSet when !ReferenceEquals(hashSet.Comparer, EqualityComparer.Default) => copy ? new HashSet(hashSet, hashSet.Comparer) : hashSet, + SortedSet sorted => copy ? new SortedSet(sorted, sorted.Comparer) : sorted, #if NET - ImmutableSortedSet => value, + ImmutableSortedSet => tags, #endif - _ => new HashSet(value, OpenApiTagComparer.Instance), - }; - } + _ => new HashSet(tags, OpenApiTagComparer.Instance), + }; } /// @@ -139,7 +140,7 @@ public OpenApiOperation() { } public OpenApiOperation(OpenApiOperation operation) { Utils.CheckArgumentNull(operation); - Tags = operation.Tags != null ? new HashSet(operation.Tags) : null; + Tags = CopyTags(operation.Tags, copy: true); Summary = operation.Summary ?? Summary; Description = operation.Description ?? Description; ExternalDocs = operation.ExternalDocs != null ? new(operation.ExternalDocs) : null; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs index 46e25c183..b43ef7b53 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs @@ -939,5 +939,61 @@ public void TagsSupportsImmutableSortedSets() Assert.Equal(["tagC", "tagB", "tagA"], names); Assert.IsType>(operation.Tags); } + + [Fact] + public void OpenApiOperationCopyConstructorPreservesCustomComparer() + { + var operation = new OpenApiOperation + { + Tags = new HashSet(new CaseInsensitiveOpenApiTagReferenceEqualityComparer()) + { + new("Tag1") + } + }; + + var copy = new OpenApiOperation(operation); + Assert.NotNull(copy.Tags); + Assert.False(copy.Tags.Add(new OpenApiTagReference("tag1"))); + Assert.Single(copy.Tags); + } + + [Fact] + public void OpenApiOperationCopyConstructorPreservesSortedSet() + { + var operation = new OpenApiOperation + { + Tags = new SortedSet(new DescendingOpenApiTagReferenceComparer()) + { + new("tagB"), + new("tagA"), + new("tagC"), + } + }; + + var copy = new OpenApiOperation(operation); + Assert.IsType>(copy.Tags); + var copyNames = copy.Tags.Select(t => t.Name); + Assert.Equal(["tagC", "tagB", "tagA"], copyNames); + } + + [Fact] + public void OpenApiOperationCopyConstructorPreservesImmutableSortedSet() + { + var operation = new OpenApiOperation + { + Tags = ImmutableSortedSet.Create( + new DescendingOpenApiTagReferenceComparer(), + [ + new OpenApiTagReference("tagB"), + new OpenApiTagReference("tagA"), + new OpenApiTagReference("tagC"), + ]), + }; + + var copy = new OpenApiOperation(operation); + Assert.IsType>(copy.Tags); + var copyNames = copy.Tags.Select(t => t.Name); + Assert.Equal(["tagC", "tagB", "tagA"], copyNames); + } } } From b63d6ec31bf754ced99eb6b0794665b49bf46f09 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Oct 2026 05:24:22 -0400 Subject: [PATCH 378/388] chore(deps): bump actions/setup-java from 6.0.1 to 6.1.0 (#3143) Bumps [actions/setup-java](https://github.com/actions/setup-java) from 6.0.1 to 6.1.0. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/de7274f081f381c8f8158605e0321c36c376e2e6...b843ebf9b913146b38da2eaa7aeddf76074ae1ad) --- updated-dependencies: - dependency-name: actions/setup-java dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/sonarcloud.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index a6954d70d..9d6e25106 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -35,7 +35,7 @@ jobs: runs-on: windows-latest steps: - name: Set up JDK 17 - uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1 + uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0 with: distribution: 'temurin' java-version: 17 From f633905129658c787db9e65da0ecfc9b850cdea1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Oct 2026 18:08:19 -0400 Subject: [PATCH 379/388] chore(deps): bump the codeql group with 2 updates (#3144) Bumps the codeql group with 2 updates: [github/codeql-action/init](https://github.com/github/codeql-action) and [github/codeql-action/analyze](https://github.com/github/codeql-action). Updates `github/codeql-action/init` from 4.38.3 to 4.39.0 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/24c54180a607b1449ed407dd24f251e4e9147c8d...6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee) Updates `github/codeql-action/analyze` from 4.38.3 to 4.39.0 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/24c54180a607b1449ed407dd24f251e4e9147c8d...6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee) --- updated-dependencies: - dependency-name: github/codeql-action/init dependency-version: 4.39.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: codeql - dependency-name: github/codeql-action/analyze dependency-version: 4.39.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: codeql ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d7bd4b843..f76dc619c 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -34,7 +34,7 @@ jobs: - name: Initialize CodeQL id: init_codeql - uses: github/codeql-action/init@24c54180a607b1449ed407dd24f251e4e9147c8d # v4.38.3 + uses: github/codeql-action/init@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0 with: queries: security-and-quality @@ -53,6 +53,6 @@ jobs: - name: Perform CodeQL Analysis id: analyze_codeql - uses: github/codeql-action/analyze@24c54180a607b1449ed407dd24f251e4e9147c8d # v4.38.3 + uses: github/codeql-action/analyze@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0 # Built with ❤ by [Pipeline Foundation](https://pipeline.foundation) \ No newline at end of file From 76ea786406270d0465831e4c6d1bd50c3685a74b Mon Sep 17 00:00:00 2001 From: Hardik K Date: Fri, 23 Oct 2026 19:01:22 +0530 Subject: [PATCH 380/388] fix(models): preserve tag collection types and comparers in copy constructors (#3141) fix(models): preserve tag collection types and comparers in OpenApiDocument copy constructor --- .../Models/OpenApiDocument.cs | 29 +++++----- .../Models/OpenApiDocumentTests.cs | 56 +++++++++++++++++++ 2 files changed, 71 insertions(+), 14 deletions(-) diff --git a/src/Microsoft.OpenApi/Models/OpenApiDocument.cs b/src/Microsoft.OpenApi/Models/OpenApiDocument.cs index 03086600d..de2bb9d16 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiDocument.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiDocument.cs @@ -87,21 +87,22 @@ public ISet? Tags } set { - if (value is null) - { - _tags = null; - return; - } - _tags = value switch - { - HashSet tags when tags.Comparer != EqualityComparer.Default => value, - SortedSet => value, + _tags = CopyTags(value); + } + } + + private static ISet? CopyTags(ISet? tags, bool copy = false) + { + return tags switch + { + null => null, + HashSet hashSet when !ReferenceEquals(hashSet.Comparer, EqualityComparer.Default) => copy ? new HashSet(hashSet, hashSet.Comparer) : hashSet, + SortedSet sorted => copy ? new SortedSet(sorted, sorted.Comparer) : sorted, #if NET - ImmutableSortedSet => value, + ImmutableSortedSet => tags, #endif - _ => new HashSet(value, OpenApiTagComparer.Instance), - }; - } + _ => new HashSet(tags, OpenApiTagComparer.Instance), + }; } /// @@ -147,7 +148,7 @@ public OpenApiDocument(OpenApiDocument? document) Webhooks = document?.Webhooks != null ? new Dictionary(document.Webhooks) : null; Components = document?.Components != null ? new(document?.Components) : null; Security = document?.Security != null ? [.. document.Security] : null; - Tags = document?.Tags != null ? new HashSet(document.Tags, OpenApiTagComparer.Instance) : null; + Tags = CopyTags(document?.Tags, copy: true); ExternalDocs = document?.ExternalDocs != null ? new(document.ExternalDocs) : null; Extensions = document?.Extensions != null ? new Dictionary(document.Extensions) : null; Metadata = document?.Metadata != null ? new Dictionary(document.Metadata) : null; diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs index 8b4629664..3abfb42fd 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs @@ -2214,6 +2214,62 @@ public void TagsSupportsImmutableSortedSets() Assert.IsType>(document.Tags); } + [Fact] + public void OpenApiDocumentCopyConstructorPreservesCustomComparer() + { + var document = new OpenApiDocument + { + Tags = new HashSet(new CaseInsensitiveOpenApiTagEqualityComparer()) + { + new() { Name = "Tag1" } + } + }; + + var copy = new OpenApiDocument(document); + Assert.NotNull(copy.Tags); + Assert.False(copy.Tags.Add(new OpenApiTag { Name = "tag1" })); + Assert.Single(copy.Tags); + } + + [Fact] + public void OpenApiDocumentCopyConstructorPreservesSortedSet() + { + var document = new OpenApiDocument + { + Tags = new SortedSet(new DescendingOpenApiTagComparer()) + { + new() { Name = "tagB" }, + new() { Name = "tagA" }, + new() { Name = "tagC" }, + } + }; + + var copy = new OpenApiDocument(document); + Assert.IsType>(copy.Tags); + var copyNames = copy.Tags.Select(t => t.Name); + Assert.Equal(["tagC", "tagB", "tagA"], copyNames); + } + + [Fact] + public void OpenApiDocumentCopyConstructorPreservesImmutableSortedSet() + { + var document = new OpenApiDocument + { + Tags = ImmutableSortedSet.Create( + new DescendingOpenApiTagComparer(), + [ + new OpenApiTag { Name = "tagB" }, + new OpenApiTag { Name = "tagA" }, + new OpenApiTag { Name = "tagC" }, + ]), + }; + + var copy = new OpenApiDocument(document); + Assert.IsType>(copy.Tags); + var copyNames = copy.Tags.Select(t => t.Name); + Assert.Equal(["tagC", "tagB", "tagA"], copyNames); + } + public static TheoryData OpenApiSpecVersions() { var values = new TheoryData(); From b0a6859be48927746726e967f578f370cd756f35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 24 Oct 2026 06:46:08 -0400 Subject: [PATCH 381/388] Bump Verify.XunitV3 from 33.3.3 to 33.3.4 (#3146) --- updated-dependencies: - dependency-name: Verify.XunitV3 dependency-version: 33.3.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index b77085ac2..1ffa3063a 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -14,7 +14,7 @@ - + From e41f0e82ac1be5c58e036195414d10b9d9f7efba Mon Sep 17 00:00:00 2001 From: Hardik K Date: Wed, 28 Oct 2026 01:03:09 +0530 Subject: [PATCH 382/388] fix(v2): map OpenAPI 2.0 response schema type file to binary format (#3150) * test(v2): add unit test for OpenAPI 2.0 schema type file mapping to binary format * fix(v2): set format binary when reading OpenAPI 2.0 schema with type file * test(v2): add response schema integration test for type file * docs(v2): document OpenAPI 2.0 file type to binary format mapping in schema deserializer * test(v2): parse enclosing operation with produces to populate response content schema --- .../Reader/V2/OpenApiSchemaDeserializer.cs | 7 +++- .../V2Tests/OpenApiSchemaTests.cs | 37 ++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.OpenApi/Reader/V2/OpenApiSchemaDeserializer.cs b/src/Microsoft.OpenApi/Reader/V2/OpenApiSchemaDeserializer.cs index 9e181fdcd..2f3a4dcec 100644 --- a/src/Microsoft.OpenApi/Reader/V2/OpenApiSchemaDeserializer.cs +++ b/src/Microsoft.OpenApi/Reader/V2/OpenApiSchemaDeserializer.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. using System; @@ -170,6 +170,11 @@ internal static partial class OpenApiV2Deserializer if (type != null) { o.Type = type.ToJsonSchemaType(); + // OpenAPI 2.0 response schema allows type: file, which maps to format: binary in OpenAPI 3.x + if ("file".Equals(type, StringComparison.OrdinalIgnoreCase)) + { + o.Format = "binary"; + } } } }, diff --git a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiSchemaTests.cs b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiSchemaTests.cs index cbbde4b70..0f02c3743 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiSchemaTests.cs +++ b/test/Microsoft.OpenApi.Readers.Tests/V2Tests/OpenApiSchemaTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. using System.Collections.Generic; @@ -186,5 +186,40 @@ public async Task SerializeSchemaWithOnlyNullableShouldSucceed() Assert.Equal(expected.MakeLineBreaksEnvironmentNeutral(), schemaString.MakeLineBreaksEnvironmentNeutral()); } + + [Fact] + public void ParseSchemaWithTypeFileShouldSetTypeStringAndFormatBinary() + { + // Arrange + var node = JsonNode.Parse("{\"type\": \"file\"}"); + + // Act + var schema = OpenApiV2Deserializer.LoadSchema(node, new(), new ParsingContext(new())); + + // Assert + Assert.NotNull(schema); + Assert.Equal(JsonSchemaType.String, schema.Type); + Assert.Equal("binary", schema.Format); + } + + [Fact] + public void ParseResponseSchemaWithTypeFileShouldSetTypeStringAndFormatBinary() + { + // Arrange + var node = JsonNode.Parse("{\"produces\": [\"application/octet-stream\"], \"responses\": {\"200\": {\"description\": \"File response\", \"schema\": {\"type\": \"file\"}}}}"); + + // Act + var operation = OpenApiV2Deserializer.LoadOperation(node, new(), new ParsingContext(new())); + + // Assert + Assert.NotNull(operation); + Assert.NotNull(operation.Responses); + var response = Assert.IsType(operation.Responses["200"]); + Assert.NotNull(response.Content); + var mediaType = Assert.Single(response.Content.Values); + Assert.NotNull(mediaType.Schema); + Assert.Equal(JsonSchemaType.String, mediaType.Schema.Type); + Assert.Equal("binary", mediaType.Schema.Format); + } } } From 47a130b88d1def7db31048172a8d81c20685e6c3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Oct 2026 18:10:44 -0400 Subject: [PATCH 383/388] chore(deps): bump the codeql group with 2 updates (#3152) Bumps the codeql group with 2 updates: [github/codeql-action/init](https://github.com/github/codeql-action) and [github/codeql-action/analyze](https://github.com/github/codeql-action). Updates `github/codeql-action/init` from 4.39.0 to 4.39.1 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee...9b3254085494b55a0f7c4c2b3d2d52cc712ce370) Updates `github/codeql-action/analyze` from 4.39.0 to 4.39.1 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee...9b3254085494b55a0f7c4c2b3d2d52cc712ce370) --- updated-dependencies: - dependency-name: github/codeql-action/init dependency-version: 4.39.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: codeql - dependency-name: github/codeql-action/analyze dependency-version: 4.39.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: codeql ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f76dc619c..819b50e4f 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -34,7 +34,7 @@ jobs: - name: Initialize CodeQL id: init_codeql - uses: github/codeql-action/init@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0 + uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1 with: queries: security-and-quality @@ -53,6 +53,6 @@ jobs: - name: Perform CodeQL Analysis id: analyze_codeql - uses: github/codeql-action/analyze@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0 + uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1 # Built with ❤ by [Pipeline Foundation](https://pipeline.foundation) \ No newline at end of file From dd08a6d07239a692dd887e2404ea6e7649d9d35f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2026 21:33:42 +0000 Subject: [PATCH 384/388] chore(deps): bump dotnet-sdk from 10.0.402 to 10.0.403 (#3156) Bumps [dotnet-sdk](https://github.com/dotnet/sdk) from 10.0.402 to 10.0.403. - [Release notes](https://github.com/dotnet/sdk/releases) - [Commits](https://github.com/dotnet/sdk/compare/v10.0.402...v10.0.403) --- updated-dependencies: - dependency-name: dotnet-sdk dependency-version: 10.0.403 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index c92eedfeb..c6880be64 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "10.0.402" + "version": "10.0.403" }, "test": { "runner": "Microsoft.Testing.Platform" From 7fa9b61e0a4734c0af19e32bc2277529e6b84d0d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2026 16:34:40 -0500 Subject: [PATCH 385/388] Bump the microsoftextensions group with 5 updates (#3157) Bumps Microsoft.Extensions.DependencyInjection from 10.0.13 to 10.0.14 Bumps Microsoft.Extensions.Logging from 10.0.13 to 10.0.14 Bumps Microsoft.Extensions.Logging.Console from 10.0.13 to 10.0.14 Bumps Microsoft.Extensions.Logging.Debug from 10.0.13 to 10.0.14 Bumps System.Text.Json from 10.0.13 to 10.0.14 --- updated-dependencies: - dependency-name: Microsoft.Extensions.DependencyInjection dependency-version: 10.0.14 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging dependency-version: 10.0.14 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging.Console dependency-version: 10.0.14 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: System.Text.Json dependency-version: 10.0.14 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions - dependency-name: Microsoft.Extensions.Logging.Debug dependency-version: 10.0.14 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoftextensions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- performance/resultsComparer/resultsComparer.csproj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/performance/resultsComparer/resultsComparer.csproj b/performance/resultsComparer/resultsComparer.csproj index 453944872..38b16b554 100644 --- a/performance/resultsComparer/resultsComparer.csproj +++ b/performance/resultsComparer/resultsComparer.csproj @@ -8,12 +8,12 @@ - - - - + + + + - + From 113803cbc13defe55975292f374e2eaeea8d288f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Nov 2026 21:35:44 +0000 Subject: [PATCH 386/388] Bump Microsoft.SourceLink.GitHub from 10.0.402 to 10.0.403 (#3158) --- updated-dependencies: - dependency-name: Microsoft.SourceLink.GitHub dependency-version: 10.0.403 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 063a25831..5eb725c09 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -21,6 +21,6 @@ true - + \ No newline at end of file From 1bf657326b18c01e1cf4cd4205c1eaa09b6bfd30 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2026 17:23:30 -0500 Subject: [PATCH 387/388] Bump the testing group with 2 updates (#3161) Bumps Microsoft.Testing.Extensions.AzureDevOpsReport from 2.5.1 to 2.5.2 Bumps Microsoft.Testing.Extensions.GitHubActionsReport from 2.5.1 to 2.5.2 --- updated-dependencies: - dependency-name: Microsoft.Testing.Extensions.AzureDevOpsReport dependency-version: 2.5.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: testing - dependency-name: Microsoft.Testing.Extensions.GitHubActionsReport dependency-version: 2.5.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: testing ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../Microsoft.OpenApi.Readers.Tests.csproj | 4 ++-- test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj index 0c6d93ee0..80dc75811 100644 --- a/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj +++ b/test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj @@ -18,8 +18,8 @@ - - + + diff --git a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj index 1ffa3063a..c0dfc5d1d 100644 --- a/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj +++ b/test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj @@ -11,8 +11,8 @@ - - + + From a68f8bef1359f4cb3c4734673b0fa3c332659a5b Mon Sep 17 00:00:00 2001 From: Hardik K Date: Fri, 6 Nov 2026 20:24:36 +0530 Subject: [PATCH 388/388] fix(models): preserve specification extensions in OpenApiPaths and OpenApiResponses copy constructors (#3162) * fix(models): preserve extensions in OpenApiPaths copy constructor Signed-off-by: Hardik K * test(models): add unit tests for OpenApiPaths copy constructor extensions Signed-off-by: Hardik K * test(models): verify OpenApiDocument copy constructor preserves Paths extensions Signed-off-by: Hardik K * fix(models): preserve extensions in OpenApiResponses copy constructor Signed-off-by: Hardik K * test(models): add unit tests for OpenApiResponses copy constructor extensions Signed-off-by: Hardik K * test(models): verify OpenApiOperation copy constructor preserves Responses extensions Signed-off-by: Hardik K * test(models): add edge case tests for null and empty extensions in Paths and Responses copy constructors Signed-off-by: Hardik K * docs(models): update XML documentation on OpenApiPaths and OpenApiResponses copy constructors Signed-off-by: Hardik K --------- Signed-off-by: Hardik K --- src/Microsoft.OpenApi/Models/OpenApiPaths.cs | 11 +- .../Models/OpenApiResponses.cs | 14 ++- .../Models/OpenApiDocumentTests.cs | 34 +++++- .../Models/OpenApiOperationTests.cs | 32 ++++++ .../Models/OpenApiPathsTests.cs | 101 ++++++++++++++++++ .../Models/OpenApiResponsesTests.cs | 101 ++++++++++++++++++ 6 files changed, 284 insertions(+), 9 deletions(-) create mode 100644 test/Microsoft.OpenApi.Tests/Models/OpenApiPathsTests.cs create mode 100644 test/Microsoft.OpenApi.Tests/Models/OpenApiResponsesTests.cs diff --git a/src/Microsoft.OpenApi/Models/OpenApiPaths.cs b/src/Microsoft.OpenApi/Models/OpenApiPaths.cs index 1aa163e3c..d79c95320 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiPaths.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiPaths.cs @@ -1,6 +1,8 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. +using System.Collections.Generic; + namespace Microsoft.OpenApi { /// @@ -14,12 +16,13 @@ public class OpenApiPaths : OpenApiExtensibleDictionary public OpenApiPaths() { } /// - /// Initializes a copy of object + /// Initializes a copy of object. /// /// The . /// - /// This creates a shallow copy, the path items are the same reference as in the provided parameter. + /// This creates a shallow copy; the path items are the same reference as in the provided parameter, + /// and specification extensions are copied into a new dictionary. /// - public OpenApiPaths(OpenApiPaths paths) : base(dictionary: paths) { } + public OpenApiPaths(OpenApiPaths paths) : base(dictionary: paths, extensions: paths?.Extensions != null ? new Dictionary(paths.Extensions) : null) { } } } diff --git a/src/Microsoft.OpenApi/Models/OpenApiResponses.cs b/src/Microsoft.OpenApi/Models/OpenApiResponses.cs index 63a144a2a..f510c9cd5 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiResponses.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiResponses.cs @@ -1,6 +1,8 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. +using System.Collections.Generic; + namespace Microsoft.OpenApi { /// @@ -14,9 +16,13 @@ public class OpenApiResponses : OpenApiExtensibleDictionary public OpenApiResponses() { } /// - /// Initializes a copy of object + /// Initializes a copy of object. /// - /// The - public OpenApiResponses(OpenApiResponses openApiResponses) : base(dictionary: openApiResponses) { } + /// The . + /// + /// This creates a shallow copy; the responses are the same reference as in the provided parameter, + /// and specification extensions are copied into a new dictionary. + /// + public OpenApiResponses(OpenApiResponses openApiResponses) : base(dictionary: openApiResponses, extensions: openApiResponses?.Extensions != null ? new Dictionary(openApiResponses.Extensions) : null) { } } } diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs index 3abfb42fd..774d9ff2a 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiDocumentTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. using System; @@ -2753,5 +2753,37 @@ public void GetOperationById_ThrowsOnNullOrEmptyId() Assert.Throws(() => doc.GetOperationById(null!)); Assert.Throws(() => doc.GetOperationById(string.Empty)); } + + [Fact] + public void OpenApiDocumentCopyConstructorPreservesPathsExtensions() + { + // Arrange + var document = new OpenApiDocument + { + Info = new OpenApiInfo { Title = "Test API", Version = "1.0.0" }, + Paths = new OpenApiPaths + { + ["/items"] = new OpenApiPathItem(), + Extensions = new Dictionary + { + ["x-paths-summary"] = new JsonNodeExtension("Paths level extension") + } + } + }; + + // Act + var copy = new OpenApiDocument(document); + + // Assert + Assert.NotNull(copy.Paths); + Assert.NotNull(copy.Paths.Extensions); + Assert.Single(copy.Paths.Extensions); + Assert.True(copy.Paths.Extensions.ContainsKey("x-paths-summary")); + + // Verify isolation + copy.Paths.Extensions["x-isolated"] = new JsonNodeExtension("isolated"); + Assert.Single(document.Paths.Extensions); + Assert.False(document.Paths.Extensions.ContainsKey("x-isolated")); + } } } diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs index b43ef7b53..8a9af17cc 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiOperationTests.cs @@ -995,5 +995,37 @@ public void OpenApiOperationCopyConstructorPreservesImmutableSortedSet() var copyNames = copy.Tags.Select(t => t.Name); Assert.Equal(["tagC", "tagB", "tagA"], copyNames); } + + [Fact] + public void OpenApiOperationCopyConstructorPreservesResponsesExtensions() + { + // Arrange + var operation = new OpenApiOperation + { + OperationId = "getItem", + Responses = new OpenApiResponses + { + ["200"] = new OpenApiResponse { Description = "Success" }, + Extensions = new Dictionary + { + ["x-responses-meta"] = new JsonNodeExtension("Metadata for responses") + } + } + }; + + // Act + var copy = new OpenApiOperation(operation); + + // Assert + Assert.NotNull(copy.Responses); + Assert.NotNull(copy.Responses.Extensions); + Assert.Single(copy.Responses.Extensions); + Assert.True(copy.Responses.Extensions.ContainsKey("x-responses-meta")); + + // Verify isolation + copy.Responses.Extensions["x-isolated"] = new JsonNodeExtension("isolated"); + Assert.Single(operation.Responses.Extensions); + Assert.False(operation.Responses.Extensions.ContainsKey("x-isolated")); + } } } diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiPathsTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiPathsTests.cs new file mode 100644 index 000000000..c4ebc20df --- /dev/null +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiPathsTests.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +using System.Collections.Generic; +using Xunit; + +namespace Microsoft.OpenApi.Tests.Models +{ + [Collection("DefaultSettings")] + public class OpenApiPathsTests + { + [Fact] + public void CopyConstructorCopiesExtensions() + { + // Arrange + var paths = new OpenApiPaths + { + ["/users"] = new OpenApiPathItem(), + Extensions = new Dictionary + { + ["x-custom-path"] = new JsonNodeExtension("custom-value"), + ["x-rate-limit"] = new JsonNodeExtension(100), + } + }; + + // Act + var copy = new OpenApiPaths(paths); + + // Assert + Assert.NotNull(copy.Extensions); + Assert.Equal(2, copy.Extensions.Count); + Assert.True(copy.Extensions.ContainsKey("x-custom-path")); + Assert.True(copy.Extensions.ContainsKey("x-rate-limit")); + } + + [Fact] + public void CopyConstructorIsolatesExtensionsDictionary() + { + // Arrange + var paths = new OpenApiPaths + { + Extensions = new Dictionary + { + ["x-original"] = new JsonNodeExtension("original") + } + }; + + // Act + var copy = new OpenApiPaths(paths); + copy.Extensions["x-copy-only"] = new JsonNodeExtension("copy"); + + // Assert + Assert.Equal(2, copy.Extensions.Count); + Assert.Single(paths.Extensions); + Assert.False(paths.Extensions.ContainsKey("x-copy-only")); + } + + [Fact] + public void CopyConstructorWithNullPathsInitializesEmptyExtensions() + { + // Act + var copy = new OpenApiPaths(null!); + + // Assert + Assert.NotNull(copy.Extensions); + Assert.Empty(copy.Extensions); + Assert.Empty(copy); + } + + [Fact] + public void CopyConstructorWithNullExtensionsInitializesEmptyExtensions() + { + // Arrange + var paths = new OpenApiPaths { Extensions = null }; + + // Act + var copy = new OpenApiPaths(paths); + + // Assert + Assert.NotNull(copy.Extensions); + Assert.Empty(copy.Extensions); + } + + [Fact] + public void CopyConstructorWithEmptyExtensionsInitializesEmptyExtensions() + { + // Arrange + var paths = new OpenApiPaths + { + Extensions = new Dictionary() + }; + + // Act + var copy = new OpenApiPaths(paths); + + // Assert + Assert.NotNull(copy.Extensions); + Assert.Empty(copy.Extensions); + } + } +} diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiResponsesTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponsesTests.cs new file mode 100644 index 000000000..35390ccb4 --- /dev/null +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiResponsesTests.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +using System.Collections.Generic; +using Xunit; + +namespace Microsoft.OpenApi.Tests.Models +{ + [Collection("DefaultSettings")] + public class OpenApiResponsesTests + { + [Fact] + public void CopyConstructorCopiesExtensions() + { + // Arrange + var responses = new OpenApiResponses + { + ["200"] = new OpenApiResponse { Description = "OK" }, + Extensions = new Dictionary + { + ["x-response-notes"] = new JsonNodeExtension("all-responses-note"), + ["x-default-code"] = new JsonNodeExtension("200"), + } + }; + + // Act + var copy = new OpenApiResponses(responses); + + // Assert + Assert.NotNull(copy.Extensions); + Assert.Equal(2, copy.Extensions.Count); + Assert.True(copy.Extensions.ContainsKey("x-response-notes")); + Assert.True(copy.Extensions.ContainsKey("x-default-code")); + } + + [Fact] + public void CopyConstructorIsolatesExtensionsDictionary() + { + // Arrange + var responses = new OpenApiResponses + { + Extensions = new Dictionary + { + ["x-original"] = new JsonNodeExtension("original") + } + }; + + // Act + var copy = new OpenApiResponses(responses); + copy.Extensions["x-copy-only"] = new JsonNodeExtension("copy"); + + // Assert + Assert.Equal(2, copy.Extensions.Count); + Assert.Single(responses.Extensions); + Assert.False(responses.Extensions.ContainsKey("x-copy-only")); + } + + [Fact] + public void CopyConstructorWithNullResponsesInitializesEmptyExtensions() + { + // Act + var copy = new OpenApiResponses(null!); + + // Assert + Assert.NotNull(copy.Extensions); + Assert.Empty(copy.Extensions); + Assert.Empty(copy); + } + + [Fact] + public void CopyConstructorWithNullExtensionsInitializesEmptyExtensions() + { + // Arrange + var responses = new OpenApiResponses { Extensions = null }; + + // Act + var copy = new OpenApiResponses(responses); + + // Assert + Assert.NotNull(copy.Extensions); + Assert.Empty(copy.Extensions); + } + + [Fact] + public void CopyConstructorWithEmptyExtensionsInitializesEmptyExtensions() + { + // Arrange + var responses = new OpenApiResponses + { + Extensions = new Dictionary() + }; + + // Act + var copy = new OpenApiResponses(responses); + + // Assert + Assert.NotNull(copy.Extensions); + Assert.Empty(copy.Extensions); + } + } +}