Class DocumentOptions
options for the swagger document
Inherited Members
Namespace: FastEndpoints.Swagger
Assembly: FastEndpoints.Swagger.dll
Syntax
public class DocumentOptions
Properties
AutoTagPathSegmentIndex
the index of the route path segment to use for tagging/grouping endpoints. set 0 to disable auto tagging.
Declaration
public int AutoTagPathSegmentIndex { get; set; }
Property Value
Type | Description |
---|---|
int |
DocumentSettings
a function for configuring the swagger document generator settings
Declaration
public Action<AspNetCoreOpenApiDocumentGeneratorSettings>? DocumentSettings { get; set; }
Property Value
Type | Description |
---|---|
Action<AspNetCoreOpenApiDocumentGeneratorSettings> |
EnableGetRequestsWithBody
by default GET request DTO properties are automatically converted to query parameters because fetch-client/swagger ui doesn't support it. set this to true if for some reason you'd like to disable this auto conversion and allow GET requests with a body.
Declaration
public bool EnableGetRequestsWithBody { get; set; }
Property Value
Type | Description |
---|---|
bool |
EnableJWTBearerAuth
set to false to disable auto addition of jwt bearer auth support
Declaration
public bool EnableJWTBearerAuth { get; set; }
Property Value
Type | Description |
---|---|
bool |
EndpointFilter
a function to filter out endpoints from the swagger document. this function will be run against every fast endpoint discovered. return true to include the endpoint and return false to exclude the endpoint from the swagger doc.
Declaration
public Func<EndpointDefinition, bool>? EndpointFilter { get; set; }
Property Value
Type | Description |
---|---|
Func<EndpointDefinition, bool> |
ExcludeNonFastEndpoints
if set to true, only FastEndpoints will show up in the swagger doc
Declaration
public bool ExcludeNonFastEndpoints { get; set; }
Property Value
Type | Description |
---|---|
bool |
FlattenSchema
enabling this flattens the inheritance hierarchy of all the schema.
Declaration
public bool FlattenSchema { get; set; }
Property Value
Type | Description |
---|---|
bool |
MaxEndpointVersion
endpoints greater than this version will not be included in the swagger doc.
Declaration
public int MaxEndpointVersion { get; set; }
Property Value
Type | Description |
---|---|
int |
MinEndpointVersion
endpoints lower than this version will not be included in the swagger doc.
Declaration
public int MinEndpointVersion { get; set; }
Property Value
Type | Description |
---|---|
int |
NewtonsoftSettings
any additional newtonsoft serializer settings. most useful for registering custom converters.
Declaration
public Action<JsonSerializerSettings>? NewtonsoftSettings { get; set; }
Property Value
Type | Description |
---|---|
Action<JsonSerializerSettings> |
RemoveEmptyRequestSchema
set to true for removing empty request dto schema from the swagger document.
WARNING: enabling this also flattens the inheritance hierarchy of the schema.
Declaration
public bool RemoveEmptyRequestSchema { get; set; }
Property Value
Type | Description |
---|---|
bool |
SerializerSettings
json serializer options
Declaration
public Action<JsonSerializerOptions>? SerializerSettings { get; set; }
Property Value
Type | Description |
---|---|
Action<JsonSerializerOptions> |
ShortSchemaNames
set to true if you'd like schema names to be just the class name instead of the full name.
Declaration
public bool ShortSchemaNames { get; set; }
Property Value
Type | Description |
---|---|
bool |
ShowDeprecatedOps
by default deprecated endpoints/operations will not show up in the swagger doc. set this to true if you instead want them to show up but displayed as "obsolete".
Declaration
public bool ShowDeprecatedOps { get; set; }
Property Value
Type | Description |
---|---|
bool |
TagCase
the casing strategy to use when naming endpoint tags.
Declaration
public TagCase TagCase { get; set; }
Property Value
Type | Description |
---|---|
TagCase |
TagDescriptions
specify swagger tag descriptions for the document. the key of the dictionary is the name of the tag to add a description for.
Declaration
public Action<Dictionary<string, string>>? TagDescriptions { get; set; }
Property Value
Type | Description |
---|---|
Action<Dictionary<string, string>> |
UsePropertyNamingPolicyForParams
specify if PropertyNamingPolicy should be used for naming swagger parameters that are generated by the default operation processor.
Declaration
public bool UsePropertyNamingPolicyForParams { get; set; }
Property Value
Type | Description |
---|---|
bool |