swagger-api / swagger-api/swagger-codegen

Generated JS client should include request/response interceptors, too

Open
#8,665 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the templates or entry points that generate the JavaScript client and the existing interceptor support used with a spec URL. Compare how requests and responses are handled in both paths, then verify that generated clients expose equivalent request and response interception behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.