Class: Apipie::Generator::Swagger::MethodDescription::ResponseService

Inherits:
Object
  • Object
show all
Defined in:
lib/apipie/generator/swagger/method_description/response_service.rb

Instance Method Summary collapse

Constructor Details

#initialize(method_description, http_method:, language:) ⇒ ResponseService

Returns a new instance of ResponseService.

Parameters:



4
5
6
7
8
# File 'lib/apipie/generator/swagger/method_description/response_service.rb', line 4

def initialize(method_description, http_method:, language:)
  @method_description = method_description
  @http_method = http_method
  @language = language
end

Instance Method Details

#callHash

Returns:

  • (Hash)


11
12
13
14
15
16
17
18
# File 'lib/apipie/generator/swagger/method_description/response_service.rb', line 11

def call
  result = {}
  result.merge!(errors)
  result.merge!(responses)
  result.merge!(empty_returns)

  result
end