Module: Skooma::Keywords::OAS31::SchemaValue

Defined in:
lib/skooma/keywords/oas_3_1.rb

Instance Method Summary collapse

Instance Method Details

#each_schema {|json| ... } ⇒ Object

Yields:

  • (json)


13
14
15
16
17
# File 'lib/skooma/keywords/oas_3_1.rb', line 13

def each_schema
  return super unless json.is_a?(Objects::OpenAPI)

  yield json
end

#wrap_value(value) ⇒ Object



7
8
9
10
11
# File 'lib/skooma/keywords/oas_3_1.rb', line 7

def wrap_value(value)
  return super unless value.is_a?(Hash) || value.is_a?(TrueClass) || value.is_a?(FalseClass)

  Objects::OpenAPI.new(value, registry: parent_schema.registry, parent: parent_schema, key: key)
end