dreamcatcher-tech / dreamcatcher-stack

https://dreamcatcher.land
1 stars 0 forks source link

schemaToFunctions must sniff when single object is property #156

Open inverted-capital opened 1 year ago

inverted-capital commented 1 year ago

Currently if an object is passed as the only arg, we assume that this is the payload.

We should sniff to see if the schema would allow a single property, and if this object has the property key in it (making it the payload), or if it does not, making it the first required property.

Ambiguity should error, if the schema has a property named the same as one of the keys in the payload - so we would ban paths like some.key.key