module OasRails::Extractors::RenderResponseExtractor

def process_render_content(specification, content, status)

Returns:
  • (Response) - A Response object based on the processed content and status.

Parameters:
  • status (String) -- The status code associated with the render call.
  • content (String) -- The content extracted from the render call.
def process_render_content(specification, content, status)
  schema, examples = build_schema_and_examples(content)
  status_int = Utils.status_to_integer(status)
  content = Builders::ContentBuilder.new(specification, :outgoing).with_schema(schema).with_examples(examples).build
  Builders::ResponseBuilder.new(specification).with_code(status_int).with_description(Utils.get_definition(status_int)).with_content(content).build
end