Class
Sealed
public sealed class OpenApiEndpoint
Namespace: Moka.Docs.Plugins.OpenApi
Represents a single HTTP endpoint (one path + one HTTP method).
Properties
| Name | Description |
|---|---|
Deprecated |
Whether this endpoint is marked as deprecated. |
Description |
Longer description of the endpoint. |
ExampleRequestJson |
Example JSON request body, if provided in the spec. |
ExampleResponseJson |
Example JSON response body (typically from the first 2xx response), if provided. |
Method |
HTTP method (GET, POST, PUT, DELETE, PATCH, etc.). |
OperationId |
Unique operation identifier. |
Parameters |
Path, query, header, and cookie parameters. |
Path |
URL path template (e.g. /users/{id}). |
RequestBody |
Request body definition, if any. |
Responses |
Response definitions keyed by status code. |
Summary |
Short summary of the endpoint. |
Tags |
Tags used to group this endpoint in the documentation. |
Deprecated
bool OpenApiEndpoint.Deprecated { get; set; }
Whether this endpoint is marked as deprecated.
Description
string OpenApiEndpoint.Description { get; set; }
Longer description of the endpoint.
ExampleRequestJson
string? OpenApiEndpoint.ExampleRequestJson { get; set; }
Example JSON request body, if provided in the spec.
ExampleResponseJson
string? OpenApiEndpoint.ExampleResponseJson { get; set; }
Example JSON response body (typically from the first 2xx response), if provided.
Method
string OpenApiEndpoint.Method { get; set; }
HTTP method (GET, POST, PUT, DELETE, PATCH, etc.).
OperationId
string OpenApiEndpoint.OperationId { get; set; }
Unique operation identifier.
Parameters
List<OpenApiParameter> OpenApiEndpoint.Parameters { get; }
Path, query, header, and cookie parameters.
Path
string OpenApiEndpoint.Path { get; set; }
URL path template (e.g. /users/{id}).
RequestBody
OpenApiRequestBody? OpenApiEndpoint.RequestBody { get; set; }
Request body definition, if any.
Responses
List<OpenApiResponse> OpenApiEndpoint.Responses { get; }
Response definitions keyed by status code.
Summary
string OpenApiEndpoint.Summary { get; set; }
Short summary of the endpoint.
Tags
List<string> OpenApiEndpoint.Tags { get; }
Tags used to group this endpoint in the documentation.
View Source
/// <summary>
/// Represents a single HTTP endpoint (one path + one HTTP method).
/// </summary>
public sealed class OpenApiEndpoint
{
/// <summary>HTTP method (GET, POST, PUT, DELETE, PATCH, etc.).</summary>
public string Method { get; set; } = "";
/// <summary>URL path template (e.g. <c>/users/{id}</c>).</summary>
public string Path { get; set; } = "";
/// <summary>Short summary of the endpoint.</summary>
public string Summary { get; set; } = "";
/// <summary>Longer description of the endpoint.</summary>
public string Description { get; set; } = "";
/// <summary>Unique operation identifier.</summary>
public string OperationId { get; set; } = "";
/// <summary>Whether this endpoint is marked as deprecated.</summary>
public bool Deprecated { get; set; }
/// <summary>Tags used to group this endpoint in the documentation.</summary>
public List<string> Tags { get; } = [];
/// <summary>Path, query, header, and cookie parameters.</summary>
public List<OpenApiParameter> Parameters { get; } = [];
/// <summary>Request body definition, if any.</summary>
public OpenApiRequestBody? RequestBody { get; set; }
/// <summary>Response definitions keyed by status code.</summary>
public List<OpenApiResponse> Responses { get; } = [];
/// <summary>Example JSON request body, if provided in the spec.</summary>
public string? ExampleRequestJson { get; set; }
/// <summary>Example JSON response body (typically from the first 2xx response), if provided.</summary>
public string? ExampleResponseJson { get; set; }
}