pipeline refactor beginnings

This commit is contained in:
Anthony Stirling
2023-12-28 17:23:19 +00:00
parent 8acab77ae3
commit 5fcb4e893b
3 changed files with 273 additions and 169 deletions

View File

@@ -8,7 +8,8 @@ import com.fasterxml.jackson.databind.JsonNode;
public class ApiEndpoint {
private String name;
private Map<String, JsonNode> parameters;
private String description;
public ApiEndpoint(String name, JsonNode postNode) {
this.name = name;
this.parameters = new HashMap<>();
@@ -16,6 +17,7 @@ public class ApiEndpoint {
String paramName = paramNode.path("name").asText();
parameters.put(paramName, paramNode);
});
this.description = postNode.path("description").asText();
}
public boolean areParametersValid(Map<String, Object> providedParams) {
@@ -27,6 +29,10 @@ public class ApiEndpoint {
return true;
}
public String getDescription() {
return description;
}
@Override
public String toString() {
return "ApiEndpoint [name=" + name + ", parameters=" + parameters + "]";