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

Clarify table type syntax in documentation / examples #59

Open
gr4per opened this issue Jul 18, 2018 · 1 comment
Open

Clarify table type syntax in documentation / examples #59

gr4per opened this issue Jul 18, 2018 · 1 comment

Comments

@gr4per
Copy link

gr4per commented Jul 18, 2018

Actually all methods that take arbitrary properties require them to be of "table" type. Example is content properties.headers

This means you can't pass in a plain js object, but actually have to type the values, e.g. turn it to a key value map where the value is {type: "$oneOfValueTypes", data: "$theValue"}

I guess putting it in one of the examples would help people understand (I thought this is not obvious)

Cheers,
Arne

@bakkerthehacker
Copy link
Owner

Not all fields have this need to be setup as a table type. Content's headers field is a domain="table" so it has to be this way. The documentation for the table type already exists but could use some work. More examples with this would probably be good.

I have also thought of some system to allow for more loose type definitions to prevent the need to have these explicit types listed but I have not pursued it as the explicit typing does work and is unambiguous.

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

No branches or pull requests

2 participants