I have two Models defined; Location and Address, defined as follows:
"address": {
"properties": {
"address1": {
"type": "string",
"required": true
}
},
"public": true,
"dataSource": "db",
"plural": "addresses"
},
"location": {
"properties": {
"title": {
"type": "string"
},
"address":{
"type": "address",
"required": true
}
},
"public": true,
"dataSource": "db",
"plural": "locations"
}
When I Create an object based on the address Model via the API Explorer, the required constraint on address1 behaves as expected and I must supply a value to create the object.
When I Create an object based on the location Model via the API Explorer, the required constraint on the address works as expected, but the required constraint on the address1 of the address Model does not. I am able to create an address without an address1, which is not what I would expect.
I am using a memory datasource, node v0.10.24 and loopback v1.8.6.
I have two Models defined; Location and Address, defined as follows:
When I Create an object based on the address Model via the API Explorer, the required constraint on address1 behaves as expected and I must supply a value to create the object.
When I Create an object based on the location Model via the API Explorer, the required constraint on the address works as expected, but the required constraint on the address1 of the address Model does not. I am able to create an address without an address1, which is not what I would expect.
I am using a memory datasource, node v0.10.24 and loopback v1.8.6.