| | | 1 | | /// <summary> |
| | | 2 | | /// Specifies metadata for an OpenAPI Parameter object. Can be applied to classes |
| | | 3 | | /// to contribute entries under components.parameters. |
| | | 4 | | /// </summary> |
| | | 5 | | [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] |
| | | 6 | | public sealed class OpenApiParameterComponentAttribute : OpenApiProperties |
| | | 7 | | { |
| | | 8 | | /// <summary> |
| | | 9 | | /// Title is not supported for parameter components. |
| | | 10 | | /// </summary> |
| | | 11 | | [Obsolete("Title is not supported for parameter components.", error: false)] |
| | | 12 | | public new string? Title |
| | | 13 | | { |
| | 0 | 14 | | get => base.Title; |
| | 0 | 15 | | set => throw new NotSupportedException("Title is not supported for OpenApiParameterComponentAttribute."); |
| | | 16 | | } |
| | | 17 | | |
| | | 18 | | /// <summary> |
| | | 19 | | /// Description of the parameter. |
| | | 20 | | /// </summary> |
| | 5 | 21 | | public new string? Description { get; set; } |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// Indicates whether the parameter is deprecated. |
| | | 25 | | /// </summary> |
| | 2 | 26 | | public new bool Deprecated { get; set; } |
| | | 27 | | |
| | | 28 | | /// <summary> |
| | | 29 | | /// The local name under components.parameters. |
| | | 30 | | /// </summary> |
| | 2 | 31 | | public string? Key { get; set; } |
| | | 32 | | |
| | | 33 | | /// <summary> |
| | | 34 | | /// The location of the parameter. |
| | | 35 | | /// </summary> |
| | 7 | 36 | | public OaParameterLocation In { get; set; } = OaParameterLocation.Query; |
| | | 37 | | |
| | | 38 | | /// <summary> |
| | | 39 | | /// Whether the parameter is required. |
| | | 40 | | /// </summary> |
| | 3 | 41 | | public bool Required { get; set; } |
| | | 42 | | |
| | | 43 | | /// <summary>Allow empty value (query only).</summary> |
| | 2 | 44 | | public bool AllowEmptyValue { get; set; } |
| | | 45 | | /// <summary>Serialization style hint.</summary> |
| | 2 | 46 | | public OaParameterStyle? Style { get; set; } |
| | | 47 | | /// <summary>Explode hint for structured values.</summary> |
| | 2 | 48 | | public bool Explode { get; set; } |
| | | 49 | | /// <summary>Allow reserved characters unescaped (query only).</summary> |
| | 2 | 50 | | public bool AllowReserved { get; set; } |
| | | 51 | | /// <summary> |
| | | 52 | | /// Indicates that the parameter definition should be inlined |
| | | 53 | | /// into the operation rather than being a reusable component. |
| | | 54 | | /// </summary> |
| | 2 | 55 | | public bool Inline { get; set; } |
| | | 56 | | |
| | | 57 | | /// <summary>The key is the media type. Will use content instead of schema.</summary> |
| | 2 | 58 | | public string? ContentType { get; set; } |
| | | 59 | | } |