1
0
Fork 0
Commit Graph

116 Commits

Author SHA1 Message Date
Alan Plum a3d5c64532
Object.extend is not a function 2016-04-20 18:13:04 +02:00
Alan Plum 0529471cdc
Allow passing an error to res.throw as reason 2016-04-20 18:11:49 +02:00
Alan Plum 96aa1d9129
Add req.json 2016-04-20 17:18:51 +02:00
Alan Plum 7065d29975
Don't add default bodies 2016-04-20 17:18:51 +02:00
Alan Plum 2b0c1f6f9a
_.extend -> Object.assign 2016-04-20 15:23:03 +02:00
Alan Plum 50ae4804f6
Spacing 2016-04-20 15:23:00 +02:00
Alan Plum 7b76519bbe
Allow res.throw(status, args) 2016-04-19 18:16:18 +02:00
Alan Plum 4b509adf15
Nicer warnings/errors 2016-04-18 18:01:04 +02:00
Alan Plum 96d0f5f4ab
QueryParam and friends should allow omitting schemas 2016-04-18 18:00:59 +02:00
Alan Plum 8224153c72
Prettier JSON responses in dev mode 2016-04-18 18:00:58 +02:00
Alan Plum 7bef673ef8
Fix empty descriptions in swagger 2016-04-18 18:00:58 +02:00
Alan Plum 46822f2335
Split body parsing and validation, add error cause 2016-04-18 18:00:56 +02:00
Alan Plum 7364c428e7
Add SyntheticRequest#database 2016-04-18 18:00:55 +02:00
Alan Plum aaaa3ca8f8
Add SyntheticResponse#throw 2016-04-18 18:00:54 +02:00
Alan Plum 30d6200a60
Allow passing strings as status code in some cases 2016-04-18 18:00:48 +02:00
Alan Plum 2dcadc06ea
Request path should be relative to service mount 2016-04-18 18:00:43 +02:00
Alan Plum a53e211452
Nested routers should allow sloppy paths too 2016-04-18 18:00:42 +02:00
Alan Plum 6473209430
Fix hasOwnProperty call 2016-04-18 18:00:42 +02:00
Alan Plum cae8a6607b
Add ServerRequest#params 2016-04-18 18:00:39 +02:00
Alan Plum 9cf8d347ad
More SyntheticResponse tests 2016-04-18 18:00:38 +02:00
Alan Plum 21a1720d86
Add SyntheticResponse tests 2016-04-18 18:00:37 +02:00
Alan Plum 18ff55b7dd
Add SyntheticRequest tests 2016-04-18 18:00:37 +02:00
Alan Plum 2993b73c25
More SyntheticRequest tests 2016-04-18 18:00:37 +02:00
Alan Plum ee90edfe45
Fix SyntheticRequest 2016-04-18 18:00:36 +02:00
Alan Plum 926f02ace5
Use mime-types 2016-04-18 18:00:35 +02:00
Alan Plum ab0db4e414
Actually don't add 200 response by default 2016-04-18 18:00:35 +02:00
Alan Plum 72f65bd8e3
Response description -> reason 2016-04-18 18:00:34 +02:00
Alan Plum 5b4b3852ad
Better default 200 response 2016-04-18 18:00:34 +02:00
Alan Plum dcc2101d09
Yak shave 2016-04-18 18:00:34 +02:00
Alan Plum 22a8b5ec65
Add util.inline 2016-04-18 18:00:34 +02:00
Alan Plum b01a3da328
Fix swagger responses 2016-04-18 18:00:33 +02:00
Alan Plum a31bf33892
Basic swagger tests 2016-04-18 18:00:33 +02:00
Alan Plum a71fc92c6f
Add default body/response descriptions 2016-04-18 18:00:33 +02:00
Alan Plum 248e8e747e
Response descriptions are mandatory in Swagger 2016-04-18 18:00:32 +02:00
Alan Plum d7f514693b
Implement name reversal 2016-04-18 18:00:32 +02:00
Alan Plum bd4bc8eb96
SyntheticRequest: add baseUrl and makeAbsolute 2016-04-18 18:00:31 +02:00
Alan Plum 4f2dc536ee
Tightening
Convert some lets to consts and eliminate the redundancy in Router.
2016-04-18 18:00:31 +02:00
Alan Plum 1f347b3145
Update license headers 2016-04-18 18:00:30 +02:00
Alan Plum d971780ba8
Make routing actually work 2016-04-18 18:00:30 +02:00
Alan Plum d2d62a97bc
Make FOTF swagger docs visible to Foxx Swagger 2016-04-18 18:00:30 +02:00
Alan Plum 8d2cc4041d
Implement request/response body handling 2016-04-18 18:00:29 +02:00
Alan Plum 24ab288d57
Move body handling into dispatch 2016-04-18 18:00:28 +02:00
Alan Plum d23f42fafc
No response schema if no response type 2016-04-18 18:00:28 +02:00
Alan Plum 3b3bfcbd95
If status 200 is set to no response, imply 204 2016-04-18 18:00:28 +02:00
Alan Plum 1197b6fa22
Use default schema for default response 2016-04-18 18:00:28 +02:00
Alan Plum 47d9ab07f4
Nevermind response headers for now 2016-04-18 18:00:27 +02:00
Alan Plum 21428c7f4b
Use joi-to-json-schema 2016-04-18 18:00:27 +02:00
Alan Plum bf253d07b3
Add operation.responses 2016-04-18 18:00:27 +02:00
Alan Plum a00ac0d96f
Swaggerify route params 2016-04-18 18:00:26 +02:00
Alan Plum d810a335ac
Better handle response/request body docs 2016-04-18 18:00:26 +02:00
Alan Plum ff0bf1a182
Add basic swagger generator stub 2016-04-18 18:00:26 +02:00
Alan Plum 91cfcb2fc9
Add SwaggerContext#_merge 2016-04-18 18:00:25 +02:00
Alan Plum 8ab3e4a161
Add tokenize.reverse 2016-04-18 18:00:25 +02:00
Alan Plum bfe66a4ad0
SwaggerContext#response per status code 2016-04-18 18:00:25 +02:00
Alan Plum 27c203bbb2
SwaggerContext should treat missing path as empty 2016-04-18 18:00:25 +02:00
Alan Plum 244345d178
SyntheticRequest#originalUrl should encode db 2016-04-18 18:00:25 +02:00
Alan Plum 314d19d20d
Extract router tree 2016-04-18 18:00:24 +02:00
Alan Plum 2633b0109b
Extract dispatch from router 2016-04-18 18:00:24 +02:00
Alan Plum 95dea0cd14
Yakshaving 2016-04-18 18:00:24 +02:00
Alan Plum 572952864c
Expose service context in request obj 2016-04-18 18:00:24 +02:00
Alan Plum 0156051c37
Basic implementation of SyntheticResponse 2016-04-18 18:00:23 +02:00
Alan Plum 9e3833eadd
Basic implementation of SyntheticRequest
Fixes #1191.
2016-04-18 18:00:23 +02:00
Alan Plum 5ba054210b
Fix router.resolve (req.method => req.requestType) 2016-04-18 18:00:23 +02:00
Alan Plum aa4b41763e
Yakshaving
Naming things is hard.
2016-04-18 18:00:22 +02:00
Alan Plum 12e27cac00
Implement queryParam & body validation 2016-04-18 18:00:22 +02:00
Alan Plum 4b0fd593ce
Implement rudimentary route handling 2016-04-18 18:00:22 +02:00