swagger-api / swagger-api/swagger-codegen

[Bash] Bash client not setting headers

Open
#8,825 0 comments 0 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

Description

Generated Bash client does not send properly provided (as specified in the documentation) HTTP headers

$ uname -a
Linux desert 4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ bash --version
GNU bash, version 4.4.19(1)-release (x86_64-pc-linux-gnu)

Swagger-codegen version

2.3.1

Swagger declaration file content or url

not applicable, any *.yaml will do

Command line used for generation

generate
-i
./swagger.yaml
-l
bash
-o
./my-bash-client

Steps to reproduce

client.sh --host http://localhost:8080 --dry-run 'My-Header:My-Header-Value'

Related issues/PRs

none found

Suggest a fix/enhancement

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

Generate a Bash client from any swagger.yaml using the listed command, then start with client.sh and reproduce the --dry-run invocation using 'My-Header:My-Header-Value'. Done means the generated client sends the supplied HTTP header as documented; no specific test file is named, so verify the request output from the reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.