0

I would like to create a model in StrongLoop that will look like the following schema:

Item =
{
  "Name": {
    "en": "",
    "ru": "",
    "fr": ""
  },
  "Price": 0,
  "id": 0
}

How do i put a strict schema inside a property ("Name")? Can i do it by editing the item.json file, or maybe from slc (command line)?

Thanks.

Craig Ringer
  • 307,061
  • 76
  • 688
  • 778

1 Answers1

0

Yes, you can edit json and add stroct:true as shown here http://docs.strongloop.com/display/LB/Model+JSON+file

or add {strict: true} set it in the model

http://docs.strongloop.com/display/LB/Creating+static+models

hth

snathan
  • 525
  • 2
  • 7