Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

Automatic openapi.yml generation with decorators. #83

Open
nake89 opened this issue Feb 28, 2020 · 4 comments
Open

Automatic openapi.yml generation with decorators. #83

nake89 opened this issue Feb 28, 2020 · 4 comments

Comments

@nake89
Copy link
Collaborator

nake89 commented Feb 28, 2020

This looks very promising: https://github.com/thiagobustamante/typescript-rest-swagger

@nake89
Copy link
Collaborator Author

nake89 commented Dec 5, 2020

Not sure this is actually doable.
You would have to decorate the arrow functions in handler.ts and I'm not sure that's doable.
https://stackoverflow.com/questions/32605074/typescript-decorators-and-arrow-function
https://stackoverflow.com/questions/52746873/typescript-arrow-function-parameters-with-decorators

@nake89
Copy link
Collaborator Author

nake89 commented Dec 5, 2020

I'm almost thinking instead of decorators I could just use comments and create a parser that would parse that file and then spit out a openapi.yaml file.

@nake89
Copy link
Collaborator Author

nake89 commented Dec 5, 2020

I could check this out and make sure it's not something I could want to use: https://www.serverless.com/plugins/serverless-openapi-documentation

@nake89
Copy link
Collaborator Author

nake89 commented Dec 7, 2020

I might not use decorators. But just do the parsing. Some of the openapi.yaml can be generated from from the serverless.yaml (endpoint and http methods). I could start with that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant