swagger docs add params, memberships handle compoundId

This commit is contained in:
Agusti Fernandez Pardo committed 2022-03-31 22:14:37 +02:00
1 parent e6cd238803
commit 12de89294d
33 files changed
+460 -205

No files matched your search

+11 -2
View File
@@ -11,9 +11,18 @@ import {
/**
* @swagger
* /api/users/:id/delete:
* /api/users/{id}/delete:
* delete:
* description: Remove an existing user
* summary: Remove an existing user
* parameters:
* - in: path
* name: id
* schema:
* type: integer
* required: true
* description: Numeric ID of the user to delete
* tags:
* - users
* responses:
* 201:
* description: OK, user removed successfuly
+3 -1
View File
@@ -14,7 +14,9 @@ import { schemaUserBodyParams, schemaUserPublic, withValidUser } from "@lib/vali
* @swagger
* /api/users/:id/edit:
* patch:
* description: Edits an existing user
* summary: Edits an existing user
* tags:
* - users
* responses:
* 201:
* description: OK, user edited successfuly
+11 -2
View File
@@ -12,9 +12,18 @@ import { schemaUserPublic } from "@lib/validations/user";
/**
* @swagger
* /api/users/:id:
* /api/users/{id}:
* get:
* description: find user by ID
* summary: Get a user by ID
* parameters:
* - in: path
* name: id
* schema:
* type: integer
* required: true
* description: Numeric ID of the user to get
* tags:
* - users
* responses:
* 200:
* description: OK
+3 -1
View File
@@ -10,7 +10,9 @@ import { schemaUserPublic } from "@lib/validations/user";
* @swagger
* /api/users:
* get:
* description: Returns all users
* summary: Get all users
* tags:
* - users
* responses:
* 200:
* description: OK
+10 -1
View File
@@ -10,7 +10,16 @@ import { schemaUserBodyParams, schemaUserPublic, withValidUser } from "@lib/vali
* @swagger
* /api/users/new:
* post:
* description: Creates a new user
* summary: Creates a new user
* requestBody:
description: Optional description in *Markdown*
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/User'
* tags:
* - users
* responses:
* 201:
* description: OK, user created