Skip to content

Support Doc link format #2003

Open
Open
@arxeiss

Description

@arxeiss

Is your feature request related to a problem? Please describe.
Currently I specify data type by structure name. Like this

//  @Failure      404  {object}  api.ErrorResponse

But in my IDE (VS Code) I cannot click through that into structure definition.

Describe the solution you'd like
Go support Doc link, when you wrap structure/function etc into [ and ]. See https://tip.golang.org/doc/comment#doclinks

It would be nice if Swag would support that format too, so I could write.

//  @Failure      404  {object}  [api.ErrorResponse]

Then the text becomes clickable and I can just go to definition directly from Swag comment.

Currently if I try that, I get error

ParseComment error in file my_file.go :cannot find type definition: [api.ErrorResponse]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions