@Override
    public boolean validate(WorkflowContext workflowContext) throws HyscaleException {
        ServiceSpec serviceSpec = workflowContext.getServiceSpec();
        List<Port> servicePorts = serviceSpec.get(HyscaleSpecFields.ports, new TypeReference<>() {
        });
        List<Agent> agents = serviceSpec.get(HyscaleSpecFields.agents, new TypeReference<>() {
        });
        return checkDuplicatePorts(servicePorts, agents);
    }
Validates the both Service and
Agent Ports present in Hspec on
Duplication of Ports etc.
workflow-controller/controller-service/src/main/java/io/hyscale/controller/validator/impl/PortsValidator.java