Additional swagger
This commit is contained in:
1 parent
aef6dd2761
commit
4f86361ee8
4 files changed
+62
-2
No files matched your search
@@ -44,3 +44,30 @@ get_product_info_swagger = {
|
||||
"500": {"description": "Internal Server Error"}
|
||||
}
|
||||
}
|
||||
|
||||
create_product_swagger = {
|
||||
"methods": ["POST"],
|
||||
"tags": ["Products"],
|
||||
"security": [{"JWT": []}],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "name",
|
||||
"in": "body",
|
||||
"type": "string",
|
||||
"description": "Name for the new product",
|
||||
"required": True
|
||||
},
|
||||
{
|
||||
"name": "price",
|
||||
"in": "body",
|
||||
"type": "float",
|
||||
"description": "Price of the product",
|
||||
"required": True
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {"description": "Successfully fetched product information"},
|
||||
"400": {"description": "Bad Request - Invalid input or missing input"},
|
||||
"500": {"description": "Internal Server Error"}
|
||||
}
|
||||
}
|
||||
@@ -42,4 +42,34 @@ login_swagger = {
|
||||
"description": "Password is incorrect"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
logout_swagger = {
|
||||
"methods": ["DELETE"],
|
||||
"tags": ["User"],
|
||||
"security": [{"JWT": []}],
|
||||
"description": "Logs out the user via provided JWT token",
|
||||
"parameters": [],
|
||||
"responses":
|
||||
{
|
||||
"200":
|
||||
{
|
||||
"description": "User successfully logged out"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
delete_swagger = {
|
||||
"methods": ["DELETE"],
|
||||
"tags": ["User"],
|
||||
"security": [{"JWT": []}],
|
||||
"description": "Deletes a user via JWT token",
|
||||
"parameters": [],
|
||||
"responses":
|
||||
{
|
||||
"200":
|
||||
{
|
||||
"description": "User successfully deleted out"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user