You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
validating at the vote app level will ensure that only valid data is submitted to the queue and also simplifies error handling towards the client. It also reduces risk as there is no chance of unknown data of unknown size being queued.
Ideally the interface between voter and vote would be documented in an OpenApi (aka swagger) spec so code can be generated for both client and server which will automatically include validity checks.
The text was updated successfully, but these errors were encountered:
the vote app submits any data you throw at it into the queue.
https://github.com/subfuzion/docker-voting-app-nodejs/blob/master/src/vote/app.js#L32
Only at database level the body of the post operation is verified
https://github.com/subfuzion/docker-voting-app-nodejs/blob/master/src/database/lib/Database.js#L211
validating at the vote app level will ensure that only valid data is submitted to the queue and also simplifies error handling towards the client. It also reduces risk as there is no chance of unknown data of unknown size being queued.
Ideally the interface between voter and vote would be documented in an OpenApi (aka swagger) spec so code can be generated for both client and server which will automatically include validity checks.
The text was updated successfully, but these errors were encountered: