array of values do not appear
MareoRaft opened this issue · 3 comments
MareoRaft commented
I believe this is the same or closely related to issue #6 . That issue was closed but I am not sure why.
Consider the schema:
const schema = {
publicUserProperties: SchemaTypes.arrayOf({
nested: SchemaTypes.string()
}),
(and a few more...)
}
and the object:
{
"publicUserProperties": [
"username",
"givenname",
"surname",
(and a few more...)
],
}
This gives me the GUI:
Instead of seeing the strings in the object, I see whitespace. How can I get the strings to appear correctly in the GUI?
b-gran commented
Hi @MareoRaft,
The object doesn't match the schema in your example:
object
{
"publicUserProperties": [
"username",
"givenname",
"surname",
],
}
This object should have the following schema:
{
publicUserProperties: SchemaTypes.arrayOf(SchemaTypes.string()),
}
dogotaru commented
I think you should do:
publicUserProperties: SchemaTypes.arrayOf({ nested: SchemaTypes.string() })()
It's like the return of arrayOf
is immediately getting invoked. Maybe it's being documented but I missed it too, checked in the example.