UNPKG

@lonu/stc

Version:

A tool for converting OpenApi/Swagger/Apifox into code.

90 lines (89 loc) 5.05 kB
export default { "console": { "info": "INFO", "error": "ERROR", "warn": "WARN", "success": "SUCCESS" }, "util": { "createFileDescription": "Generated by stc v{{version}}", "timeout": "Request timed out." }, "def": { "parserTypeError": "{{name}} with type {{type}} is ignored as it is not an object type." }, "path": { "notName": "{{url}} [{{method}}] cannot get the method name, so it will be ignored.", "duplicate": "{{url}} [{{method}}] has the same method name {{name}}, you can set the `--actionIndex` option, or add `operationId` for each method." }, "app": { "apiJsonFileError": "API file parsing failed. Reason: {{error}}", "generateFileDone": "API file is generated ({{total}} apis):", "specEmpty": "API spec content is empty.", "specInvalid": "Invalid API spec content, expected a JSON or YAML object." }, "cli": { "checkUpdate": "Check for updates", "updatePrompt": "New version found: {{version}} → {{latestVersion}}", "updateConfirm": ", update?", "updating": "updating", "updateDone": "The update is complete, version: v{{version}}, please run again.", "latestVersion": "Already the latest version.", "unknownOption": "Unknown option: {{arg}}.", "requiredUrl": "The option url must be provided.", "usage": "Use:", "option": "Options:", "example": "Example:", "option_help": "View help information.", "option_url": "Remote address or local file path (JSON or YAML).", "option_out": "The output directory, the default is {{out}} under the current execution directory of stc.", "option_client": "http request client. When `lang` is `ts/js`, the possible values ​​are: `axios`, `wechat`, `fetch`.", "option_lang": "Language, the suffix used for the output file, [default: \"ts\"].", "option_mcp": "Generate an MCP tool catalog (mcp-tools.json).", "option_filter": "Filter interfaces, and the interfaces that meet the filter conditions will be generated.", "option_tag": "Specify tags from the interface url for filenames, the first one of tags is read by default.", "option_version": "View version information.", "option_conjunction": "Conjunction of method name. [default: \"By\"].", "option_actionIndex": "Method name index. [default: -1].", "option_shared": "Whether to generate the shared directory. [default: true].", "option_clean": "Whether to clean the output directory before generating. [default: true].", "option_globalHeader": "Global header key configuration, multiple can be set. When a single API has the same key, it will not appear as a parameter.", "option_noDeprecated": "Whether to ignore deprecated APIs. [default: false].", "option_config": "Config file path. By default, looks for stc.config.json, stc.config.ts, stc.config.js, .stcrc.json, .stcrc in the current directory.", "option_watch": "Watch the API document (local file or remote url) and regenerate on change. [default: false].", "option_interval": "Polling interval in milliseconds when watching a remote url. [default: 3000].", "configNotFound": "Config file {{path}} does not exist.", "configLoadError": "Failed to load the config file. Reason: {{error}}", "configUnknownKey": "Unknown option {{key}} in the config file, ignored." }, "watch": { "start": "Watching for changes. Press Ctrl+C to exit.", "changeDetected": "Change detected, regenerating.", "configChanged": "Config file changed, reloading.", "regenerateError": "Generation failed. Reason: {{error}}", "pollRemote": "Polling the remote url every {{interval}}s.", "stop": "Watch stopped." }, "plugin": { "name": "Load plugin {{name}}", "noSetupMethod": "Plugin {{name}} has no setup method.", "allSetupDone": "The plugin is loaded. \n", "parserDef": "Parsing definition", "parserDefDone": "The parsing definition is complete. \n", "parserAction": "Parse url data", "parserActionDone": "Parsing url data is complete.", "no_200_response": "Missing information for 200 status code.", "no_tag": "{{url}} does not specify a tag, skip parsing. Please use the --tag parameter.", "alreadyRegistered": "Plugin {{names}} is already registered.", "template": { "enumRequired": "Missing enum.eta template file.", "actionImportRequired": "Missing actionImport.eta template file.", "definitionHeader": "Missing definitionHeader.eta template file.", "definitionBody": "Missing definitionBody.eta template file.", "definitionFooter": "Missing definitionFooter.eta template file." } }, "plugin_javascript": { "compilation_failed": "Compilation failed." } };