Two changes:
1) We are now allowing the parameters of a request to be typed. This
adds more type safety to consumers.
2) We support optional parameters in the request.
For (2), the root cause is this issue in how Typescript handles
--strictNullChecking:
https://github.com/Microsoft/TypeScript/issues/9235
I managed to find some tests in the `swagger-tools` codebase for this
field, so I was able to verify the typing. I found a number of
mistakes I had made. I've also changed a few fields to `any` where I
had no good structure to give them.
Previously, we were using the "NextHandleFunction" from connect, which
just takes in a raw IncomingMessage. However, swagger-tools actually
augments the request with a "swagger" field which contains information
from swagger-tools. The types are now updated to reflect this.