Simplify jsonAPI based documentation using this generator.
Simplify jsonApi based documentation using this generator.
Installed aglio
as it is used to build documentation. Knowledge of
jsonApi and api blueprint format, as well as MSON structure is welcome
and can be very helpful.
Everything that needs to be changed for your Api documentation is inside
of src/
directory. A few, thing you need to keep in mind:
src/api-description.apib
contains general details and information ofsrc/requests.apib
and src/responses.apib
contains general requestsrc/groups/{resource-type}.apib
contains endpoint definitionssrc/resources/{resource-type}.apib
contains data structuresNew resource can be added to documentation using generator script.
Script is run with arguments representing details of resource:
```shell script
$ ./generate.sh notes Note Notes
First argument is resource type (as jsonApi resource type). Second
argument is singular representation of resource name (used in a
documentation, and it MUST be a capitalized word). Third argument is
plural representation of resource name (also used in a documentation,
and it MUST be a capitalized word).
New generated files will be added to `src/groups/` and `src/resources/`
directories with name that is `{resource-type}.apib`.
## Build Documentation
Documentation is build as an `index.html` file in `dist/` directory.
To build api documentation use following command:
```shell script
$ ./build.sh
File dist/index.html
can be open in browser without running any local
server.