swagger-typescript-api
swagger-typescript-api copied to clipboard
Any ideas how to handle permissions? See details
We have a permission system in our backend done via enum per each endpoint. I'd like to somehow automate such logic.
One way of doing so if swagger will have enum string as a note to an endpoint like this

Is there a way to add that endpoint as TS literal type to a resulting class or method? Or, maybe there are other ways to achieve a similar outcome?
You can do any kind of manipulations with custom templates using --templates option
Yeah, thanks, I've been looking through it. If you don't mind keeping this issue open then I'd like to reply here once I'll get something viable
@amankkg
Can you show result ts code which you want to have ?
Also I need part of your swagger schema