Skip to content

Support httpin tags for automatically generating params from structs. #1720

@hookenz

Description

@hookenz

Is your feature request related to a problem? Please describe.
Keeping documentation up to date is always difficult. Devs add new params and forget to update the swag comments so it gets missed and docs are outdated. Docs are a big maintenance overhead and mistakes cost a lot of time and money to resolve. Automation is key.

Describe the solution you'd like
httpin is a tool that decodes http requests into structs.
http uses go struct tags to help with the decoding process.

Swag already parses the structs for example tags. If we could also add support for httpin tags then we would just need to supply the appropriate object to the docs and swag can figure out the rest. This means as we change the structs, the generated docs automatically reflect the changes.

https://ggicci.github.io/httpin/

Describe alternatives you've considered
Not using swag but generating server based on code. However our codebase is too big and complex to switch.
This addition would solve a lot of issues for us and I think it'd be an amazing feature.

Additional context
none

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