danielgtaylor / openapi-cli-generator

Generate a CLI from an OpenAPI 3 specification
MIT License
179 stars 49 forks source link

How to set default value to custom header #42

Open vikasbalani opened 3 years ago

vikasbalani commented 3 years ago

Hi , I am trying to have a custom header in my spec like below :

-  name: 'Client-Type'
    in: header
    schema:
        type: string

./cli --Client-Type

I don't want to force user to pass the header like above example command, it should take from spec instead.

So I modified it like below :

 -  name: 'Client-Type'
    in: header
    schema:
        type: string
        default: "my-header"
        nullable: true

Still, I don't see this header in my request. And it expects me to pass the same from CLI.

Can you please suggest on this ?

Thanks in advance ;)