API blueprint's formatter
Go
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples using custom template is now even simpler Oct 17, 2015
.gitignore add example: api doc server Sep 26, 2013
.travis.yml use trusty beta for travis Oct 3, 2016
LICENSE MIT Sep 25, 2013
README.md added deprecation message Oct 3, 2016
fixture_test.go Support for new warnings structure in v2.3.0-pre.2 Apr 8, 2016
formatter.go Bug fix for AST nesting in API struct Dec 4, 2015
formatter_test.go add example: api doc server Sep 26, 2013
iglo.go
iglo_test.go Updated drafter to v2.3.1, relaxed test to v2.3.x May 10, 2016
parser.go Support for new warnings structure in v2.3.0-pre.2 Apr 8, 2016
parser_test.go no need to check drafter version flag Apr 1, 2015
template.go using custom template is now even simpler Oct 17, 2015

README.md

iglo

API blueprint's formatter.

Build Status

Status

DEPRECATED. Please use https://github.com/subosito/snowboard instead.

Writing API documentation

For writing API documentation, the iglo using API Blueprint syntax. You can read about its specification.

Here's the example:

FORMAT: 1A
HOST: https://api.example.com/v1

# Hello API

A simple API demo

# Group People

This section describes about the People

## Person [/people/{id}]

Represent particular Person

+ Parameters

    + id (required, string, `123`) ... The id of the Person.

+ Model (application/json)

    ```
    {"name":"Gesang","birthdate":"01-09-1917"}
    ```

### Retrieve Person [GET]

Return the information for the Person

+ Request (application/json)

    + Headers

        ```
        Authorization: Basic AbcdeFg=
        ```

+ Response 200 (application/json)

    [Person][]

Demo

Make sure you have iglo installed in the GOPATH

$ cd $GOPATH
$ go get github.com/subosito/iglo

Serving as HTTP

You can go to the examples/api-server directory and then run the main.go.

$ cd examples/api-server
$ go run main.go

Then visit http://localhost:8080/ to see the output.

Or, you can just visit this demo page :)

Exporting as HTML file

You can go to the examples/api-exporter directory and then run the main.go.

$ cd examples/api-exporter
$ go run main.go -out "api-output.html"

Now you have HTML generated output in the api-output.html.

Dependencies

The iglo ParseMarkdown requires drafter to be installed. Refer to the drafter page for the installation details.

Related Projects