I am using openapi-generator-maven-plugin
to generate an api client from an existing yaml specification file in a Java and SpringBoot project .
The API endpoint are protected by Basic HTTP Security scheme (username and password) this way :
securitySchemes:
BasicAuth:
type: http
scheme: basic
The generated client (UsersApi
in my case) comes with an ApiClient
class which will use a RestTemplate
to perform all the REST calls.
Is there a way to pass the credentials to ApiClient
so I will be able to reach the external API.