|
|
|
|
@ -57,14 +57,15 @@ public class SpringDocAutoConfiguration {
|
|
|
|
|
openApi.externalDocs(properties.getExternalDocs());
|
|
|
|
|
openApi.tags(properties.getTags());
|
|
|
|
|
openApi.paths(properties.getPaths());
|
|
|
|
|
openApi.components(properties.getComponents());
|
|
|
|
|
Set<String> keySet = properties.getComponents().getSecuritySchemes().keySet();
|
|
|
|
|
List<SecurityRequirement> list = new ArrayList<>();
|
|
|
|
|
SecurityRequirement securityRequirement = new SecurityRequirement();
|
|
|
|
|
keySet.forEach(securityRequirement::addList);
|
|
|
|
|
list.add(securityRequirement);
|
|
|
|
|
openApi.security(list);
|
|
|
|
|
|
|
|
|
|
if (properties.getComponents() != null) {
|
|
|
|
|
openApi.components(properties.getComponents());
|
|
|
|
|
Set<String> keySet = properties.getComponents().getSecuritySchemes().keySet();
|
|
|
|
|
List<SecurityRequirement> list = new ArrayList<>();
|
|
|
|
|
SecurityRequirement securityRequirement = new SecurityRequirement();
|
|
|
|
|
keySet.forEach(securityRequirement::addList);
|
|
|
|
|
list.add(securityRequirement);
|
|
|
|
|
openApi.security(list);
|
|
|
|
|
}
|
|
|
|
|
return openApi;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|