Show / Hide Table of Contents

Interface IOpenApiBuilder

An interface that allows an Open API document to be built.

Namespace: FunctionMonkey.Abstractions.Builders
Assembly: FunctionMonkey.Abstractions.dll
Syntax
public interface IOpenApiBuilder

Methods

| Improve this Doc View Source

AddDocumentFilter(Func<IOpenApiDocumentFilter>)

Add a custom document filter to the filter chain.

Declaration
IOpenApiBuilder AddDocumentFilter(Func<IOpenApiDocumentFilter> documentFilterFactory)
Parameters
Type Name Description
Func<IOpenApiDocumentFilter> documentFilterFactory

The filter to add

Returns
Type Description
IOpenApiBuilder
| Improve this Doc View Source

AddOperationFilter(Func<IOpenApiOperationFilter>)

Add a custom operation filter to the filter chain.

Declaration
IOpenApiBuilder AddOperationFilter(Func<IOpenApiOperationFilter> operationFilterFactory)
Parameters
Type Name Description
Func<IOpenApiOperationFilter> operationFilterFactory

The filter to add

Returns
Type Description
IOpenApiBuilder
| Improve this Doc View Source

AddParameterFilter(Func<IOpenApiParameterFilter>)

Add a custom parameter filter to the filter chain.

Declaration
IOpenApiBuilder AddParameterFilter(Func<IOpenApiParameterFilter> parameterFilterFactory)
Parameters
Type Name Description
Func<IOpenApiParameterFilter> parameterFilterFactory

The filter to add

Returns
Type Description
IOpenApiBuilder
| Improve this Doc View Source

AddSchemaFilter(Func<IOpenApiSchemaFilter>)

Add a custom schema filter to the filter chain.

Declaration
IOpenApiBuilder AddSchemaFilter(Func<IOpenApiSchemaFilter> schemaFilterFactory)
Parameters
Type Name Description
Func<IOpenApiSchemaFilter> schemaFilterFactory

The filter to add

Returns
Type Description
IOpenApiBuilder
| Improve this Doc View Source

AddXmlComments(Func<XPathDocument>)

Inject human-friendly descriptions for Operations, Parameters and Schemas based on XML Comment files

Declaration
IOpenApiBuilder AddXmlComments(Func<XPathDocument> xmlDocFactory)
Parameters
Type Name Description
Func<XPathDocument> xmlDocFactory

A factory method that returns XML Comments as an XPathDocument

Returns
Type Description
IOpenApiBuilder
| Improve this Doc View Source

AddXmlComments(String)

Inject human-friendly descriptions for Operations, Parameters and Schemas based on XML Comment files

Declaration
IOpenApiBuilder AddXmlComments(string filePath)
Parameters
Type Name Description
System.String filePath

An abolsute path to the file that contains XML Comments

Returns
Type Description
IOpenApiBuilder
| Improve this Doc View Source

CustomSchemaIds(Func<Type, String>)

Provide a custom strategy for generating the unique Id's that are used to reference object Schemas.

Declaration
IOpenApiBuilder CustomSchemaIds(Func<Type, string> schemaIdSelector)
Parameters
Type Name Description
Func<Type, System.String> schemaIdSelector

A lambda that returns a unique identifier for the provided system type

Returns
Type Description
IOpenApiBuilder
| Improve this Doc View Source

Servers(String[])

Sets the server block in the document

Declaration
IOpenApiBuilder Servers(params string[] urls)
Parameters
Type Name Description
System.String[] urls

One or more URLs for servers

Returns
Type Description
IOpenApiBuilder
| Improve this Doc View Source

Title(String)

Sets the title of the Open API document

Declaration
IOpenApiBuilder Title(string title)
Parameters
Type Name Description
System.String title
Returns
Type Description
IOpenApiBuilder
| Improve this Doc View Source

UserInterface(String)

If invoked will host a user interface for the Open API spec

Declaration
IOpenApiBuilder UserInterface(string route = "/openapi")
Parameters
Type Name Description
System.String route

The route to host on - defaults to /swagger

Returns
Type Description
IOpenApiBuilder
| Improve this Doc View Source

Version(String)

Sets the version for the document

Declaration
IOpenApiBuilder Version(string version)
Parameters
Type Name Description
System.String version

Document version

Returns
Type Description
IOpenApiBuilder

Extension Methods

IOpenApiBuilderExtensions.AddValidatorsFromAssembly(IOpenApiBuilder, Assembly, IEnumerable<OpenApiFluentValidationRule>)
OpenApiFluentValidationHelper.IsNumeric(Object)
OpenApiFluentValidationHelper.NumericToInt(Object)
OpenApiFluentValidationHelper.NumericToDouble(Object)
OpenApiFluentValidationHelper.NumericToDecimal(Object)
  • Improve this Doc
  • View Source
  • 0 Comments
In This Article
  • Methods
    • AddDocumentFilter(Func<IOpenApiDocumentFilter>)
    • AddOperationFilter(Func<IOpenApiOperationFilter>)
    • AddParameterFilter(Func<IOpenApiParameterFilter>)
    • AddSchemaFilter(Func<IOpenApiSchemaFilter>)
    • AddXmlComments(Func<XPathDocument>)
    • AddXmlComments(String)
    • CustomSchemaIds(Func<Type, String>)
    • Servers(String[])
    • Title(String)
    • UserInterface(String)
    • Version(String)
  • Extension Methods
Back to top Copyright © 2018 James Randall