Schemas

Warning

These schemas are subject to change in future releases.

JSON schemas of the formalized data structures used in the Canopy API are listed here. These schema attempts to adhere to the 2020-12 version of the JSON Schema specification for python as implemented by the jsonschema package.

The command line tool check-jsonschema can be used to validate JSON files against these schemas.

Template Document

JSON schema: ParsedTemplateDocument.json

The following validation rules, which cannot be expressed in JSON Schema, apply to this schema:

  • type:

    • Where the field type is “Table” the rows must contain at least one row and number_of_table_columns must be greater than zero.

This schema is used for the import/export of:

Template Methodology

JSON schema: ParsedTemplateMethodology.json

This schema is used for the import/export of:

Template Taxonomy

JSON schema: ParsedTemplateTaxonomy.json

This schema is used for the import/export of:

Template Findings

JSON schema: ParsedTemplateFindingList.json

This schema is used for the import/export of:

Terminology note: Findings Knowledge Base (KB) is a collection of Template Findings.

Canopy Tool Data

JSON schema: CanopyToolData.json

This schema represents the internal data structure used for tool imports.

System Data

JSON schema: ParsedSystemDataContainer.json

The following import validation rules, which cannot be expressed in JSON Schema, apply to this schema:

  • custom_fields:

    • allow_lookup can only be set if the custom field type is “Text”.

    • lookup_label may only be set when allow_lookup is “true”.

    • children field may only be set when type is “Group” and the child custom fields may not have children of their own.

    • is_content_field will only be set where the model_name is “FindingCustomField”. Additionally where the type is “Rich Text” is_content_field will be imported as “true” regardless of the value in the import file.

  • settings:

    • value must be a valid JSON string where setting is one of the following:

      • “DOCUMENT_CLASSIFICATIONS”

      • “TINYMCE_STYLE_FORMATS”

This schema is used for the import/export of: