C# Class Swagger.ObjectModel.Builders.OperationBuilder

The operation builder.
Show file Open project: khellang/Nancy.Swagger Class Usage Examples

Public Methods

Method Description
BodyParameter ( Action parameter ) : OperationBuilder

Add a body parameter for this operation

Build ( System.Operation provided = null ) : System.Operation

The build.

ConsumeMimeType ( string consume ) : OperationBuilder

Add a MIME type the operation can consume

ConsumeMimeTypes ( IEnumerable consumes ) : OperationBuilder

Add a list of MIME types the operation can consume

Description ( string description ) : OperationBuilder

A verbose explanation of the operation behavior. GitHub Flavored Markdown syntax can be used for rich text representation.

ExternalDocumentation ( ExternalDocumentation documentation ) : OperationBuilder

Additional external documentation

ExternalDocumentation ( ExternalDocumentationBuilder documentation ) : OperationBuilder

Additional external documentation

IsDeprecated ( ) : OperationBuilder

Declares this operation to be deprecated

OperationId ( string operationId ) : OperationBuilder

A friendly name for the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operation id to uniquely identify an operation.

Parameter ( Action parameter ) : OperationBuilder

Add a parameter for this operation

Parameter ( Parameter parameter ) : OperationBuilder

Add a parameter for this operation

Parameters ( IEnumerable parameters ) : OperationBuilder

Add parameters that are valid for this operation

ProduceMimeType ( string produce ) : OperationBuilder

Add a MIME type the operation can produce

ProduceMimeTypes ( IEnumerable produces ) : OperationBuilder

Add a list of MIME types the operation can produce

Response ( Action response ) : OperationBuilder

Add the default response

Response ( HttpStatusCode httpStatusCode, Action response ) : OperationBuilder

Add the expected response object for an HTTP Status Code

Response ( int httpStatusCode, Action response ) : OperationBuilder

Add the expected response object for an HTTP Status Code

Response ( string httpStatusCode, Action response ) : OperationBuilder

Add the expected response object for an HTTP Status Code

Scheme ( Schemes scheme ) : OperationBuilder

Add a transfer protocol

SecurityRequirement ( KeyValuePair security ) : OperationBuilder

Add a security requirement

SecurityRequirement ( SecurityRequirementBuilder security ) : OperationBuilder

Add a security requirement from the builder

SecurityRequirement ( SecuritySchemes securityScheme ) : OperationBuilder

Shortcut to add a security requirement that is not SecuritySchemes.Oauth2

Summary ( string summary ) : OperationBuilder

A short summary of what the operation does. For maximum readability in the swagger-ui, this field SHOULD be less than 120 characters.

Tag ( string tag ) : OperationBuilder

Add list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.

Tags ( IEnumerable tags ) : OperationBuilder

Add list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.

Method Details

BodyParameter() public method

Add a body parameter for this operation
public BodyParameter ( Action parameter ) : OperationBuilder
parameter Action /// The parameter. ///
return OperationBuilder

Build() public method

The build.
public Build ( System.Operation provided = null ) : System.Operation
provided System.Operation
return System.Operation

ConsumeMimeType() public method

Add a MIME type the operation can consume
public ConsumeMimeType ( string consume ) : OperationBuilder
consume string /// The consume. ///
return OperationBuilder

ConsumeMimeTypes() public method

Add a list of MIME types the operation can consume
public ConsumeMimeTypes ( IEnumerable consumes ) : OperationBuilder
consumes IEnumerable /// The consumes. ///
return OperationBuilder

Description() public method

A verbose explanation of the operation behavior. GitHub Flavored Markdown syntax can be used for rich text representation.
public Description ( string description ) : OperationBuilder
description string /// The description. ///
return OperationBuilder

ExternalDocumentation() public method

Additional external documentation
public ExternalDocumentation ( ExternalDocumentation documentation ) : OperationBuilder
documentation ExternalDocumentation /// The documentation. ///
return OperationBuilder

ExternalDocumentation() public method

Additional external documentation
public ExternalDocumentation ( ExternalDocumentationBuilder documentation ) : OperationBuilder
documentation ExternalDocumentationBuilder /// The documentation. ///
return OperationBuilder

IsDeprecated() public method

Declares this operation to be deprecated
public IsDeprecated ( ) : OperationBuilder
return OperationBuilder

OperationId() public method

A friendly name for the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operation id to uniquely identify an operation.
public OperationId ( string operationId ) : OperationBuilder
operationId string /// The operation id. ///
return OperationBuilder

Parameter() public method

Add a parameter for this operation
public Parameter ( Action parameter ) : OperationBuilder
parameter Action /// The parameter. ///
return OperationBuilder

Parameter() public method

Add a parameter for this operation
public Parameter ( Parameter parameter ) : OperationBuilder
parameter Parameter /// The parameter. ///
return OperationBuilder

Parameters() public method

Add parameters that are valid for this operation
public Parameters ( IEnumerable parameters ) : OperationBuilder
parameters IEnumerable /// The parameters. ///
return OperationBuilder

ProduceMimeType() public method

Add a MIME type the operation can produce
public ProduceMimeType ( string produce ) : OperationBuilder
produce string /// The produce. ///
return OperationBuilder

ProduceMimeTypes() public method

Add a list of MIME types the operation can produce
public ProduceMimeTypes ( IEnumerable produces ) : OperationBuilder
produces IEnumerable /// The produces. ///
return OperationBuilder

Response() public method

Add the default response
public Response ( Action response ) : OperationBuilder
response Action /// The response. ///
return OperationBuilder

Response() public method

Add the expected response object for an HTTP Status Code
public Response ( HttpStatusCode httpStatusCode, Action response ) : OperationBuilder
httpStatusCode HttpStatusCode /// The http status code. ///
response Action /// The response. ///
return OperationBuilder

Response() public method

Add the expected response object for an HTTP Status Code
public Response ( int httpStatusCode, Action response ) : OperationBuilder
httpStatusCode int /// The http status code. ///
response Action /// The response. ///
return OperationBuilder

Response() public method

Add the expected response object for an HTTP Status Code
public Response ( string httpStatusCode, Action response ) : OperationBuilder
httpStatusCode string /// The http status code. ///
response Action /// The response. ///
return OperationBuilder

Scheme() public method

Add a transfer protocol
public Scheme ( Schemes scheme ) : OperationBuilder
scheme Schemes /// The scheme. ///
return OperationBuilder

SecurityRequirement() public method

Add a security requirement
public SecurityRequirement ( KeyValuePair security ) : OperationBuilder
security KeyValuePair /// The security. ///
return OperationBuilder

SecurityRequirement() public method

Add a security requirement from the builder
public SecurityRequirement ( SecurityRequirementBuilder security ) : OperationBuilder
security SecurityRequirementBuilder /// The security. ///
return OperationBuilder

SecurityRequirement() public method

Shortcut to add a security requirement that is not SecuritySchemes.Oauth2
public SecurityRequirement ( SecuritySchemes securityScheme ) : OperationBuilder
securityScheme SecuritySchemes /// The security scheme. ///
return OperationBuilder

Summary() public method

A short summary of what the operation does. For maximum readability in the swagger-ui, this field SHOULD be less than 120 characters.
public Summary ( string summary ) : OperationBuilder
summary string /// The summary. ///
return OperationBuilder

Tag() public method

Add list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.
public Tag ( string tag ) : OperationBuilder
tag string /// The tag. ///
return OperationBuilder

Tags() public method

Add list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.
public Tags ( IEnumerable tags ) : OperationBuilder
tags IEnumerable /// The tags. ///
return OperationBuilder