docs: mention ContextBuilder returned from #check()#972
docs: mention ContextBuilder returned from #check()#972fedeci wants to merge 1 commit intoexpress-validator:masterfrom
ContextBuilder returned from #check()#972Conversation
gustavohenke
left a comment
There was a problem hiding this comment.
I don't know if it is better to expose the properties in this way or to build a "local" context
Hmm I don't mind either way at the moment. The Context interface is quite small, so this looks reasonable for now.
I don't recall if the .builder property is exposed/documented anywhere... do you think it would make more sense to put it in
express-validator/src/chain/context-handler.ts
Lines 5 to 9 in 7f15d2d
|
Yes, for example in express-validator/src/middlewares/check.ts Lines 32 to 40 in 7f15d2d |
741b357 to
d4250a2
Compare
ContextBuilder returned from #check()
gustavohenke
left a comment
There was a problem hiding this comment.
Will LGTM if we can add more docs than just this 😬
- API entry
- Possibly an entry under "Features", if it's necessary to showcase more of it
d4250a2 to
939bae6
Compare
gustavohenke
left a comment
There was a problem hiding this comment.
...did you want to address the previous review?
|
Oops nope, asked review for the wrong PR😄 |
3177f64 to
6e160b1
Compare
Description
We mention in the docs that
ContextBuilderis exposed in the result of#check()middleware.This allows to get the properties of the builder.It can be used to create a library based on the context that will be built.(e.g. swagger docs generation)I don't know if it is better to expose the properties in this way or to build a "local" context, @gustavohenke what do you think?To-do list