swagger-api / swagger-api/swagger-codegen

[nodejs] support server response headers

Open
#6,424 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature Server: Nodejs
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

I would like that a generated nodejs server does respond wiht the headers which were defined in the swagger file. Is this possible?

Swagger declaration file content or url
responses:
        '200':
          description: Success
          headers:
            Access-Control-Allow-Origin:
              type: string
              default: "*"

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 generated Node.js server response handling and the Swagger response declaration shown in the issue. Determine how declared response headers should be represented in generated output; done means a generated server sends headers defined for the response, including Access-Control-Allow-Origin.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.