gastonfournier / api-doc

Api documentation made easy (or at least pretty)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Who doesn't love documentation?

In a project I was working on, I developed a nice couple of classes to automagically document our API for us, later I extracted it to an external component for other applications to use it, and now I'm putting it out here for the world.

It's nothing complicated, but it helps set a standard across different apps that publish an API in your organization.

Quick how to

All you need to do, is

  1. Add the dependency to the component in your web application

    ar.com.jmfsg api-doc 0.0.27
  2. Import the component context in your application context

  3. Write your doc file -- see the sample application with an example.

  4. Specify where to find the doc file

And that's it!
When you run your application, you'll see your pretty documentation

Stuff I know is wrong and plan on fixing

  • The sections supported in the detailed view are kind of hardcoded (they are optional, but hardcoded) to what we used internally -- parameters, filters, options, and facets. I plan on making it generic so you can define your own sections somewhere in the doc file, and specify the field list for them. (this will probably break compatibility, but I don't expect it to be that difficult)

  • The toggle is suboptimal code, there's a TODO in there.

About

Api documentation made easy (or at least pretty)


Languages

Language:JavaScript 73.6%Language:Java 19.9%Language:CSS 6.6%