Module: PairKit::JsonSchema::Dsl::ObjectDsl
- Includes:
- CommonPartialDsl
- Defined in:
- lib/pair_kit/json_schema/dsl/nodes/object_dsl.rb
Overview
Instance Method Summary
collapse
#null
#_else, #_if, #_not, #_then, #all_of, #any_of, #one_of
#enum
#const
#default, #deprecated, #description, #example, #read_only, #readable, #title, #writable, #write_only
#anchor, #comment, #define, #dynamic_anchor, #dynamic_ref, #id, #ref, #schema, #vocabulary
Instance Method Details
#additional_properties ⇒ Object
19
20
21
|
# File 'lib/pair_kit/json_schema/dsl/nodes/object_dsl.rb', line 19
def additional_properties
end
|
#dependency(name, *dependent) ⇒ Object
35
36
37
|
# File 'lib/pair_kit/json_schema/dsl/nodes/object_dsl.rb', line 35
def dependency(name, *dependent)
@subject['dependentRequired', {}][name, []] += dependent
end
|
#dependent_schemas ⇒ Object
27
28
29
|
# File 'lib/pair_kit/json_schema/dsl/nodes/object_dsl.rb', line 27
def dependent_schemas
end
|
#max_props(val) ⇒ Object
39
40
41
|
# File 'lib/pair_kit/json_schema/dsl/nodes/object_dsl.rb', line 39
def max_props(val)
@subject['maxLength'] = val
end
|
#min_props(val) ⇒ Object
31
32
33
|
# File 'lib/pair_kit/json_schema/dsl/nodes/object_dsl.rb', line 31
def min_props(val)
@subject['minLength'] = val
end
|
#pattern_props ⇒ Object
15
16
17
|
# File 'lib/pair_kit/json_schema/dsl/nodes/object_dsl.rb', line 15
def pattern_props
end
|
#prop(name, &block) ⇒ Object
10
11
12
13
|
# File 'lib/pair_kit/json_schema/dsl/nodes/object_dsl.rb', line 10
def prop(name, &block)
@subject['properties', {}][name] = {}
@dsl.call(@subject, builder: :property, name: name, &block)
end
|
#prop_names ⇒ Object
23
24
25
|
# File 'lib/pair_kit/json_schema/dsl/nodes/object_dsl.rb', line 23
def prop_names
end
|
#required(*props) ⇒ Object
43
44
45
|
# File 'lib/pair_kit/json_schema/dsl/nodes/object_dsl.rb', line 43
def required(*props)
@subject['required', []] += props
end
|