Skip to content

A plugin for docular (grunt-docular.com) to allow documentation of HTTP API

License

Notifications You must be signed in to change notification settings

calummoore/docular-doc-api-http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docular-doc-api-http

A plugin for docular (grunt-docular.com) to allow documentation of HTTP API.

###NOTE: This will not work until pull-request #91 on docular is merged.

###Grunt To add the plugin using Grunt:

docular: {
  //Other options...
  plugins:[{id:'docular-doc-api-http'}]
}

See grunt-docular for more configuration options.

###Usage

Doc Identifier

The doc identifier is: doc-http.

Doc Types

Things to know about docTypes.

  1. DocTypes are what Docular uses to determine how to render the document.

  2. DocTypes are the value specified next to the documentation identifier.

@doc-http root

Root path or collection relating to a data entity - which you will have a number of paths and schema associated with it.

/**
 * @doc-http root
 * @name Media.protected:Album
 * 
 * @description
 * Some info.
 * 
 */
@doc-http path

A specific route/path with it's own HTTP method, parameters etc.

/**
 * @doc-http path
 * @name Media.protected:Album#get-many
 * 
 * @pathOf Media.protected:Album
 * 
 * @path /albums/:id
 * @method get-one //get, post, delete, put
 *
 * @param {string} id Albums unique id.
 * 
 * @description
 * Lists all albums that are associated with the user.
 * 
 */
@doc-http schema

Details the fields that are available to be selected from. Field follows the same structure as @param.

/**
 * @doc-http schema
 * @name Media.protected:Album#schema
 * 
 * @schemaOf Media.protected:Album
 * 
 * @field {String} name Name of the album
 *
 */

About

A plugin for docular (grunt-docular.com) to allow documentation of HTTP API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published