47 lines
1.5 KiB
C#
47 lines
1.5 KiB
C#
using EonaCat.Json;
|
|
|
|
namespace EonaCat.DoxaApi.Models
|
|
{
|
|
// This file is part of the EonaCat project(s) which is released under the Apache License.
|
|
// See the LICENSE file or go to https://EonaCat.com/license for full license details.
|
|
|
|
public sealed class ApiEndpoint
|
|
{
|
|
[JsonProperty("operationId")]
|
|
public string OperationId { get; set; } = "";
|
|
|
|
[JsonProperty("summary")]
|
|
public string? Summary { get; set; }
|
|
|
|
[JsonProperty("description")]
|
|
public string? Description { get; set; }
|
|
|
|
[JsonProperty("method")]
|
|
public string Method { get; set; } = "GET";
|
|
|
|
[JsonProperty("path")]
|
|
public string Path { get; set; } = "/";
|
|
|
|
[JsonProperty("deprecated")]
|
|
public bool Deprecated { get; set; }
|
|
|
|
[JsonProperty("tags")]
|
|
public List<string> Tags { get; set; } = new();
|
|
|
|
[JsonProperty("parameters")]
|
|
public List<ApiParameter> Parameters { get; set; } = new();
|
|
|
|
[JsonProperty("requestBody")]
|
|
public RequestBodyModel? RequestBody { get; set; }
|
|
|
|
[JsonProperty("responses")]
|
|
public List<ResponseModel> Responses { get; set; } = new();
|
|
|
|
/// <summary>
|
|
/// Ids of security schemes that apply to this endpoint (referencing ApiDocument.SecuritySchemes).
|
|
/// Empty means the endpoint is unauthenticated (or uses the document-wide default, if any).
|
|
/// </summary>
|
|
[JsonProperty("security")]
|
|
public List<string> Security { get; set; } = new();
|
|
}
|
|
} |