module OasRails::Extractors::RenderResponseExtractor
def process_non_hash_content(content)
-
(Array- An array where the first element is the schema and the second is the examples.)
Parameters:
-
content(String) -- The content extracted from the render call.
def process_non_hash_content(content) maybe_a_model, errors = content.gsub('@', "").split(".") klass = maybe_a_model.singularize.camelize(:upper).constantize if klass.ancestors.include?(ActiveRecord::Base) schema = Builders::EsquemaBuilder.build_outgoing_schema(klass:) if test_singularity(maybe_a_model) build_singular_model_schema_and_examples(maybe_a_model, errors, klass, schema) else build_array_model_schema_and_examples(maybe_a_model, klass, schema) end else [{}] end end