Fixed generation of swagger docs (#29)
This commit is contained in:
34
vendor/github.com/swaggo/swag/README.md
generated
vendored
34
vendor/github.com/swaggo/swag/README.md
generated
vendored
@ -22,7 +22,7 @@
|
||||
- [Getting started](#getting-started)
|
||||
- [Go web frameworks](#supported-web-frameworks)
|
||||
- [Supported Web Frameworks](#supported-web-frameworks)
|
||||
- [How to use it with `gin`?](#how-to-use-it-with-`gin`?)
|
||||
- [How to use it with Gin](#how-to-use-it-with-gin)
|
||||
- [Implementation Status](#implementation-status)
|
||||
- [swag cli](#swag-cli)
|
||||
- [General API Info](#general-api-info)
|
||||
@ -72,7 +72,7 @@ $ swag init
|
||||
- [echo](http://github.com/swaggo/echo-swagger)
|
||||
- [net/http](https://github.com/swaggo/http-swagger)
|
||||
|
||||
## How to use it with `gin`?
|
||||
## How to use it with Gin
|
||||
|
||||
Find the example source code [here](https://github.com/swaggo/swag/tree/master/example/celler).
|
||||
|
||||
@ -307,19 +307,23 @@ OPTIONS:
|
||||
**Example**
|
||||
[celler/main.go](https://github.com/swaggo/swag/blob/master/example/celler/main.go)
|
||||
|
||||
| annotation | description | example |
|
||||
|--------------------|-------------------------------------------------------------------------------------------------|-----------------------------------------------------------------|
|
||||
| title | **Required.** The title of the application. | // @title Swagger Example API |
|
||||
| version | **Required.** Provides the version of the application API. | // @version 1.0 |
|
||||
| description | A short description of the application. | // @description This is a sample server celler server. |
|
||||
| termsOfService | The Terms of Service for the API. | // @termsOfService http://swagger.io/terms/ |
|
||||
| contact.name | The contact information for the exposed API. | // @contact.name API Support |
|
||||
| contact.url | The URL pointing to the contact information. MUST be in the format of a URL. | // @contact.url http://www.swagger.io/support |
|
||||
| contact.email | The email address of the contact person/organization. MUST be in the format of an email address.| // @contact.email support@swagger.io |
|
||||
| license.name | **Required.** The license name used for the API. | // @license.name Apache 2.0 |
|
||||
| license.url | A URL to the license used for the API. MUST be in the format of a URL. | // @license.url http://www.apache.org/licenses/LICENSE-2.0.html |
|
||||
| host | The host (name or ip) serving the API. | // @host localhost:8080 |
|
||||
| BasePath | The base path on which the API is served. | // @BasePath /api/v1 |
|
||||
| annotation | description | example |
|
||||
|-----------------------|-------------------------------------------------------------------------------------------------|-----------------------------------------------------------------|
|
||||
| title | **Required.** The title of the application. | // @title Swagger Example API |
|
||||
| version | **Required.** Provides the version of the application API. | // @version 1.0 |
|
||||
| description | A short description of the application. | // @description This is a sample server celler server. |
|
||||
| tag.name | Name of a tag. | // @tag.name This is the name of the tag |
|
||||
| tag.description | Description of the tag | // @tag.description Cool Description |
|
||||
| tag.docs.url | Url of the external Documentation of the tag | // @tag.docs.url https://example.com |
|
||||
| tag.docs.descripiton | Description of the external Documentation of the tag | // @tag.docs.descirption Best example documentation |
|
||||
| termsOfService | The Terms of Service for the API. | // @termsOfService http://swagger.io/terms/ |
|
||||
| contact.name | The contact information for the exposed API. | // @contact.name API Support |
|
||||
| contact.url | The URL pointing to the contact information. MUST be in the format of a URL. | // @contact.url http://www.swagger.io/support |
|
||||
| contact.email | The email address of the contact person/organization. MUST be in the format of an email address.| // @contact.email support@swagger.io |
|
||||
| license.name | **Required.** The license name used for the API. | // @license.name Apache 2.0 |
|
||||
| license.url | A URL to the license used for the API. MUST be in the format of a URL. | // @license.url http://www.apache.org/licenses/LICENSE-2.0.html |
|
||||
| host | The host (name or ip) serving the API. | // @host localhost:8080 |
|
||||
| BasePath | The base path on which the API is served. | // @BasePath /api/v1 |
|
||||
|
||||
## Security
|
||||
|
||||
|
Reference in New Issue
Block a user