Sha256: 2c1a834916cfeda2c7430b8eb885aa101c23b1ee41f9cfc35bf1a4e381c0ad5f

Contents?: true

Size: 654 Bytes

Versions: 14

Compression:

Stored size: 654 Bytes

Contents

require_relative "json_schema/configuration"
require_relative "json_schema/document_store"
require_relative "json_schema/error"
require_relative "json_schema/parser"
require_relative "json_schema/reference_expander"
require_relative "json_schema/schema"
require_relative "json_schema/validator"

module JsonSchema
  def self.configure
    yield configuration
  end

  def self.configuration
    @configuration ||= Configuration.new
  end

  def self.parse(data)
    parser = Parser.new
    if schema = parser.parse(data)
      [schema, nil]
    else
      [nil, parser.errors]
    end
  end

  def self.parse!(data)
    Parser.new.parse!(data)
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
json_schema-0.14.1 lib/json_schema.rb
json_schema-0.14.0 lib/json_schema.rb
json_schema-0.13.6 lib/json_schema.rb
json_schema-0.13.5 lib/json_schema.rb
json_schema-0.13.4 lib/json_schema.rb
json_schema-0.13.3 lib/json_schema.rb
json_schema-0.13.2 lib/json_schema.rb
json_schema-0.13.0 lib/json_schema.rb
json_schema-0.12.5 lib/json_schema.rb
json_schema-0.12.4 lib/json_schema.rb
json_schema-0.12.3 lib/json_schema.rb
json_schema-0.12.2 lib/json_schema.rb
json_schema-0.12.1 lib/json_schema.rb
json_schema-0.12.0 lib/json_schema.rb