|
| 1 | + |
| 2 | +using System.Collections.Generic; |
| 3 | +using System.Text.Json.Nodes; |
| 4 | +using Microsoft.OpenApi.Interfaces; |
| 5 | + |
| 6 | +namespace Microsoft.OpenApi.Models.Interfaces; |
| 7 | + |
| 8 | +/// <summary> |
| 9 | +/// Defines the base properties for the headers object. |
| 10 | +/// This interface is provided for type assertions but should not be implemented by package consumers beyond automatic mocking. |
| 11 | +/// </summary> |
| 12 | +public interface IOpenApiHeader : IOpenApiDescribedElement, IOpenApiSerializable, IOpenApiReadOnlyExtensible |
| 13 | +{ |
| 14 | + /// <summary> |
| 15 | + /// Determines whether this header is mandatory. |
| 16 | + /// </summary> |
| 17 | + public bool Required { get; } |
| 18 | + |
| 19 | + /// <summary> |
| 20 | + /// Specifies that a header is deprecated and SHOULD be transitioned out of usage. |
| 21 | + /// </summary> |
| 22 | + public bool Deprecated { get; } |
| 23 | + |
| 24 | + /// <summary> |
| 25 | + /// Sets the ability to pass empty-valued headers. |
| 26 | + /// </summary> |
| 27 | + public bool AllowEmptyValue { get; } |
| 28 | + |
| 29 | + /// <summary> |
| 30 | + /// Describes how the header value will be serialized depending on the type of the header value. |
| 31 | + /// </summary> |
| 32 | + public ParameterStyle? Style { get; } |
| 33 | + |
| 34 | + /// <summary> |
| 35 | + /// When this is true, header values of type array or object generate separate parameters |
| 36 | + /// for each value of the array or key-value pair of the map. |
| 37 | + /// </summary> |
| 38 | + public bool Explode { get; } |
| 39 | + |
| 40 | + /// <summary> |
| 41 | + /// Determines whether the header value SHOULD allow reserved characters, as defined by RFC3986. |
| 42 | + /// </summary> |
| 43 | + public bool AllowReserved { get; } |
| 44 | + |
| 45 | + /// <summary> |
| 46 | + /// The schema defining the type used for the request body. |
| 47 | + /// </summary> |
| 48 | + public OpenApiSchema Schema { get; } |
| 49 | + |
| 50 | + /// <summary> |
| 51 | + /// Example of the media type. |
| 52 | + /// </summary> |
| 53 | + public JsonNode Example { get; } |
| 54 | + |
| 55 | + /// <summary> |
| 56 | + /// Examples of the media type. |
| 57 | + /// </summary> |
| 58 | + public IDictionary<string, IOpenApiExample> Examples { get; } |
| 59 | + |
| 60 | + /// <summary> |
| 61 | + /// A map containing the representations for the header. |
| 62 | + /// </summary> |
| 63 | + public IDictionary<string, OpenApiMediaType> Content { get; } |
| 64 | + |
| 65 | +} |
0 commit comments