apifox-openapi-transformer

transform apifox openapi format provided by `http://127.0.0.1:4523/export/openapi/` into typescript api flie.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
zenonux
今日安裝
0
安裝總數
26
評價
0 0 0
版本
1.5.1
建立日期
2023-04-08
更新日期
2024-06-26
尺寸
12.6 KB
授權條款
GPL-3.0 License
腳本執行於

Tampermonkey-apifox-extension

transform apifox openapi format provided by http://127.0.0.1:4523/export/openapi/ into typescript api flie.

How it works

Before

{
    "openapi": "3.0.1",
    "info": {},
    "tags": [],
    "paths": {},
    "components": {}
}

After

  // 获取软件下载列表
  get(payloads: {
    params: {
      category: string
      name?: string
      subCategory?: string
      softwareVer?: string
      systemVer?: string
      language?: string
    }
    data?: {}
  }): Promise<{
    code: number
    msg: string
    data: {
      list: {
        subCategory?: string
        subSort?: number
        subList: {
          id?: number
          name?: string
          subCategory?: string
          softwareVer?: string
          systemVer?: string
          downloadUrl?: string
          sort?: number
          createTime?: number
          updateTime?: number
        }[]
      }[]
    }
  }> {
     return request({
         url:"/download/v1/software/list",
         method:"get",
         params:payloads.params,
     })
  },