Class: Swarker::Definition

Inherits:
Object
  • Object
show all
Defined in:
lib/swarker/definition.rb

Constant Summary collapse

REQUIRED_FIELD =
'required'.freeze
PROPERTIES_FIELD =
'properties'.freeze
REF =
'$ref'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, original_schema) ⇒ Definition

Returns a new instance of Definition.



9
10
11
12
13
14
# File 'lib/swarker/definition.rb', line 9

def initialize(name, original_schema)
  @name            = name
  @original_schema = original_schema
  move_required_fields
  fix_refs
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/swarker/definition.rb', line 3

def name
  @name
end

#schemaObject (readonly)

Returns the value of attribute schema.



3
4
5
# File 'lib/swarker/definition.rb', line 3

def schema
  @schema
end