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 SourceAddDocumentFilter(Func<IOpenApiDocumentFilter>)
Add a custom document filter to the filter chain.
Declaration
IOpenApiBuilder AddDocumentFilter(Func<IOpenApiDocumentFilter> documentFilterFactory)
Parameters
Type | Name | Description |
---|---|---|
Func<IOpen |
documentFilterFactory | The filter to add |
Returns
Type | Description |
---|---|
IOpen |
AddOperationFilter(Func<IOpenApiOperationFilter>)
Add a custom operation filter to the filter chain.
Declaration
IOpenApiBuilder AddOperationFilter(Func<IOpenApiOperationFilter> operationFilterFactory)
Parameters
Type | Name | Description |
---|---|---|
Func<IOpen |
operationFilterFactory | The filter to add |
Returns
Type | Description |
---|---|
IOpen |
AddParameterFilter(Func<IOpenApiParameterFilter>)
Add a custom parameter filter to the filter chain.
Declaration
IOpenApiBuilder AddParameterFilter(Func<IOpenApiParameterFilter> parameterFilterFactory)
Parameters
Type | Name | Description |
---|---|---|
Func<IOpen |
parameterFilterFactory | The filter to add |
Returns
Type | Description |
---|---|
IOpen |
AddSchemaFilter(Func<IOpenApiSchemaFilter>)
Add a custom schema filter to the filter chain.
Declaration
IOpenApiBuilder AddSchemaFilter(Func<IOpenApiSchemaFilter> schemaFilterFactory)
Parameters
Type | Name | Description |
---|---|---|
Func<IOpen |
schemaFilterFactory | The filter to add |
Returns
Type | Description |
---|---|
IOpen |
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<XPath |
xmlDocFactory | A factory method that returns XML Comments as an XPathDocument |
Returns
Type | Description |
---|---|
IOpen |
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. |
filePath | An abolsute path to the file that contains XML Comments |
Returns
Type | Description |
---|---|
IOpen |
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. |
schemaIdSelector | A lambda that returns a unique identifier for the provided system type |
Returns
Type | Description |
---|---|
IOpen |
Servers(String[])
Sets the server block in the document
Declaration
IOpenApiBuilder Servers(params string[] urls)
Parameters
Type | Name | Description |
---|---|---|
System. |
urls | One or more URLs for servers |
Returns
Type | Description |
---|---|
IOpen |
Title(String)
Sets the title of the Open API document
Declaration
IOpenApiBuilder Title(string title)
Parameters
Type | Name | Description |
---|---|---|
System. |
title |
Returns
Type | Description |
---|---|
IOpen |
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. |
route | The route to host on - defaults to /swagger |
Returns
Type | Description |
---|---|
IOpen |
Version(String)
Sets the version for the document
Declaration
IOpenApiBuilder Version(string version)
Parameters
Type | Name | Description |
---|---|---|
System. |
version | Document version |
Returns
Type | Description |
---|---|
IOpen |