Giter Site home page Giter Site logo

No operations defined in spec! about gin-swagger HOT 5 OPEN

swaggo avatar swaggo commented on April 28, 2024 3
No operations defined in spec!

from gin-swagger.

Comments (5)

amoghpareek1 avatar amoghpareek1 commented on April 28, 2024 2

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.

oivoodoo avatar oivoodoo commented on April 28, 2024

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.

gq-tang avatar gq-tang commented on April 28, 2024

In the comments, @router this must start with ‘/’

from gin-swagger.

Shailendra-go avatar Shailendra-go commented on April 28, 2024

This helped me solve my issue
#73 (comment)

from gin-swagger.

noneowl avatar noneowl commented on April 28, 2024

Have you solved this problem? How did you solve it?

from gin-swagger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.