Sub schemas return an array of empty objects #4

Closed
IamSmith opened this Issue Mar 19, 2013 · 4 comments

Comments

Projects
None yet
3 participants
@IamSmith
Contributor

IamSmith commented Mar 19, 2013

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: [{}, {}]

@domharrington

This comment has been minimized.

Show comment Hide comment
@domharrington

domharrington Mar 26, 2013

Contributor

This sounds like it could be a save issue? As schemata has nothing to do with saving, only stripping and validating.

Contributor

domharrington commented Mar 26, 2013

This sounds like it could be a save issue? As schemata has nothing to do with saving, only stripping and validating.

@IamSmith

This comment has been minimized.

Show comment Hide comment
@IamSmith

IamSmith Mar 28, 2013

Contributor

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?

Contributor

IamSmith commented Mar 28, 2013

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?

@serby

This comment has been minimized.

Show comment Hide comment
@serby

serby Mar 28, 2013

Owner

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

Owner

serby commented Mar 28, 2013

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

@IamSmith

This comment has been minimized.

Show comment Hide comment
@IamSmith

IamSmith May 2, 2013

Contributor

Related pull request: #8

Contributor

IamSmith commented May 2, 2013

Related pull request: #8

@serby serby closed this May 2, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment