-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an option for placing the docs/docs.go file #1811
Comments
Could you please mention your full command line? |
Sure, I use a script to try to decouple stuff from the source. #!/usr/bin/env bash
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
APIPATH="../../src/admin-api"
INITFILE="admin-api.go"
cd "$SCRIPTPATH"
cd admin-api
swag init -g "$APIPATH/$INITFILE" -d "$APIPATH" -s swagger/ || exit 1
mv "$APIPATH/docs/docs.go" docs/docs.go
rmdir "$APIPATH/docs/"
go build -o bin/admin-api-docs || exit 1 |
You are probably referring to the swaggo/swag CLI tool. In this case, this is not the right place to report errors. |
I'm sorry, I'll delete this |
(guess what, I can't delete this issue. Feel free to do it, thanks) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem statement
When generating the documentation with
swag init
, there is no option to place the generateddocs
folder differently. I'm trying to separate the documentation generation code from the application code.At the moment the folder is always placed in the directory specified with the
d
flag, which is the analysed one. I'm aiming to have asrc/
folder with the program code and adocs/
folder with the documentation and swagger code.Please tell me if more explanations are needed, thanks
Environment
swagger version: 1.4.0
The text was updated successfully, but these errors were encountered: