Class OperationResponseProcessorBase
- Namespace
- NSwag.Generation.Processors
- Assembly
- NSwag.Generation.dll
The OperationResponseProcessor base class.
public abstract class OperationResponseProcessorBase
- Inheritance
-
OperationResponseProcessorBase
- Inherited Members
Constructors
OperationResponseProcessorBase(OpenApiDocumentGeneratorSettings)
Initializes a new instance of the OperationResponseProcessorBase class.
public OperationResponseProcessorBase(OpenApiDocumentGeneratorSettings settings)
Parameters
settings
OpenApiDocumentGeneratorSettingsThe settings.
Methods
GetResponseXmlDocsElement(MethodInfo, string)
Gets the XML documentation element for the given response code or null.
protected XElement GetResponseXmlDocsElement(MethodInfo methodInfo, string responseCode)
Parameters
methodInfo
MethodInfoThe method info.
responseCode
stringThe response code.
Returns
- XElement
The XML element or null.
GetVoidResponseStatusCode()
Gets the response HTTP status code for an empty/void response and the given generator.
protected abstract string GetVoidResponseStatusCode()
Returns
- string
The status code.
ProcessResponseTypeAttributes(OperationProcessorContext, IEnumerable<Attribute>)
Generates the responses based on the given return type attributes.
public void ProcessResponseTypeAttributes(OperationProcessorContext operationProcessorContext, IEnumerable<Attribute> responseTypeAttributes)
Parameters
operationProcessorContext
OperationProcessorContextThe context.
responseTypeAttributes
IEnumerable<Attribute>The response type attributes.
UpdateResponseDescription(OperationProcessorContext)
Updates the response description based on the return parameter or the response tags in the method's xml docs.
protected void UpdateResponseDescription(OperationProcessorContext operationProcessorContext)
Parameters
operationProcessorContext
OperationProcessorContextThe context.