CCF
CCF copied to clipboard
Native JSON schema validation for js
Problem
In js_generic app, the schema validation needs to be handled at the application layer. In the current samples, there is no example of such validation. The default behaviour is 500 "error":{"code":"InternalError","message":"Exception thrown while executing."}}, whereas the error is from the client.
Solution
Having the schema validation in the native layer of js_generic as a plugin (enabled or disabled) with customization exposed for error response is a preferred approach.
Alternatives
- Provide a recommended
jslibrary - Provide a sample
jsimplementation with schema validation
Additional context
We are currently profiling our js app and will provide some context on the overhead that validation is adding
Not going to add substantial new user APIs before container re-design.