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?
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?