Skip to content

Fast.OpenApi public API

Targets: net8.0;net9.0;net10.0. This is a declaration and XML-comment reference. See the module guide for usage and constraints.

Source commit: 43554c07f6c216f80b509bd535c0a5b66ae7f2e8. Maintained through scripts/export-dotnet-api.ps1 -Language en; ordinary site builds consume this file directly.

Fast.OpenApi.OpenApiDocumentSchemaPropertyDto

Source · Targets: net8.0, net9.0, net10.0

csharp
public class OpenApiDocumentSchemaPropertyDto

OpenAPI schema property DTO

Fast.OpenApi.OpenApiDocumentSchemaPropertyDto.Type

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Type { get; set; }

Type

Fast.OpenApi.OpenApiDocumentSchemaPropertyDto.Format

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Format { get; set; }

Format

Fast.OpenApi.OpenApiDocumentSchemaPropertyDto.Nullable

Source · Targets: net8.0, net9.0, net10.0

csharp
public bool Nullable { get; set; }

Nullable

Fast.OpenApi.OpenApiDocumentSchemaPropertyDto.ReadOnly

Source · Targets: net8.0, net9.0, net10.0

csharp
public bool ReadOnly { get; set; }

Read-only

Fast.OpenApi.OpenApiDocumentSchemaPropertyDto.Description

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Description { get; set; }

Description

Fast.OpenApi.OpenApiDocumentSchemaPropertyDto.Items

Source · Targets: net8.0, net9.0, net10.0

csharp
public OpenApiDocumentSchemaPropertyDto Items { get; set; }

Items schema

Fast.OpenApi.OpenApiDocumentSchemaPropertyDto.Properties

Source · Targets: net8.0, net9.0, net10.0

csharp
public IDictionary<string, OpenApiDocumentSchemaPropertyDto> Properties { get; set; }

Object property definitions.

Fast.OpenApi.OpenApiDocumentSchemaPropertyDto.Required

Source · Targets: net8.0, net9.0, net10.0

csharp
public HashSet<string> Required { get; set; }

Required property names.

Fast.OpenApi.OpenApiDocumentSchemaPropertyDto.AdditionalProperties

Source · Targets: net8.0, net9.0, net10.0

csharp
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
    public JsonElement AdditionalProperties { get; set; }

Additional property definition.

Remarks: OpenAPI allows a boolean or schema object here, so the original JSON structure is preserved.

Fast.OpenApi.OpenApiDocumentSchemaPropertyDto.AllOf

Source · Targets: net8.0, net9.0, net10.0

csharp
public List<OpenApiDocumentSchemaPropertyDto> AllOf { get; set; }

Schema composition requiring all schemas to match.

Fast.OpenApi.OpenApiDocumentSchemaPropertyDto.AnyOf

Source · Targets: net8.0, net9.0, net10.0

csharp
public List<OpenApiDocumentSchemaPropertyDto> AnyOf { get; set; }

Schema composition requiring any schema to match.

Fast.OpenApi.OpenApiDocumentSchemaPropertyDto.OneOf

Source · Targets: net8.0, net9.0, net10.0

csharp
public List<OpenApiDocumentSchemaPropertyDto> OneOf { get; set; }

Schema composition requiring exactly one schema to match.

Fast.OpenApi.OpenApiDocumentSchemaPropertyDto.Ref

Source · Targets: net8.0, net9.0, net10.0

csharp
[JsonPropertyName("$ref")]
    public string Ref { get; set; }

Reference

Fast.OpenApi.OpenApiDocumentComponentDto

Source · Targets: net8.0, net9.0, net10.0

csharp
public class OpenApiDocumentComponentDto

OpenAPI components DTO

Fast.OpenApi.OpenApiDocumentComponentDto.Schemas

Source · Targets: net8.0, net9.0, net10.0

csharp
public IDictionary<string, OpenApiDocumentComponentSchemaDto> Schemas { get; set; }

Schemas

Fast.OpenApi.OpenApiDocumentComponentSchemaDto

Source · Targets: net8.0, net9.0, net10.0

csharp
public class OpenApiDocumentComponentSchemaDto

OpenAPI component schema DTO

Fast.OpenApi.OpenApiDocumentComponentSchemaDto.Enum

Source · Targets: net8.0, net9.0, net10.0

csharp
public List<long> Enum { get; set; }

Enumeration

Fast.OpenApi.OpenApiDocumentComponentSchemaDto.Type

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Type { get; set; }

Type

Fast.OpenApi.OpenApiDocumentComponentSchemaDto.Format

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Format { get; set; }

Format

Fast.OpenApi.OpenApiDocumentComponentSchemaDto.Nullable

Source · Targets: net8.0, net9.0, net10.0

csharp
public bool Nullable { get; set; }

Nullable.

Fast.OpenApi.OpenApiDocumentComponentSchemaDto.Items

Source · Targets: net8.0, net9.0, net10.0

csharp
public OpenApiDocumentSchemaPropertyDto Items { get; set; }

Items schema.

Fast.OpenApi.OpenApiDocumentComponentSchemaDto.Properties

Source · Targets: net8.0, net9.0, net10.0

csharp
public IDictionary<string, OpenApiDocumentSchemaPropertyDto> Properties { get; set; }

Schema property definitions

Fast.OpenApi.OpenApiDocumentComponentSchemaDto.Required

Source · Targets: net8.0, net9.0, net10.0

csharp
public HashSet<string> Required { get; set; }

Required property names.

Fast.OpenApi.OpenApiDocumentComponentSchemaDto.AdditionalProperties

Source · Targets: net8.0, net9.0, net10.0

csharp
[JsonIgnore]
    public bool AdditionalProperties { get; set; }

Additional properties

Fast.OpenApi.OpenApiDocumentComponentSchemaDto.AdditionalPropertiesSchema

Source · Targets: net8.0, net9.0, net10.0

csharp
[JsonPropertyName("additionalProperties")]
    [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
    public JsonElement AdditionalPropertiesSchema { get; set; }

Original additional-properties definition.

Remarks: Supports both boolean values and schema objects in OpenAPI.

Fast.OpenApi.OpenApiDocumentComponentSchemaDto.Ref

Source · Targets: net8.0, net9.0, net10.0

csharp
[JsonPropertyName("$ref")]
    public string Ref { get; set; }

Reference.

Fast.OpenApi.OpenApiDocumentComponentSchemaDto.AllOf

Source · Targets: net8.0, net9.0, net10.0

csharp
public List<OpenApiDocumentSchemaPropertyDto> AllOf { get; set; }

Schema composition requiring all schemas to match.

Fast.OpenApi.OpenApiDocumentComponentSchemaDto.AnyOf

Source · Targets: net8.0, net9.0, net10.0

csharp
public List<OpenApiDocumentSchemaPropertyDto> AnyOf { get; set; }

Schema composition requiring any schema to match.

Fast.OpenApi.OpenApiDocumentComponentSchemaDto.OneOf

Source · Targets: net8.0, net9.0, net10.0

csharp
public List<OpenApiDocumentSchemaPropertyDto> OneOf { get; set; }

Schema composition requiring exactly one schema to match.

Fast.OpenApi.OpenApiDocumentComponentSchemaDto.Description

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Description { get; set; }

Description

Fast.OpenApi.OpenApiDocumentDto

Source · Targets: net8.0, net9.0, net10.0

csharp
public class OpenApiDocumentDto

OpenAPI document DTO

Fast.OpenApi.OpenApiDocumentDto.Url

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Url { get; set; }

Address

Remarks:

Fast.OpenApi.OpenApiDocumentDto.OpenApi

Source · Targets: net8.0, net9.0, net10.0

csharp
[JsonPropertyName("openapi")]
    public string OpenApi { get; set; }

OpenAPI version

Fast.OpenApi.OpenApiDocumentDto.Info

Source · Targets: net8.0, net9.0, net10.0

csharp
public OpenApiDocumentInfoDto Info { get; set; }

Document information

Fast.OpenApi.OpenApiDocumentDto.Paths

Source · Targets: net8.0, net9.0, net10.0

csharp
public IDictionary<string, OpenApiDocumentPathDto> Paths { get; set; }

Paths

Fast.OpenApi.OpenApiDocumentDto.Components

Source · Targets: net8.0, net9.0, net10.0

csharp
public OpenApiDocumentComponentDto Components { get; set; }

Components

Fast.OpenApi.OpenApiDocumentDto.Tags

Source · Targets: net8.0, net9.0, net10.0

csharp
public List<OpenApiDocumentTagDto> Tags { get; set; }

Modules

Fast.OpenApi.OpenApiDocumentInfoDto

Source · Targets: net8.0, net9.0, net10.0

csharp
public class OpenApiDocumentInfoDto

OpenAPI document information DTO

Fast.OpenApi.OpenApiDocumentInfoDto.Title

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Title { get; set; }

Title

Fast.OpenApi.OpenApiDocumentInfoDto.Description

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Description { get; set; }

Description

Fast.OpenApi.OpenApiDocumentInfoDto.Version

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Version { get; set; }

Version

Fast.OpenApi.OpenApiDocumentPathDto

Source · Targets: net8.0, net9.0, net10.0

csharp
public class OpenApiDocumentPathDto

OpenAPI document path DTO

Fast.OpenApi.OpenApiDocumentPathDto.Get

Source · Targets: net8.0, net9.0, net10.0

csharp
public OpenApiDocumentPathMethodDto Get { get; set; }

GET request

Fast.OpenApi.OpenApiDocumentPathDto.Post

Source · Targets: net8.0, net9.0, net10.0

csharp
public OpenApiDocumentPathMethodDto Post { get; set; }

POST request

Fast.OpenApi.OpenApiDocumentPathDto.Method

Source · Targets: net8.0, net9.0, net10.0

csharp
public OpenApiDocumentPathMethodDto Method { get; }

Request method

Fast.OpenApi.OpenApiDocumentPathDto.RequestMethod

Source · Targets: net8.0, net9.0, net10.0

csharp
public HttpRequestMethodEnum RequestMethod { get; }

Request method

Fast.OpenApi.OpenApiDocumentPathDto.Tag

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Tag { get; }

Modules

Fast.OpenApi.OpenApiDocumentPathMethodDto

Source · Targets: net8.0, net9.0, net10.0

csharp
public class OpenApiDocumentPathMethodDto

OpenAPI path operation DTO

Fast.OpenApi.OpenApiDocumentPathMethodDto.Tags

Source · Targets: net8.0, net9.0, net10.0

csharp
public List<string> Tags { get; set; }

Modules

Remarks: Typically only the first item is used

Fast.OpenApi.OpenApiDocumentPathMethodDto.Summary

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Summary { get; set; }

API name

Fast.OpenApi.OpenApiDocumentPathMethodDto.OperationId

Source · Targets: net8.0, net9.0, net10.0

csharp
public string OperationId { get; set; }

Operation ID

Fast.OpenApi.OpenApiDocumentPathMethodDto.Parameters

Source · Targets: net8.0, net9.0, net10.0

csharp
public List<OpenApiDocumentPathMethodParameterDto> Parameters { get; set; }

URL parameters

Fast.OpenApi.OpenApiDocumentPathMethodDto.RequestBody

Source · Targets: net8.0, net9.0, net10.0

csharp
public OpenApiDocumentPathMethodRequestBodyDto RequestBody { get; set; }

Body parameters

Fast.OpenApi.OpenApiDocumentPathMethodDto.Responses

Source · Targets: net8.0, net9.0, net10.0

csharp
public OpenApiDocumentPathMethodResponseDto Responses { get; set; }

Responses

Fast.OpenApi.OpenApiDocumentPathMethodContentDto

Source · Targets: net8.0, net9.0, net10.0

csharp
public class OpenApiDocumentPathMethodContentDto

OpenAPI path content DTO

Fast.OpenApi.OpenApiDocumentPathMethodContentDto.Json

Source · Targets: net8.0, net9.0, net10.0

csharp
[JsonPropertyName("application/json")]
    public OpenApiDocumentPathMethodContentSchemaDto Json { get; set; }

JSON format

Fast.OpenApi.OpenApiDocumentPathMethodContentDto.FormData

Source · Targets: net8.0, net9.0, net10.0

csharp
[JsonPropertyName("multipart/form-data")]
    public OpenApiDocumentPathMethodContentSchemaDto FormData { get; set; }

Form format

Fast.OpenApi.OpenApiDocumentPathMethodContentSchemaDto

Source · Targets: net8.0, net9.0, net10.0

csharp
public class OpenApiDocumentPathMethodContentSchemaDto

OpenAPI path content schema DTO

Fast.OpenApi.OpenApiDocumentPathMethodContentSchemaDto.Schema

Source · Targets: net8.0, net9.0, net10.0

csharp
public OpenApiDocumentSchemaPropertyDto Schema { get; set; }

Schemas

Fast.OpenApi.OpenApiDocumentPathMethodParameterDto

Source · Targets: net8.0, net9.0, net10.0

csharp
public class OpenApiDocumentPathMethodParameterDto

OpenAPI path operation parameter DTO

Fast.OpenApi.OpenApiDocumentPathMethodParameterDto.Name

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Name { get; set; }

Parameter name

Fast.OpenApi.OpenApiDocumentPathMethodParameterDto.In

Source · Targets: net8.0, net9.0, net10.0

csharp
public string In { get; set; }

Parameter location, such as query, path, header, or cookie

Fast.OpenApi.OpenApiDocumentPathMethodParameterDto.Description

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Description { get; set; }

Description

Fast.OpenApi.OpenApiDocumentPathMethodParameterDto.Schema

Source · Targets: net8.0, net9.0, net10.0

csharp
public OpenApiDocumentSchemaPropertyDto Schema { get; set; }

Schemas

Fast.OpenApi.OpenApiDocumentPathMethodRequestBodyDto

Source · Targets: net8.0, net9.0, net10.0

csharp
public class OpenApiDocumentPathMethodRequestBodyDto

OpenAPI path request-body DTO

Fast.OpenApi.OpenApiDocumentPathMethodRequestBodyDto.Description

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Description { get; set; }

Description

Fast.OpenApi.OpenApiDocumentPathMethodRequestBodyDto.Content

Source · Targets: net8.0, net9.0, net10.0

csharp
public OpenApiDocumentPathMethodContentDto Content { get; set; }

Request-body content

Fast.OpenApi.OpenApiDocumentPathMethodResponseContentDto

Source · Targets: net8.0, net9.0, net10.0

csharp
public class OpenApiDocumentPathMethodResponseContentDto

OpenAPI path response-content DTO

Fast.OpenApi.OpenApiDocumentPathMethodResponseContentDto.Description

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Description { get; set; }

Description

Fast.OpenApi.OpenApiDocumentPathMethodResponseContentDto.Content

Source · Targets: net8.0, net9.0, net10.0

csharp
public OpenApiDocumentPathMethodContentDto Content { get; set; }

Content

Fast.OpenApi.OpenApiDocumentPathMethodResponseDto

Source · Targets: net8.0, net9.0, net10.0

csharp
public class OpenApiDocumentPathMethodResponseDto

OpenAPI path response DTO

Fast.OpenApi.OpenApiDocumentPathMethodResponseDto.Description

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Description { get; set; }

Description

Fast.OpenApi.OpenApiDocumentPathMethodResponseDto.Code200

Source · Targets: net8.0, net9.0, net10.0

csharp
[JsonPropertyName("200")]
    public OpenApiDocumentPathMethodResponseContentDto Code200 { get; set; }

Response content for status code 200

Fast.OpenApi.OpenApiDocumentTagDto

Source · Targets: net8.0, net9.0, net10.0

csharp
public class OpenApiDocumentTagDto

OpenAPI document module DTO

Fast.OpenApi.OpenApiDocumentTagDto.Name

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Name { get; set; }

Module name

Fast.OpenApi.OpenApiDocumentTagDto.Description

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Description { get; set; }

Description

Fast.OpenApi.ScriptLanguageEnum

Source · Targets: net8.0, net9.0, net10.0

csharp
public enum ScriptLanguageEnum : byte

Script-language enum

Fast.OpenApi.ScriptLanguageEnum.JavaScript

Source · Targets: net8.0, net9.0, net10.0

csharp
[Description("JavaScript")]
    JavaScript = 1

JavaScript

Fast.OpenApi.ScriptLanguageEnum.TypeScript

Source · Targets: net8.0, net9.0, net10.0

csharp
[Description("TypeScript")]
    TypeScript = 2

TypeScript

Fast.OpenApi.IServiceCollectionExtension

Source · Targets: net8.0, net9.0, net10.0

csharp
[SuppressSniffer]
public static class IServiceCollectionExtension

Dynamic API extensions for IServiceCollection

Fast.OpenApi.IServiceCollectionExtension.AddOpenApi

Source · Targets: net8.0, net9.0, net10.0

csharp
public static IServiceCollection AddOpenApi(this IServiceCollection services, IConfiguration configuration,
        string section = "OpenApiSettings")

Adds OpenAPI settings

Remarks: For applications using only the utilities

  • Parameter services: The service collection to add services to
  • Parameter configuration: Configuration used to read module settings
  • Parameter section: JSON configuration section key; defaults to OpenAPISettings
  • Returns: Returns services for chaining

Fast.OpenApi.OpenApiSettingsOptions

Source · Targets: net8.0, net9.0, net10.0

csharp
[SuppressSniffer]
public class OpenApiSettingsOptions : IPostConfigure

OpenAPI settings

Fast.OpenApi.OpenApiSettingsOptions.FolderGroup

Source · Targets: net8.0, net9.0, net10.0

csharp
public bool? FolderGroup { get; set; }

Folder groups

Fast.OpenApi.OpenApiSettingsOptions.ImportSchemaMappings

Source · Targets: net8.0, net9.0, net10.0

csharp
public List<OpenApiImportSchemaMappingSettingsOptions> ImportSchemaMappings { get; set; }

Imported declaration mappings

Remarks: Also ignored during export

Fast.OpenApi.OpenApiSettingsOptions.ImportTypeMappings

Source · Targets: net8.0, net9.0, net10.0

csharp
public List<OpenApiImportTypeMappingSettingsOptions> ImportTypeMappings { get; set; }

Imported type declarations

Fast.OpenApi.OpenApiSettingsOptions.IgnoreSchemas

Source · Targets: net8.0, net9.0, net10.0

csharp
public HashSet<string> IgnoreSchemas { get; set; }

Ignored declarations

Fast.OpenApi.OpenApiSettingsOptions.PagedSchemaProperties

Source · Targets: net8.0, net9.0, net10.0

csharp
public HashSet<string> PagedSchemaProperties { get; set; }

Pagination declaration properties

Fast.OpenApi.OpenApiSettingsOptions.BaseTypeMappings

Source · Targets: net8.0, net9.0, net10.0

csharp
public IDictionary<string, string> BaseTypeMappings { get; set; }

Primitive type mappings

Fast.OpenApi.OpenApiSettingsOptions.PostConfigure

Source · Targets: net8.0, net9.0, net10.0

csharp
public void PostConfigure()

Documentation is inherited from an interface or base class; consult that declaration.

Fast.OpenApi.OpenApiImportSchemaMappingSettingsOptions

Source · Targets: net8.0, net9.0, net10.0

csharp
[SuppressSniffer]
public class OpenApiImportSchemaMappingSettingsOptions

OpenAPI imported declaration mapping options

Fast.OpenApi.OpenApiImportSchemaMappingSettingsOptions.Name

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Name { get; set; }

Name

Fast.OpenApi.OpenApiImportSchemaMappingSettingsOptions.MappingName

Source · Targets: net8.0, net9.0, net10.0

csharp
public string MappingName { get; set; }

Mapping name

Remarks: Defaults to Name when empty

Fast.OpenApi.OpenApiImportSchemaMappingSettingsOptions.WebImportPath

Source · Targets: net8.0, net9.0, net10.0

csharp
public string WebImportPath { get; set; }

Import path for web clients

Fast.OpenApi.OpenApiImportSchemaMappingSettingsOptions.MobileImportPath

Source · Targets: net8.0, net9.0, net10.0

csharp
public string MobileImportPath { get; set; }

Import path for mobile clients

Fast.OpenApi.OpenApiImportTypeMappingSettingsOptions

Source · Targets: net8.0, net9.0, net10.0

csharp
[SuppressSniffer]
public class OpenApiImportTypeMappingSettingsOptions

OpenAPI imported type mapping options

Fast.OpenApi.OpenApiImportTypeMappingSettingsOptions.Name

Source · Targets: net8.0, net9.0, net10.0

csharp
public string Name { get; set; }

Name prefix

Fast.OpenApi.OpenApiImportTypeMappingSettingsOptions.MappingName

Source · Targets: net8.0, net9.0, net10.0

csharp
public string MappingName { get; set; }

Mapping name

Remarks: {0} expands to all characters remaining after trimming the name prefix

Fast.OpenApi.OpenApiImportTypeMappingSettingsOptions.RefSchema

Source · Targets: net8.0, net9.0, net10.0

csharp
public HashSet<string> RefSchema { get; set; }

Referenced declaration

Fast.OpenApi.OpenApiUtil

Source · Targets: net8.0, net9.0, net10.0

csharp
public static partial class OpenApiUtil

OpenAPI API utilities

Fast.OpenApi.OpenApiUtil

Source · Targets: net8.0, net9.0, net10.0

csharp
public static partial class OpenApiUtil

OpenAPI DTO utilities

Fast.OpenApi.OpenApiUtil

Source · Targets: net8.0, net9.0, net10.0

csharp
public static partial class OpenApiUtil

OpenAPI enum utilities

Fast.OpenApi.OpenApiUtil

Source · Targets: net8.0, net9.0, net10.0

csharp
public static partial class OpenApiUtil

OpenAPI utilities

Fast.OpenApi.OpenApiUtil.GenerateOpenApi

Source · Targets: net8.0, net9.0, net10.0

csharp
public static async Task GenerateOpenApi(string address,
        IApiDescriptionGroupCollectionProvider apiDescriptionGroupCollectionProvider, List<string> groupList = null)

Generates OpenAPI document resources

  • Parameter address: Target service address
  • Parameter apiDescriptionGroupCollectionProvider: Provider used to read all API description groups
  • Parameter groupList: Documentation groups
  • Returns: A task representing OpenAPI document resource generation

Fast.OpenApi.OpenApiUtil

Source · Targets: net8.0, net9.0, net10.0

csharp
public static partial class OpenApiUtil

OpenAPI request utilities