ljlm0402 / typescript-express-starter

📘 Quick and Easy TypeScript Express Starter
http://npm.im/typescript-express-starter
MIT License
2.72k stars 419 forks source link

Auto Generating Swagger API Docs #100

Closed kamleshkatpara closed 3 years ago

kamleshkatpara commented 3 years ago

Hi,

I found this starter template very helpful for the developer community.

I had a suggestion for auto generating swagger (api-docs) using the following below packages:

https://www.npmjs.com/package/routing-controllers

https://www.npmjs.com/package/routing-controllers-openapi

I believe once this starter template has this two included then it would be more helpful to save the developer's time in manually writing the swagger api docs.

ljlm0402 commented 3 years ago

@kamleshkatpara

Thank you for the good information. For reference, I will try to improve just about the improvement points. :)

kamleshkatpara commented 3 years ago

@ljlm0402 When can you add this feature ?

ljlm0402 commented 3 years ago

@kamleshkatpara

I am sorry that it is open for personal reasons. I will update it this month. If you receive a pull request, we will discuss it and then reflect it.

kamleshkatpara commented 3 years ago

@ljlm0402

Thank you for adding it,

Just to inform you that the swagger is not working as it should:

Screenshot 2021-07-17 at 10 12 37 AM

Also the difficult part would with be uploading files through swagger using routing-controllers-openapi.

I am making my own version of it using references will share with you once done.

ljlm0402 commented 3 years ago

@kamleshkatpara

Sorry about the error. Newly updated.

I developed it referring to https://github.com/epiphone/routing-controllers-openapi/tree/master/sample, and after testing it was confirmed that it works normally. Thank you.

â–¼ screenshot image

image

kamleshkatpara commented 3 years ago

@ljlm0402 Why you did not use typeorm in this ?

ljlm0402 commented 3 years ago

@kamleshkatpara

The typeorm template exists separately, and if you want to use the function in other templates, you will need to use it separately.

In addition, please note that each template has been made basicly, so custom items must be custom used.