I'm using open-api to communication between some java microservices and it works fine, I just facing some situation that I cannot found the proper way to solve: how inject a header in ApiClient.authentications map in the java before call the microservice that will validate(since it is unmodifiable, i think because it was not thread safe). I wanna do it to try use the global authorization configuration (existing in documentation link below).
The yaml structure is the below using this documentation (applied in both microservices):
I saw this topic of a override, but I hope have a better approach, also like I mention, I need it as a header, not as a parameter inside of methods.
Obs: It must me a header, not a parameter (that is usually the workaround) (different issue, that looks have some time and still not solve, so I create a new question)
So, I'm trying to see if have a proper way to inject that header I need without override the ApiClient. I tried extend that and just remove the unmodifiableMap from the init() (image above), but still was not enough.
How I can do it properly? Thanks in advance.