Skip to content

LeslieLeung/yaag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yaag

Upload Swagger to Yapi.

English | 简体中文

Installation

go install

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

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

go install github.com/swaggo/swag/cmd/swag@latest

For more details, see swaggo/swag .

Run yaag in your project

Usage

Usage of yaag:
  -docDir string
        path to swagger.json
  -init
        init
  -mergeMode string
        merge mode
  -upload
        upload only, no swag generate