Skip to content
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

version issue with github.com/swaggo/swag v1.8.1 #122

Open
rish-ee opened this issue Oct 23, 2024 · 2 comments
Open

version issue with github.com/swaggo/swag v1.8.1 #122

rish-ee opened this issue Oct 23, 2024 · 2 comments

Comments

@rish-ee
Copy link

rish-ee commented Oct 23, 2024

I am using go 1.23 with github.com/swaggo/swag v1.8.1. So the generated Docs is giving error with swag init. but github.com/swaggo/swag v1.16.1 fixed this.

@rish-ee
Copy link
Author

rish-ee commented Oct 23, 2024

And github.com/swaggo/http-swagger/v2 is referencing github.com/swaggo/swag v1.8.1

@yashisrani
Copy link

@rish-ee The issue arises because github.com/swaggo/http-swagger/v2 depends on an outdated version of github.com/swaggo/swag (v1.8.1), while the newer version of swag (v1.16.1) fixes the swag init error.

  • Update swag to v1.16.1

  • Force Dependency Resolution

    • Override the version of swag used by http-swagger/v2 to ensure it references v1.16.1.
    • Use below command :
    • replace github.com/swaggo/swag v1.8.1 => github.com/swaggo/swag v1.16.1
  • Verify Compatibility

    • Use below commands :
    • go mod tidy
    • swag init
  • After applying these steps, your swag init command should work without errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants