-
Notifications
You must be signed in to change notification settings - Fork 127
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
No operations defined in spec! #66
Comments
I caught the same issue.
|
Because you are using the wrong file to init your documentation. Moreover, I observed a very silly mistake I stuck with while generating docs, the line gap between doc statements and function declaration would fail including swagger for that API. |
I had a similar issue. Please double check if you imported your autogenerated Like this: // replace it with your package path
_ "github.com/swaggo/echo-swagger/example/docs" // docs is generated by Swag CLI, you have to import it. |
had same problem |
1 similar comment
had same problem |
I had some trouble myself getting swaggo to find all my annotations in the project structure. And, of course, don't forget to import your generated docs. Edit: See also this issue |
Same, maybe we should define path with router to swag init or some like that? I run swag init in main, where create Echo object, but i had router in other package |
This helps a lot, can't believe this cost me a whole afternoon ....... |
This should really be mentionned in the docs! Do not keep an empty line between annotations and the api function or it won't parse it, and it also won't say anything about it, so be careful. |
what is a properly done example of this? |
@MichaelBonnet There is nothing more to it than that. By default, For a full example on how to define a documentation, refer to the official echo-swagger docs |
If you used in golang, I think you should follow this tutorials: |
I follow the echo-wagger README tutorial and get the error bellow
And I google so many times and have no answer. so any help or suggesions would be appreciate.
The text was updated successfully, but these errors were encountered: