| | | 1 | | /// <summary> |
| | | 2 | | /// Declares a reusable example reference for a request body, |
| | | 3 | | /// mapping a local example key to a components/examples reference. |
| | | 4 | | /// </summary> |
| | | 5 | | /// <remarks> |
| | | 6 | | /// Create a request body example reference, optionally specifying the media type. |
| | | 7 | | /// </remarks> |
| | | 8 | | [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = true)] |
| | | 9 | | public sealed class OpenApiRequestBodyExampleRefAttribute : KestrunAnnotation, IOpenApiExampleAttribute |
| | | 10 | | { |
| | | 11 | | /// <summary>Local name under content[contentType].examples</summary> |
| | 0 | 12 | | public required string Key { get; set; } |
| | | 13 | | |
| | | 14 | | /// <summary>Id under #/components/examples/{ReferenceId}</summary> |
| | 0 | 15 | | public required string ReferenceId { get; set; } |
| | | 16 | | |
| | | 17 | | /// <summary>Media type bucket (e.g., application/json, application/xml)</summary> |
| | 0 | 18 | | public string[]? ContentType { get; set; } |
| | | 19 | | |
| | | 20 | | /// <summary> |
| | | 21 | | /// When true, embeds the example directly instead of referencing it. |
| | | 22 | | /// </summary> |
| | 0 | 23 | | public bool Inline { get; set; } |
| | | 24 | | } |