Open amcdnl opened 8 years ago
I'm all for this. Thoughts @MugeSo ?
Personally I like the convention over configuration of what's here now. As long as decorators don't become the only way, seems ok. I was actually attracted to the lack of specifying such on each controller or operation. There are other frameworks which already do that as you say, so the lack is actually unique and a benefit in some way here, imo.
@maxwellb thanks for the feedback! I don't believe this feature proposal was ever meant to sunset any existing convention. It would be an additional way to configure APIs which would keep the framework more unopinionated.
Add Support for ES7/TypeScript Decorators
Per my convo with @jsdevel on Gitter, I'd like to propose adding some implementation for decorators.
Example
ZooController.ts
App.ts
This is kinda angular2-esque with the loaded decorator design pattern which works nicely IMO, define the config at top and the real work happens in body.
If it were me, I'd consider making this project more generic like
node-openapi
and then writing this proposal seperate likenode-openapi-router
and then add adapters for connect/koa/etc likenode-openapi-connect-middleware
.Resources