Comments (5)
Having same issue, getting "No operations defined in spec!" even though my swagger.yaml and swagger.json file is generated correctly. When copy-pasted my YAML file content in http://editor.swagger.io/, it is working as expected but showing the error in http://localhost:8080/swagger/index.html
Anyone know, why this error "No operations defined in spec!" comes up? and what needs to be done in that case
from gin-swagger.
Hi @kotyara85
Check out this example:
https://github.com/swaggo/swag/blob/master/example/basic/api/api.go#L8
Probably it would require to place the comments for the each API endpoint to generate properly docs.go file.
But I am not 100% sure about that. I've just started the integration myself.
from gin-swagger.
In the comments, @router this must start with ‘/’
from gin-swagger.
This helped me solve my issue
#73 (comment)
from gin-swagger.
Have you solved this problem? How did you solve it?
from gin-swagger.
Related Issues (20)
- support for 'main' package outside of project root
- use go work report swaggerFiles could not import error
- Using gin-swagger encountered a javascript error, causing the google browser not to display the swagger api page, the javascript error is as follows HOT 3
- Swagger comments in Go files are not recursively parsed by Swaggo HOT 2
- Getting all defined routes in swagger
- Question how to specify []string type in formData. HOT 1
- support for function scoped struct in type method
- Why is disabling try it out still not supported?
- Support OpenAPI 3.1
- Enable annotation readOnly HOT 1
- Serve Swagger UI on custom route without path or path extensions HOT 1
- Support for discriminator
- GO-2023-1988 found in golang.org/x/net/html
- zsh: command not found: swag HOT 2
- Option to change the order/sorting of endpoints is not supported
- Is there no way to support the sorting of interfaces under this classification? HOT 1
- Cannot find type definition: dto.CreateCityRequest HOT 1
- Error install v1.6.0
- swag init can't generate api info in swagger.json
- swagger-ui Parser error on line 13 end of the stream or a document separator is expected
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gin-swagger.