FAQ
Hi,

Has anyone developed tooling to auto-generate documentation of an HTTP
API implemented in Go? In the past I've used Sphinx with the HTTP
domain[1] for this with Python projects.

Ideally I'd like to have the documentation generated from code
comments, similar to godoc. But godoc itself is not right for the job,
since I'm looking to document the HTTP API, not the Go implementation.

If a tool doesn't already exist, is implementing it using go/parser,
go/ast, etc. the right way to go about it?

Thanks,
Joe

[1] https://pythonhosted.org/sphinxcontrib-httpdomain/

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Henrik Johansson at Feb 24, 2014 at 4:20 pm
    I have good experience using Swagger with go-restful.

    https://github.com/emicklei/go-restful

    Simple and not too invasive although it is runtime.


    On Mon, Feb 24, 2014 at 4:16 PM, Joe Shaw wrote:

    Hi,

    Has anyone developed tooling to auto-generate documentation of an HTTP
    API implemented in Go? In the past I've used Sphinx with the HTTP
    domain[1] for this with Python projects.

    Ideally I'd like to have the documentation generated from code
    comments, similar to godoc. But godoc itself is not right for the job,
    since I'm looking to document the HTTP API, not the Go implementation.

    If a tool doesn't already exist, is implementing it using go/parser,
    go/ast, etc. the right way to go about it?

    Thanks,
    Joe

    [1] https://pythonhosted.org/sphinxcontrib-httpdomain/

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Joe Shaw at Mar 6, 2014 at 3:00 am
    Hi again,

    I ended up writing a tool to help with this. It extracts reStructured
    Text comments tagged with "+rst" from Go source code into their own
    .rst files. For my own use this lets me continue using the httpdomain
    syntax in comments as I did in Python and using Sphinx to generate the
    HTML docs.

    https://github.com/joeshaw/rst-extract

    Thank you, thank you, thank you to the Go team for providing go/parser
    and go/ast and including them in the standard library.

    Joe
    On Mon, Feb 24, 2014 at 10:16 AM, Joe Shaw wrote:
    Hi,

    Has anyone developed tooling to auto-generate documentation of an HTTP
    API implemented in Go? In the past I've used Sphinx with the HTTP
    domain[1] for this with Python projects.

    Ideally I'd like to have the documentation generated from code
    comments, similar to godoc. But godoc itself is not right for the job,
    since I'm looking to document the HTTP API, not the Go implementation.

    If a tool doesn't already exist, is implementing it using go/parser,
    go/ast, etc. the right way to go about it?

    Thanks,
    Joe

    [1] https://pythonhosted.org/sphinxcontrib-httpdomain/
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedFeb 24, '14 at 4:15p
activeMar 6, '14 at 3:00a
posts3
users2
websitegolang.org

2 users in discussion

Joe Shaw: 2 posts Henrik Johansson: 1 post

People

Translate

site design / logo © 2021 Grokbase