code: @ShellMethod(key = "validate-service", value = "Validate a given JSON/YAML service definition by path or directory")
      public static void validateService(
          @ShellOption(value = {"file"},
              help = "Path to the JSON/YAML service definition file") final String file,
          @ShellOption(value = {"directory"},
              help = "Path to the JSON/YAML service definitions directory",
              defaultValue = "/etc/cas/services") final String directory) {
  
          if (StringUtils.isBlank(file) && StringUtils.isBlank(directory)) {
              LOGGER.warn("Either file or directory must be specified");
              return;
          }
  
          if (StringUtils.isNotBlank(file)) {
              val filePath = new File(file);
              validate(filePath);
              return;
          }
          if (StringUtils.isNotBlank(directory)) {
              val directoryPath = new File(directory);
              if (directoryPath.isDirectory()) {
                  FileUtils.listFiles(directoryPath, new String[]{"json", "yml"}, false).forEach(ValidateRegisteredServiceCommand::validate);
              }
              return;
          }
  
      }
docs: Validate service.
  
  @param file      the file
  @param directory the directory