Module: GrapeOAS::ApiModelBuilders::ResponseParsers::Base
- Included in:
- DefaultResponseParser, DocumentationResponsesParser, HttpCodesParser
- Defined in:
- lib/grape_oas/api_model_builders/response_parsers/base.rb
Overview
Base module for response parser strategies Each parser is responsible for extracting response specifications from a specific format (e.g., :http_codes, documentation: { responses: … })
Instance Method Summary collapse
-
#applicable?(route) ⇒ Boolean
Check if this parser can handle the given route.
-
#parse(route) ⇒ Array<Hash>
Parse response specifications from the route.
Instance Method Details
#applicable?(route) ⇒ Boolean
Check if this parser can handle the given route
26 27 28 |
# File 'lib/grape_oas/api_model_builders/response_parsers/base.rb', line 26 def applicable?(route) raise NotImplementedError, "#{self.class} must implement #applicable?" end |
#parse(route) ⇒ Array<Hash>
Parse response specifications from the route
19 20 21 |
# File 'lib/grape_oas/api_model_builders/response_parsers/base.rb', line 19 def parse(route) raise NotImplementedError, "#{self.class} must implement #parse" end |