Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Jsonschemas should validate custom format attributes #206

@Floris272

Description

@Floris272

Originally created for Objects API maykinmedia/open-object#473

The JsonSchema spec defines formats in 7.3

These formats are currently not validated by the jsonschema validator. At first glance the fix for this seems simple: https://python-jsonschema.readthedocs.io/en/latest/validate/#validating-formats although there are two caveats: https://python-jsonschema.readthedocs.io/en/latest/validate/#format-specific-notes (regex & email).

An Objects API specific issue is that the data_attrs in Objects API atleast does not support data-time.

Other than the Objects API the following components also have this issue:

  • Open Product uses producttype data & verbruik json schemas used to validate product (verbruiks)data
  • Verzoeken (from Open VTB) uses verzoektype aanvraag_gegevens_schema used to validate verzoek aanvraag_gegevens.

For backwards compatibilty i would propose to add a strict boolean to the ObjectTypeVersion model with a config setting as its default value in API/admin (False on model itself).

Since Open Product & Verzoeken are relatively new components they do not need a boolean per instance or config setting.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Waiting for approval

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions