Skip to content

Scheduling infrastructure for absolutely everyone.

remove v1 from specs

Agusti Fernandez Pardofa30b529887a
diff --git a/pages/api/attendees/[id].ts b/pages/api/attendees/[id].ts
index 0c456ea6e48..e6780c69291 100644
--- a/pages/api/attendees/[id].ts
+++ b/pages/api/attendees/[id].ts
@@ -12,7 +12,7 @@ import {
/**
* @swagger
- * /v1/attendees/{id}:
+ * /attendees/{id}:
* get:
* summary: Get an attendee by ID
* parameters:
diff --git a/pages/api/attendees/index.ts b/pages/api/attendees/index.ts
index 9fa493aa606..8705fea6a88 100644
--- a/pages/api/attendees/index.ts
+++ b/pages/api/attendees/index.ts
@@ -8,7 +8,7 @@ import { schemaAttendeeBodyParams, schemaAttendeePublic, withValidAttendee } fro
/**
* @swagger
- * /v1/attendees:
+ * /attendees:
* get:
* summary: Get all attendees
* security:
diff --git a/pages/api/availabilities/[id].ts b/pages/api/availabilities/[id].ts
index 5c154cf0f87..cd277b058e3 100644
--- a/pages/api/availabilities/[id].ts
+++ b/pages/api/availabilities/[id].ts
@@ -12,7 +12,7 @@ import {
/**
* @swagger
- * /v1/availabilities/{id}:
+ * /availabilities/{id}:
* get:
* summary: Get an availability by ID
* parameters:
diff --git a/pages/api/availabilities/index.ts b/pages/api/availabilities/index.ts
index 40923606e6a..ab7aa3b3880 100644
--- a/pages/api/availabilities/index.ts
+++ b/pages/api/availabilities/index.ts
@@ -8,7 +8,7 @@ import { schemaAvailabilityBodyParams, schemaAvailabilityPublic } from "@lib/val
/**
* @swagger
- * /v1/availabilities:
+ * /availabilities:
* get:
* summary: Get all availabilities
* security:
diff --git a/pages/api/booking-references/[id].ts b/pages/api/booking-references/[id].ts
index 1644041b2ff..5f08ab4c0d3 100644
--- a/pages/api/booking-references/[id].ts
+++ b/pages/api/booking-references/[id].ts
@@ -16,7 +16,7 @@ import {
/**
* @swagger
- * /v1/booking-references/{id}:
+ * /booking-references/{id}:
* get:
* summary: Get a daily event reference by ID
* parameters:
diff --git a/pages/api/booking-references/index.ts b/pages/api/booking-references/index.ts
index 74ae942dd28..f77b0c586dc 100644
--- a/pages/api/booking-references/index.ts
+++ b/pages/api/booking-references/index.ts
@@ -11,7 +11,7 @@ import {
/**
* @swagger
- * /v1/booking-references:
+ * /booking-references:
* get:
* summary: Get all booking references
* security:
diff --git a/pages/api/bookings/[id].ts b/pages/api/bookings/[id].ts
index 9172b7dc907..c0b74d09f87 100644
--- a/pages/api/bookings/[id].ts
+++ b/pages/api/bookings/[id].ts
@@ -12,7 +12,7 @@ import {
/**
* @swagger
- * /v1/bookings/{id}:
+ * /bookings/{id}:
* get:
* summary: Get a booking by ID
* parameters:
diff --git a/pages/api/bookings/index.ts b/pages/api/bookings/index.ts
index 9512847ea1e..cb0f2089ed1 100644
--- a/pages/api/bookings/index.ts
+++ b/pages/api/bookings/index.ts
@@ -8,7 +8,7 @@ import { schemaBookingBodyParams, schemaBookingPublic, withValidBooking } from "
/**
* @swagger
- * /v1/bookings:
+ * /bookings:
* get:
* summary: Get all bookings
* security:
diff --git a/pages/api/daily-event-references/[id].ts b/pages/api/daily-event-references/[id].ts
index b8bb8dc88cf..280ad0c623b 100644
--- a/pages/api/daily-event-references/[id].ts
+++ b/pages/api/daily-event-references/[id].ts
@@ -15,7 +15,7 @@ import {
/**
* @swagger
- * /v1/daily-event-references/{id}:
+ * /daily-event-references/{id}:
* get:
* summary: Get a daily event reference by ID
* parameters:
diff --git a/pages/api/daily-event-references/index.ts b/pages/api/daily-event-references/index.ts
index 7b216d0040c..670b18421cf 100644
--- a/pages/api/daily-event-references/index.ts
+++ b/pages/api/daily-event-references/index.ts
@@ -11,7 +11,7 @@ import {
/**
* @swagger
- * /v1/daily-event-references:
+ * /daily-event-references:
* get:
* summary: Get all daily event reference
* security:
diff --git a/pages/api/destination-calendars/[id].ts b/pages/api/destination-calendars/[id].ts
index 2f643d41202..f5ba4d90eec 100644
--- a/pages/api/destination-calendars/[id].ts
+++ b/pages/api/destination-calendars/[id].ts
@@ -15,7 +15,7 @@ import {
/**
* @swagger
- * /v1/destination-calendars/{id}:
+ * /destination-calendars/{id}:
* get:
* summary: Get a destination calendar by ID
* parameters:
diff --git a/pages/api/destination-calendars/index.ts b/pages/api/destination-calendars/index.ts
index b3bdcaab577..782612518c4 100644
--- a/pages/api/destination-calendars/index.ts
+++ b/pages/api/destination-calendars/index.ts
@@ -11,7 +11,7 @@ import {
/**
* @swagger
- * /v1/destination-calendars:
+ * /destination-calendars:
* get:
* summary: Get all destination calendars
* security:
diff --git a/pages/api/docs.ts b/pages/api/docs.ts
index 3c9f50cfed0..25d9c7ce1b9 100644
--- a/pages/api/docs.ts
+++ b/pages/api/docs.ts
@@ -5,6 +5,15 @@ import { withSwagger } from "next-swagger-doc";
const swaggerHandler = withSwagger({
definition: {
openapi: "3.0.0",
+ servers: [
+ { url: "https://api.cal.com/v1" },
+ { url: "https://api.cal.dev/v1" },
+ { url: "http://localhost:3002/v1" },
+ ],
+ externalDocs: {
+ url: "https://docs.cal.com",
+ description: "Find more info at our main docs: https://docs.cal.com/",
+ },
info: {
title: `${pjson.name}: ${pjson.description}`,
version: pjson.version,
@@ -15,7 +24,21 @@ const swaggerHandler = withSwagger({
},
},
apiFolder: "pages/api",
- tags: ["users", "teams", "memeberships"],
+ 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();
diff --git a/pages/api/event-type-custom-inputs/[id].ts b/pages/api/event-type-custom-inputs/[id].ts
index 4df7114cef4..23e4c73a9ae 100644
--- a/pages/api/event-type-custom-inputs/[id].ts
+++ b/pages/api/event-type-custom-inputs/[id].ts
@@ -15,7 +15,7 @@ import {
/**
* @swagger
- * /v1/event-type-custom-inputs/{id}:
+ * /event-type-custom-inputs/{id}:
* get:
* summary: Get a eventTypeCustomInput by ID
* parameters:
diff --git a/pages/api/event-type-custom-inputs/index.ts b/pages/api/event-type-custom-inputs/index.ts
index 5b3b249ab41..f1931b8b12d 100644
--- a/pages/api/event-type-custom-inputs/index.ts
+++ b/pages/api/event-type-custom-inputs/index.ts
@@ -11,7 +11,7 @@ import {
/**
* @swagger
- * /v1/event-type-custom-inputs:
+ * /event-type-custom-inputs:
* get:
* summary: Get all eventTypeCustomInputs
* security:
diff --git a/pages/api/event-types/[id].ts b/pages/api/event-types/[id].ts
index 94dd09dee2c..465e85b428f 100644
--- a/pages/api/event-types/[id].ts
+++ b/pages/api/event-types/[id].ts
@@ -12,7 +12,7 @@ import {
/**
* @swagger
- * /v1/event-types/{id}:
+ * /event-types/{id}:
* get:
* summary: Get a eventType by ID
* parameters:
diff --git a/pages/api/event-types/index.ts b/pages/api/event-types/index.ts
index 3135d9e8664..9d73be94589 100644
--- a/pages/api/event-types/index.ts
+++ b/pages/api/event-types/index.ts
@@ -8,7 +8,7 @@ import { schemaEventTypeBodyParams, schemaEventTypePublic } from "@lib/validatio
/**
* @swagger
- * /v1/event-types:
+ * /event-types:
* get:
* summary: Get all event types
* security:
diff --git a/pages/api/memberships/[id].ts b/pages/api/memberships/[id].ts
index acb8f03c0cb..c4a1d362f7d 100644
--- a/pages/api/memberships/[id].ts
+++ b/pages/api/memberships/[id].ts
@@ -9,7 +9,7 @@ import { schemaQueryIdAsString, withValidQueryIdString } from "@lib/validations/
/**
* @swagger
- * /v1/memberships/{userId}_{teamId}:
+ * /memberships/{userId}_{teamId}:
* get:
* summary: Get a membership by userID and teamID
* parameters:
diff --git a/pages/api/memberships/index.ts b/pages/api/memberships/index.ts
index 6402ac8ca4e..702effdfd61 100644
--- a/pages/api/memberships/index.ts
+++ b/pages/api/memberships/index.ts
@@ -8,7 +8,7 @@ import { schemaMembershipBodyParams, schemaMembershipPublic } from "@lib/validat
/**
* @swagger
- * /v1/memberships:
+ * /memberships:
* get:
* summary: Get all memberships
* security:
diff --git a/pages/api/payments/[id].ts b/pages/api/payments/[id].ts
index 3f23750b2ab..6ccf2276418 100644
--- a/pages/api/payments/[id].ts
+++ b/pages/api/payments/[id].ts
@@ -12,7 +12,7 @@ import {
/**
* @swagger
- * /v1/payments/{id}:
+ * /payments/{id}:
* get:
* summary: Get one of your own payments by ID
* parameters:
diff --git a/pages/api/payments/index.ts b/pages/api/payments/index.ts
index 827bd683406..2b00d85ebb4 100644
--- a/pages/api/payments/index.ts
+++ b/pages/api/payments/index.ts
@@ -8,7 +8,7 @@ import { schemaPaymentPublic } from "@lib/validations/payment";
/**
* @swagger
- * /v1/payments:
+ * /payments:
* get:
* summary: Get all payments
* security:
diff --git a/pages/api/schedules/[id].ts b/pages/api/schedules/[id].ts
index 9a6f67d8268..154dfa41f14 100644
--- a/pages/api/schedules/[id].ts
+++ b/pages/api/schedules/[id].ts
@@ -12,7 +12,7 @@ import {
/**
* @swagger
- * /v1/schedules/{id}:
+ * /schedules/{id}:
* get:
* summary: Get a schedule by ID
* parameters:
diff --git a/pages/api/schedules/index.ts b/pages/api/schedules/index.ts
index bd9a38a9efc..d04d35cccb9 100644
--- a/pages/api/schedules/index.ts
+++ b/pages/api/schedules/index.ts
@@ -8,7 +8,7 @@ import { schemaScheduleBodyParams, schemaSchedulePublic, withValidSchedule } fro
/**
* @swagger
- * /v1/schedules:
+ * /schedules:
* get:
* summary: Get all schedules
* security:
diff --git a/pages/api/selected-calendars/[id].ts b/pages/api/selected-calendars/[id].ts
index 5c00b3895f2..1b3e5e9cd58 100644
--- a/pages/api/selected-calendars/[id].ts
+++ b/pages/api/selected-calendars/[id].ts
@@ -12,7 +12,7 @@ import { schemaQueryIdAsString, withValidQueryIdString } from "@lib/validations/
/**
* @swagger
- * /v1/selected-calendars/{userId}_{integration}_{externalId}:
+ * /selected-calendars/{userId}_{integration}_{externalId}:
* get:
* summary: Get a selected-calendar by userID and teamID
* parameters:
diff --git a/pages/api/selected-calendars/index.ts b/pages/api/selected-calendars/index.ts
index 0ccde36943f..d9b80a85417 100644
--- a/pages/api/selected-calendars/index.ts
+++ b/pages/api/selected-calendars/index.ts
@@ -11,7 +11,7 @@ import {
/**
* @swagger
- * /v1/selected-calendars:
+ * /selected-calendars:
* get:
* summary: Get all selected calendars
* security:
diff --git a/pages/api/teams/[id].ts b/pages/api/teams/[id].ts
index f74937ecc57..2990d3642b2 100644
--- a/pages/api/teams/[id].ts
+++ b/pages/api/teams/[id].ts
@@ -12,7 +12,7 @@ import { schemaTeamBodyParams, schemaTeamPublic } from "@lib/validations/team";
/**
* @swagger
- * /v1/teams/{id}:
+ * /teams/{id}:
* get:
* summary: Get a team by ID
* parameters:
diff --git a/pages/api/teams/index.ts b/pages/api/teams/index.ts
index 045fc25461c..d6392e0c1b4 100644
--- a/pages/api/teams/index.ts
+++ b/pages/api/teams/index.ts
@@ -9,7 +9,7 @@ import { schemaTeamBodyParams, schemaTeamPublic, withValidTeam } from "@lib/vali
/**
* @swagger
- * /v1/teams:
+ * /teams:
* get:
* summary: Get all teams
* security:
diff --git a/pages/api/users/[id].ts b/pages/api/users/[id].ts
index e7e35d5e6eb..24bf1075ed5 100644
--- a/pages/api/users/[id].ts
+++ b/pages/api/users/[id].ts
@@ -12,7 +12,7 @@ import { schemaUserEditBodyParams, schemaUserReadPublic, withValidUser } from "@
/**
* @swagger
- * /v1/users/{id}:
+ * /users/{id}:
* get:
* summary: Get a user by ID, returns your user if regular user.
* parameters:
diff --git a/pages/api/users/index.ts b/pages/api/users/index.ts
index dfea9f1ff63..aa35dca0429 100644
--- a/pages/api/users/index.ts
+++ b/pages/api/users/index.ts
@@ -8,7 +8,7 @@ import { schemaUserReadPublic } from "@lib/validations/user";
/**
* @swagger
- * /v1/users:
+ * /users:
* get:
* summary: Get all users (admin only), returns your user if regular user.
* security: