OpenApiDocDescriptor class
Generates OpenAPI v2 (Swagger) documents from C# types decorated with OpenApiSchema attributes.
Helper methods for accessing OpenAPI document components.
Generates OpenAPI v2 (Swagger) documents from C# types decorated with OpenApiSchema attributes.
Generates OpenAPI v2 (Swagger) documents from C# types decorated with OpenApiSchema attributes.
Helper methods for accessing OpenAPI document components.
Helper methods for accessing OpenAPI document components.
Generates OpenAPI v2 (Swagger) documents from C# types decorated with OpenApiSchema attributes.
Generates OpenAPI v2 (Swagger) documents from C# types decorated with OpenApiSchema attributes.
Helper methods for accessing OpenAPI document components.
Generates OpenAPI v2 (Swagger) documents from C# types decorated with OpenApiSchema attributes.
Generates OpenAPI v2 (Swagger) documents from C# types decorated with OpenApiSchema attributes.
Generates OpenAPI v2 (Swagger) documents from C# types decorated with OpenApiSchema attributes.
Methods for applying security schemes to the OpenAPI document.
Helper methods for accessing OpenAPI document components.
Helper methods for accessing OpenAPI document components.
public class OpenApiDocDescriptor
Public Members
| name | description |
|---|---|
| OpenApiDocDescriptor(…) | Initializes a new instance of the OpenApiDocDescriptor. |
| Callbacks { get; set; } | OpenAPI metadata for callbacks associated with this document. |
| Document { get; } | The OpenAPI document being generated. |
| DocumentId { get; set; } | The ID of the OpenAPI document being generated. |
| HasBeenGenerated { get; } | Indicates whether the OpenAPI document has been generated at least once. |
| Host { get; set; } | The Kestrun host providing registered routes. |
| InlineComponents { get; } | Inline components specific to this OpenAPI document. |
| SecurityRequirement { get; } | Security requirements for the OpenAPI document. |
| WebHook { get; set; } | OpenAPI metadata for webhooks associated with this document. |
| AddComponentExample(…) | Adds a component example to the OpenAPI document. |
| AddComponentHeader(…) | Adds an OpenApiHeader component to the OpenAPI document. |
| AddComponentLink(…) | Adds a component link to the OpenAPI document. |
| AddInlineExample(…) | Adds an inline example to the OpenAPI document. |
| AddInlineLink(…) | Adds an inline link to the OpenAPI document. |
| AddOpenApiExtension(…) | Creates an OpenAPI extension in the document from the provided extensions dictionary. |
| AddTag(…) | Adds a tag if it doesn’t exist and returns the existing or newly created tag. |
| ApplySecurityScheme(…) | Applies a security scheme to the OpenAPI document based on the provided authentication options. |
| ContainsTag(…) | Determines whether the OpenAPI document contains a tag with the specified name. |
| CreateExternalDocs(…) | Creates an OpenApiExternalDocs object with optional extensions. (2 methods) |
| CreateInfoContact(…) | Creates an OpenApiContact object with optional extensions. |
| GenerateComponents() | Generates the OpenAPI document by auto-discovering component types. |
| GenerateDoc() | Generates the OpenAPI document by processing components and building paths and webhooks. |
| InferPrimitiveSchema(…) | Infers a primitive OpenApiSchema from a .NET type. |
| LoadAnnotatedFunctions(…) | Enumerates all in-session PowerShell functions in the given runspace, detects those annotated with [OpenApiPath], and maps them into the provided KestrunHost. |
| NewOpenApiExample(…) | Creates a new OpenApiExample object. (2 methods) |
| NewOpenApiExternalExample(…) | Creates a new OpenApiExample object. Using ExternalValue |
| NewOpenApiHeader(…) | Creates a new OpenApiHeader with the specified properties. |
| NewOpenApiLink(…) | Creates a new OpenApiLink instance based on the provided parameters. |
| ReadAndDiagnose(…) | Reads and diagnoses the OpenAPI document by serializing and re-parsing it. |
| RemoveTag(…) | Removes a tag by instance. Returns true if removed. |
| ToJson(…) | Serializes the OpenAPI document to a JSON string. |
| ToYaml(…) | Serializes the OpenAPI document to a YAML string. |
| TryGetComponent<T>(…) | Tries to retrieve an OpenAPI component by name and kind. |
| TryGetInline<T>(…) | Tries to retrieve an inline OpenAPI component by name and kind. |
| TryGetTag(…) | Tries to get a tag item by name from the OpenAPI document. |
| const DefaultDocumentationId | Default documentation identifier. |
| static readonly DefaultDocumentationIds | Default documentation identifiers for OpenAPI authentication schemes. |
See Also
- namespace Kestrun.OpenApi
- OpenApiDocDescriptor.cs