From 27b53c4ddae868b013161636ac28ea1853671438 Mon Sep 17 00:00:00 2001 From: fahad Date: Sun, 10 Dec 2023 04:49:57 +0500 Subject: [PATCH] Update ReadMe --- 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