Open metalpalo opened 1 year ago
+1 on this request
We are currently experiencing a problem where certain headers are getting dropped from the generated api client class. We need an option to allow the generated methods to accept custom headers as arguments
+1 to this proposal
one approach is to add a defaultHeaders (list of string) in ApiClient.java to allow users to provide custom headers in the request.
if anyone wants to contribute a PR or sponsor the enhancement, please reply to let us know.
one approach is to add a defaultHeaders (list of string) in ApiClient.java to allow users to provide custom headers in the request.
if anyone wants to contribute a PR or sponsor the enhancement, please reply to let us know.
Hi @wing328
I tried adding defaultHeaders and it didn't work.
Related issue:
Hi
We have defined our OAS(openapi.yml) with one GET operation where response can different contents for status 200 like this:
When springboot application starts and swagger page is opened we are able to choose concrete value from combobox like this:
Now we want to generate apiclient via openapi-generator-maven-plugin(4.3.1) with following config:
with result that method will contains accept header as parameter:
Object getDummy(List accept) or Object getDummy(String accept)
Of course we can define accept header in yaml file and put it as parameter but then we have duplicated field in rendered swagger
Can somebody help me how to call our generated method via webclient with full control which accept header to be passed?
thanks brpalo