diff --git a/README.md b/README.md index af384450..0e9ddd05 100644 --- a/README.md +++ b/README.md @@ -62,31 +62,22 @@ new OpenApiMiddleware({ }).install(app); app.get('/v1/pets', function(req, res, next) { - console.log('at /v1/pets here'); - res.json({ - test: 'hi', - }); + res.json([ + { id: 1, name: 'max' }, + { id: 2, name: 'mini' }, + ]); }); app.post('/v1/pets', function(req, res, next) { res.json({ - test: 'hi', - }); -}); - -app.get('/v1/vets/:id', function(req, res, next) { - console.log('---- get /pets/:id', req.params); - // here - res.json({ - id: req.params.id, + name: 'sparky', }); }); app.get('/v1/pets/:id', function(req, res, next) { - console.log('---- get /pets/:id', req.params); - // here res.json({ id: req.params.id, + name: 'sparky' }); });