Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leslieleung/yaag
Sync swagger to Yapi.
https://github.com/leslieleung/yaag
gin gin-gonic swagger yapi
Last synced: 4 days ago
JSON representation
Sync swagger to Yapi.
- Host: GitHub
- URL: https://github.com/leslieleung/yaag
- Owner: LeslieLeung
- Created: 2022-10-30T08:29:57.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-19T07:10:17.000Z (11 months ago)
- Last Synced: 2024-10-11T09:41:26.945Z (about 1 month ago)
- Topics: gin, gin-gonic, swagger, yapi
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Yaag
> Upload Sw**ag**ger to **Ya**pi.English | [简体中文](README_zh.md)
## Installation
### go install
```bash
go install github.com/leslieleung/yaag@latest
```## Quick Start
### Create a `yaag.yaml` under your project
You can either copy `example/yaag.yaml` to your project root or
simply use `yaag -init` to create one.### Fill in the `yaag.yaml`
```yaml
docDir: "" # the directory where you want to store the swagger.json
mergeMode: "" # the mergeMode of Yapi, see http://yapi.smart-xwork.cn/doc/openapi.html
swagGeneral: "" # the general API annotations, default to main.go
yapiUrl: "" # url to yapi
yapiToken: "" # token to yapi
```### Install swag and write annotations
```bash
go install github.com/swaggo/swag/cmd/swag@latest
```For more details, see [swaggo/swag](https://github.com/swaggo/swag) .
### Run `yaag` in your project
## Usage
```bash
Usage of yaag:
-docDir string
path to swagger.json
-init
init
-mergeMode string
merge mode
-upload
upload only, no swag generate
```