Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>doc2httpNew to Visual Studio Code? Get it now.
doc2http

doc2http

wangziweng7890

|
163 installs
| (0) | Free
auto generate http-request-template by api-docs
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

doc2http extension for VS Code

Description

This extension allows you to create http-request-template (eg: swrv or axios ) for your project from api-docs.

The following image is the your document of apifox

apifox-definition

the following is the Remote Explorer, the structure is the same as the api-docs-definition

Remote Explorer

How to use

  1. install this extension
  2. ctrl + shift + p, input doc2http:Config to init your config to tell extension how get apifox data
  3. open Remote Explore, select any file or any folder
  4. click to swrv button
  5. you will get the http-request-template in your project

example

request-method-template

request-method-template

request-interface-template

request-interface-template

other feature

copy as importFn

copy selected apiName to import {apiName,...} form ApiPath

how to use

  1. select apiName in your file
  2. right click then click Copy As ImportFn
  3. you will get paste like import { useGetChatbotAdminBotIntentDetail, PostChatbotAdminBotIntentBatchProcess } from '@/services/apifox/cHATBOTGuanLiHouTai/jiQiRenYiTuKu/apifox' in your clipboard

Snipaste_2023-08-23_15-09-16.md.png

if you want alias path, you can set alias property in doc2http.json { "alias": { "@/": "src/" } }

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft