Skip to content

Commit 7c5a170

Browse files
More examples
1 parent 02f492c commit 7c5a170

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

api/doc/api_data.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/doc/api_data.json

+1-1
Large diffs are not rendered by default.

api/doc/api_project.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/doc/api_project.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "name": "react-workshop-api-doc", "version": "1.0.0", "description": "React Workshop API documentation", "title": "React Workshop API", "url": "http://localhost:3000/api", "sampleUrl": false, "apidoc": "0.2.0", "generator": { "name": "apidoc", "time": "2016-04-11T08:24:11.701Z", "url": "http://apidocjs.com", "version": "0.15.1" }}
1+
{ "name": "react-workshop-api-doc", "version": "1.0.0", "description": "React Workshop API documentation", "title": "React Workshop API", "url": "http://localhost:3000/api", "sampleUrl": false, "apidoc": "0.2.0", "generator": { "name": "apidoc", "time": "2016-04-11T08:48:33.421Z", "url": "http://apidocjs.com", "version": "0.15.1" }}

api/src/server.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ app.get('/api/wines', function (req, res) {
101101
* @api {get} /likes All
102102
* @apiName All
103103
* @apiGroup Likes
104+
*
104105
* @apiSampleRequest /api/likes
105106
*
106107
* @apiSuccess {Number} count The number of likes across all wines
@@ -229,6 +230,8 @@ app.get('/api/wines/:id/like', function (req, res) {
229230
* @api {post} /wines/:id/like Like
230231
* @apiName Like
231232
* @apiGroup Wines
233+
234+
* @apiSampleRequest /api/wines/:id/like
232235
*
233236
* @apiParam {String} id the id of the wine
234237
* @apiParam {String} like indicates if the current user likes the wine
@@ -302,7 +305,7 @@ app.get('/api/wines/:id/comments', function (req, res) {
302305
* @apiName Comment
303306
* @apiGroup Wines
304307
*
305-
* @apiSampleRequest http://localhost:3000/api/comments
308+
* @apiSampleRequest /api/wines/:id/comments
306309
*
307310
* @apiParam {String} id the id of the wine
308311
* @apiParam {String} title title of the comment.
@@ -339,7 +342,7 @@ app.post('/api/wines/:id/comments', function (req, res) {
339342
* @apiName All
340343
* @apiGroup Regions
341344
*
342-
* @apiSampleRequest http://localhost:3000/api/regions
345+
* @apiSampleRequest /api/regions
343346
*
344347
* @apiSuccess {String[]} regions Wine regions
345348
*

0 commit comments

Comments
 (0)