Skip to main content

Data

Example of automatic documentation

Thanks to JSON Schema and standardization, we are able to generate a clear and explicit documentation of any entity of the your Data Model.

You can see the resulting API documentation for the Accounts entity here

Original Schema
{
"is_enabled" : true,
"db" : "datastore",
"name" : "accounts",
"correlation_field" : "account_id",
"encrypted_fields" : [
"email"
],
"schema" : {
"model" : {
"properties" : {
"is_enabled" : {
"type" : "boolean",
"description" : "Boolean indicating the enabling state of the entity",
"example" : true
},
"auth" : {
"type" : "string",
"description" : "Authentication token"
},
"email" : {
"type" : "string",
"description" : "Account email of the user",
"example" : "john@doe.org",
"format" : "email"
},
"email_verification_token" : {
"type" : "string",
"description" : "Verification token for a newly registerd email",
"example" : "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"pattern" : "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?$"
},
"is_email_verified" : {
"type" : "boolean",
"description" : "Is the email verified",
"example" : false
},
"reset_password_uuid" : {
"type" : "string",
"description" : "Unique ID to use to reset the password",
"example" : "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"pattern" : "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?$"
},
"reset_password_expires_by" : {
"type" : "string",
"description" : "Reset password request expiration date",
"example" : "2019-01-01T00:00:00.000Z",
"format" : "date-time"
}
}
},
"events" : {
"CREATED" : {
"0_0_0" : {
"required" : [
"email",
"auth"
],
"properties" : {
"is_enabled" : {
"type" : "boolean",
"description" : "Boolean indicating the enabling state of the entity",
"example" : true
},
"auth" : {
"type" : "string",
"description" : "Authentication token"
},
"email" : {
"type" : "string",
"description" : "Account email of the user",
"example" : "john@doe.org",
"format" : "email"
},
"email_verification_token" : {
"type" : "string",
"description" : "Verification token for a newly registerd email",
"example" : "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"pattern" : "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?$"
},
"is_email_verified" : {
"type" : "boolean",
"description" : "Is the email verified",
"example" : false
},
"reset_password_uuid" : {
"type" : "string",
"description" : "Unique ID to use to reset the password",
"example" : "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"pattern" : "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?$"
},
"reset_password_expires_by" : {
"type" : "string",
"description" : "Reset password request expiration date",
"example" : "2019-01-01T00:00:00.000Z",
"format" : "date-time"
}
}
}
},
"UPDATED" : {
"0_0_0" : {
"properties" : {
"is_enabled" : {
"type" : "boolean",
"description" : "Boolean indicating the enabling state of the entity",
"example" : true
},
"auth" : {
"type" : "string",
"description" : "Authentication token"
},
"email" : {
"type" : "string",
"description" : "Account email of the user",
"example" : "john@doe.org",
"format" : "email"
},
"email_verification_token" : {
"type" : "string",
"description" : "Verification token for a newly registerd email",
"example" : "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"pattern" : "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?$"
},
"is_email_verified" : {
"type" : "boolean",
"description" : "Is the email verified",
"example" : false
},
"reset_password_uuid" : {
"type" : "string",
"description" : "Unique ID to use to reset the password",
"example" : "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"pattern" : "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?$"
},
"reset_password_expires_by" : {
"type" : "string",
"description" : "Reset password request expiration date",
"example" : "2019-01-01T00:00:00.000Z",
"format" : "date-time"
}
}
}
},
"RESTORED" : {
"0_0_0" : {
"properties" : {
"is_enabled" : {
"type" : "boolean",
"description" : "Boolean indicating the enabling state of the entity",
"example" : true
},
"auth" : {
"type" : "string",
"description" : "Authentication token"
},
"email" : {
"type" : "string",
"description" : "Account email of the user",
"example" : "john@doe.org",
"format" : "email"
},
"email_verification_token" : {
"type" : "string",
"description" : "Verification token for a newly registerd email",
"example" : "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"pattern" : "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?$"
},
"is_email_verified" : {
"type" : "boolean",
"description" : "Is the email verified",
"example" : false
},
"reset_password_uuid" : {
"type" : "string",
"description" : "Unique ID to use to reset the password",
"example" : "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"pattern" : "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?$"
},
"reset_password_expires_by" : {
"type" : "string",
"description" : "Reset password request expiration date",
"example" : "2019-01-01T00:00:00.000Z",
"format" : "date-time"
}
}
}
}
}
}
}
account_id
string

Unique ID used as a correlation ID

is_enabled
boolean

Boolean indicating the enabling state of the entity

auth
string

Authentication token

object

encrypted Account email of the user

email_verification_token
string^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f...

Verification token for a newly registerd email

is_email_verified
boolean

Is the email verified

reset_password_uuid
string^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f...

Unique ID to use to reset the password

reset_password_expires_by
string <date-time>

Reset password request expiration date

version
integer >= 0

Event history version

created_at
string <date-time>

ISO 8601 date format

updated_at
string <date-time>

ISO 8601 date format

{
  • "account_id": "5fa962406a651140b5f9f4bf",
  • "is_enabled": true,
  • "auth": "string",
  • "email": {
    },
  • "email_verification_token": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  • "is_email_verified": false,
  • "reset_password_uuid": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  • "reset_password_expires_by": "2019-01-01T00:00:00.000Z",
  • "version": 0,
  • "created_at": "2019-01-01T00:00:00.000Z",
  • "updated_at": "2019-01-01T00:00:00.000Z"
}