Update ReadMe

This commit is contained in:
fahad 2023-12-10 04:49:57 +05:00
parent 3b4340f1a7
commit 27b53c4dda
1 changed files with 26 additions and 0 deletions

View File

@ -148,6 +148,32 @@ Demo project tree, `swag init` is run at relative `.`
├── go.sum
└── 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