Skip to content

MiguelYax/ApiDocSnippets

Repository files navigation

ApiDoc Snippets

Inline Documentation for RESTful web APIs with ApiDoc - Snippets

Basic documetation example:

Image of Snippets

Custom documentation example:

Image of Snippets

Content:

Example:

@api

apiApi + tab

@api {${method}} /${path} ${title}

@apiDefine

apiDefine + tab

@apiDefine ${name} ${title}
*    ${description} 

@apiDeprecated

apiDeprecated + tab

@apiDeprecated ${text}

@apiDescription

apiDescription + tab

@apiDescription ${text}

@apiDocumentation

apiDocumentation + tab

/**
 * 
 * @api {${1:method}} /${2:path} ${3:title}
 * @apiName ${4:apiName}
 * @apiGroup ${5:group}
 * @apiVersion  ${6:major}.${7:minor}.${8:patch}
 * 
 * 
 * @apiParam  {${9:String}} ${10:paramName} ${11:description}
 * 
 * @apiSuccess ${12:(${13:200})} {${14:type}} ${15:name} ${16:description}
 * 
 * @apiParamExample  {${17:type}} ${18:Request-Example:}
 * {
 *     ${19:property} : ${20:value}
 * }
 * 
 * 
 * @apiSuccessExample {${21:type}} ${22:Success-Response:}
 * {
 *     ${23:property} : ${24:value}
 * }
 * 
 * 
 */

@apiErrorExample

apiErrorExample + tab

@apiErrorExample {${type}} ${title:Error-Response:}
    ${example}

@apiExample

apiExample + tab

@apiExample {${type}} ${title:Example usage:}
*    ${example}

@apiGroup

apiGroup + tab

@apiGroup ${group}

@apiHeader

apiHeader + tab

@apiHeader ${group:(${code:200})} {${type}} ${field} ${description}

@apiHeaderExample

apiHeaderExample + tab

@apiHeaderExample {${type}} ${title:Request-Example:}
*    ${example}

@apiName

apiName + tab

@apiName ${name}

@apiParam

apiParam + tab

@apiParam  {${String}} ${name} ${description}

@apiParamExample

apiParamExample + tab

@apiParamExample  {${type}} ${title:Request-Example:}
*    ${example}

@apiPermission

apiPermission + tab

@apiPermission ${name}

@apiSampleRequest

apiSampleRequest + tab

@apiSampleRequest ${url}

@apiSuccess

apiSuccess + tab

@apiSuccess ${group:(${code:200})} {${type}} ${name} ${description}

@apiSuccessExample

apiSuccessExample + tab

@apiSuccessExample {${type}} ${title:Success-Response:}
*    ${example}

@apiUse

apiUse + tab

@apiUse ${name}

@apiVersion

apiVersion + tab

@apiVersion  ${major}.${minor}.${patch}

@comment

cc + tab

/**
 * ${1}
 */

Contribution

  • Something is missing?
  • If you have ideas on how to improve this project let us know.
  • All contributions are welcome!

About

Api Doc Snippets for Visual Studio Code

Resources

License

Stars

Watchers

Forks

Packages

No packages published