openapi-cli-generator icon indicating copy to clipboard operation
openapi-cli-generator copied to clipboard

How to set default value to custom header

Open vikasbalani opened this issue 4 years ago • 0 comments

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 ;)

vikasbalani avatar Jun 24 '21 15:06 vikasbalani