daysoff_assistant / api_docs_mck.py
camparchimedes's picture
Update api_docs_mck.py
6deeb03 verified
raw
history blame
1.31 kB
### api_docs_mck.py
import json
api_docs = {
"api_url": "<https://670dccd0073307b4ee447f2f.mockapi.io/daysoff/api/V1/>",
"endpoints": {
"/booking": {
"method": "GET",
"description": "Retrieve booking details for a given booking ID.",
"parameters": {
"booking_id": {
"type": "string",
"description": "Alphanumeric identifier, (6 capital letters followed by 6 digits, e.g., DAGHNS116478) of the booking to retrieve.",
"regex_pattern": "^[A-Z]{6}\\d{6}$",
}
},
"headers": {
"Content-Type": "application/json"
},
"api_response": {
"description": "A JSON object containing booking details.",
"content_type": "application/json",
"booking_info": {
"booking_id": "response.get('booking_id', 'N/A')",
"full_name": "response.get('full_name', 'N/A')",
"amount": "response.get('amount', 'N/A')",
"date": "response.get('date', 'N/A')",
"address": "response.get('address', 'N/A')",
"user_id": "response.get('user_id', 'N/A')"
}
}
}
}
api_docs_str = json.dumps(api_docs, indent=2)
api_docs_str