Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
1 | · | 1 | ·38119c62367e55e0b11a43023e686cc6·80872·doc·optional·python-jsonschema-doc_4.10.3-1_all.deb |
2 | ·cca722f895088ef2211cd724896205f0·67860·python·optional·python3-jsonschema_4.10.3-1_all.deb | 2 | ·cca722f895088ef2211cd724896205f0·67860·python·optional·python3-jsonschema_4.10.3-1_all.deb |
Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
1 | -rw-r--r--···0········0········0········4·2023-01-20·10:53:50.000000·debian-binary | 1 | -rw-r--r--···0········0········0········4·2023-01-20·10:53:50.000000·debian-binary |
2 | -rw-r--r--···0········0········0·····1768·2023-01-20·10:53:50.000000·control.tar.xz | 2 | -rw-r--r--···0········0········0·····1768·2023-01-20·10:53:50.000000·control.tar.xz |
3 | -rw-r--r--···0········0········0····78 | 3 | -rw-r--r--···0········0········0····78912·2023-01-20·10:53:50.000000·data.tar.xz |
Offset 35, 15 lines modified | Offset 35, 15 lines modified | ||
35 | ··········<div·class="body"·role="main"> | 35 | ··········<div·class="body"·role="main"> |
36 | ············ | 36 | ············ |
37 | ··<section·id="creating-or-extending-validator-classes"> | 37 | ··<section·id="creating-or-extending-validator-classes"> |
38 | <span·id="creating-validators"></span><h1>Creating·or·Extending·Validator·Classes<a·class="headerlink"·href="#creating-or-extending-validator-classes"·title="Permalink·to·this·heading">¶</a></h1> | 38 | <span·id="creating-validators"></span><h1>Creating·or·Extending·Validator·Classes<a·class="headerlink"·href="#creating-or-extending-validator-classes"·title="Permalink·to·this·heading">¶</a></h1> |
39 | <dl·class="py·function"> | 39 | <dl·class="py·function"> |
40 | <dt·class="sig·sig-object·py"·id="jsonschema.validators.create"> | 40 | <dt·class="sig·sig-object·py"·id="jsonschema.validators.create"> |
41 | <span·class="sig-prename·descclassname"><span·class="pre">jsonschema.validators.</span></span><span·class="sig-name·descname"><span·class="pre">create</span></span><span·class="sig-paren">(</span><em·class="sig-param"><span·class="n"><span·class="pre">meta_schema</span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">validators=()</span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">version=None</span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">type_checker=TypeChecker(_type_checkers=pmap({'number':</span>·<span·class="pre"><function</span>·<span·class="pre">is_number></span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">'object':</span>·<span·class="pre"><function</span>·<span·class="pre">is_object></span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">' | 41 | <span·class="sig-prename·descclassname"><span·class="pre">jsonschema.validators.</span></span><span·class="sig-name·descname"><span·class="pre">create</span></span><span·class="sig-paren">(</span><em·class="sig-param"><span·class="n"><span·class="pre">meta_schema</span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">validators=()</span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">version=None</span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">type_checker=TypeChecker(_type_checkers=pmap({'number':</span>·<span·class="pre"><function</span>·<span·class="pre">is_number></span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">'object':</span>·<span·class="pre"><function</span>·<span·class="pre">is_object></span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">'integer':</span>·<span·class="pre"><function</span>·<span·class="pre"><lambda>></span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">'boolean':</span>·<span·class="pre"><function</span>·<span·class="pre">is_bool></s[·...·truncated·by·diffoscope;·len:·476,·SHA:·8bd19fd7df63e7d83caada93fca4b4983a2d21991e8fef3b292bbf40b878c7af·...·]>}))</span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">format_checker=<FormatChecker</span>·<span·class="pre">checkers=['date'</span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">'email'</span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">'idn-email'</span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">'idn-hostname'</span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">'ipv4'</span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">'ipv6'</span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">'iri'</span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">'iri-reference'</span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">'json-pointer'</span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">'regex'</span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">'relative-json-pointer'</span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">'uri'</span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">'uri-reference'</span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">'uuid']></span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">id_of=<function</span>·<span·class="pre">_id_of></span></span></em>,·<em·class="sig-param"><span·class="n"><span·class="pre">applicable_validators=operator.methodcaller('items')</span></span></em><span·class="sig-paren">)</span><a·class="reference·internal"·href="_modules/jsonschema/validators.html#create"><span·class="viewcode-link"><span·class="pre">[source]</span></span></a><a·class="headerlink"·href="#jsonschema.validators.create"·title="Permalink·to·this·definition">¶</a></dt> |
42 | <dd><p>Create·a·new·validator·class.</p> | 42 | <dd><p>Create·a·new·validator·class.</p> |
43 | <dl·class="field-list·simple"> | 43 | <dl·class="field-list·simple"> |
44 | <dt·class="field-odd">Parameters<span·class="colon">:</span></dt> | 44 | <dt·class="field-odd">Parameters<span·class="colon">:</span></dt> |
45 | <dd·class="field-odd"><ul·class="simple"> | 45 | <dd·class="field-odd"><ul·class="simple"> |
46 | <li><p><strong>meta_schema</strong>·(<em>collections.abc.Mapping</em>)·–·the·meta·schema·for·the·new·validator·class</p></li> | 46 | <li><p><strong>meta_schema</strong>·(<em>collections.abc.Mapping</em>)·–·the·meta·schema·for·the·new·validator·class</p></li> |
47 | <li><p><strong>validators</strong>·(<em>collections.abc.Mapping</em>)·–·<p>a·mapping·from·names·to·callables,·where·each·callable·will | 47 | <li><p><strong>validators</strong>·(<em>collections.abc.Mapping</em>)·–·<p>a·mapping·from·names·to·callables,·where·each·callable·will |
48 | validate·the·schema·property·with·the·given·name.</p> | 48 | validate·the·schema·property·with·the·given·name.</p> |
Offset 6, 20 lines modified | Offset 6, 20 lines modified | ||
6 | ******·Creating·or·Extending·Validator·Classes¶·****** | 6 | ******·Creating·or·Extending·Validator·Classes¶·****** |
7 | ··jsonschema.validators.create(meta_schema,·validators=(),·version=None, | 7 | ··jsonschema.validators.create(meta_schema,·validators=(),·version=None, |
8 | ··type_checker=TypeChecker(_type_checkers=pmap({'number':·<function·is_number>, | 8 | ··type_checker=TypeChecker(_type_checkers=pmap({'number':·<function·is_number>, |
9 | ··'object':·<function·is_object>,·' | 9 | ··'object':·<function·is_object>,·'integer':·<function·<lambda>>,·'boolean': |
10 | ··<function·is_bool>,·'array':·<function·is_array>,·'null':·<function·is_null>, | ||
11 | ·· | 10 | ··<function·is_bool>,·'string':·<function·is_string>,·'array':·<function |
11 | ··is_array>,·'null':·<function·is_null>})),·format_checker=<FormatChecker | ||
12 | ··['date',·'email',·'idn-email',·'idn-hostname',·'ipv4',·'ipv6 | 12 | ··checkers=['date',·'email',·'idn-email',·'idn-hostname',·'ipv4',·'ipv6', |
13 | ··reference',·'json-pointer',·'regex',·'relative-json-pointe | 13 | ··'iri',·'iri-reference',·'json-pointer',·'regex',·'relative-json-pointer', |
14 | ··reference',·'uuid']>,·id_of=<function·_id_of>, | 14 | ··'uri',·'uri-reference',·'uuid']>,·id_of=<function·_id_of>, |
15 | ··applicable_validators=operator.methodcaller('items'))[source]¶ | 15 | ··applicable_validators=operator.methodcaller('items'))[source]¶ |
16 | ······Create·a·new·validator·class. | 16 | ······Create·a·new·validator·class. |
17 | ········Returns: | 17 | ········Returns: |
18 | ············a·new·jsonschema.protocols.Validator·class | 18 | ············a·new·jsonschema.protocols.Validator·class |
19 | ··jsonschema.validators.extend(validator,·validators=(),·version=None, | 19 | ··jsonschema.validators.extend(validator,·validators=(),·version=None, |
20 | ··type_checker=None,·format_checker=None)[source]¶ | 20 | ··type_checker=None,·format_checker=None)[source]¶ |
21 | ······Create·a·new·validator·class·by·extending·an·existing·one. | 21 | ······Create·a·new·validator·class·by·extending·an·existing·one. |
Offset 12, 24 lines modified | Offset 12, 24 lines modified | ||
12 | ········"_type_check":·0, | 12 | ········"_type_check":·0, |
13 | ········"pmap":·[0,·5], | 13 | ········"pmap":·[0,·5], |
14 | ········"number":·[0,·1,·3,·5], | 14 | ········"number":·[0,·1,·3,·5], |
15 | ········"function":·[0,·1,·2,·4,·5], | 15 | ········"function":·[0,·1,·2,·4,·5], |
16 | ········"is_numb":·0, | 16 | ········"is_numb":·0, |
17 | ········"object":·[0,·1,·2,·3,·4,·5], | 17 | ········"object":·[0,·1,·2,·3,·4,·5], |
18 | ········"is_object":·0, | 18 | ········"is_object":·0, |
19 | ········" | 19 | ········"integ":·[0,·1,·5], |
20 | ········" | 20 | ········"lambda":·[0,·1], |
21 | ········"boolean":·[0,·5], | 21 | ········"boolean":·[0,·5], |
22 | ········"is_bool":·0, | 22 | ········"is_bool":·0, |
23 | ········"string":·[0,·1,·2,·3,·5], | ||
24 | ········"is_str":·0, | ||
23 | ········"arrai":·[0,·1,·5], | 25 | ········"arrai":·[0,·1,·5], |
24 | ········"is_arrai":·0, | 26 | ········"is_arrai":·0, |
25 | ········"null":·0, | 27 | ········"null":·0, |
26 | ········"is_nul":·0, | 28 | ········"is_nul":·0, |
27 | ········"integ":·[0,·1,·5], | ||
28 | ········"lambda":·[0,·1], | ||
29 | ········"format_check":·[0,·5], | 29 | ········"format_check":·[0,·5], |
30 | ········"formatcheck":·[0,·1,·2,·5], | 30 | ········"formatcheck":·[0,·1,·2,·5], |
31 | ········"checker":·[0,·1,·5], | 31 | ········"checker":·[0,·1,·5], |
32 | ········"date":·[0,·2,·5], | 32 | ········"date":·[0,·2,·5], |
33 | ········"email":·[0,·5], | 33 | ········"email":·[0,·5], |
34 | ········"idn":·[0,·5], | 34 | ········"idn":·[0,·5], |
35 | ········"hostnam":·[0,·5], | 35 | ········"hostnam":·[0,·5], |