Module: Scheming::Schema

Defined in:
lib/scheming/schema.rb,
lib/scheming/schema/json.rb

Overview

Schema

Responsible for producing different schema formats which describe the data type provided to it.

Class Method Summary collapse

Class Method Details

.json(raw_type) ⇒ Hash

Parameters:

Returns:

  • (Hash)


17
18
19
20
# File 'lib/scheming/schema.rb', line 17

def json(raw_type)
  type = Scheming::DSL::TypeResolver.resolve(raw_type)
  JSON.schema(type)
end