Skip to content

Overriding json-schema from backend does not override definitions #93

@edoput

Description

@edoput

Let's say that we have a custom schema like in airos and that we print the schema, like it happens on a validation error report.

The interesting part is that redefined definitions do not override the default one as it can be read from the log

Against schema {'$ref': '#/definitions/ap_wireless_settings'}
{'proto': 'wpa2_personal', 'key': 'and-pizza-too'} is valid under each of
{'$ref': '#/definitions/encryption_wpa_personal'},
{'$ref': '#/definitions/encryption_wps'},
{'$ref': '#/definitions/encryption_wep'},
OrderedDict([('$ref', '#/definitions/encryption_none')]),
OrderedDict([('$ref', '#/definitions/encryption_wpa_personal')]),
OrderedDict([('$ref', '#/definitions/encryption_wpa_enterprise_sta')]),
{'$ref': '#/definitions/encryption_none'}

It seems that merge_config can merge a json-schema and OrderedDict but it treat the same definition as different elements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions