From aa92a0ac3f26c587e4248afcf8d8b6318353e7b0 Mon Sep 17 00:00:00 2001 From: Fahad <61559675+fuddin95@users.noreply.github.com> Date: Sun, 10 Dec 2023 04:57:54 -0500 Subject: [PATCH] Update ReadMe (#291) --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 7e07033..9c20ddd 100644 --- a/README.md +++ b/README.md @@ -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