apifox-openapi-transformer

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

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

Autor
zenonux
Denně instalací
0
Celkem instalací
26
Hodnocení
0 0 0
Verze
1.5.1
Vytvořeno
08. 04. 2023
Aktualizováno
26. 06. 2024
Size
12,6 KB
Licence
GPL-3.0 License
Spustit na

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,
     })
  },