Class: OpenAPIParser::RequestOperation::ValidatableResponseBody

Inherits:
Object
  • Object
show all
Defined in:
lib/openapi_parser/request_operation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status_code, response_data, headers) ⇒ ValidatableResponseBody

Returns a new instance of ValidatableResponseBody.



75
76
77
78
79
# File 'lib/openapi_parser/request_operation.rb', line 75

def initialize(status_code, response_data, headers)
  @status_code = status_code
  @response_data = response_data
  @headers = headers
end

Instance Attribute Details

#headersObject (readonly)

Returns the value of attribute headers.



73
74
75
# File 'lib/openapi_parser/request_operation.rb', line 73

def headers
  @headers
end

#response_dataObject (readonly)

Returns the value of attribute response_data.



73
74
75
# File 'lib/openapi_parser/request_operation.rb', line 73

def response_data
  @response_data
end

#status_codeObject (readonly)

Returns the value of attribute status_code.



73
74
75
# File 'lib/openapi_parser/request_operation.rb', line 73

def status_code
  @status_code
end

Instance Method Details

#content_typeObject



81
82
83
# File 'lib/openapi_parser/request_operation.rb', line 81

def content_type
  headers['Content-Type'].to_s.split(';').first.to_s
end