jsonschema_diff.core¶
Submodules¶
Classes¶
Package Contents¶
- class Statuses(*args, **kwds)[source]¶
Create a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- ADDED = '+'¶
- DELETED = '-'¶
- REPLACED = 'r'¶
- MODIFIED = 'm'¶
- NO_DIFF = ' '¶
- UNKNOWN = '?'¶
- class Config(
- tab: str = ' ',
- compare_rules: jsonschema_diff.core.tools.compare.COMPARE_RULES_TYPE = {},
- combine_rules: jsonschema_diff.core.tools.combine.COMBINE_RULES_TYPE = [],
- path_maker_ignore: jsonschema_diff.core.tools.render.PATH_MAKER_IGNORE_RULES_TYPE = ['properties', 'items'],
- pair_context_rules: jsonschema_diff.core.tools.context.PAIR_CONTEXT_RULES_TYPE = [],
- context_rules: jsonschema_diff.core.tools.context.CONTEXT_RULES_TYPE = {},
- TAB = ' '¶
- COMPARE_RULES¶
- COMBINE_RULES = []¶
- PATH_MAKER_IGNORE = ['properties', 'items']¶
- PAIR_CONTEXT_RULES = []¶
- CONTEXT_RULES¶
- class Compare(
- config: jsonschema_diff.core.config.Config,
- schema_path: COMPARE_PATH_TYPE,
- json_path: COMPARE_PATH_TYPE,
- to_compare: list[ToCompare],
- status¶
- config¶
- schema_path¶
- json_path¶
- to_compare¶
- class Property(
- config: jsonschema_diff.core.config.Config,
- schema_path: list[str | int],
- json_path: list[str | int],
- name: str | int | None,
- old_schema: dict | None,
- new_schema: dict | None,
- status: jsonschema_diff.core.abstraction.Statuses¶
- config¶
- name¶
- schema_path¶
- json_path¶
- old_schema¶
- new_schema¶