typescript-rest
typescript-rest copied to clipboard
added query param handling of arrays so that single values are receiv…
trafficstars
Update for issue #99
Greetings! I stumbled upon your repository last night while looking for interesting projects for #hacktoberfest. I will admit, I love this approach to building RESTful services. It mirrors almost exactly my experience with working with jax-rs in Java REST services. Its a very clear and concise approach to working with REST. I plan on using this in some upcoming personal projects.
Updated ./src/server/parameter-processor.ts for better handling of expected array types on query parameters.
- Added a concat step when the expected type is an array. This will convert single objects into an array of one or preserve existing arrays as-is
- Added tests for array query params types
- Fixed a typo in the description of a test that I just happened to notice
- Code coverage slightly improved by additions