Manage using dashboard¶
Login to Jazer’s dashboard. Select an application and open schemas page using left sidebar menu item .
Create¶
Create a schema using toolbar item . A dialog will be shown asking document type for which to apply schema. Enter document type and click on the create button. The result will be a new schema without any constraints.
Update¶
Constraints can be added on attributes and/or relationships.
Attributes¶
Attributes toolbar provides item to add a new attribute. Default new attribute name is field which is of type string and is optional. Clicking on the item shows more options available based on the field type. A field can be removed using item .
Field type object and combinators have additional item to add property/subschema.
Relationships¶
Relationships toolbar provides an item to add a new relationship. Default new relationship name is relationship which is of type to-one and is optional. A relationship can be of type to-one or ‘to-many’. These are editor types (i.e. JSON schema does not provide such types) which are transformed into JSON schema types. The editor tries to be helpful by providing abstract types since JSON API specification restricts relationships to a well-defined structure. A relationship has only one option type pattern which is regular expression pattern for a relationship type.
When done with editing save changes using toolbar item .
Example¶
Following image shows schema for a product document. The document requires attributes: name, quantity, price, available and can have attribute tags. Each attribute has some restrictions based on a business logic. Relationship category is required with type product-category and relationship similar is optional with type product.
Delete¶
Select a schema in the schemas list and click on the toolbar item . A confirmation dialog will be shown with cancel and delete buttons. Choose delete to permanently delete a schema.