openapi-codegen-ts icon indicating copy to clipboard operation
openapi-codegen-ts copied to clipboard

Custom Header brokes the autogen client

Open jacopocarlini opened this issue 4 years ago • 2 comments

I try to use this tool to generate the client from this swagger

In the swagger we have a custom X-Request-Id header in request and response and this is a problem for the tool.

I found that the only allowed headers are: export declare type RequestHeaderKey = "Accept-Encoding" | "Authorization" | "Content-Type" | "Host" | "If-None-Match" | "Ocp-Apim-Subscription-Key" | "X-Functions-Key";

jacopocarlini avatar Jan 21 '22 12:01 jacopocarlini

The PR #271 have been tested within your project and it fixes the error.

gquadrati avatar Jan 26 '22 11:01 gquadrati

thanks a lot! 🤩

jacopocarlini avatar Jan 26 '22 14:01 jacopocarlini