mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 19:33:55 +00:00
Log a warning on more than 1 security requirements
This commit is contained in:
parent
5a76a1b155
commit
1c21730607
@ -491,6 +491,9 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
|
||||
// See the "security" field of "Swagger Object":
|
||||
// https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#swagger-object
|
||||
// "there is a logical OR between the security requirements"
|
||||
if (securities.size() > 1) {
|
||||
LOGGER.warn("More than 1 security requirements are found, using only the first one");
|
||||
}
|
||||
Map<String, List<String>> security = securities.get(0);
|
||||
for (String securityName : security.keySet()) {
|
||||
SecuritySchemeDefinition securityDefinition = fromSecurity(securityName);
|
||||
|
Loading…
Reference in New Issue
Block a user