| | | 1 | | /// <summary> |
| | | 2 | | /// Specifies metadata for an OpenAPI request body component. This attribute can be applied to method parameters |
| | | 3 | | /// to contribute entries under components.requestBodies. |
| | | 4 | | /// </summary> |
| | | 5 | | [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] |
| | | 6 | | public sealed class OpenApiRequestBodyComponentAttribute : OpenApiProperties |
| | | 7 | | { |
| | | 8 | | /// <summary> |
| | | 9 | | /// Description of the request body. |
| | | 10 | | /// </summary> |
| | 0 | 11 | | public new string? Description { get; set; } |
| | | 12 | | |
| | | 13 | | /// <summary> |
| | | 14 | | /// Optional component key override. If omitted, generator will use class/member naming rules. |
| | | 15 | | /// </summary> |
| | 0 | 16 | | public string? Key { get; set; } |
| | | 17 | | |
| | | 18 | | /// <summary> |
| | | 19 | | /// Media type. Defaults to application/json. |
| | | 20 | | /// </summary> |
| | 0 | 21 | | public string[] ContentType { get; set; } = ["application/json"]; |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// Whether the request body is required. |
| | | 25 | | /// </summary> |
| | 0 | 26 | | public bool Required { get; set; } |
| | | 27 | | |
| | | 28 | | /// <summary> |
| | | 29 | | /// When true, the generator will emit an inline schema object for the request body instead |
| | | 30 | | /// of a <c>$ref</c> to <c>components.schemas</c>. This applies whether the schema is resolved |
| | | 31 | | /// from a CLR type or from a string-based schema reference; in both cases the resolved schema |
| | | 32 | | /// will be inlined where supported. |
| | | 33 | | /// </summary> |
| | 0 | 34 | | public bool Inline { get; set; } |
| | | 35 | | } |