-
Notifications
You must be signed in to change notification settings - Fork 0
/
metadata.py
93 lines (77 loc) · 2.01 KB
/
metadata.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
title = "NuSa API"
version = "1.0.0"
contact = {
"name": "NuSa - CC Team",
"email": "[email protected]",
}
license_info = {
"name": "MIT",
"url": "https://github.com/NuSa-Nutrition-Scan/API-V1/blob/main/LICENSE",
}
description = """
# [WATCH THIS FIRST!](https://www.youtube.com/watch?v=xvFZjo5PgG0)
NuSa API helps you, our solo mobile developer, to run your app. 🚀
## Features
You will be able to:
* **Authenticate user**
* **Get user profile & update it**
* **Upload photo with limit 10 every day**
* **Get your personal food recommendation**
* **Integrate with machine learning features**
#### NOTES FOR RESPONSE
1. Every 422 error response will be like this:
```
{
"code": 422,
"msg": "Unprocessable Entity",
"errors": {
"name": "field required",
"password": "field required"
}
}
```
errors field will be dynamic key value pair
2. Other than 422, every error response will be like this:
```
{
"code": 401,
"msg": "Unauthorized"
}
```
errors field will always code and msg
3. Every 200 success response will be like this:
```
{
"code": 200,
"msg": "OK",
"data": {
"some": "dynamic data",
"some": "dynamic data",
"some": "dynamic data",
"some": "dynamic data"
}
}
```
the data field always will be dynamic key and value pair (maybe list of key value pair too)
Other example
```
{
"code": 201,
"msg": "Created"
}
```
"""
tags_metadata = [
{
"name": "Authentication",
"description": "Operations with authentication",
},
{
"name": "Nutrition",
"description": "This is for nutrition section. Currently, only upload photo and get value of how many times user upload the photo today",
},
{
"name": "Settings",
"description": "Update profile, and see all the previous uploaded photo",
},
]