Skip to content

Generated headers overrides headers passed from options #963

@BlvckParrot

Description

@BlvckParrot

Description

I have generated client from OpenAPI spec (as class), but this generated code overrides the headers passed from options, because the spread is happening above the constant header in the generated code. So you have no way of passing headers to the client.
Snímek obrazovky 2024-08-22 v 11 06 08

Also when I do not generate the client as class, there is the same problem and furthermore the constant headers has the correct Content-type filled. In the class form there is Content-type:null --- both are generated from the same spec.

Snímek obrazovky 2024-08-22 v 11 08 28

This seems like a pretty big issue and am surprised noone has noticed this, so I am wondering if I am doing something wrong

Reproducible example or configuration

No response

OpenAPI specification (optional)

No response

System information (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🔥Something isn't workingprioritized 🚚This issue has been prioritized and will be worked on soon

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions