Advertisement
Guest User

Untitled

a guest
Dec 6th, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 2.63 KB | None | 0 0
  1. comment: {
  2.     bsonType: "object",
  3.     description: "must be an object and is optional",
  4.     required: ["_id", "linkId", "body", "score","isRemoved"],
  5.     properties: {
  6.         _id: {
  7.             bsonType: "objectId",
  8.             description: "must be an objectId and is required"
  9.         },
  10.         linkId: {
  11.             bsonType: "objectId",
  12.             description: "must be an objectId and is required"
  13.         },
  14.         body{
  15.             bsonType: "string",
  16.             description: "must be a string and is required"
  17.         },
  18.         score{
  19.             bsonType: "int",
  20.             description: "must be an int and is required"
  21.         },
  22.         isRemoved{
  23.             bsonType: "bool",
  24.             description: "must be an boolean and is required"
  25.         }
  26.     }
  27. },
  28. user: {
  29.     bsonType: "object",
  30.     description: "must be an object and is optional",
  31.     required: ["_id", "firstName", "lastName", "password"],
  32.     properties: {
  33.         _id: {
  34.             bsonType: "objectId",
  35.             description: "must be an objectId and is required"
  36.         },
  37.         firstName: {
  38.             bsonType: "string",
  39.             description: "must be an string and is required"
  40.         },
  41.         lastName: {
  42.             bsonType: "string",
  43.             description: "must be an string and is required"
  44.         },
  45.         password: {
  46.             bsonType: "string",
  47.             description: "must be an string and is required"
  48.         },
  49.         activationToken: {
  50.             bsonType: "string",
  51.             description: "must be an string and is not required"
  52.         },
  53.         resetPasswordToken: {
  54.             bsonType: "string",
  55.             description: "must be an string and is not required"
  56.         },
  57.         linkSearchHistory: [
  58.             link:{
  59.                 bsonType: "object",
  60.                 description: "must be an object and is optional",
  61.                 required: ["linkId", "searchDate, "minScore","ammount"],
  62.                 properties: {
  63.                     linkId:{
  64.                         bsonType: "objectId",
  65.                         description: "must be an objectId and is required"
  66.                     },
  67.                     searchDate:{
  68.                         bsonType: "date",
  69.                         description: "must be an objectId and is required"
  70.                     },
  71.                     threadTitle:{
  72.                         bsonType: "string",
  73.                         description: "must be an objectId and is not required"
  74.                     },
  75.                     minScore:{
  76.                         bsonType: "int",
  77.                         description: "must be an objectId and is required"
  78.                     },
  79.                     ammount:{
  80.                         bsonType: "int",
  81.                         description: "must be an objectId and is required"
  82.                     }
  83.                 }
  84.             }
  85.         ]}
  86.     }
  87. },
  88. sessions: {
  89.     bsonType: "object",
  90.     description: "must be an object and is optional",
  91.     required: ["_id", "session_id"],
  92.     properties:{
  93.         _id: {
  94.             bsonType: "objectId",
  95.             description: "must be an objectId and is required"
  96.         },
  97.         session_id: {
  98.             bsonType: "string",
  99.             description: "must be an string and is required"
  100.         },
  101.         session_attributes{
  102.             bsonType: "string",
  103.             description: "must be an string and is required"
  104.         }
  105.     }
  106. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement