in domain/src/main/java/org/apache/rocketmq/eventbridge/domain/model/classes/EventSourceClassService.java [80:100]
public EventSourceClass checkEventSourceAPIParams(String name, Map<String, Object> inputConfig) {
EventSourceClass eventSourceClass = this.getClassByName(name);
for (Map.Entry<String, APIAttribute> entry : eventSourceClass.getApiParams()
.entrySet()) {
if (!inputConfig.containsKey(entry.getKey()) && entry.getValue()
.isRequired() && entry.getValue()
.getDefaultValue() == null) {
throw new EventBridgeException(EventSourceMissingAttribute, entry.getKey(), entry.getValue()
.getDescription());
}
}
for (Map.Entry<String, Object> entry : inputConfig.entrySet()) {
if (!eventSourceClass.getApiParams()
.containsKey(entry.getKey())) {
throw new EventBridgeException(EventSourceIneffectiveAttribute, entry.getKey(), String.join(",",
eventSourceClass.getApiParams()
.keySet()));
}
}
return eventSourceClass;
}