Skip to content

Commit

Permalink
replace gomod with github.com/jixiuf/swag.
Browse files Browse the repository at this point in the history
  • Loading branch information
jixiufeng authored and jixiufeng committed Nov 14, 2024
1 parent db87ab4 commit 65adedd
Show file tree
Hide file tree
Showing 91 changed files with 180 additions and 176 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ GOPATH:=$(shell $(GOCMD) env GOPATH)
u := $(if $(update),-u)

BINARY_NAME:=swag
PACKAGES:=$(shell $(GOLIST) github.com/swaggo/swag github.com/swaggo/swag/cmd/swag github.com/swaggo/swag/gen github.com/swaggo/swag/format)
PACKAGES:=$(shell $(GOLIST) github.com/jixiuf/swag github.com/jixiuf/swag/cmd/swag github.com/jixiuf/swag/gen github.com/jixiuf/swag/format)
GOFILES:=$(shell find . -name "*.go" -type f)

all: test build
Expand Down
2 changes: 1 addition & 1 deletion PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
e.g. add cool parser.

**Relation issue**
e.g. https://github.com/swaggo/swag/pull/118/files
e.g. https://github.com/jixiuf/swag/pull/118/files

**Additional context**
Add any other context about the problem here.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

<img align="right" width="180px" src="https://raw.githubusercontent.com/swaggo/swag/master/assets/swaggo.png">

[![Build Status](https://github.com/swaggo/swag/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/features/actions)
[![Build Status](https://github.com/jixiuf/swag/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/features/actions)
[![Coverage Status](https://img.shields.io/codecov/c/github/swaggo/swag/master.svg)](https://codecov.io/gh/swaggo/swag)
[![Go Report Card](https://goreportcard.com/badge/github.com/swaggo/swag)](https://goreportcard.com/report/github.com/swaggo/swag)
[![Go Report Card](https://goreportcard.com/badge/github.com/jixiuf/swag)](https://goreportcard.com/report/github.com/jixiuf/swag)
[![codebeat badge](https://codebeat.co/badges/71e2f5e5-9e6b-405d-baf9-7cc8b5037330)](https://codebeat.co/projects/github.aaakk.us.kg-swaggo-swag-master)
[![Go Doc](https://godoc.org/github.com/swaggo/swagg?status.svg)](https://godoc.org/github.com/swaggo/swag)
[![Go Doc](https://godoc.org/github.com/jixiuf/swagg?status.svg)](https://godoc.org/github.com/jixiuf/swag)
[![Backers on Open Collective](https://opencollective.com/swag/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/swag/sponsors/badge.svg)](#sponsors) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fswaggo%2Fswag.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fswaggo%2Fswag?ref=badge_shield)
[![Release](https://img.shields.io/github/release/swaggo/swag.svg?style=flat-square)](https://github.com/swaggo/swag/releases)
[![Release](https://img.shields.io/github/release/swaggo/swag.svg?style=flat-square)](https://github.com/jixiuf/swag/releases)


Swag converts Go annotations to Swagger Documentation 2.0. We've created a variety of plugins for popular [Go web frameworks](#supported-web-frameworks). This allows you to quickly integrate with an existing Go project (using Swagger UI).
Expand Down Expand Up @@ -153,7 +153,7 @@ OPTIONS:
## How to use it with Gin
Find the example source code [here](https://github.com/swaggo/swag/tree/master/example/celler).
Find the example source code [here](https://github.com/jixiuf/swag/tree/master/example/celler).
Finish the steps in [Getting started](#getting-started)
1. After using `swag init` to generate Swagger 2.0 docs, import the following packages:
Expand Down Expand Up @@ -257,8 +257,8 @@ import (
"strconv"
"github.com/gin-gonic/gin"
"github.com/swaggo/swag/example/celler/httputil"
"github.com/swaggo/swag/example/celler/model"
"github.com/jixiuf/swag/example/celler/httputil"
"github.com/jixiuf/swag/example/celler/model"
)
// ShowAccount godoc
Expand Down Expand Up @@ -323,7 +323,7 @@ swag init
## The swag formatter
The Swag Comments can be automatically formatted, just like 'go fmt'.
Find the result of formatting [here](https://github.com/swaggo/swag/tree/master/example/celler).
Find the result of formatting [here](https://github.com/jixiuf/swag/tree/master/example/celler).
Usage:
```shell
Expand Down Expand Up @@ -382,7 +382,7 @@ func (c *Controller) ListAccounts(ctx *gin.Context) {
## General API Info
**Example**
[celler/main.go](https://github.com/swaggo/swag/blob/master/example/celler/main.go)
[celler/main.go](https://github.com/jixiuf/swag/blob/master/example/celler/main.go)
| annotation | description | example |
|-------------|--------------------------------------------|---------------------------------|
Expand Down Expand Up @@ -426,7 +426,7 @@ When a short string in your documentation is insufficient, or you need images, c
## API Operation
**Example**
[celler/controller](https://github.com/swaggo/swag/tree/master/example/celler/controller)
[celler/controller](https://github.com/jixiuf/swag/tree/master/example/celler/controller)
| annotation | description |
Expand Down Expand Up @@ -717,7 +717,7 @@ type Account struct {
}
```
[#708](https://github.com/swaggo/swag/issues/708) The parser handles only struct comments starting with `@Description` attribute.
[#708](https://github.com/jixiuf/swag/issues/708) The parser handles only struct comments starting with `@Description` attribute.
But it writes all struct field comments as is.
So, generated swagger doc as follows:
Expand All @@ -739,7 +739,7 @@ So, generated swagger doc as follows:
```
### Use swaggertype tag to supported custom type
[#201](https://github.com/swaggo/swag/issues/201#issuecomment-475479409)
[#201](https://github.com/jixiuf/swag/issues/201#issuecomment-475479409)
```go
type TimestampTime struct {
Expand Down Expand Up @@ -775,7 +775,7 @@ type Account struct {
}
```
[#379](https://github.com/swaggo/swag/issues/379)
[#379](https://github.com/jixiuf/swag/issues/379)
```go
type CerticateKeyPair struct {
Crt []byte `json:"crt" swaggertype:"string" format:"base64" example:"U3dhZ2dlciByb2Nrcw=="`
Expand Down Expand Up @@ -973,7 +973,7 @@ This project was inspired by [yvasiyarov/swagger](https://github.com/yvasiyarov/
## Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/swaggo/swag/graphs/contributors"><img src="https://opencollective.com/swag/contributors.svg?width=890&button=false" /></a>
<a href="https://github.com/jixiuf/swag/graphs/contributors"><img src="https://opencollective.com/swag/contributors.svg?width=890&button=false" /></a>
## Backers
Expand Down
24 changes: 12 additions & 12 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

[![Travis Status](https://img.shields.io/travis/swaggo/swag/master.svg)](https://travis-ci.org/swaggo/swag)
[![Coverage Status](https://img.shields.io/codecov/c/github/swaggo/swag/master.svg)](https://codecov.io/gh/swaggo/swag)
[![Go Report Card](https://goreportcard.com/badge/github.com/swaggo/swag)](https://goreportcard.com/report/github.com/swaggo/swag)
[![Go Report Card](https://goreportcard.com/badge/github.com/jixiuf/swag)](https://goreportcard.com/report/github.com/jixiuf/swag)
[![codebeat badge](https://codebeat.co/badges/71e2f5e5-9e6b-405d-baf9-7cc8b5037330)](https://codebeat.co/projects/github.aaakk.us.kg-swaggo-swag-master)
[![Go Doc](https://godoc.org/github.com/swaggo/swagg?status.svg)](https://godoc.org/github.com/swaggo/swag)
[![Go Doc](https://godoc.org/github.com/jixiuf/swagg?status.svg)](https://godoc.org/github.com/jixiuf/swag)
[![Backers on Open Collective](https://opencollective.com/swag/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/swag/sponsors/badge.svg)](#sponsors) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fswaggo%2Fswag.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fswaggo%2Fswag?ref=badge_shield)
[![Release](https://img.shields.io/github/release/swaggo/swag.svg?style=flat-square)](https://github.com/swaggo/swag/releases)
[![Release](https://img.shields.io/github/release/swaggo/swag.svg?style=flat-square)](https://github.com/jixiuf/swag/releases)

Swag将Go的注释转换为Swagger2.0文档。我们为流行的 [Go Web Framework](#支持的Web框架) 创建了各种插件,这样可以与现有Go项目快速集成(使用Swagger UI)。

Expand Down Expand Up @@ -130,7 +130,7 @@ OPTIONS:

## 如何与Gin集成

[点击此处](https://github.com/swaggo/swag/tree/master/example/celler)查看示例源代码。
[点击此处](https://github.com/jixiuf/swag/tree/master/example/celler)查看示例源代码。

1. 使用`swag init`生成Swagger2.0文档后,导入如下代码包:

Expand Down Expand Up @@ -234,8 +234,8 @@ import (
"strconv"

"github.com/gin-gonic/gin"
"github.com/swaggo/swag/example/celler/httputil"
"github.com/swaggo/swag/example/celler/model"
"github.com/jixiuf/swag/example/celler/httputil"
"github.com/jixiuf/swag/example/celler/model"
)

// ShowAccount godoc
Expand Down Expand Up @@ -300,7 +300,7 @@ swag init
## 格式化说明

可以针对Swag的注释自动格式化,就像`go fmt`
此处查看格式化结果 [here](https://github.com/swaggo/swag/tree/master/example/celler).
此处查看格式化结果 [here](https://github.com/jixiuf/swag/tree/master/example/celler).

示例:
```shell
Expand Down Expand Up @@ -336,7 +336,7 @@ swag fmt -d ./ --exclude ./internal

## 通用API信息

**示例** [`celler/main.go`](https://github.com/swaggo/swag/blob/master/example/celler/main.go)
**示例** [`celler/main.go`](https://github.com/jixiuf/swag/blob/master/example/celler/main.go)

| 注释 | 说明 | 示例 |
| ----------------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
Expand Down Expand Up @@ -377,7 +377,7 @@ swag fmt -d ./ --exclude ./internal

## API操作

Example [celler/controller](https://github.com/swaggo/swag/tree/master/example/celler/controller)
Example [celler/controller](https://github.com/jixiuf/swag/tree/master/example/celler/controller)

| 注释 | 描述 |
|----------------------|------------------------------------------------------------------------------------------------|
Expand Down Expand Up @@ -602,7 +602,7 @@ type Account struct {

### 使用`swaggertype`标签更改字段类型

[#201](https://github.com/swaggo/swag/issues/201#issuecomment-475479409)
[#201](https://github.com/jixiuf/swag/issues/201#issuecomment-475479409)

```go
type TimestampTime struct {
Expand Down Expand Up @@ -639,7 +639,7 @@ type Account struct {
}
```

[#379](https://github.com/swaggo/swag/issues/379)
[#379](https://github.com/jixiuf/swag/issues/379)

```go
type CerticateKeyPair struct {
Expand Down Expand Up @@ -742,7 +742,7 @@ This project was inspired by [yvasiyarov/swagger](https://github.com/yvasiyarov/
## 贡献者

This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/swaggo/swag/graphs/contributors"><img src="https://opencollective.com/swag/contributors.svg?width=890&button=false" /></a>
<a href="https://github.com/jixiuf/swag/graphs/contributors"><img src="https://opencollective.com/swag/contributors.svg?width=890&button=false" /></a>

## 支持者

Expand Down
6 changes: 3 additions & 3 deletions cmd/swag/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (

"github.com/urfave/cli/v2"

"github.com/swaggo/swag"
"github.com/swaggo/swag/format"
"github.com/swaggo/swag/gen"
"github.com/jixiuf/swag"
"github.com/jixiuf/swag/format"
"github.com/jixiuf/swag/gen"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions doc.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Package swag converts Go annotations to Swagger Documentation 2.0.
See https://github.com/swaggo/swag for more information about swag.
See https://github.com/jixiuf/swag for more information about swag.
*/
package swag // import "github.com/swaggo/swag"
package swag // import "github.com/jixiuf/swag"
2 changes: 1 addition & 1 deletion example/basic/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"net/http"

"github.com/swaggo/swag/example/basic/web"
"github.com/jixiuf/swag/example/basic/web"
)

// GetStringByInt example
Expand Down
2 changes: 1 addition & 1 deletion example/basic/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by swaggo/swag
package docs

import "github.com/swaggo/swag"
import "github.com/jixiuf/swag"

const docTemplate = `{
"schemes": {{ marshal .Schemes }},
Expand Down
2 changes: 1 addition & 1 deletion example/basic/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"net/http"

"github.com/swaggo/swag/example/basic/api"
"github.com/jixiuf/swag/example/basic/api"
)

// @title Swagger Example API
Expand Down
2 changes: 1 addition & 1 deletion example/celler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Gen doc

```console
$ go get -u github.com/swaggo/swag/cmd/swag
$ go get -u github.com/jixiuf/swag/cmd/swag
$ swag init
```

Expand Down
4 changes: 2 additions & 2 deletions example/celler/controller/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"strconv"

"github.com/gin-gonic/gin"
"github.com/swaggo/swag/example/celler/httputil"
"github.com/swaggo/swag/example/celler/model"
"github.com/jixiuf/swag/example/celler/httputil"
"github.com/jixiuf/swag/example/celler/model"
)

// ShowAccount godoc
Expand Down
4 changes: 2 additions & 2 deletions example/celler/controller/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"net/http"

"github.com/gin-gonic/gin"
"github.com/swaggo/swag/example/celler/httputil"
"github.com/swaggo/swag/example/celler/model"
"github.com/jixiuf/swag/example/celler/httputil"
"github.com/jixiuf/swag/example/celler/model"
)

// Auth godoc
Expand Down
4 changes: 2 additions & 2 deletions example/celler/controller/bottles.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"github.com/gin-gonic/gin"

"github.com/swaggo/swag/example/celler/httputil"
"github.com/swaggo/swag/example/celler/model"
"github.com/jixiuf/swag/example/celler/httputil"
"github.com/jixiuf/swag/example/celler/model"
)

// ShowBottle godoc
Expand Down
2 changes: 1 addition & 1 deletion example/celler/controller/examples.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"

"github.com/gin-gonic/gin"
"github.com/swaggo/swag/example/celler/httputil"
"github.com/jixiuf/swag/example/celler/httputil"
)

// PingExample godoc
Expand Down
2 changes: 1 addition & 1 deletion example/celler/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by swaggo/swag
package docs

import "github.com/swaggo/swag"
import "github.com/jixiuf/swag"

const docTemplate = `{
"schemes": {{ marshal .Schemes }},
Expand Down
4 changes: 2 additions & 2 deletions example/celler/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/swaggo/swag/example/celler
module github.com/jixiuf/swag/example/celler

go 1.18

Expand All @@ -7,7 +7,7 @@ require (
github.com/gofrs/uuid v4.2.0+incompatible
github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2
github.com/swaggo/gin-swagger v1.4.2
github.com/swaggo/swag v1.8.1
github.com/jixiuf/swag v1.8.1
)

require (
Expand Down
6 changes: 3 additions & 3 deletions example/celler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"net/http"

"github.com/gin-gonic/gin"
"github.com/swaggo/swag/example/celler/controller"
_ "github.com/swaggo/swag/example/celler/docs"
"github.com/swaggo/swag/example/celler/httputil"
"github.com/jixiuf/swag/example/celler/controller"
_ "github.com/jixiuf/swag/example/celler/docs"
"github.com/jixiuf/swag/example/celler/httputil"

swaggerFiles "github.com/swaggo/files"
ginSwagger "github.com/swaggo/gin-swagger"
Expand Down
2 changes: 1 addition & 1 deletion example/go-module-support/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by swaggo/swag
package docs

import "github.com/swaggo/swag"
import "github.com/jixiuf/swag"

const docTemplate = `{
"schemes": {{ marshal .Schemes }},
Expand Down
4 changes: 2 additions & 2 deletions example/go-module-support/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/swaggo/swag/example/go-module-support
module github.com/jixiuf/swag/example/go-module-support

go 1.18

require (
github.com/gin-gonic/gin v1.9.1
github.com/swaggo/examples v0.0.0-20190624100559-f57286ab550c
github.com/swaggo/swag v1.8.1
github.com/jixiuf/swag v1.8.1
)

require (
Expand Down
2 changes: 1 addition & 1 deletion example/markdown/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by swaggo/swag
package docs

import "github.com/swaggo/swag"
import "github.com/jixiuf/swag"

const docTemplate = `{
"schemes": {{ marshal .Schemes }},
Expand Down
4 changes: 2 additions & 2 deletions example/markdown/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/swaggo/swag/example/markdown
module github.com/jixiuf/swag/example/markdown

go 1.18

require (
github.com/gorilla/mux v1.8.0
github.com/swaggo/http-swagger v1.2.6
github.com/swaggo/swag v1.8.1
github.com/jixiuf/swag v1.8.1
)

require (
Expand Down
Loading

0 comments on commit 65adedd

Please sign in to comment.