Skip to content

Commit

Permalink
feat: splits described and summarized interfaces
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
  • Loading branch information
baywet committed Jan 24, 2025
1 parent af3038a commit 2a10cd9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@
namespace Microsoft.OpenApi.Models.Interfaces;

/// <summary>
/// Describes an element that has a summary and description.
/// Describes an element that has a description.
/// </summary>
public interface IOpenApiDescribedElement : IOpenApiElement
{
/// <summary>
/// Short description for the example.
/// </summary>
public string Summary { get; set; }

/// <summary>
/// Long description for the example.
/// CommonMark syntax MAY be used for rich text representation.
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.OpenApi/Models/Interfaces/IOpenApiExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Microsoft.OpenApi.Models.Interfaces;
/// Defines the base properties for the example object.
/// This interface is provided for type assertions but should not be implemented by package consumers beyond automatic mocking.
/// </summary>
public interface IOpenApiExample : IOpenApiDescribedElement, IOpenApiSerializable, IOpenApiReadOnlyExtensible
public interface IOpenApiExample : IOpenApiDescribedElement, IOpenApiSummarizedElement, IOpenApiSerializable, IOpenApiReadOnlyExtensible
{
/// <summary>
/// Embedded literal example. The value field and externalValue field are mutually
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Microsoft.OpenApi.Interfaces;

namespace Microsoft.OpenApi.Models.Interfaces;
/// <summary>
/// Describes an element that has a summary.
/// </summary>
public interface IOpenApiSummarizedElement : IOpenApiElement
{
/// <summary>
/// Short description for the example.
/// </summary>
public string Summary { get; set; }
}

0 comments on commit 2a10cd9

Please sign in to comment.