Closed IamSmith closed 11 years ago
This sounds like it could be a save issue? As schemata has nothing to do with saving, only stripping and validating.
I have some more information on this. The main schema is using tags, and unless the sub schema properties have that tag in each of its properties they are being stripped and hence why an empty object is being passed to save.
I believe this is a bug as tags should be ignored when saving subschemas. Do you agree?
I'm not sure actually, that make saving just one sub schema property impossible.
On Thursday, March 28, 2013, Tom Smith wrote:
I have some more information on this. The main schema is using tags, and unless the sub schema properties have that tag in each of its properties they are being stripped and hence why an empty object is being passed to save.
I believe this is a bug as tags should be ignored when saving subschemas. Do you agree?
— Reply to this email directly or view it on GitHubhttps://github.com/serby/schemata/issues/4#issuecomment-15582029 .
Sent from a phone
Related pull request: https://github.com/serby/schemata/pull/8
When saving a object which contains a sub schema, although the sub schema object is posted correctly, the response when saving it show an array of empty objects
Post { name: "tom", contactMeans: [ { type: "telephone", number: "01234 567890"}, { type: "email", number: "test@test.com"} ]}
Response { name: "tom", contactMeans: [{}, {}]