JSON Schema
To create a JSON Schema file of your entity, choose the menu Tools > Forward Engineering > JSON Schema:

then select the directory path and file name.
The JSON Schema for the entity can also be viewed in the left-hand pane of the JSON Preview tab:

Several important options are available:
JSON Schema compliance
Hackolade extends JSON Schema for data types as well as non-standard keywords. When displaying or exporting JSON Schema, you may choose the compliance level:
- standard: only JSON Schema keywords and data types are used -- this output should pass validation with standard validators
- full: custom keywords are also listed for a full view of the schema, but only standard JSON data types are used -- this output should pass validation as long as additionalProperties are set to true
- extended: data types are specific to the target of the model, plus internal properties and keywords are also listed.
Important
In extended compliance, it is normal that the exported JSON Schema does not pass the test of validators. This is because data types used for a given target may be non-JSON data types. For example ObjectId for MongoDB, or UUID in Cassandra, etc...
JSON Schema specification
JSON Schema output is dynamically adapted to the selected specification:
Definitions
When displaying or exporting JSON Schema, the references can used as described or transformed:
- referenced: definitions are referenced as described in the model, using $ref syntax
- resolved:: definitions are resolved to list the content of the reference.
- internal: references to external and model definitions are converted into internal definitions
Advanced: excluding unneeded properties
You may be in a situation where you want to generate JSON Schema, but you want that a particular keyword does not get included in the file.
In the custom properties folder C:\Users\%username%\.hackolade\options\<target>\customProperties you may edit the file jsonSchemaProperties.json to fill the section, for example:
{
"unneededFieldProps": ["color" ,"isActivated"],
"removeIfPropsNegative": []
}