Skip to content

Scheduling infrastructure for absolutely everyone.

Improves Destination Calendar docs in swagger (#235)

Syed Ali Shahbaz2248d7069f2a
diff --git a/pages/api/destination-calendars/[id].ts b/pages/api/destination-calendars/[id].ts
index 61daae15c84..1f521c40d7d 100644
--- a/pages/api/destination-calendars/[id].ts
+++ b/pages/api/destination-calendars/[id].ts
@@ -40,8 +40,14 @@ export async function destionationCalendarById(
* type: integer
* required: true
* description: ID of the destination calendar to get
+ * - in: query
+ * name: apiKey
+ * required: true
+ * schema:
+ * type: string
+ * description: Your API key
* tags:
- * - destination-calendars
+ * - destination-calendars
* responses:
* 200:
* description: OK
@@ -58,8 +64,34 @@ export async function destionationCalendarById(
* type: integer
* required: true
* description: ID of the destination calendar to edit
+ * - in: query
+ * name: apiKey
+ * required: true
+ * schema:
+ * type: string
+ * description: Your API key
+ * requestBody:
+ * description: Create a new booking related to one of your event-types
+ * required: true
+ * content:
+ * application/json:
+ * schema:
+ * type: object
+ * properties:
+ * integration:
+ * type: string
+ * description: 'The integration'
+ * externalId:
+ * type: string
+ * description: 'The external ID of the integration'
+ * eventTypeId:
+ * type: integer
+ * description: 'The ID of the eventType it is associated with'
+ * bookingId:
+ * type: integer
+ * description: 'The booking ID it is associated with'
* tags:
- * - destination-calendars
+ * - destination-calendars
* responses:
* 201:
* description: OK, destinationCalendar edited successfuly
@@ -76,8 +108,14 @@ export async function destionationCalendarById(
* type: integer
* required: true
* description: ID of the destination calendar to delete
+ * - in: query
+ * name: apiKey
+ * required: true
+ * schema:
+ * type: string
+ * description: Your API key
* tags:
- * - destination-calendars
+ * - destination-calendars
* responses:
* 201:
* description: OK, destinationCalendar removed successfuly
@@ -110,8 +148,14 @@ export async function destionationCalendarById(
* type: integer
* required: true
* description: ID of the destination calendar to edit
+ * - in: query
+ * name: apiKey
+ * required: true
+ * schema:
+ * type: string
+ * description: Your API key
* tags:
- * - destination-calendars
+ * - destination-calendars
* responses:
* 201:
* description: OK, destinationCalendar edited successfuly
@@ -150,8 +194,14 @@ export async function destionationCalendarById(
* type: integer
* required: true
* description: ID of the destination calendar to delete
+ * - in: query
+ * name: apiKey
+ * required: true
+ * schema:
+ * type: string
+ * description: Your API key
* tags:
- * - destination-calendars
+ * - destination-calendars
* responses:
* 201:
* description: OK, destinationCalendar removed successfuly
diff --git a/pages/api/destination-calendars/index.ts b/pages/api/destination-calendars/index.ts
index 3690dfa359c..2143ba0d0a3 100644
--- a/pages/api/destination-calendars/index.ts
+++ b/pages/api/destination-calendars/index.ts
@@ -16,9 +16,16 @@ async function createOrlistAllDestinationCalendars(
* @swagger
* /destination-calendars:
* get:
+ * parameters:
+ * - in: query
+ * name: apiKey
+ * required: true
+ * schema:
+ * type: string
+ * description: Your API key
* summary: Find all destination calendars
* tags:
- * - destination-calendars
+ * - destination-calendars
* responses:
* 200:
* description: OK
@@ -43,9 +50,39 @@ async function createOrlistAllDestinationCalendars(
* @swagger
* /destination-calendars:
* post:
+ * parameters:
+ * - in: query
+ * name: apiKey
+ * required: true
+ * schema:
+ * type: string
+ * description: Your API key
* summary: Creates a new destination calendar
+ * requestBody:
+ * description: Create a new destination calendar for your events
+ * required: true
+ * content:
+ * application/json:
+ * schema:
+ * type: object
+ * required:
+ * - integration
+ * - externalId
+ * properties:
+ * integration:
+ * type: string
+ * description: 'The integration'
+ * externalId:
+ * type: string
+ * description: 'The external ID of the integration'
+ * eventTypeId:
+ * type: integer
+ * description: 'The ID of the eventType it is associated with'
+ * bookingId:
+ * type: integer
+ * description: 'The booking ID it is associated with'
* tags:
- * - destination-calendars
+ * - destination-calendars
* responses:
* 201:
* description: OK, destination calendar created