Class
Sealed
public sealed class OpenApiSpec
Namespace: Moka.Docs.Plugins.OpenApi
Top-level representation of a parsed OpenAPI 3.0 specification.
Properties
| Name | Description |
|---|---|
BasePath |
Base path extracted from the first server URL, if present. |
Description |
API description from the info object. |
Endpoints |
All parsed endpoints grouped by their original path and method. |
Schemas |
Named schemas from the components/schemas section. |
Tags |
Distinct tag names found across all endpoints, in discovery order. |
Title |
API title from the info object. |
Version |
API version string from the info object. |
BasePath
string OpenApiSpec.BasePath { get; set; }
Base path extracted from the first server URL, if present.
Description
string OpenApiSpec.Description { get; set; }
API description from the info object.
Endpoints
List<OpenApiEndpoint> OpenApiSpec.Endpoints { get; }
All parsed endpoints grouped by their original path and method.
Schemas
Dictionary<string, OpenApiSchema> OpenApiSpec.Schemas { get; }
Named schemas from the components/schemas section.
Tags
List<string> OpenApiSpec.Tags { get; }
Distinct tag names found across all endpoints, in discovery order.
Title
string OpenApiSpec.Title { get; set; }
API title from the info object.
Version
string OpenApiSpec.Version { get; set; }
API version string from the info object.
View Source
/// <summary>
/// Top-level representation of a parsed OpenAPI 3.0 specification.
/// </summary>
public sealed class OpenApiSpec
{
/// <summary>API title from the info object.</summary>
public string Title { get; set; } = "";
/// <summary>API description from the info object.</summary>
public string Description { get; set; } = "";
/// <summary>API version string from the info object.</summary>
public string Version { get; set; } = "";
/// <summary>Base path extracted from the first server URL, if present.</summary>
public string BasePath { get; set; } = "";
/// <summary>All parsed endpoints grouped by their original path and method.</summary>
public List<OpenApiEndpoint> Endpoints { get; } = [];
/// <summary>Named schemas from the components/schemas section.</summary>
public Dictionary<string, OpenApiSchema> Schemas { get; } = new(StringComparer.Ordinal);
/// <summary>Distinct tag names found across all endpoints, in discovery order.</summary>
public List<string> Tags { get; } = [];
}