Skip to content

Commit

Permalink
feat: allow multiple Swagger documents (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
h44z committed Nov 4, 2021
1 parent 498deb2 commit 8ae7504
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 68 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,10 @@ func main() {
}
```

| Option | Type | Default | Description |
| ------------------------ | ------ | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| URL | string | "doc.json" | URL pointing to API definition |
| DocExpantion | string | "list" | Controls the default expansion setting for the operations and tags. It can be 'list' (expands only the tags), 'full' (expands the tags and operations) or 'none' (expands nothing). |
| DeepLinking | bool | true | If set to true, enables deep linking for tags and operations. See the Deep Linking documentation for more information. |
| DefaultModelsExpandDepth | int | 1 | Default expansion depth for models (set to -1 completely hide the models) |
| Option | Type | Default | Description |
| ------------------------ | ------ | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| URL | string | "doc.json" | URL pointing to API definition |
| DocExpantion | string | "list" | Controls the default expansion setting for the operations and tags. It can be 'list' (expands only the tags), 'full' (expands the tags and operations) or 'none' (expands nothing). |
| DeepLinking | bool | true | If set to true, enables deep linking for tags and operations. See the Deep Linking documentation for more information. |
| DefaultModelsExpandDepth | int | 1 | Default expansion depth for models (set to -1 completely hide the models). |
| InstanceName | string | "swagger" | The instance name of the swagger document. If multiple different swagger instances should be deployed on one gin router, ensure that each instance has a unique name (use the _--instanceName_ parameter to generate swagger documents with _swag init_). |
13 changes: 5 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
module github.com/swaggo/gin-swagger

require (
github.com/gin-contrib/gzip v0.0.1
github.com/gin-gonic/gin v1.7.0
github.com/kr/pretty v0.1.0 // indirect
github.com/stretchr/testify v1.4.0
github.com/gin-contrib/gzip v0.0.3
github.com/gin-gonic/gin v1.7.4
github.com/stretchr/testify v1.7.0
github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14
github.com/swaggo/swag v1.5.1
golang.org/x/net v0.0.0-20190611141213-3f473d35a33a
golang.org/x/tools v0.0.0-20190611222205-d73e1c7e250b // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
github.com/swaggo/swag v1.7.4
golang.org/x/net v0.0.0-20210119194325-5f4716e94777
)

go 1.13

0 comments on commit 8ae7504

Please sign in to comment.