ResponseModel

struct ResponseModel
extension ResponseModel: CustomStringConvertible

reponse of operation as stated in open api document

  • Undocumented

    Declaration

    Swift

    internal init(type: String? = nil, formats: [OpenAPI.ContentType]? = nil, detail: String? = nil, code: OpenAPI.Response.StatusCode)
  • type of response

    Declaration

    Swift

    var type: String?
  • list of formats of response (json/application only relevant)

    Declaration

    Swift

    var formats: [OpenAPI.ContentType]?
  • comment for this response

    Declaration

    Swift

    var detail: String?
  • the status code which this response contains

    Declaration

    Swift

    var code: OpenAPI.Response.StatusCode
  • Resolves the response for an operation as stated in open api document

    Declaration

    Swift

    static func resolve(code: OpenAPI.Response.StatusCode, response: OpenAPI.Response) -> ResponseModel

    Parameters

    code

    the status code which this response contains

    response

    reponse of operation as stated in open api document

    Return Value

    response model

  • Declaration

    Swift

    var description: String { get }
  • error decoding for OpenAPIError errors

    Declaration

    Swift

    var errorDecoderString: String { get }