Update api_docs_mck.py
Browse files- api_docs_mck.py +72 -21
api_docs_mck.py
CHANGED
@@ -2,37 +2,88 @@
|
|
2 |
|
3 |
import json
|
4 |
|
|
|
5 |
api_docs = {
|
6 |
-
"
|
7 |
"endpoints": {
|
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 |
api_docs_str = json.dumps(api_docs, indent=2)
|
37 |
api_docs_str
|
38 |
|
|
|
2 |
|
3 |
import json
|
4 |
|
5 |
+
# API Documentation
|
6 |
api_docs = {
|
7 |
+
"base_url": "https://670dccd0073307b4ee447f2f.mockapi.io/daysoff/api/V1/",
|
8 |
"endpoints": {
|
9 |
+
"booking_info": {
|
10 |
+
"method": "GET",
|
11 |
+
"url": "booking",
|
12 |
+
"description": "Retrieve booking information for all or a specific booking ID.",
|
13 |
+
"parameters": {
|
14 |
+
"booking_id": {
|
15 |
+
"type": "string",
|
16 |
+
"description": "The unique identifier of the booking to retrieve (e.g., 'OIGLFD786354')."
|
17 |
+
}
|
18 |
+
},
|
19 |
+
"headers": {
|
20 |
+
"Content-Type": "application/json"
|
21 |
+
},
|
22 |
+
"response": {
|
23 |
+
"description": "Details about a specific booking.",
|
24 |
+
"content_type": "application/json",
|
25 |
+
"template": {
|
26 |
+
"requestId": "$datatype.uuid",
|
27 |
+
"items": "$mockData",
|
28 |
+
"count": "$count",
|
29 |
+
"fields": {
|
30 |
+
"booking_id": "$mockData.booking_id",
|
31 |
+
"full_name": "$mockData.full_name",
|
32 |
+
"amount": "$mockData.amount",
|
33 |
+
"checkin": "$mockData.checkin",
|
34 |
+
"checkout": "$mockData.checkout",
|
35 |
+
"address": "$mockData.address",
|
36 |
+
"user_id": "$mockData.user_id"
|
37 |
+
}
|
38 |
+
}
|
39 |
}
|
40 |
},
|
41 |
+
"firmahytteordning": {
|
42 |
+
"method": "GET",
|
43 |
+
"url": "firmahytteordning",
|
44 |
+
"description": "Retrieve details about the 'Firmahytteordning' service.",
|
45 |
+
"headers": {
|
46 |
+
"Content-Type": "application/json"
|
47 |
+
},
|
48 |
+
"response": {
|
49 |
+
"description": "Information about DaysOff's Firmahytteordning.",
|
50 |
+
"content_type": "application/json",
|
51 |
+
"template": {
|
52 |
+
"requestId": "$datatype.uuid",
|
53 |
+
"items": "$mockData",
|
54 |
+
"count": "$count",
|
55 |
+
"fields": {
|
56 |
+
"title": "$mockData.title",
|
57 |
+
"content": "$mockData.content"
|
58 |
+
}
|
59 |
+
}
|
60 |
+
}
|
61 |
},
|
62 |
+
"privacy_policy": {
|
63 |
+
"method": "GET",
|
64 |
+
"url": "privacy-policy",
|
65 |
+
"description": "Retrieve the privacy policy for DaysOff.",
|
66 |
+
"headers": {
|
67 |
+
"Content-Type": "application/json"
|
68 |
+
},
|
69 |
+
"response": {
|
70 |
+
"description": "DaysOff's privacy policy.",
|
71 |
+
"content_type": "application/json",
|
72 |
+
"template": {
|
73 |
+
"requestId": "$datatype.uuid",
|
74 |
+
"items": "$mockData",
|
75 |
+
"count": "$count",
|
76 |
+
"fields": {
|
77 |
+
"title": "$mockData.title",
|
78 |
+
"content": "$mockData.content"
|
79 |
+
}
|
80 |
+
}
|
81 |
}
|
82 |
}
|
83 |
}
|
84 |
}
|
85 |
|
86 |
+
# Convert to JSON string for usage in your Python application
|
87 |
api_docs_str = json.dumps(api_docs, indent=2)
|
88 |
api_docs_str
|
89 |
|