swagger-typescript-api icon indicating copy to clipboard operation
swagger-typescript-api copied to clipboard

include header parameters in the client

Open mattJurz opened this issue 4 years ago • 1 comments

Hello

The swagger JSON includes header params ( "name":"X-Tenant-ID" ), but the generator does not respect this. Is there a way to generate the client with those extra parameters to pass X-Tenant-ID when I call the fetch as parameter?

{
   "/support/v1/corporatefeatures/{feature}":{
      "post":{
         "tags":[
            "corporate-feature-controller"
         ],
         "operationId":"CorporateFeatureController.enableFeature",
         "parameters":[
            {
               "name":"X-Tenant-ID",
               "in":"header",
               "description":"Tenant identifier",
               "required":true,
               "schema":{
                  "type":"string"
               },
               "example":"tenant1"
            },

mattJurz avatar Nov 09 '21 10:11 mattJurz

similar problem, all parameters with <"in": "header"> is missed from generated ts file

kedzoo avatar Apr 11 '24 08:04 kedzoo