Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arrayItem Property doesn't work for subschemas #2626

Open
GraemeFulton opened this issue Aug 29, 2020 · 2 comments
Open

arrayItem Property doesn't work for subschemas #2626

GraemeFulton opened this issue Aug 29, 2020 · 2 comments

Comments

@GraemeFulton
Copy link
Contributor

GraemeFulton commented Aug 29, 2020

In the 1.15 update, the arrayItem property is introduced so we can get rid of the foo.$ field. I found this doesn't work for subschemas. I get the following error for a subschema defining an urlCollection arrayItem:

Error: "urlCollection" is Array type but the schema does not include a "urlCollection.$" definition for the array items"

It looks like it doesn't see the arrayItems field. I made the update as outlined in the blog:

Screenshot 2020-08-29 at 12 46 44

It does however work fine for my root schema, but in the nested schemas, I have to continue using the old foo.$ method.

@eric-burel
Copy link
Contributor

Thanks for pointing that out. Will add it whenever we have a chance to rework on schema nesting.

@GraemeFulton
Copy link
Contributor Author

Thanks for pointing that out. Will add it whenever we have a chance to rework on schema nesting.

Yeah probably not essential at the moment, since the old way still works

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

No branches or pull requests

2 participants