D
D
deadkEEper12016-03-25 11:29:27
API
deadkEEper1, 2016-03-25 11:29:27

How to document the transfer of a file when automatically generating documentation (using apiDOC)?

Below is a working example of authorization documentation

/**
     * @api {post} /signIn Sign In
     * @apiVersion 0.0.1
     * @apiName SignIn
     * @apiGroup Authorization
     *
     * * @apiExample Example usage:
     *     endpoint: /signIn
     *
     *     body:
     *     {
     *       "email": "[email protected]",
     *       "password": "MySecretPassword"
     *     }
     *
     * @apiSuccessExample {json} Success-Response:
     *     HTTP/1.1 200 OK
     *     {
     *          "success": "Login successful",
     *          "user":
     *              {
     *                  "userId": "568a36e3eaa9fc0b10b64ff0",
     *                  "role": "USER",
     *                  "email": "[email protected]"
     *              }
     *     }
     *
     * @apiUse ErrorBlock
     */

I specify: method, url, request body, successful and error response.
Voros is how to indicate in the documentation that I am going to transfer some file. Using the "connect-multiparty" module to extend the 'req' object

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question