├── .changeset ├── README.md └── config.json ├── .eslintrc.cjs ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ └── feature_request.md ├── dependabot.yml └── workflows │ ├── ci.yml │ └── release.yml ├── .gitignore ├── .husky ├── commit-msg ├── post-merge ├── pre-commit └── pre-push ├── .npmrc ├── .prettierignore ├── CHANGELOG.md ├── LICENSE ├── README-en_US.md ├── README.md ├── agents.md ├── commitlint.config.cjs ├── docs └── docs.md ├── lint-staged.config.cjs ├── openapi-ts-request.cache.json ├── openapi-ts-request.config.ts ├── package.json ├── pnpm-lock.yaml ├── prettier.config.cjs ├── src ├── bin │ ├── cli.ts │ └── openapi.ts ├── config.ts ├── generator │ ├── config.ts │ ├── file.ts │ ├── merge.ts │ ├── mockGenarator.ts │ ├── patchSchema.ts │ ├── serviceGenarator.ts │ ├── type.ts │ └── util.ts ├── index.ts ├── log.ts ├── parser-mock │ ├── index.ts │ ├── primitives.ts │ └── util.ts ├── readConfig.ts ├── type.ts └── util.ts ├── templates ├── displayEnumLabel.njk ├── displayTypeLabel.njk ├── interface.njk ├── reactQuery.njk ├── schema.njk ├── serviceController.njk └── serviceIndex.njk ├── test ├── README.md ├── __snapshots__ │ ├── both │ │ ├── should both excludeTags and excludePaths works while excludePaths has wildcard.snap │ │ ├── should both excludeTags and excludePaths works with includeTags.snap │ │ ├── should empty excludeTags and excludePaths return none.snap │ │ ├── should exclude items from includePaths and includeTags.snap │ │ └── should return all while includeTags match all.snap │ ├── common │ │ ├── 小驼峰命名文件和请求函数.snap │ │ ├── 支持 null 类型作为默认值.snap │ │ ├── 文件上传.snap │ │ ├── 正常命名文件和请求函数.snap │ │ ├── 测试 $ref 引用中包含 encode 编码字符.snap │ │ ├── 测试 _COMPUTER SCIENCE_ 这一类的枚举值在生成的类型中不报错.snap │ │ ├── 测试 number类型 枚举.snap │ │ ├── 测试 number类型 枚举,使用 desc 解析枚举.snap │ │ ├── 测试 schemas 包含枚举数组.snap │ │ ├── 测试 swagger =_ openapi, schema 循环引用.snap │ │ ├── 测试 tags 为 undefined.snap │ │ ├── 测试 tags 为[].snap │ │ ├── 测试只生成 typescript 类型,不生成请求函数.snap │ │ ├── 测试处理 allof 结构, 生成复杂 type 翻译.snap │ │ ├── 测试将中文 tag 名称翻译成英文 tag 名称.snap │ │ ├── 测试支持 apifox x-apifox-enum.snap │ │ ├── 测试支持 apifox x-run-in-apifox.snap │ │ ├── 测试支持 components 非 schemas 的字段.snap │ │ ├── 测试文件下载 API.snap │ │ ├── 测试生成 JSON Schemas.snap │ │ ├── 测试生成 JavaScript.snap │ │ ├── 测试生成 isSupportParseEnumDesc 设置为true.snap │ │ ├── 测试生成 react-query 的 vue 模式.snap │ │ ├── 测试生成 react-query.snap │ │ ├── 测试生成 response type comments.snap │ │ ├── 测试生成匿名response =_ 具名response.snap │ │ ├── 测试空的 openapi 定义.snap │ │ ├── 测试空的 schema 引用.snap │ │ ├── 测试筛选出指定 tags 对应的api.snap │ │ ├── 测试解析 components.parameters 中的 $ref 引用.snap │ │ ├── 测试解析 swagger.yaml_openapi.yaml.snap │ │ ├── 测试设置 path 前缀.snap │ │ ├── 生成枚举翻译, 生成 type 翻译.snap │ │ └── 自定义 hook.snap │ ├── customRenderTemplateData │ │ ├── 测试 DisplayEnumLabel hook - 过滤枚举类型.snap │ │ ├── 测试 DisplayTypeLabel hook - 修改类型标签.snap │ │ ├── 测试 Interface hook - 修改JSONObject.snap │ │ ├── 测试 Interface hook - 修改类型名称和属性.snap │ │ ├── 测试 ReactQuery hook - 过滤 GET 方法.snap │ │ ├── 测试 Schema hook - 修改 JSON Schema 类型名.snap │ │ ├── 测试 ServiceController hook - 过滤和修改 API 列表.snap │ │ ├── 测试 ServiceIndex hook - 排序控制器列表.snap │ │ ├── 测试 hook 上下文参数 - 验证 context 对象.snap │ │ ├── 测试 hook 异常处理 - hook 函数抛出错误.snap │ │ ├── 测试向后兼容性 - 不使用新 hook 时的默认行为.snap │ │ └── 测试多个 hook 同时使用.snap │ ├── exclude │ │ ├── should empty excludeTags and excludePaths return all.snap │ │ ├── should excludePaths can be case insensitive.snap │ │ ├── should excludePaths case sensitive by default.snap │ │ ├── should excludeTags and excludePaths both set works.snap │ │ ├── should excludeTags can be case insensitive.snap │ │ ├── should excludeTags case sensitive by default.snap │ │ ├── should excludeTags set works to exclude all.snap │ │ ├── should only excludePaths set works.snap │ │ └── should only excludeTags set works.snap │ └── include │ │ ├── should excludePaths and excludePaths both specified.snap │ │ ├── should include all tags.snap │ │ ├── should include all while no include and exclude set.snap │ │ ├── should includePaths can be case insensitive.snap │ │ ├── should includePaths case sensitive by default.snap │ │ ├── should includeTags can be case insensitive.snap │ │ ├── should includeTags case sensitive by default.snap │ │ ├── should includeTags specified and includePaths are wildcard.snap │ │ ├── should only include the specified paths and includeTags.snap │ │ └── should return empty while include tags is empty.snap ├── both.spec.ts ├── common.spec.ts ├── customRenderTemplateData.spec.ts ├── example-files │ ├── openapi-apifox-enum-label.json │ ├── openapi-camelcase.json │ ├── openapi-chinese-tag.json │ ├── openapi-complex-enum-convert.json │ ├── openapi-components-parameters.yaml │ ├── openapi-custom-gen-file-list-hook.json │ ├── openapi-custom-hook.json │ ├── openapi-desc-enum.json │ ├── openapi-display-enum-label.json │ ├── openapi-empty.json │ ├── openapi-file-download.json │ ├── openapi-number-enum.json │ ├── openapi-priority-rule.json │ ├── openapi-ref-encode-character.json │ ├── openapi-response-desc.json │ ├── openapi-schema-contain-blank-symbol.json │ ├── openapi-schemas-enum-array.json │ ├── openapi-tags-empty.json │ ├── openapi-tags-undefined.json │ ├── openapi-test-allof-api.json │ ├── openapi.json │ ├── swagger-components-response.json │ ├── swagger-file-convert.json │ ├── swagger-get-method-params-convert-obj.json │ ├── swagger.json │ └── swagger.yaml ├── exclude.spec.ts ├── include.spec.ts └── testUtils.ts ├── tsconfig.json └── vitest.config.ts /.changeset/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/.changeset/README.md -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/.changeset/config.json -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/.eslintrc.cjs -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/.github/ISSUE_TEMPLATE/bug_report.yml -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/.github/ISSUE_TEMPLATE/feature_request.md -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/.github/dependabot.yml -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/.github/workflows/ci.yml -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/.github/workflows/release.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/.gitignore -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | npx --no-install commitlint --edit $1 2 | -------------------------------------------------------------------------------- /.husky/post-merge: -------------------------------------------------------------------------------- 1 | # pnpm install 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | npx lint-staged 2 | -------------------------------------------------------------------------------- /.husky/pre-push: -------------------------------------------------------------------------------- 1 | # pnpm test:unit 2 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | openapi-ts-request.cache.json -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/LICENSE -------------------------------------------------------------------------------- /README-en_US.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/README-en_US.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/README.md -------------------------------------------------------------------------------- /agents.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/agents.md -------------------------------------------------------------------------------- /commitlint.config.cjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/commitlint.config.cjs -------------------------------------------------------------------------------- /docs/docs.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/docs/docs.md -------------------------------------------------------------------------------- /lint-staged.config.cjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/lint-staged.config.cjs -------------------------------------------------------------------------------- /openapi-ts-request.cache.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/openapi-ts-request.cache.json -------------------------------------------------------------------------------- /openapi-ts-request.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/openapi-ts-request.config.ts -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/package.json -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/pnpm-lock.yaml -------------------------------------------------------------------------------- /prettier.config.cjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/prettier.config.cjs -------------------------------------------------------------------------------- /src/bin/cli.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/src/bin/cli.ts -------------------------------------------------------------------------------- /src/bin/openapi.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/src/bin/openapi.ts -------------------------------------------------------------------------------- /src/config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/src/config.ts -------------------------------------------------------------------------------- /src/generator/config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/src/generator/config.ts -------------------------------------------------------------------------------- /src/generator/file.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/src/generator/file.ts -------------------------------------------------------------------------------- /src/generator/merge.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/src/generator/merge.ts -------------------------------------------------------------------------------- /src/generator/mockGenarator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/src/generator/mockGenarator.ts -------------------------------------------------------------------------------- /src/generator/patchSchema.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/src/generator/patchSchema.ts -------------------------------------------------------------------------------- /src/generator/serviceGenarator.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/src/generator/serviceGenarator.ts -------------------------------------------------------------------------------- /src/generator/type.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/src/generator/type.ts -------------------------------------------------------------------------------- /src/generator/util.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/src/generator/util.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/log.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/src/log.ts -------------------------------------------------------------------------------- /src/parser-mock/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/src/parser-mock/index.ts -------------------------------------------------------------------------------- /src/parser-mock/primitives.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/src/parser-mock/primitives.ts -------------------------------------------------------------------------------- /src/parser-mock/util.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/src/parser-mock/util.ts -------------------------------------------------------------------------------- /src/readConfig.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/src/readConfig.ts -------------------------------------------------------------------------------- /src/type.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/src/type.ts -------------------------------------------------------------------------------- /src/util.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/src/util.ts -------------------------------------------------------------------------------- /templates/displayEnumLabel.njk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/templates/displayEnumLabel.njk -------------------------------------------------------------------------------- /templates/displayTypeLabel.njk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/templates/displayTypeLabel.njk -------------------------------------------------------------------------------- /templates/interface.njk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/templates/interface.njk -------------------------------------------------------------------------------- /templates/reactQuery.njk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/templates/reactQuery.njk -------------------------------------------------------------------------------- /templates/schema.njk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/templates/schema.njk -------------------------------------------------------------------------------- /templates/serviceController.njk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/templates/serviceController.njk -------------------------------------------------------------------------------- /templates/serviceIndex.njk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/templates/serviceIndex.njk -------------------------------------------------------------------------------- /test/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/README.md -------------------------------------------------------------------------------- /test/__snapshots__/both/should both excludeTags and excludePaths works while excludePaths has wildcard.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/both/should both excludeTags and excludePaths works while excludePaths has wildcard.snap -------------------------------------------------------------------------------- /test/__snapshots__/both/should both excludeTags and excludePaths works with includeTags.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/both/should both excludeTags and excludePaths works with includeTags.snap -------------------------------------------------------------------------------- /test/__snapshots__/both/should empty excludeTags and excludePaths return none.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/both/should empty excludeTags and excludePaths return none.snap -------------------------------------------------------------------------------- /test/__snapshots__/both/should exclude items from includePaths and includeTags.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/both/should exclude items from includePaths and includeTags.snap -------------------------------------------------------------------------------- /test/__snapshots__/both/should return all while includeTags match all.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/both/should return all while includeTags match all.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/小驼峰命名文件和请求函数.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/小驼峰命名文件和请求函数.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/支持 null 类型作为默认值.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/支持 null 类型作为默认值.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/文件上传.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/文件上传.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/正常命名文件和请求函数.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/正常命名文件和请求函数.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试 $ref 引用中包含 encode 编码字符.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试 $ref 引用中包含 encode 编码字符.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试 _COMPUTER SCIENCE_ 这一类的枚举值在生成的类型中不报错.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试 _COMPUTER SCIENCE_ 这一类的枚举值在生成的类型中不报错.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试 number类型 枚举.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试 number类型 枚举.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试 number类型 枚举,使用 desc 解析枚举.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试 number类型 枚举,使用 desc 解析枚举.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试 schemas 包含枚举数组.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试 schemas 包含枚举数组.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试 swagger =_ openapi, schema 循环引用.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试 swagger =_ openapi, schema 循环引用.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试 tags 为 undefined.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试 tags 为 undefined.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试 tags 为[].snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试 tags 为[].snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试只生成 typescript 类型,不生成请求函数.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试只生成 typescript 类型,不生成请求函数.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试处理 allof 结构, 生成复杂 type 翻译.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试处理 allof 结构, 生成复杂 type 翻译.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试将中文 tag 名称翻译成英文 tag 名称.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试将中文 tag 名称翻译成英文 tag 名称.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试支持 apifox x-apifox-enum.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试支持 apifox x-apifox-enum.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试支持 apifox x-run-in-apifox.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试支持 apifox x-run-in-apifox.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试支持 components 非 schemas 的字段.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试支持 components 非 schemas 的字段.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试文件下载 API.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试文件下载 API.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试生成 JSON Schemas.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试生成 JSON Schemas.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试生成 JavaScript.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试生成 JavaScript.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试生成 isSupportParseEnumDesc 设置为true.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试生成 isSupportParseEnumDesc 设置为true.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试生成 react-query 的 vue 模式.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试生成 react-query 的 vue 模式.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试生成 react-query.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试生成 react-query.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试生成 response type comments.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试生成 response type comments.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试生成匿名response =_ 具名response.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试生成匿名response =_ 具名response.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试空的 openapi 定义.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试空的 openapi 定义.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试空的 schema 引用.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试空的 schema 引用.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试筛选出指定 tags 对应的api.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试筛选出指定 tags 对应的api.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试解析 components.parameters 中的 $ref 引用.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试解析 components.parameters 中的 $ref 引用.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试解析 swagger.yaml_openapi.yaml.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试解析 swagger.yaml_openapi.yaml.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/测试设置 path 前缀.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/测试设置 path 前缀.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/生成枚举翻译, 生成 type 翻译.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/生成枚举翻译, 生成 type 翻译.snap -------------------------------------------------------------------------------- /test/__snapshots__/common/自定义 hook.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/common/自定义 hook.snap -------------------------------------------------------------------------------- /test/__snapshots__/customRenderTemplateData/测试 DisplayEnumLabel hook - 过滤枚举类型.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/customRenderTemplateData/测试 DisplayEnumLabel hook - 过滤枚举类型.snap -------------------------------------------------------------------------------- /test/__snapshots__/customRenderTemplateData/测试 DisplayTypeLabel hook - 修改类型标签.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/customRenderTemplateData/测试 DisplayTypeLabel hook - 修改类型标签.snap -------------------------------------------------------------------------------- /test/__snapshots__/customRenderTemplateData/测试 Interface hook - 修改JSONObject.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/customRenderTemplateData/测试 Interface hook - 修改JSONObject.snap -------------------------------------------------------------------------------- /test/__snapshots__/customRenderTemplateData/测试 Interface hook - 修改类型名称和属性.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/customRenderTemplateData/测试 Interface hook - 修改类型名称和属性.snap -------------------------------------------------------------------------------- /test/__snapshots__/customRenderTemplateData/测试 ReactQuery hook - 过滤 GET 方法.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/customRenderTemplateData/测试 ReactQuery hook - 过滤 GET 方法.snap -------------------------------------------------------------------------------- /test/__snapshots__/customRenderTemplateData/测试 Schema hook - 修改 JSON Schema 类型名.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/customRenderTemplateData/测试 Schema hook - 修改 JSON Schema 类型名.snap -------------------------------------------------------------------------------- /test/__snapshots__/customRenderTemplateData/测试 ServiceController hook - 过滤和修改 API 列表.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/customRenderTemplateData/测试 ServiceController hook - 过滤和修改 API 列表.snap -------------------------------------------------------------------------------- /test/__snapshots__/customRenderTemplateData/测试 ServiceIndex hook - 排序控制器列表.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/customRenderTemplateData/测试 ServiceIndex hook - 排序控制器列表.snap -------------------------------------------------------------------------------- /test/__snapshots__/customRenderTemplateData/测试 hook 上下文参数 - 验证 context 对象.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/customRenderTemplateData/测试 hook 上下文参数 - 验证 context 对象.snap -------------------------------------------------------------------------------- /test/__snapshots__/customRenderTemplateData/测试 hook 异常处理 - hook 函数抛出错误.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/customRenderTemplateData/测试 hook 异常处理 - hook 函数抛出错误.snap -------------------------------------------------------------------------------- /test/__snapshots__/customRenderTemplateData/测试向后兼容性 - 不使用新 hook 时的默认行为.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/customRenderTemplateData/测试向后兼容性 - 不使用新 hook 时的默认行为.snap -------------------------------------------------------------------------------- /test/__snapshots__/customRenderTemplateData/测试多个 hook 同时使用.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/customRenderTemplateData/测试多个 hook 同时使用.snap -------------------------------------------------------------------------------- /test/__snapshots__/exclude/should empty excludeTags and excludePaths return all.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/exclude/should empty excludeTags and excludePaths return all.snap -------------------------------------------------------------------------------- /test/__snapshots__/exclude/should excludePaths can be case insensitive.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/exclude/should excludePaths can be case insensitive.snap -------------------------------------------------------------------------------- /test/__snapshots__/exclude/should excludePaths case sensitive by default.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/exclude/should excludePaths case sensitive by default.snap -------------------------------------------------------------------------------- /test/__snapshots__/exclude/should excludeTags and excludePaths both set works.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/exclude/should excludeTags and excludePaths both set works.snap -------------------------------------------------------------------------------- /test/__snapshots__/exclude/should excludeTags can be case insensitive.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/exclude/should excludeTags can be case insensitive.snap -------------------------------------------------------------------------------- /test/__snapshots__/exclude/should excludeTags case sensitive by default.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/exclude/should excludeTags case sensitive by default.snap -------------------------------------------------------------------------------- /test/__snapshots__/exclude/should excludeTags set works to exclude all.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/exclude/should excludeTags set works to exclude all.snap -------------------------------------------------------------------------------- /test/__snapshots__/exclude/should only excludePaths set works.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/exclude/should only excludePaths set works.snap -------------------------------------------------------------------------------- /test/__snapshots__/exclude/should only excludeTags set works.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/exclude/should only excludeTags set works.snap -------------------------------------------------------------------------------- /test/__snapshots__/include/should excludePaths and excludePaths both specified.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/include/should excludePaths and excludePaths both specified.snap -------------------------------------------------------------------------------- /test/__snapshots__/include/should include all tags.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/include/should include all tags.snap -------------------------------------------------------------------------------- /test/__snapshots__/include/should include all while no include and exclude set.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/include/should include all while no include and exclude set.snap -------------------------------------------------------------------------------- /test/__snapshots__/include/should includePaths can be case insensitive.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/include/should includePaths can be case insensitive.snap -------------------------------------------------------------------------------- /test/__snapshots__/include/should includePaths case sensitive by default.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/include/should includePaths case sensitive by default.snap -------------------------------------------------------------------------------- /test/__snapshots__/include/should includeTags can be case insensitive.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/include/should includeTags can be case insensitive.snap -------------------------------------------------------------------------------- /test/__snapshots__/include/should includeTags case sensitive by default.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/include/should includeTags case sensitive by default.snap -------------------------------------------------------------------------------- /test/__snapshots__/include/should includeTags specified and includePaths are wildcard.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/include/should includeTags specified and includePaths are wildcard.snap -------------------------------------------------------------------------------- /test/__snapshots__/include/should only include the specified paths and includeTags.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/include/should only include the specified paths and includeTags.snap -------------------------------------------------------------------------------- /test/__snapshots__/include/should return empty while include tags is empty.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/__snapshots__/include/should return empty while include tags is empty.snap -------------------------------------------------------------------------------- /test/both.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/both.spec.ts -------------------------------------------------------------------------------- /test/common.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/common.spec.ts -------------------------------------------------------------------------------- /test/customRenderTemplateData.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/customRenderTemplateData.spec.ts -------------------------------------------------------------------------------- /test/example-files/openapi-apifox-enum-label.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi-apifox-enum-label.json -------------------------------------------------------------------------------- /test/example-files/openapi-camelcase.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi-camelcase.json -------------------------------------------------------------------------------- /test/example-files/openapi-chinese-tag.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi-chinese-tag.json -------------------------------------------------------------------------------- /test/example-files/openapi-complex-enum-convert.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi-complex-enum-convert.json -------------------------------------------------------------------------------- /test/example-files/openapi-components-parameters.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi-components-parameters.yaml -------------------------------------------------------------------------------- /test/example-files/openapi-custom-gen-file-list-hook.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi-custom-gen-file-list-hook.json -------------------------------------------------------------------------------- /test/example-files/openapi-custom-hook.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi-custom-hook.json -------------------------------------------------------------------------------- /test/example-files/openapi-desc-enum.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi-desc-enum.json -------------------------------------------------------------------------------- /test/example-files/openapi-display-enum-label.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi-display-enum-label.json -------------------------------------------------------------------------------- /test/example-files/openapi-empty.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi-empty.json -------------------------------------------------------------------------------- /test/example-files/openapi-file-download.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi-file-download.json -------------------------------------------------------------------------------- /test/example-files/openapi-number-enum.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi-number-enum.json -------------------------------------------------------------------------------- /test/example-files/openapi-priority-rule.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi-priority-rule.json -------------------------------------------------------------------------------- /test/example-files/openapi-ref-encode-character.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi-ref-encode-character.json -------------------------------------------------------------------------------- /test/example-files/openapi-response-desc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi-response-desc.json -------------------------------------------------------------------------------- /test/example-files/openapi-schema-contain-blank-symbol.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi-schema-contain-blank-symbol.json -------------------------------------------------------------------------------- /test/example-files/openapi-schemas-enum-array.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi-schemas-enum-array.json -------------------------------------------------------------------------------- /test/example-files/openapi-tags-empty.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi-tags-empty.json -------------------------------------------------------------------------------- /test/example-files/openapi-tags-undefined.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi-tags-undefined.json -------------------------------------------------------------------------------- /test/example-files/openapi-test-allof-api.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi-test-allof-api.json -------------------------------------------------------------------------------- /test/example-files/openapi.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/openapi.json -------------------------------------------------------------------------------- /test/example-files/swagger-components-response.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/swagger-components-response.json -------------------------------------------------------------------------------- /test/example-files/swagger-file-convert.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/swagger-file-convert.json -------------------------------------------------------------------------------- /test/example-files/swagger-get-method-params-convert-obj.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/swagger-get-method-params-convert-obj.json -------------------------------------------------------------------------------- /test/example-files/swagger.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/swagger.json -------------------------------------------------------------------------------- /test/example-files/swagger.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/example-files/swagger.yaml -------------------------------------------------------------------------------- /test/exclude.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/exclude.spec.ts -------------------------------------------------------------------------------- /test/include.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/include.spec.ts -------------------------------------------------------------------------------- /test/testUtils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/test/testUtils.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/tsconfig.json -------------------------------------------------------------------------------- /vitest.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openapi-ui/openapi-ts-request/HEAD/vitest.config.ts --------------------------------------------------------------------------------