Conversation
The reason for that is that it is specified that the root must be of type object. So having the root be of type array should probably also be prevented with the new builders, to avoid going against the specification by accident. For reference: API/SPECIFICATION.md#action. |
i mean the string is directly provided by neuro and it has to be a json, arrays are valid json so i dont see what prevents it. I do still see your point however
is kind of a limitation, but since it will be directly received by neuro i think she can handle that fine, it is still json after all. technically the schema can be set to a primitive type so i guess i have to go and set some limitations |
|
There, i limited the root builders to only arrays and objects |
6fa3211 to
78c529b
Compare
78c529b to
d0cdaad
Compare
in theory this is possible and in theory neuro can work with it, however the spec only gets amended if it's for "certain" it works afaik, so if the spec is "only objects for top-level schemas", it's likely they tried non-object schemas for the top-level and it didn't work. (I remember alex on the discord server testing top-level string schema type with the inscryption mod, so I think what happened is that he and/or vedal did some testing and found out that neuro doesn't really "understand" schemas that aren't |
Adds a highly extensible and readable schema builder for the unity sdk.
Fully backward-compatible.
Here is an example with the old system:
and here is with the new builder system
In the base QJS wrapper you cannot make the root an array, so a little workaround would be:
In the builders however, you can do that natively:
All and all, with these changes along with my other pull requests, this should help encourage making proper schemas and give better information to neuro so she can better understand how the data should be formed