Skip to content

500 Internal Server Error following the guide #127

@ThermodynamicBeta

Description

@ThermodynamicBeta

When following the instructions I got:

Internal Server Error http://localhost:3420/swagger/doc.json
when visiting my swagger link (http://localhost:3420/swagger/index.html):

Image

This is because I didn't have the docs imported, as the swaggo docs instruct:

Image

I'm new to go so I didn't know how to import properly because all my files are in src, so swagger put my files in src/docs, turns out I just needed to do

_ "github.<company>.com/<org>/<repo name>/src/docs"

After that, everything worked properly. Should this step be added to the docs?

I was also confused because the example puts swagger.json and swagger.yaml in /docs/swagger/, but that is not what swaggo does (everything under /docs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions