use of io.automatiko.engine.api.codegen.AutomatikoConfigProperties in project automatiko-engine by automatiko-io.
the class AutomatikoConfigSource method getProperties.
@Override
public Map<String, String> getProperties() {
load();
Map<String, String> properties = new LinkedHashMap<String, String>();
if (found == null) {
return properties;
}
for (AutomatikoConfigProperties p : found) {
if (p.getProperties() != null) {
properties.putAll(p.getProperties());
}
}
return properties;
}
use of io.automatiko.engine.api.codegen.AutomatikoConfigProperties in project automatiko-engine by automatiko-io.
the class AutomatikoConfigSource method load.
private void load() {
if (found == null) {
try {
ServiceLoader<AutomatikoConfigProperties> loader = ServiceLoader.load(AutomatikoConfigProperties.class);
found = StreamSupport.stream(loader.spliterator(), false).collect(Collectors.toList());
found.add(new AutomatikoConfigProperties() {
private Map<String, String> values = new LinkedHashMap<>();
@Override
public String getProperty(String name) {
if ("mp.openapi.extensions.smallrye.operationIdStrategy".equals(name)) {
return "METHOD";
}
return null;
}
@Override
public Map<String, String> getProperties() {
if (values.isEmpty()) {
values.put("mp.openapi.extensions.smallrye.operationIdStrategy", "METHOD");
}
return values;
}
});
} catch (Throwable e) {
}
}
}
Aggregations