CCF icon indicating copy to clipboard operation
CCF copied to clipboard

Native JSON schema validation for js

Open iqsarv opened this issue 5 years ago • 1 comments

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 js library
  • Provide a sample js implementation with schema validation

Additional context

We are currently profiling our js app and will provide some context on the overhead that validation is adding

iqsarv avatar Sep 01 '21 13:09 iqsarv

Not going to add substantial new user APIs before container re-design.

achamayou avatar May 23 '22 10:05 achamayou