fixes all openapi spect issues, removes json-schema auto-generated moving to manual examples
This commit is contained in:
1 parent
2449d90bcb
commit
bb28680413
37 files changed
+154
-386
No files matched your search
@@ -23,8 +23,7 @@ import {
|
||||
* required: true
|
||||
* description: Numeric ID of the attendee to get
|
||||
* example: 3
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - attendees
|
||||
* responses:
|
||||
@@ -36,8 +35,6 @@ import {
|
||||
* description: Attendee was not found
|
||||
* patch:
|
||||
* summary: Edit an existing attendee
|
||||
* consumes:
|
||||
* - application/json
|
||||
* requestBody:
|
||||
* description: Edit an existing attendee related to one of your bookings
|
||||
* required: true
|
||||
@@ -68,14 +65,12 @@ import {
|
||||
* example: 3
|
||||
* required: true
|
||||
* description: Numeric ID of the attendee to edit
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - attendees
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, attendee edited successfuly
|
||||
* model: Attendee
|
||||
* 400:
|
||||
* description: Bad request. Attendee body is invalid.
|
||||
* 401:
|
||||
@@ -89,14 +84,12 @@ import {
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the attendee to delete
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - attendees
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, attendee removed successfuly
|
||||
* model: Attendee
|
||||
* 400:
|
||||
* description: Bad request. Attendee id is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -11,8 +11,7 @@ import { schemaAttendeeCreateBodyParams, schemaAttendeeReadPublic } from "@lib/v
|
||||
* /attendees:
|
||||
* get:
|
||||
* summary: Find all attendees
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - attendees
|
||||
* responses:
|
||||
@@ -24,10 +23,7 @@ import { schemaAttendeeCreateBodyParams, schemaAttendeeReadPublic } from "@lib/v
|
||||
* description: No attendees were found
|
||||
* post:
|
||||
* summary: Creates a new attendee
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
* consumes:
|
||||
* - application/json
|
||||
|
||||
* requestBody:
|
||||
* description: Create a new attendee related to one of your bookings
|
||||
* required: true
|
||||
@@ -58,7 +54,6 @@ import { schemaAttendeeCreateBodyParams, schemaAttendeeReadPublic } from "@lib/v
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, attendee created
|
||||
* model: Attendee
|
||||
* 400:
|
||||
* description: Bad request. Attendee body is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -25,8 +25,7 @@ import {
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the availability to get
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - availabilities
|
||||
* externalDocs:
|
||||
@@ -40,24 +39,14 @@ import {
|
||||
* description: Availability was not found
|
||||
* patch:
|
||||
* summary: Edit an existing availability
|
||||
* consumes:
|
||||
* - application/json
|
||||
* parameters:
|
||||
* - in: body
|
||||
* name: availability
|
||||
* description: The availability to edit
|
||||
* schema:
|
||||
* type: object
|
||||
* $ref: '#/components/schemas/Availability'
|
||||
* required: true
|
||||
* - in: path
|
||||
* name: id
|
||||
* schema:
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the availability to edit
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - availabilities
|
||||
* externalDocs:
|
||||
@@ -65,7 +54,6 @@ import {
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, availability edited successfuly
|
||||
* model: Availability
|
||||
* 400:
|
||||
* description: Bad request. Availability body is invalid.
|
||||
* 401:
|
||||
@@ -79,8 +67,7 @@ import {
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the availability to delete
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - availabilities
|
||||
* externalDocs:
|
||||
@@ -88,7 +75,6 @@ import {
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, availability removed successfuly
|
||||
* model: Availability
|
||||
* 400:
|
||||
* description: Bad request. Availability id is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -14,8 +14,7 @@ import {
|
||||
* /availabilities:
|
||||
* get:
|
||||
* summary: Find all availabilities
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - availabilities
|
||||
* externalDocs:
|
||||
@@ -29,8 +28,7 @@ import {
|
||||
* description: No availabilities were found
|
||||
* post:
|
||||
* summary: Creates a new availability
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - availabilities
|
||||
* externalDocs:
|
||||
@@ -38,7 +36,6 @@ import {
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, availability created
|
||||
* model: Availability
|
||||
* 400:
|
||||
* description: Bad request. Availability body is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -26,8 +26,7 @@ import {
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the booking reference to get
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - booking-references
|
||||
* responses:
|
||||
@@ -39,30 +38,20 @@ import {
|
||||
* description: BookingReference was not found
|
||||
* patch:
|
||||
* summary: Edit an existing booking reference
|
||||
* consumes:
|
||||
* - application/json
|
||||
|
||||
* parameters:
|
||||
* - in: body
|
||||
* name: bookingReference
|
||||
* description: The bookingReference to edit
|
||||
* schema:
|
||||
* type: object
|
||||
* $ref: '#/components/schemas/BookingReference'
|
||||
* required: true
|
||||
* - in: path
|
||||
* name: id
|
||||
* schema:
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the booking reference to edit
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - booking-references
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, bookingReference edited successfuly
|
||||
* model: BookingReference
|
||||
* 400:
|
||||
* description: Bad request. BookingReference body is invalid.
|
||||
* 401:
|
||||
@@ -76,14 +65,12 @@ import {
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the booking reference to delete
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - booking-references
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, bookingReference removed successfuly
|
||||
* model: BookingReference
|
||||
* 400:
|
||||
* description: Bad request. BookingReference id is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -14,8 +14,7 @@ import {
|
||||
* /booking-references:
|
||||
* get:
|
||||
* summary: Find all booking references
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - booking-references
|
||||
* responses:
|
||||
@@ -27,14 +26,13 @@ import {
|
||||
* description: No booking references were found
|
||||
* post:
|
||||
* summary: Creates a new booking reference
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - booking-references
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, booking reference created
|
||||
* model: BookingReference
|
||||
|
||||
* 400:
|
||||
* description: Bad request. BookingReference body is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -22,8 +22,7 @@ import {
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the booking to get
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - bookings
|
||||
* responses:
|
||||
@@ -35,30 +34,20 @@ import {
|
||||
* description: Booking was not found
|
||||
* patch:
|
||||
* summary: Edit an existing booking
|
||||
* consumes:
|
||||
* - application/json
|
||||
|
||||
* parameters:
|
||||
* - in: body
|
||||
* name: booking
|
||||
* description: The booking to edit
|
||||
* schema:
|
||||
* type: object
|
||||
* $ref: '#/components/schemas/Booking'
|
||||
* required: true
|
||||
* - in: path
|
||||
* name: id
|
||||
* schema:
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the booking to edit
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - bookings
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, booking edited successfuly
|
||||
* model: Booking
|
||||
* 400:
|
||||
* description: Bad request. Booking body is invalid.
|
||||
* 401:
|
||||
@@ -72,14 +61,12 @@ import {
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the booking to delete
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - bookings
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, booking removed successfuly
|
||||
* model: Booking
|
||||
* 400:
|
||||
* description: Bad request. Booking id is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -11,8 +11,7 @@ import { schemaBookingCreateBodyParams, schemaBookingReadPublic } from "@lib/val
|
||||
* /bookings:
|
||||
* get:
|
||||
* summary: Find all bookings
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - bookings
|
||||
* responses:
|
||||
@@ -24,14 +23,12 @@ import { schemaBookingCreateBodyParams, schemaBookingReadPublic } from "@lib/val
|
||||
* description: No bookings were found
|
||||
* post:
|
||||
* summary: Creates a new booking
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - bookings
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, booking created
|
||||
* model: Booking
|
||||
* 400:
|
||||
* description: Bad request. Booking body is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -25,8 +25,7 @@ import {
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the daily event reference to get
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - daily-event-references
|
||||
* responses:
|
||||
@@ -38,30 +37,20 @@ import {
|
||||
* description: DailyEventReference was not found
|
||||
* patch:
|
||||
* summary: Edit an existing daily event reference
|
||||
* consumes:
|
||||
* - application/json
|
||||
|
||||
* parameters:
|
||||
* - in: body
|
||||
* name: dailyEventReference
|
||||
* description: The dailyEventReference to edit
|
||||
* schema:
|
||||
* type: object
|
||||
* $ref: '#/components/schemas/DailyEventReference'
|
||||
* required: true
|
||||
* - in: path
|
||||
* name: id
|
||||
* schema:
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the daily event reference to edit
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - daily-event-references
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, dailyEventReference edited successfuly
|
||||
* model: DailyEventReference
|
||||
* 400:
|
||||
* description: Bad request. DailyEventReference body is invalid.
|
||||
* 401:
|
||||
@@ -75,14 +64,12 @@ import {
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the daily event reference to delete
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - daily-event-references
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, dailyEventReference removed successfuly
|
||||
* model: DailyEventReference
|
||||
* 400:
|
||||
* description: Bad request. DailyEventReference id is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -14,8 +14,7 @@ import {
|
||||
* /daily-event-references:
|
||||
* get:
|
||||
* summary: Find all daily event reference
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - daily-event-references
|
||||
* responses:
|
||||
@@ -27,14 +26,12 @@ import {
|
||||
* description: No daily event references were found
|
||||
* post:
|
||||
* summary: Creates a new daily event reference
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - daily-event-references
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, daily event reference created
|
||||
* model: DailyEventReference
|
||||
* 400:
|
||||
* description: Bad request. DailyEventReference body is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -25,8 +25,7 @@ import {
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the destination calendar to get
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - destination-calendars
|
||||
* responses:
|
||||
@@ -38,30 +37,20 @@ import {
|
||||
* description: DestinationCalendar was not found
|
||||
* patch:
|
||||
* summary: Edit an existing destination calendar
|
||||
* consumes:
|
||||
* - application/json
|
||||
|
||||
* parameters:
|
||||
* - in: body
|
||||
* name: destinationCalendar
|
||||
* description: The destinationCalendar to edit
|
||||
* schema:
|
||||
* type: object
|
||||
* $ref: '#/components/schemas/DestinationCalendar'
|
||||
* required: true
|
||||
* - in: path
|
||||
* name: id
|
||||
* schema:
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the destination calendar to edit
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - destination-calendars
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, destinationCalendar edited successfuly
|
||||
* model: DestinationCalendar
|
||||
* 400:
|
||||
* description: Bad request. DestinationCalendar body is invalid.
|
||||
* 401:
|
||||
@@ -75,14 +64,12 @@ import {
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the destination calendar to delete
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - destination-calendars
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, destinationCalendar removed successfuly
|
||||
* model: DestinationCalendar
|
||||
* 400:
|
||||
* description: Bad request. DestinationCalendar id is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -14,8 +14,7 @@ import {
|
||||
* /destination-calendars:
|
||||
* get:
|
||||
* summary: Find all destination calendars
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - destination-calendars
|
||||
* responses:
|
||||
@@ -27,14 +26,12 @@ import {
|
||||
* description: No destination calendars were found
|
||||
* post:
|
||||
* summary: Creates a new destination calendar
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - destination-calendars
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, destination calendar created
|
||||
* model: DestinationCalendar
|
||||
* 400:
|
||||
* description: Bad request. DestinationCalendar body is invalid.
|
||||
* 401:
|
||||
|
||||
+1
-18
@@ -20,26 +20,9 @@ const swaggerHandler = withSwagger({
|
||||
},
|
||||
components: {
|
||||
securitySchemes: { ApiKeyAuth: { type: "apiKey", in: "query", name: "apiKey" } },
|
||||
security: { ApiKeyAuth: [] },
|
||||
schemas: { ...jsonSchema.definitions },
|
||||
},
|
||||
security: [{ apiKey: [] }],
|
||||
},
|
||||
apiFolder: "pages/api",
|
||||
tags: [
|
||||
"users",
|
||||
"teams",
|
||||
"memeberships",
|
||||
"selected-calendars",
|
||||
"schedules",
|
||||
"payments",
|
||||
"event-types",
|
||||
"event-type-custom-inputs",
|
||||
"destination-calendars",
|
||||
"daily-event-references",
|
||||
"booking-references",
|
||||
"availabilities",
|
||||
"attendees",
|
||||
],
|
||||
sort: true,
|
||||
});
|
||||
export default swaggerHandler();
|
||||
@@ -25,8 +25,7 @@ import {
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the eventTypeCustomInput to get
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - event-type-custom-inputs
|
||||
* responses:
|
||||
@@ -35,35 +34,25 @@ import {
|
||||
* 401:
|
||||
* description: Authorization information is missing or invalid.
|
||||
* 404:
|
||||
* deCustomInputscription: EventType was not found
|
||||
* description: EventType was not found
|
||||
* patch:
|
||||
* summary: Edit an existing eventTypeCustomInput
|
||||
* consumes:
|
||||
* - application/json
|
||||
|
||||
* parameters:
|
||||
* - in: body
|
||||
* name: eventTypeCustomInput
|
||||
* description: The eventTypeCustomInput to edit
|
||||
* schema:
|
||||
* type: object
|
||||
* $ref: '#/components/schemas/EventTypeCustomInput'
|
||||
* required: true
|
||||
* - in: path
|
||||
* name: id
|
||||
* schema:
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the eventTypeCustomInput to edit
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - event-type-custom-inputs
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, eventTypeCustomInput edited successfuly
|
||||
* model: EventTypeCustomInput
|
||||
* 400:
|
||||
* desCustomInputcription: Bad request. EventType body is invalid.
|
||||
* description: Bad request. EventType body is invalid.
|
||||
* 401:
|
||||
* description: Authorization information is missing or invalid.
|
||||
* delete:
|
||||
@@ -75,16 +64,14 @@ import {
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the eventTypeCustomInput to delete
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - event-type-custom-inputs
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, eventTypeCustomInput removed successfuly
|
||||
* model: EventTypeCustomInput
|
||||
* 400:
|
||||
* desCustomInputcription: Bad request. EventType id is invalid.
|
||||
* description: Bad request. EventType id is invalid.
|
||||
* 401:
|
||||
* description: Authorization information is missing or invalid.
|
||||
*/
|
||||
|
||||
@@ -14,8 +14,7 @@ import {
|
||||
* /event-type-custom-inputs:
|
||||
* get:
|
||||
* summary: Find all eventTypeCustomInputs
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - event-type-custom-inputs
|
||||
* responses:
|
||||
@@ -27,14 +26,12 @@ import {
|
||||
* description: No eventTypeCustomInputs were found
|
||||
* post:
|
||||
* summary: Creates a new eventTypeCustomInput
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - event-type-custom-inputs
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, eventTypeCustomInput created
|
||||
* model: EventTypeCustomInput
|
||||
* 400:
|
||||
* description: Bad request. EventTypeCustomInput body is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -37,16 +37,7 @@ import {
|
||||
* description: EventType was not found
|
||||
* patch:
|
||||
* summary: Edit an existing eventType
|
||||
* consumes:
|
||||
* - application/json
|
||||
* parameters:
|
||||
* - in: body
|
||||
* name: eventType
|
||||
* description: The eventType to edit
|
||||
* schema:
|
||||
* type: object
|
||||
* $ref: '#/components/schemas/EventType'
|
||||
* required: true
|
||||
* - in: path
|
||||
* name: id
|
||||
* schema:
|
||||
@@ -62,7 +53,6 @@ import {
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, eventType edited successfuly
|
||||
* model: EventType
|
||||
* 400:
|
||||
* description: Bad request. EventType body is invalid.
|
||||
* 401:
|
||||
@@ -85,7 +75,6 @@ import {
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, eventType removed successfuly
|
||||
* model: EventType
|
||||
* 400:
|
||||
* description: Bad request. EventType id is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -11,8 +11,7 @@ import { schemaEventTypeBodyParams, schemaEventTypePublic } from "@lib/validatio
|
||||
* /event-types:
|
||||
* get:
|
||||
* summary: Find all event types
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - event-types
|
||||
* externalDocs:
|
||||
@@ -26,8 +25,7 @@ import { schemaEventTypeBodyParams, schemaEventTypePublic } from "@lib/validatio
|
||||
* description: No event types were found
|
||||
* post:
|
||||
* summary: Creates a new event type
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - event-types
|
||||
* externalDocs:
|
||||
@@ -35,7 +33,6 @@ import { schemaEventTypeBodyParams, schemaEventTypePublic } from "@lib/validatio
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, event type created
|
||||
* model: EventType
|
||||
* 400:
|
||||
* description: Bad request. EventType body is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
*/
|
||||
export default async function CalcomApi(_: NextApiRequest, res: NextApiResponse) {
|
||||
res.status(201).json({ message: "Welcome to Cal.com API - docs are at https://docs.cal.com/api" });
|
||||
}
|
||||
@@ -25,8 +25,7 @@ import { schemaQueryIdAsString, withValidQueryIdString } from "@lib/validations/
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric teamId of the membership to get
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - memberships
|
||||
* responses:
|
||||
@@ -38,16 +37,8 @@ import { schemaQueryIdAsString, withValidQueryIdString } from "@lib/validations/
|
||||
* description: Membership was not found
|
||||
* patch:
|
||||
* summary: Edit an existing membership
|
||||
* consumes:
|
||||
* - application/json
|
||||
|
||||
* parameters:
|
||||
* - in: body
|
||||
* name: membership
|
||||
* description: The membership to edit
|
||||
* schema:
|
||||
* type: object
|
||||
* $ref: '#/components/schemas/Membership'
|
||||
* required: true
|
||||
* - in: path
|
||||
* name: userId
|
||||
* schema:
|
||||
@@ -60,14 +51,12 @@ import { schemaQueryIdAsString, withValidQueryIdString } from "@lib/validations/
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric teamId of the membership to get
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - memberships
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, membership edited successfuly
|
||||
* model: Membership
|
||||
* 400:
|
||||
* description: Bad request. Membership body is invalid.
|
||||
* 401:
|
||||
@@ -87,14 +76,12 @@ import { schemaQueryIdAsString, withValidQueryIdString } from "@lib/validations/
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric teamId of the membership to get
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - memberships
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, membership removed successfuly
|
||||
* model: Membership
|
||||
* 400:
|
||||
* description: Bad request. Membership id is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -11,8 +11,7 @@ import { schemaMembershipBodyParams, schemaMembershipPublic } from "@lib/validat
|
||||
* /memberships:
|
||||
* get:
|
||||
* summary: Find all memberships
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - memberships
|
||||
* responses:
|
||||
@@ -24,14 +23,12 @@ import { schemaMembershipBodyParams, schemaMembershipPublic } from "@lib/validat
|
||||
* description: No memberships were found
|
||||
* post:
|
||||
* summary: Creates a new membership
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - memberships
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, membership created
|
||||
* model: Membership
|
||||
* 400:
|
||||
* description: Bad request. Membership body is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -22,8 +22,7 @@ import {
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the payment to get
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - payments
|
||||
* responses:
|
||||
|
||||
@@ -11,8 +11,7 @@ import { schemaPaymentPublic } from "@lib/validations/payment";
|
||||
* /payments:
|
||||
* get:
|
||||
* summary: Find all payments
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - payments
|
||||
* responses:
|
||||
|
||||
@@ -22,8 +22,7 @@ import {
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the schedule to get
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - schedules
|
||||
* responses:
|
||||
@@ -35,30 +34,21 @@ import {
|
||||
* description: Schedule was not found
|
||||
* patch:
|
||||
* summary: Edit an existing schedule
|
||||
* consumes:
|
||||
* - application/json
|
||||
|
||||
* parameters:
|
||||
* - in: body
|
||||
* name: schedule
|
||||
* description: The schedule to edit
|
||||
* schema:
|
||||
* type: object
|
||||
* $ref: '#/components/schemas/Schedule'
|
||||
* required: true
|
||||
|
||||
* - in: path
|
||||
* name: id
|
||||
* schema:
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the schedule to edit
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - schedules
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, schedule edited successfuly
|
||||
* model: Schedule
|
||||
* 400:
|
||||
* description: Bad request. Schedule body is invalid.
|
||||
* 401:
|
||||
@@ -72,14 +62,12 @@ import {
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the schedule to delete
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - schedules
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, schedule removed successfuly
|
||||
* model: Schedule
|
||||
* 400:
|
||||
* description: Bad request. Schedule id is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -11,8 +11,7 @@ import { schemaScheduleBodyParams, schemaSchedulePublic } from "@lib/validations
|
||||
* /schedules:
|
||||
* get:
|
||||
* summary: Find all schedules
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - schedules
|
||||
* responses:
|
||||
@@ -24,14 +23,12 @@ import { schemaScheduleBodyParams, schemaSchedulePublic } from "@lib/validations
|
||||
* description: No schedules were found
|
||||
* post:
|
||||
* summary: Creates a new schedule
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - schedules
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, schedule created
|
||||
* model: Schedule
|
||||
* 400:
|
||||
* description: Bad request. Schedule body is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -34,8 +34,7 @@ import { schemaQueryIdAsString, withValidQueryIdString } from "@lib/validations/
|
||||
* type: string
|
||||
* required: true
|
||||
* description: integration of the selected calendar to get
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - selected-calendars
|
||||
* responses:
|
||||
@@ -47,16 +46,7 @@ import { schemaQueryIdAsString, withValidQueryIdString } from "@lib/validations/
|
||||
* description: SelectedCalendar was not found
|
||||
* patch:
|
||||
* summary: Edit an existing selected calendar
|
||||
* consumes:
|
||||
* - application/json
|
||||
* parameters:
|
||||
* - in: body
|
||||
* name: selected-calendar
|
||||
* description: The selected-calendar to edit
|
||||
* schema:
|
||||
* type: object
|
||||
* $ref: '#/components/schemas/SelectedCalendar'
|
||||
* required: true
|
||||
* - in: path
|
||||
* name: userId
|
||||
* schema:
|
||||
@@ -75,14 +65,12 @@ import { schemaQueryIdAsString, withValidQueryIdString } from "@lib/validations/
|
||||
* type: string
|
||||
* required: true
|
||||
* description: integration of the selected calendar to get
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - selected-calendars
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, selected-calendar edited successfuly
|
||||
* model: SelectedCalendar
|
||||
* 400:
|
||||
* description: Bad request. SelectedCalendar body is invalid.
|
||||
* 401:
|
||||
@@ -108,14 +96,12 @@ import { schemaQueryIdAsString, withValidQueryIdString } from "@lib/validations/
|
||||
* type: string
|
||||
* required: true
|
||||
* description: integration of the selected calendar to get
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - selected-calendars
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, selected-calendar removed successfuly
|
||||
* model: SelectedCalendar
|
||||
* 400:
|
||||
* description: Bad request. SelectedCalendar id is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -14,8 +14,7 @@ import {
|
||||
* /selected-calendars:
|
||||
* get:
|
||||
* summary: Find all selected calendars
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - selected-calendars
|
||||
* responses:
|
||||
@@ -27,14 +26,12 @@ import {
|
||||
* description: No selected calendars were found
|
||||
* post:
|
||||
* summary: Creates a new selected calendar
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - selected-calendars
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, selected calendar created
|
||||
* model: SelectedCalendar
|
||||
* 400:
|
||||
* description: Bad request. SelectedCalendar body is invalid.
|
||||
* 401:
|
||||
|
||||
+5
-17
@@ -22,8 +22,7 @@ import { schemaTeamBodyParams, schemaTeamPublic } from "@lib/validations/team";
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the team to get
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - teams
|
||||
* responses:
|
||||
@@ -33,36 +32,27 @@ import { schemaTeamBodyParams, schemaTeamPublic } from "@lib/validations/team";
|
||||
* description: Authorization information is missing or invalid.
|
||||
* 404:
|
||||
* description: Team was not found
|
||||
|
||||
* patch:
|
||||
* summary: Edit an existing team
|
||||
* consumes:
|
||||
* - application/json
|
||||
* parameters:
|
||||
* - in: body
|
||||
* name: team
|
||||
* description: The team to edit
|
||||
* schema:
|
||||
* type: object
|
||||
* $ref: '#/components/schemas/Team'
|
||||
* required: true
|
||||
* - in: path
|
||||
* name: id
|
||||
* schema:
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the team to edit
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - teams
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, team edited successfuly
|
||||
* model: Team
|
||||
* 400:
|
||||
* description: Bad request. Team body is invalid.
|
||||
* 401:
|
||||
* description: Authorization information is missing or invalid.
|
||||
|
||||
* delete:
|
||||
* summary: Remove an existing team
|
||||
* parameters:
|
||||
@@ -72,14 +62,12 @@ import { schemaTeamBodyParams, schemaTeamPublic } from "@lib/validations/team";
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the team to delete
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - teams
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, team removed successfuly
|
||||
* model: Team
|
||||
* 400:
|
||||
* description: Bad request. Team id is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -12,8 +12,7 @@ import { schemaTeamBodyParams, schemaTeamPublic } from "@lib/validations/team";
|
||||
* /teams:
|
||||
* get:
|
||||
* summary: Find all teams
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - teams
|
||||
* responses:
|
||||
@@ -25,14 +24,12 @@ import { schemaTeamBodyParams, schemaTeamPublic } from "@lib/validations/team";
|
||||
* description: No teams were found
|
||||
* post:
|
||||
* summary: Creates a new team
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - teams
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, team created
|
||||
* model: Team
|
||||
* 400:
|
||||
* description: Bad request. Team body is invalid.
|
||||
* 401:
|
||||
|
||||
+4
-15
@@ -22,8 +22,7 @@ import { schemaUserEditBodyParams, schemaUserReadPublic } from "@lib/validations
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the user to get
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - users
|
||||
* responses:
|
||||
@@ -35,28 +34,20 @@ import { schemaUserEditBodyParams, schemaUserReadPublic } from "@lib/validations
|
||||
* description: User was not found
|
||||
* patch:
|
||||
* summary: Edit an existing user
|
||||
* consumes:
|
||||
* - application/json
|
||||
|
||||
* parameters:
|
||||
* - in: body
|
||||
* name: name
|
||||
* description: The users full name
|
||||
* schema:
|
||||
* type: string
|
||||
* - in: path
|
||||
* name: id
|
||||
* schema:
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the user to edit
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - users
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, user edited successfuly
|
||||
* model: User
|
||||
* 400:
|
||||
* description: Bad request. User body is invalid.
|
||||
* 401:
|
||||
@@ -70,14 +61,12 @@ import { schemaUserEditBodyParams, schemaUserReadPublic } from "@lib/validations
|
||||
* type: integer
|
||||
* required: true
|
||||
* description: Numeric ID of the user to delete
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - users
|
||||
* responses:
|
||||
* 201:
|
||||
* description: OK, user removed successfuly
|
||||
* model: User
|
||||
* 400:
|
||||
* description: Bad request. User id is invalid.
|
||||
* 401:
|
||||
|
||||
@@ -11,8 +11,7 @@ import { schemaUserReadPublic } from "@lib/validations/user";
|
||||
* /users:
|
||||
* get:
|
||||
* summary: Find all users (admin only), returns your user if regular user.
|
||||
* security:
|
||||
* - ApiKeyAuth: []
|
||||
|
||||
* tags:
|
||||
* - users
|
||||
* responses:
|
||||
|
||||
Reference in new issue
Block a user