What's the point of JSON resource schemas if, if t...
# community
What's the point of JSON resource schemas if, if the resource is shape is malformed, the request will be denied either way?
I'm meaning if I don't have a resource schema and the object I passed is not what I designed the conditions for, then the conditions will fail anyways and thus the request will be denied
Schemas help make sure that your application doesn't send the wrong data type for fields and include all the required fields needed by the rules. Depending on how you write your rules, they could still evaluate to true even if some are missing or of the wrong type. Having a schema ensures that doesn't happen.
Hmm, so so long I am using a `EFFECT_ALLOW`s I will basically be safe without schemas? I mean a non-provided
will never evaluate to
, right?
I also feel like I'd rather have TypeScript types code generated than have to write JSON schemas
It shouldn't be too hard to parse
to come up with the data structure required