class Rack::Spec::Schema

Utility wrapper class for JsonSchema::Schema

Public Class Methods

new(schema) click to toggle source

@param schema [Hash] @raise [JsonSchema::SchemaError] @example

hash = JSON.parse("schema.json")
schema = Rack::Spec::Schema.new(hash)
# File lib/rack/spec/schema.rb, line 19
def initialize(schema)
  @json_schema = JsonSchema.parse!(schema).tap(&:expand_references!)
end

Public Instance Methods

Private Instance Methods