Update ReadMe (#291)
This commit is contained in:
@@ -148,6 +148,32 @@ Demo project tree, `swag init` is run at relative `.`
|
|||||||
├── go.sum
|
├── go.sum
|
||||||
└── main.go
|
└── main.go
|
||||||
```
|
```
|
||||||
|
## Project with Nested Directory
|
||||||
|
```
|
||||||
|
.
|
||||||
|
├── cmd
|
||||||
|
│ └── ginsimple
|
||||||
|
│ └── main.go
|
||||||
|
├── docs
|
||||||
|
│ ├── docs.go
|
||||||
|
│ ├── swagger.json
|
||||||
|
│ └── swagger.yaml
|
||||||
|
├── go.mod
|
||||||
|
├── go.sum
|
||||||
|
└── internal
|
||||||
|
├── handlers
|
||||||
|
│ ├── helloWorld.go
|
||||||
|
│ └── userHandler.go
|
||||||
|
└── models
|
||||||
|
├── profile.go
|
||||||
|
└── user.go
|
||||||
|
```
|
||||||
|
Inorder generate swagger docs for projects with nested directories run the following command
|
||||||
|
```bash
|
||||||
|
swag init -g ./cmd/ginsimple/main.go -o cmd/docs
|
||||||
|
```
|
||||||
|
`-o` will set the auto generated file to the specified path
|
||||||
|
|
||||||
|
|
||||||
## Multiple APIs
|
## Multiple APIs
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user