From 46e08d4b53e756db5d717337488c9bb787ec8ee7 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 29 Jan 2025 14:51:19 -0500 Subject: [PATCH 1/2] fix: tag reference proxy design pattern implementation Signed-off-by: Vincent Biret --- .../Interfaces/IOpenApiDescribedElement.cs | 12 +++ .../Models/Interfaces/IOpenApiTag.cs | 20 +++++ src/Microsoft.OpenApi/Models/OpenApiTag.cs | 45 ++++------ .../References/BaseOpenApiReferenceHolder.cs | 7 +- .../Models/References/OpenApiTagReference.cs | 86 +++---------------- .../Models/OpenApiTagTests.cs | 3 +- .../References/OpenApiTagReferenceTest.cs | 1 - .../PublicApi/PublicApi.approved.txt | 49 ++++++----- 8 files changed, 95 insertions(+), 128 deletions(-) create mode 100644 src/Microsoft.OpenApi/Models/Interfaces/IOpenApiTag.cs diff --git a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiDescribedElement.cs b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiDescribedElement.cs index ca035cc51..3deee3d3c 100644 --- a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiDescribedElement.cs +++ b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiDescribedElement.cs @@ -13,3 +13,15 @@ public interface IOpenApiDescribedElement : IOpenApiElement /// public string Description { get; set; } } + +/// +/// Describes an element that has a description. +/// +public interface IOpenApiReadOnlyDescribedElement : IOpenApiElement +{ + /// + /// Long description for the example. + /// CommonMark syntax MAY be used for rich text representation. + /// + public string Description { get; } +} diff --git a/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiTag.cs b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiTag.cs new file mode 100644 index 000000000..c4f7d1e95 --- /dev/null +++ b/src/Microsoft.OpenApi/Models/Interfaces/IOpenApiTag.cs @@ -0,0 +1,20 @@ +using Microsoft.OpenApi.Interfaces; + +namespace Microsoft.OpenApi.Models.Interfaces; + +/// +/// Defines the base properties for the path item object. +/// This interface is provided for type assertions but should not be implemented by package consumers beyond automatic mocking. +/// +public interface IOpenApiTag : IOpenApiSerializable, IOpenApiReadOnlyExtensible, IOpenApiReadOnlyDescribedElement +{ + /// + /// The name of the tag. + /// + public string Name { get; } + + /// + /// Additional external documentation for this tag. + /// + public OpenApiExternalDocs ExternalDocs { get; } +} diff --git a/src/Microsoft.OpenApi/Models/OpenApiTag.cs b/src/Microsoft.OpenApi/Models/OpenApiTag.cs index 057cf6d49..c30d7b819 100644 --- a/src/Microsoft.OpenApi/Models/OpenApiTag.cs +++ b/src/Microsoft.OpenApi/Models/OpenApiTag.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using Microsoft.OpenApi.Interfaces; +using Microsoft.OpenApi.Models.Interfaces; using Microsoft.OpenApi.Writers; namespace Microsoft.OpenApi.Models @@ -11,32 +12,19 @@ namespace Microsoft.OpenApi.Models /// /// Tag Object. /// - public class OpenApiTag : IOpenApiReferenceable, IOpenApiExtensible + public class OpenApiTag : IOpenApiExtensible, IOpenApiReferenceable, IOpenApiTag, IOpenApiDescribedElement { - /// - /// The name of the tag. - /// - public virtual string Name { get; set; } + /// + public string Name { get; set; } - /// - /// A short description for the tag. - /// - public virtual string Description { get; set; } + /// + public string Description { get; set; } - /// - /// Additional external documentation for this tag. - /// - public virtual OpenApiExternalDocs ExternalDocs { get; set; } + /// + public OpenApiExternalDocs ExternalDocs { get; set; } - /// - /// This object MAY be extended with Specification Extensions. - /// - public virtual IDictionary Extensions { get; set; } = new Dictionary(); - - /// - /// Indicates if object is populated with data or is just a reference to the data - /// - public bool UnresolvedReference { get; set; } + /// + public IDictionary Extensions { get; set; } = new Dictionary(); /// /// Parameterless constructor @@ -44,21 +32,20 @@ public class OpenApiTag : IOpenApiReferenceable, IOpenApiExtensible public OpenApiTag() { } /// - /// Initializes a copy of an object + /// Initializes a copy of an object /// - public OpenApiTag(OpenApiTag tag) + public OpenApiTag(IOpenApiTag tag) { Name = tag?.Name ?? Name; Description = tag?.Description ?? Description; ExternalDocs = tag?.ExternalDocs != null ? new(tag.ExternalDocs) : null; Extensions = tag?.Extensions != null ? new Dictionary(tag.Extensions) : null; - UnresolvedReference = tag?.UnresolvedReference ?? UnresolvedReference; } /// /// Serialize to Open Api v3.1 /// - public virtual void SerializeAsV31(IOpenApiWriter writer) + public void SerializeAsV31(IOpenApiWriter writer) { SerializeInternal(writer, OpenApiSpecVersion.OpenApi3_1, (writer, element) => element.SerializeAsV31(writer)); @@ -67,13 +54,13 @@ public virtual void SerializeAsV31(IOpenApiWriter writer) /// /// Serialize to Open Api v3.0 /// - public virtual void SerializeAsV3(IOpenApiWriter writer) + public void SerializeAsV3(IOpenApiWriter writer) { SerializeInternal(writer, OpenApiSpecVersion.OpenApi3_0, (writer, element) => element.SerializeAsV3(writer)); } - internal virtual void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, + internal void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersion version, Action callback) { writer.WriteStartObject(); @@ -96,7 +83,7 @@ internal virtual void SerializeInternal(IOpenApiWriter writer, OpenApiSpecVersio /// /// Serialize to Open Api v2.0 /// - public virtual void SerializeAsV2(IOpenApiWriter writer) + public void SerializeAsV2(IOpenApiWriter writer) { writer.WriteStartObject(); diff --git a/src/Microsoft.OpenApi/Models/References/BaseOpenApiReferenceHolder.cs b/src/Microsoft.OpenApi/Models/References/BaseOpenApiReferenceHolder.cs index 56d694d0a..0b500945b 100644 --- a/src/Microsoft.OpenApi/Models/References/BaseOpenApiReferenceHolder.cs +++ b/src/Microsoft.OpenApi/Models/References/BaseOpenApiReferenceHolder.cs @@ -10,9 +10,12 @@ namespace Microsoft.OpenApi.Models.References; /// The interface type for the model. public abstract class BaseOpenApiReferenceHolder : IOpenApiReferenceHolder where T : class, IOpenApiReferenceable, V where V : IOpenApiSerializable { - private T _target; + /// + /// The resolved target object. + /// + protected T _target; /// - public T Target + public virtual T Target { get { diff --git a/src/Microsoft.OpenApi/Models/References/OpenApiTagReference.cs b/src/Microsoft.OpenApi/Models/References/OpenApiTagReference.cs index 09afa3655..b70717403 100644 --- a/src/Microsoft.OpenApi/Models/References/OpenApiTagReference.cs +++ b/src/Microsoft.OpenApi/Models/References/OpenApiTagReference.cs @@ -5,26 +5,19 @@ using System.Collections.Generic; using System.Linq; using Microsoft.OpenApi.Interfaces; -using Microsoft.OpenApi.Writers; +using Microsoft.OpenApi.Models.Interfaces; namespace Microsoft.OpenApi.Models.References { /// /// Tag Object Reference /// - public class OpenApiTagReference : OpenApiTag, IOpenApiReferenceHolder + public class OpenApiTagReference : BaseOpenApiReferenceHolder, IOpenApiTag { - internal OpenApiTag _target; - - /// - /// Reference. - /// - public OpenApiReference Reference { get; set; } - /// /// Resolved target of the reference. /// - public OpenApiTag Target + public override OpenApiTag Target { get { @@ -38,85 +31,32 @@ public OpenApiTag Target /// /// The reference Id. /// The host OpenAPI document. - public OpenApiTagReference(string referenceId, OpenApiDocument hostDocument) + public OpenApiTagReference(string referenceId, OpenApiDocument hostDocument):base(referenceId, hostDocument, ReferenceType.Tag) { - Utils.CheckArgumentNullOrEmpty(referenceId); - - Reference = new OpenApiReference() - { - Id = referenceId, - HostDocument = hostDocument, - Type = ReferenceType.Tag - }; } - /// - /// Copy Constructor - /// - /// The source to copy information from. - public OpenApiTagReference(OpenApiTagReference source):base() + internal OpenApiTagReference(OpenApiTag target, string referenceId):base(target, referenceId, ReferenceType.Tag) { - Reference = source?.Reference != null ? new(source.Reference) : null; - _target = source?._target; } - private const string ReferenceErrorMessage = "Setting the value from the reference is not supported, use the target property instead."; /// - public override string Description { get => Target.Description; set => throw new InvalidOperationException(ReferenceErrorMessage); } - - /// - public override OpenApiExternalDocs ExternalDocs { get => Target.ExternalDocs; set => throw new InvalidOperationException(ReferenceErrorMessage); } - - /// - public override IDictionary Extensions { get => Target.Extensions; set => throw new InvalidOperationException(ReferenceErrorMessage); } - - /// - public override string Name { get => Target.Name; set => throw new InvalidOperationException(ReferenceErrorMessage); } - - /// - public override void SerializeAsV3(IOpenApiWriter writer) + public string Description { - if (!writer.GetSettings().ShouldInlineReference(Reference)) - { - Reference.SerializeAsV3(writer); - } - else - { - SerializeInternal(writer); - } + get => string.IsNullOrEmpty(Reference?.Description) ? Target?.Description : Reference.Description; } /// - public override void SerializeAsV31(IOpenApiWriter writer) - { - if (!writer.GetSettings().ShouldInlineReference(Reference)) - { - Reference.SerializeAsV31(writer); - } - else - { - SerializeInternal(writer); - } - } + public OpenApiExternalDocs ExternalDocs { get => Target?.ExternalDocs; } /// - public override void SerializeAsV2(IOpenApiWriter writer) - { - if (!writer.GetSettings().ShouldInlineReference(Reference)) - { - Reference.SerializeAsV2(writer); - } - else - { - SerializeInternal(writer); - } - } + public IDictionary Extensions { get => Target?.Extensions; } /// - private void SerializeInternal(IOpenApiWriter writer) + public string Name { get => Target?.Name; } + /// + public override IOpenApiTag CopyReferenceAsTargetElementWithOverrides(IOpenApiTag source) { - Utils.CheckArgumentNull(writer); - writer.WriteValue(Name); + return source is OpenApiTag ? new OpenApiTag(this) : source; } } } diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.cs b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.cs index 508779adf..c987592d4 100644 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.cs +++ b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.cs @@ -7,6 +7,7 @@ using System.Threading.Tasks; using Microsoft.OpenApi.Interfaces; using Microsoft.OpenApi.Models; +using Microsoft.OpenApi.Models.Interfaces; using Microsoft.OpenApi.Models.References; using Microsoft.OpenApi.Writers; using VerifyXunit; @@ -30,7 +31,7 @@ public class OpenApiTagTests } }; - public static OpenApiTag ReferencedTag = new OpenApiTagReference("pet", null); + public static IOpenApiTag ReferencedTag = new OpenApiTagReference(AdvancedTag, "pet"); [Theory] [InlineData(true)] diff --git a/test/Microsoft.OpenApi.Tests/Models/References/OpenApiTagReferenceTest.cs b/test/Microsoft.OpenApi.Tests/Models/References/OpenApiTagReferenceTest.cs index 9d409c24b..250f8ee53 100644 --- a/test/Microsoft.OpenApi.Tests/Models/References/OpenApiTagReferenceTest.cs +++ b/test/Microsoft.OpenApi.Tests/Models/References/OpenApiTagReferenceTest.cs @@ -74,7 +74,6 @@ public void TagReferenceResolutionWorks() // Assert Assert.Equal("user", _openApiTagReference.Name); Assert.Equal("Operations about users.", _openApiTagReference.Description); - Assert.Throws(() => _openApiTagReference.Description = "New Description"); } [Theory] diff --git a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt index 98029f874..54da760d1 100644 --- a/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt +++ b/test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt @@ -392,6 +392,10 @@ namespace Microsoft.OpenApi.Models.Interfaces System.Collections.Generic.IList Parameters { get; } System.Collections.Generic.IList Servers { get; } } + public interface IOpenApiReadOnlyDescribedElement : Microsoft.OpenApi.Interfaces.IOpenApiElement + { + string Description { get; } + } public interface IOpenApiRequestBody : Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.Interfaces.IOpenApiSerializable, Microsoft.OpenApi.Models.Interfaces.IOpenApiDescribedElement { System.Collections.Generic.IDictionary Content { get; } @@ -473,6 +477,11 @@ namespace Microsoft.OpenApi.Models.Interfaces { string Summary { get; set; } } + public interface IOpenApiTag : Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.Interfaces.IOpenApiSerializable, Microsoft.OpenApi.Models.Interfaces.IOpenApiReadOnlyDescribedElement + { + Microsoft.OpenApi.Models.OpenApiExternalDocs ExternalDocs { get; } + string Name { get; } + } } namespace Microsoft.OpenApi.Models { @@ -1109,18 +1118,17 @@ namespace Microsoft.OpenApi.Models public void SerializeAsV3(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { } public void SerializeAsV31(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { } } - public class OpenApiTag : Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable + public class OpenApiTag : Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, Microsoft.OpenApi.Interfaces.IOpenApiSerializable, Microsoft.OpenApi.Models.Interfaces.IOpenApiDescribedElement, Microsoft.OpenApi.Models.Interfaces.IOpenApiReadOnlyDescribedElement, Microsoft.OpenApi.Models.Interfaces.IOpenApiTag { public OpenApiTag() { } - public OpenApiTag(Microsoft.OpenApi.Models.OpenApiTag tag) { } - public bool UnresolvedReference { get; set; } - public virtual string Description { get; set; } - public virtual System.Collections.Generic.IDictionary Extensions { get; set; } - public virtual Microsoft.OpenApi.Models.OpenApiExternalDocs ExternalDocs { get; set; } - public virtual string Name { get; set; } - public virtual void SerializeAsV2(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { } - public virtual void SerializeAsV3(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { } - public virtual void SerializeAsV31(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { } + public OpenApiTag(Microsoft.OpenApi.Models.Interfaces.IOpenApiTag tag) { } + public string Description { get; set; } + public System.Collections.Generic.IDictionary Extensions { get; set; } + public Microsoft.OpenApi.Models.OpenApiExternalDocs ExternalDocs { get; set; } + public string Name { get; set; } + public void SerializeAsV2(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { } + public void SerializeAsV3(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { } + public void SerializeAsV31(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { } } public class OpenApiXml : Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiSerializable { @@ -1234,10 +1242,11 @@ namespace Microsoft.OpenApi.Models.References where T : class, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable, V where V : Microsoft.OpenApi.Interfaces.IOpenApiSerializable { + protected T _target; protected BaseOpenApiReferenceHolder(Microsoft.OpenApi.Models.References.BaseOpenApiReferenceHolder source) { } protected BaseOpenApiReferenceHolder(string referenceId, Microsoft.OpenApi.Models.OpenApiDocument hostDocument, Microsoft.OpenApi.Models.ReferenceType referenceType, string externalResource = null) { } public Microsoft.OpenApi.Models.OpenApiReference Reference { get; set; } - public T Target { get; } + public virtual T Target { get; } public bool UnresolvedReference { get; set; } public abstract V CopyReferenceAsTargetElementWithOverrides(V source); public virtual void SerializeAsV2(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { } @@ -1426,19 +1435,15 @@ namespace Microsoft.OpenApi.Models.References public Microsoft.OpenApi.Models.SecuritySchemeType? Type { get; } public override Microsoft.OpenApi.Models.Interfaces.IOpenApiSecurityScheme CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.Models.Interfaces.IOpenApiSecurityScheme source) { } } - public class OpenApiTagReference : Microsoft.OpenApi.Models.OpenApiTag, Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiReferenceHolder, Microsoft.OpenApi.Interfaces.IOpenApiReferenceHolder, Microsoft.OpenApi.Interfaces.IOpenApiSerializable + public class OpenApiTagReference : Microsoft.OpenApi.Models.References.BaseOpenApiReferenceHolder, Microsoft.OpenApi.Interfaces.IOpenApiElement, Microsoft.OpenApi.Interfaces.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.Interfaces.IOpenApiSerializable, Microsoft.OpenApi.Models.Interfaces.IOpenApiReadOnlyDescribedElement, Microsoft.OpenApi.Models.Interfaces.IOpenApiTag { - public OpenApiTagReference(Microsoft.OpenApi.Models.References.OpenApiTagReference source) { } public OpenApiTagReference(string referenceId, Microsoft.OpenApi.Models.OpenApiDocument hostDocument) { } - public Microsoft.OpenApi.Models.OpenApiReference Reference { get; set; } - public Microsoft.OpenApi.Models.OpenApiTag Target { get; } - public override string Description { get; set; } - public override System.Collections.Generic.IDictionary Extensions { get; set; } - public override Microsoft.OpenApi.Models.OpenApiExternalDocs ExternalDocs { get; set; } - public override string Name { get; set; } - public override void SerializeAsV2(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { } - public override void SerializeAsV3(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { } - public override void SerializeAsV31(Microsoft.OpenApi.Writers.IOpenApiWriter writer) { } + public string Description { get; } + public System.Collections.Generic.IDictionary Extensions { get; } + public Microsoft.OpenApi.Models.OpenApiExternalDocs ExternalDocs { get; } + public string Name { get; } + public override Microsoft.OpenApi.Models.OpenApiTag Target { get; } + public override Microsoft.OpenApi.Models.Interfaces.IOpenApiTag CopyReferenceAsTargetElementWithOverrides(Microsoft.OpenApi.Models.Interfaces.IOpenApiTag source) { } } } namespace Microsoft.OpenApi.Reader From e147e72b119a28c2afacb8bb98c6c9f34cb4f893 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 29 Jan 2025 14:51:40 -0500 Subject: [PATCH 2/2] chore: removes unused test files Signed-off-by: Vincent Biret --- ...renceWorksAsync_produceTerseOutput=False.verified.txt | 9 --------- ...erenceWorksAsync_produceTerseOutput=True.verified.txt | 1 - ...renceWorksAsync_produceTerseOutput=False.verified.txt | 9 --------- ...erenceWorksAsync_produceTerseOutput=True.verified.txt | 1 - 4 files changed, 20 deletions(-) delete mode 100644 test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt delete mode 100644 test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt delete mode 100644 test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt delete mode 100644 test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt deleted file mode 100644 index 2afa516e0..000000000 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "pet", - "description": "Pets operations", - "externalDocs": { - "description": "Find more info here", - "url": "https://example.com" - }, - "x-tag-extension": null -} \ No newline at end of file diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt deleted file mode 100644 index f0a901938..000000000 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV2JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt +++ /dev/null @@ -1 +0,0 @@ -{"name":"pet","description":"Pets operations","externalDocs":{"description":"Find more info here","url":"https://example.com"},"x-tag-extension":null} \ No newline at end of file diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt deleted file mode 100644 index 2afa516e0..000000000 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=False.verified.txt +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "pet", - "description": "Pets operations", - "externalDocs": { - "description": "Find more info here", - "url": "https://example.com" - }, - "x-tag-extension": null -} \ No newline at end of file diff --git a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt b/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt deleted file mode 100644 index f0a901938..000000000 --- a/test/Microsoft.OpenApi.Tests/Models/OpenApiTagTests.SerializeAdvancedTagAsV3JsonWithoutReferenceWorksAsync_produceTerseOutput=True.verified.txt +++ /dev/null @@ -1 +0,0 @@ -{"name":"pet","description":"Pets operations","externalDocs":{"description":"Find more info here","url":"https://example.com"},"x-tag-extension":null} \ No newline at end of file