throw new BadRequestException("Invalid blueprint: 'Blueprints' node is missing from JSON.");
}
if (root.path("Blueprints").path("blueprint_name").isMissingNode()) {
throw new BadRequestException("Invalid blueprint: 'blueprint_name' under 'Blueprints' is missing from JSON.");
}
if (root.path("host_groups").isMissingNode() || !root.path("host_groups").isArray()) {
throw new BadRequestException("Invalid blueprint: 'host_groups' node is missing from JSON or is not an array.");
}
Iterator<JsonNode> hostGroupsIterator = root.path("host_groups").elements();
while (hostGroupsIterator.hasNext()) {
JsonNode hostGroup = hostGroupsIterator.next();