forked from eddycjy/go-gin-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgrade gin-swaager v1.0.1 to v1.2.0.
- Loading branch information
Showing
138 changed files
with
13,479 additions
and
34,739 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.