mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-15 19:10:47 +02:00
fix: merge pdf pipeline validation (#5799)
Co-authored-by: RenzoMXD <[email protected]>
This commit is contained in:
@@ -25,8 +25,9 @@ public class ApiEndpoint {
|
||||
}
|
||||
|
||||
public boolean areParametersValid(Map<String, Object> providedParams) {
|
||||
for (String requiredParam : parameters.keySet()) {
|
||||
if (!providedParams.containsKey(requiredParam)) {
|
||||
for (Map.Entry<String, JsonNode> entry : parameters.entrySet()) {
|
||||
boolean isRequired = entry.getValue().path("required").asBoolean(false);
|
||||
if (isRequired && !providedParams.containsKey(entry.getKey())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user