Module: PairKit::JsonSchema::Dsl::StringDsl
- Includes:
- CommonPartialDsl
- Defined in:
- lib/pair_kit/json_schema/dsl/nodes/string_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
#len_eq(val) ⇒ Object
28
29
30
31
|
# File 'lib/pair_kit/json_schema/dsl/nodes/string_dsl.rb', line 28
def len_eq(val)
min_len(val)
max_len(val)
end
|
#max_len(val) ⇒ Object
Also known as:
len_lteq
22
23
24
|
# File 'lib/pair_kit/json_schema/dsl/nodes/string_dsl.rb', line 22
def max_len(val)
@subject['maxLength'] = val
end
|
#min_len(val) ⇒ Object
Also known as:
len_gteq
10
11
12
|
# File 'lib/pair_kit/json_schema/dsl/nodes/string_dsl.rb', line 10
def min_len(val)
@subject['minLength'] = val
end
|
#pattern(re) ⇒ Object
Also known as:
re
16
17
18
|
# File 'lib/pair_kit/json_schema/dsl/nodes/string_dsl.rb', line 16
def pattern(re)
@subject['pattern'] = re
end
|