Class: Apia::OpenApi::Objects::Response
- Inherits:
-
Object
- Object
- Apia::OpenApi::Objects::Response
- Includes:
- Helpers
- Defined in:
- lib/apia/open_api/objects/response.rb
Instance Method Summary collapse
- #add_to_spec ⇒ Object
-
#initialize(spec:, path_ids:, route:, route_spec:, api_authenticator:) ⇒ Response
constructor
A new instance of Response.
Methods included from Helpers
#add_to_components_schemas, #convert_type_to_open_api_data_type, #formatted_description, #generate_array_schema, #generate_id_from_definition, #generate_scalar_schema, #generate_schema_ref
Constructor Details
#initialize(spec:, path_ids:, route:, route_spec:, api_authenticator:) ⇒ Response
Returns a new instance of Response.
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/apia/open_api/objects/response.rb', line 31 def initialize(spec:, path_ids:, route:, route_spec:, api_authenticator:) @spec = spec @path_ids = path_ids @route = route @endpoint = route.endpoint @route_spec = route_spec @api_authenticator = api_authenticator @http_status = @endpoint.definition.http_status @response_type = @endpoint.definition.response_type end |
Instance Method Details
#add_to_spec ⇒ Object
42 43 44 45 |
# File 'lib/apia/open_api/objects/response.rb', line 42 def add_to_spec add_sucessful_response_schema add_error_response_schemas end |