freeCodeCamp / open-api

freeCodeCamp's open-api Intiative
BSD 3-Clause "New" or "Revised" License
89 stars 28 forks source link

Schema validation #186

Open ojongerius opened 6 years ago

ojongerius commented 6 years ago

Validation of particularly createCommunityEvent is a big clunky. We could create an object, populate it with all the fields that are appropriate and do one validation instead. This can be re-used for the update function (#187) too.

Possible library that is up to date and fast would be https://github.com/epoberezkin/ajv