wcandillon / swagger-js-codegen

A Swagger Codegen for typescript, nodejs & angularjs
Apache License 2.0
693 stars 286 forks source link

Generated JS client should include request/response interceptors, too #222

Open srchulo opened 6 years ago

srchulo commented 6 years ago

Is your feature request related to a problem?

I'd like to know when any request in my generated Swagger client fails, but there is no interceptor support for the generated JS client. I like using a generated client more as I feel this is more natural.

Describe the solution you'd like

I'd like for the generated swagger JS code to include request/response interceptor support, just like it does when you pass it a spec url.

Describe alternatives you've considered

I've considered wrapping all of my callbacks in an outer callback so I can receive all responses in that first, but this seems less ideal as if I forget to wrap one callback, I won't get the functionality that I want.