An open API service indexing awesome lists of open source software.

https://github.com/xiaokyo/yapi-to-typescript

yapi document transform typescript with raycast extension
https://github.com/xiaokyo/yapi-to-typescript

Last synced: 8 months ago
JSON representation

yapi document transform typescript with raycast extension

Awesome Lists containing this project

README

          

# YAPI

yApi's document transform to typescript interfaces

## Quickly Start

- configration yApi host and cookie
- Got a yApi's document id
- typing in raycast's yApi to typescript tool

## example

create a `yapi-to-type.md` file in generater folder

```
API_PREFIX: /product-api

http://192.168.5.222/project/158/interface/api/220372
http://192.168.5.222/project/462/interface/api/220390
http://192.168.5.222/project/158/interface/api/220504

API_PREFIX: /quick-search-product-center
http://192.168.5.222/project/462/interface/api/220396

http://192.168.5.222/project/462/interface/api/131538
http://192.168.5.222/project/462/interface/api/44584
http://192.168.5.222/project/462/interface/api/32131
```

run the command ```genTypescriptInterfaceFilesByIds```

then you will get the `types` and `services` folder in the `generater` folder