Class Sealed
public sealed class OpenApiRequestBody

Namespace: Moka.Docs.Plugins.OpenApi

Represents the request body of an endpoint.

Properties

NameDescription
ContentType Content type (e.g. application/json).
Description Human-readable description of the request body.
Required Whether the request body is required.
Schema Schema describing the request body structure.

ContentType

string OpenApiRequestBody.ContentType { get; set; }

Content type (e.g. application/json).

Description

string OpenApiRequestBody.Description { get; set; }

Human-readable description of the request body.

Required

bool OpenApiRequestBody.Required { get; set; }

Whether the request body is required.

Schema

OpenApiSchema? OpenApiRequestBody.Schema { get; set; }

Schema describing the request body structure.

View Source
/// <summary>
///     Represents the request body of an endpoint.
/// </summary>
public sealed class OpenApiRequestBody
{
    /// <summary>Human-readable description of the request body.</summary>
    public string Description { get; set; } = "";
    /// <summary>Whether the request body is required.</summary>
    public bool Required { get; set; }
    /// <summary>Content type (e.g. <c>application/json</c>).</summary>
    public string ContentType { get; set; } = "";
    /// <summary>Schema describing the request body structure.</summary>
    public OpenApiSchema? Schema { get; set; }
}
Was this page helpful?