Files
EonaCat.DoxaApi/DoxaApi/Models/ApiEndpoint.cs
T
2026-06-21 20:10:02 +02:00

47 lines
1.6 KiB
C#

using System.Text.Json.Serialization;
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
{
[JsonPropertyName("operationId")]
public string OperationId { get; set; } = "";
[JsonPropertyName("summary")]
public string? Summary { get; set; }
[JsonPropertyName("description")]
public string? Description { get; set; }
[JsonPropertyName("method")]
public string Method { get; set; } = "GET";
[JsonPropertyName("path")]
public string Path { get; set; } = "/";
[JsonPropertyName("deprecated")]
public bool Deprecated { get; set; }
[JsonPropertyName("tags")]
public List<string> Tags { get; set; } = new();
[JsonPropertyName("parameters")]
public List<ApiParameter> Parameters { get; set; } = new();
[JsonPropertyName("requestBody")]
public RequestBodyModel? RequestBody { get; set; }
[JsonPropertyName("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>
[JsonPropertyName("security")]
public List<string> Security { get; set; } = new();
}
}