@ShellMethod(key = "generate-yaml", value = "Generate a YAML registered service definition")
    public File generateYaml(
        @ShellOption(value = {"file", "--file"},
            help = "Path to the JSON service definition file")
        final String file,
        @ShellOption(value = {"destination", "--destination"},
            help = "Path to the destination YAML service definition file")
        final String destination) {
        val filePath = new File(file);
        val result = StringUtils.isBlank(destination) ? null : new File(destination);
        generate(filePath, result);
        return filePath;
    }
Validate service.

@param file        the file
@param destination the destination
@return the file
support/cas-server-support-shell-core/src/main/java/org/apereo/cas/shell/commands/services/GenerateYamlRegisteredServiceCommand.java