-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2091 from microsoft/fix/headers-reference
fix/headers reference
- Loading branch information
Showing
35 changed files
with
321 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
|
||
using System.Collections.Generic; | ||
using System.Text.Json.Nodes; | ||
using Microsoft.OpenApi.Interfaces; | ||
|
||
namespace Microsoft.OpenApi.Models.Interfaces; | ||
|
||
/// <summary> | ||
/// 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. | ||
/// </summary> | ||
public interface IOpenApiHeader : IOpenApiDescribedElement, IOpenApiSerializable, IOpenApiReadOnlyExtensible | ||
{ | ||
/// <summary> | ||
/// Determines whether this header is mandatory. | ||
/// </summary> | ||
public bool Required { get; } | ||
|
||
/// <summary> | ||
/// Specifies that a header is deprecated and SHOULD be transitioned out of usage. | ||
/// </summary> | ||
public bool Deprecated { get; } | ||
|
||
/// <summary> | ||
/// Sets the ability to pass empty-valued headers. | ||
/// </summary> | ||
public bool AllowEmptyValue { get; } | ||
|
||
/// <summary> | ||
/// Describes how the header value will be serialized depending on the type of the header value. | ||
/// </summary> | ||
public ParameterStyle? Style { get; } | ||
|
||
/// <summary> | ||
/// When this is true, header values of type array or object generate separate parameters | ||
/// for each value of the array or key-value pair of the map. | ||
/// </summary> | ||
public bool Explode { get; } | ||
|
||
/// <summary> | ||
/// Determines whether the header value SHOULD allow reserved characters, as defined by RFC3986. | ||
/// </summary> | ||
public bool AllowReserved { get; } | ||
|
||
/// <summary> | ||
/// The schema defining the type used for the request body. | ||
/// </summary> | ||
public OpenApiSchema Schema { get; } | ||
|
||
/// <summary> | ||
/// Example of the media type. | ||
/// </summary> | ||
public JsonNode Example { get; } | ||
|
||
/// <summary> | ||
/// Examples of the media type. | ||
/// </summary> | ||
public IDictionary<string, IOpenApiExample> Examples { get; } | ||
|
||
/// <summary> | ||
/// A map containing the representations for the header. | ||
/// </summary> | ||
public IDictionary<string, OpenApiMediaType> Content { get; } | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
src/Microsoft.OpenApi/Models/Interfaces/IOpenApiSummarizedElement.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.