This adds validation to the endpoints, and also drops in swagger docs because why not?
This would've been relevant with PR #31, but it slipped my mind.
It works pretty much as expected, but I'm a bit dissatisfied that I have to set modify: true in order to use stripUnknown, and (unless I'm missing something), that needs to be set on every route where that might be useful. Also that to add something to the documentation you need to add the api tag.
[A solution could be to wrap the endpoint creation in a function to offer opinions, but that seems against how Hapi was designed].
This adds validation to the endpoints, and also drops in swagger docs because why not?
This would've been relevant with PR #31, but it slipped my mind.
It works pretty much as expected, but I'm a bit dissatisfied that I have to set
modify: true
in order to usestripUnknown
, and (unless I'm missing something), that needs to be set on every route where that might be useful. Also that to add something to the documentation you need to add theapi
tag.[A solution could be to wrap the endpoint creation in a function to offer opinions, but that seems against how Hapi was designed].