Schemas

Validate your specifications.

Schemas are used to determine structure and validation of Specs.

They are written in YAML and uses JSON Schema Draft 4.

Export a Schema

To create a Schema, go to Exports and click Add Export:

2560

Enter a Name and Description and choose "Schema" as the Type.

2560

Then enter a schema you'd like to use. Here is an example for a blog:

type: object
properties:
  models:
    posts:
      attributes:
        publishedAt:
          type: date
    users:
      attributes:
        email:
          required: true
          type: string
        username:
          required: true
          type: string

Example

Here is what a schema looks like:

type: object
properties:
  name:
    required: true
  	type: string