very-express
Version:
based on json schema and openapi, generate Express RestApi server with mongoDb
45 lines • 1.09 kB
JSON
{
"type": "object",
"x-documentConfig": {
"documentName": "Session",
"restApi": {
"methods": [],
"joinWhitelist": []
},
"uniqueIndex": [
[
"sessionCode"
]
]
},
"required": ["provider", "userId", "expired"],
"properties": {
"_id": {
"type": "string",
"x-format": "Primary",
"index": true
},
"sessionCode": {
"type": "string",
"index": true
},
"provider": {
"type": "string",
"maxLength": 30
},
"userId":{
"type": "string",
"x-format": "UUID",
"x-foreignKey": {
"schemaName": "User",
"fieldName": "_id",
"relationType": "one-to-one"
}
},
"expired": {
"type": "integer",
"x-format": "UnixTimestamp",
"description": "expired time in unix timestamp format (ms)"
}
}
}