class Rage::OpenAPI::Parsers::Ext::Alba::Visitor

def hash_to_openapi_schema(hash)

def hash_to_openapi_schema(hash)
  return { "type" => "object" } unless hash
  schema = hash.each_with_object({}) do |(key, value), memo|
    memo[key.to_s] = if value.is_a?(Hash)
      hash_to_openapi_schema(value)
    elsif value.is_a?(Array)
      { "type" => "array", "items" => { "type" => "string" } }
    else
      { "type" => "string" }
    end
  end
  { "type" => "object", "properties" => schema }
end