-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Labels
Description
Hi,
We've defined a yaml file with Swagger version 2.0 with the following security definitions:
securityDefinitions:
UserNameSecurity:
type: apiKey
in: header
name: X-API-USERNAME
PasswordSecurity:
type: apiKey
in: header
name: X-API-PASSWORD
TenantSecurity:
type: apiKey
in: header
name: X-API-TENANT
security:
- UserNameSecurity: []
- PasswordSecurity: []
- TenantSecurity: []After compiling it using Swagger JAVA compiler version 2.2.3 we see the security labels as annotations in all the operation, but we can't access the values entered for them in the request header.
@io.swagger.annotations.Authorization(value = "PasswordSecurity"),
@io.swagger.annotations.Authorization(value = "TenantSecurity"),
@io.swagger.annotations.Authorization(value = "UserNameSecurity")
Do you know how can the apiKey values, supplied in the header, can be accessed in the generated code?
Thanks,
Kfir