Skip to content

Commit

Permalink
upgrade gin-swaager v1.0.1 to v1.2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddycjy committed Mar 22, 2020
1 parent a2781e6 commit 44a3156
Show file tree
Hide file tree
Showing 138 changed files with 13,479 additions and 34,739 deletions.
155 changes: 94 additions & 61 deletions docs/docs.go

Large diffs are not rendered by default.

572 changes: 572 additions & 0 deletions docs/swagger.json

Large diffs are not rendered by default.

369 changes: 369 additions & 0 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,369 @@
definitions:
app.Response:
properties:
code:
type: integer
data:
type: object
msg:
type: string
type: object
info:
contact: {}
description: An example of gin
license:
name: MIT
url: https://github.com/EDDYCJY/go-gin-example/blob/master/LICENSE
termsOfService: https://github.com/EDDYCJY/go-gin-example
title: Golang Gin API
version: "1.0"
paths:
/api/v1/articles:
get:
parameters:
- description: TagID
in: body
name: tag_id
schema:
type: integer
- description: State
in: body
name: state
schema:
type: integer
- description: CreatedBy
in: body
name: created_by
schema:
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/app.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/app.Response'
summary: Get multiple articles
post:
parameters:
- description: TagID
in: body
name: tag_id
required: true
schema:
type: integer
- description: Title
in: body
name: title
required: true
schema:
type: string
- description: Desc
in: body
name: desc
required: true
schema:
type: string
- description: Content
in: body
name: content
required: true
schema:
type: string
- description: CreatedBy
in: body
name: created_by
required: true
schema:
type: string
- description: State
in: body
name: state
required: true
schema:
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/app.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/app.Response'
summary: Add article
/api/v1/articles/{id}:
delete:
parameters:
- description: ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/app.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/app.Response'
summary: Delete article
get:
parameters:
- description: ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/app.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/app.Response'
summary: Get a single article
put:
parameters:
- description: ID
in: path
name: id
required: true
type: integer
- description: TagID
in: body
name: tag_id
schema:
type: string
- description: Title
in: body
name: title
schema:
type: string
- description: Desc
in: body
name: desc
schema:
type: string
- description: Content
in: body
name: content
schema:
type: string
- description: ModifiedBy
in: body
name: modified_by
required: true
schema:
type: string
- description: State
in: body
name: state
schema:
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/app.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/app.Response'
summary: Update article
/api/v1/tags:
get:
parameters:
- description: Name
in: query
name: name
type: string
- description: State
in: query
name: state
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/app.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/app.Response'
summary: Get multiple article tags
post:
parameters:
- description: Name
in: body
name: name
required: true
schema:
type: string
- description: State
in: body
name: state
schema:
type: integer
- description: CreatedBy
in: body
name: created_by
schema:
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/app.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/app.Response'
summary: Add article tag
/api/v1/tags/{id}:
delete:
parameters:
- description: ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/app.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/app.Response'
summary: Delete article tag
put:
parameters:
- description: ID
in: path
name: id
required: true
type: integer
- description: Name
in: body
name: name
required: true
schema:
type: string
- description: State
in: body
name: state
schema:
type: integer
- description: ModifiedBy
in: body
name: modified_by
required: true
schema:
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/app.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/app.Response'
summary: Update article tag
/api/v1/tags/export:
post:
parameters:
- description: Name
in: body
name: name
schema:
type: string
- description: State
in: body
name: state
schema:
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/app.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/app.Response'
summary: Export article tag
/api/v1/tags/import:
post:
parameters:
- description: Image File
in: formData
name: image
required: true
type: file
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/app.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/app.Response'
summary: Import Image
/auth:
get:
parameters:
- description: userName
in: query
name: username
required: true
type: string
- description: password
in: query
name: password
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/app.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/app.Response'
summary: Get Auth
swagger: "2.0"
7 changes: 3 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/denisenkom/go-mssqldb v0.0.0-20190920000552-128d9f4ae1cd // indirect
github.com/dgrijalva/jwt-go v3.1.0+incompatible
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 // indirect
github.com/gin-gonic/gin v1.3.0
github.com/gin-gonic/gin v1.4.0
github.com/go-ini/ini v1.32.1-0.20180214101753-32e4be5f41bb
github.com/go-sql-driver/mysql v1.4.1-0.20190510102335-877a9775f068 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
Expand All @@ -24,13 +24,12 @@ require (
github.com/mattn/go-sqlite3 v1.11.0 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 // indirect
github.com/swaggo/gin-swagger v1.0.1-0.20190110070702-0c6fcfd3c7f3
github.com/swaggo/swag v1.4.0
github.com/swaggo/gin-swagger v1.2.0
github.com/swaggo/swag v1.5.1
github.com/tealeg/xlsx v1.0.4-0.20180419195153-f36fa3be8893
github.com/unknwon/com v1.0.1
golang.org/x/image v0.0.0-20180628062038-cc896f830ced // indirect
golang.org/x/sys v0.0.0-20190921204832-2dccfee4fd3e // indirect
google.golang.org/appengine v1.6.3 // indirect
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
gopkg.in/ini.v1 v1.47.0 // indirect
)
Loading

0 comments on commit 44a3156

Please sign in to comment.