DEV Community

Discussion on: I would love feedback on my TypeScript skills and NPM Module.

Collapse
 
cubiclebuddha profile image
Cubicle Buddha

I love that you’re adding to the TypeScript ecosystem. Here are some things I noticed:
1) you provide a way to utilize JSON Schema for the request and response but most APIs (that I’m aware of) utilize OpenAPI/Swagger Spec which is essentially JSON Schema. The advantage that OpenAPI has is that it allows you to describe much more than the request and the response. I believe it allows you to detail the headers, the parameters, and even the error codes that API might return.
2) There is a popular library called tsoa that already lets you generate APIs and their OpenAPI Spec files based off of configuration (well actually decorators). If you’re passionate about helping to make TypeScript a more popular server side language, then maybe consider helping out with tsoa?
3) Your code looks pretty great! :)

Collapse
 
dechamp profile image
DeChamp

Thank you! It's been fun so far. So I've defaulted to Openapi many times in the past and I still do for other projects.

I started with json schema middleware because AWS gateway uses it and for many developers, they are comfortable with it as well, but i didn't see a huge push for it.

I wanted to tackle that as a first project. This plugin was aimed as convenience of setting up projects quickly but mainly aimed as a "can i do this and get it to NPM". So that is a little info behind that.

With that being said, I think you're right. It would be great to be part of a well supported plugin. I will look at it and see if I can start adding to it.

Thank you for the feedback!

Collapse
 
cubiclebuddha profile image
Cubicle Buddha

Awesome! :)