Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save azizkale/661e47117d97d4368ad7c1aa629524b4 to your computer and use it in GitHub Desktop.
Save azizkale/661e47117d97d4368ad7c1aa629524b4 to your computer and use it in GitHub Desktop.
/**
* @swagger
* /posts:
* get:
* summary: Returns all posts
* tags: [Posts]
* responses:
* 200:
* description: the list of the posts
* content:
* application/json:
* schema:
* type: array
* items:
* $ref: '#/components/schemas/Post'
*/
postRouter.get("/", (req, res) => {
res.send(data);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment