def parse(schema)
      # Really we'd like to only have data hashes passed into drivers these
      # days, but here we handle a JsonSchema::Schema for now to maintain
      # backward compatibility (this library used to be hyper-schema only).
      if schema.is_a?(JsonSchema::Schema)
        hyper_schema = schema
      else
        hyper_schema = JsonSchema.parse!(schema)
        hyper_schema.expand_references!
      end

      schema = Schema.new
      schema.driver = self
      schema.routes = build_routes(hyper_schema)
      schema
    end
def parse(schema)
      # Really we'd like to only have data hashes passed into drivers these
      # days, but here we handle a JsonSchema::Schema for now to maintain
      # backward compatibility (this library used to be hyper-schema only).
      if schema.is_a?(JsonSchema::Schema)
        hyper_schema = schema
      else
        hyper_schema = JsonSchema.parse!(schema)
        hyper_schema.expand_references!
      end

      schema = Schema.new
      schema.driver = self
      schema.routes = build_routes(hyper_schema)
      schema
    end
Parses an API schema and builds a set of route definitions for use with
 Committee.

 The expected input format is a data hash with keys as strings (as opposed
 to symbols) like the kind produced by JSON.parse or YAML.load.