Merge pull request #60 from calcom/fix/add-servers-openapi-spec

This commit is contained in:
Agusti Fernandez
2022-04-26 21:57:58 +02:00
committed by GitHub
29 changed files with 52 additions and 29 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ import {
/**
* @swagger
* /v1/attendees/{id}:
* /attendees/{id}:
* get:
* summary: Get an attendee by ID
* parameters:
+1 -1
View File
@@ -8,7 +8,7 @@ import { schemaAttendeeBodyParams, schemaAttendeePublic, withValidAttendee } fro
/**
* @swagger
* /v1/attendees:
* /attendees:
* get:
* summary: Get all attendees
* security:
+1 -1
View File
@@ -12,7 +12,7 @@ import {
/**
* @swagger
* /v1/availabilities/{id}:
* /availabilities/{id}:
* get:
* summary: Get an availability by ID
* parameters:
+1 -1
View File
@@ -8,7 +8,7 @@ import { schemaAvailabilityBodyParams, schemaAvailabilityPublic } from "@lib/val
/**
* @swagger
* /v1/availabilities:
* /availabilities:
* get:
* summary: Get all availabilities
* security:
+1 -1
View File
@@ -16,7 +16,7 @@ import {
/**
* @swagger
* /v1/booking-references/{id}:
* /booking-references/{id}:
* get:
* summary: Get a daily event reference by ID
* parameters:
+1 -1
View File
@@ -11,7 +11,7 @@ import {
/**
* @swagger
* /v1/booking-references:
* /booking-references:
* get:
* summary: Get all booking references
* security:
+1 -1
View File
@@ -12,7 +12,7 @@ import {
/**
* @swagger
* /v1/bookings/{id}:
* /bookings/{id}:
* get:
* summary: Get a booking by ID
* parameters:
+1 -1
View File
@@ -8,7 +8,7 @@ import { schemaBookingBodyParams, schemaBookingPublic, withValidBooking } from "
/**
* @swagger
* /v1/bookings:
* /bookings:
* get:
* summary: Get all bookings
* security:
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -11,7 +11,7 @@ import {
/**
* @swagger
* /v1/daily-event-references:
* /daily-event-references:
* get:
* summary: Get all daily event reference
* security:
+1 -1
View File
@@ -15,7 +15,7 @@ import {
/**
* @swagger
* /v1/destination-calendars/{id}:
* /destination-calendars/{id}:
* get:
* summary: Get a destination calendar by ID
* parameters:
+1 -1
View File
@@ -11,7 +11,7 @@ import {
/**
* @swagger
* /v1/destination-calendars:
* /destination-calendars:
* get:
* summary: Get all destination calendars
* security:
+24 -1
View File
@@ -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();
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -11,7 +11,7 @@ import {
/**
* @swagger
* /v1/event-type-custom-inputs:
* /event-type-custom-inputs:
* get:
* summary: Get all eventTypeCustomInputs
* security:
+1 -1
View File
@@ -12,7 +12,7 @@ import {
/**
* @swagger
* /v1/event-types/{id}:
* /event-types/{id}:
* get:
* summary: Get a eventType by ID
* parameters:
+1 -1
View File
@@ -8,7 +8,7 @@ import { schemaEventTypeBodyParams, schemaEventTypePublic } from "@lib/validatio
/**
* @swagger
* /v1/event-types:
* /event-types:
* get:
* summary: Get all event types
* security:
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -8,7 +8,7 @@ import { schemaMembershipBodyParams, schemaMembershipPublic } from "@lib/validat
/**
* @swagger
* /v1/memberships:
* /memberships:
* get:
* summary: Get all memberships
* security:
+1 -1
View File
@@ -12,7 +12,7 @@ import {
/**
* @swagger
* /v1/payments/{id}:
* /payments/{id}:
* get:
* summary: Get one of your own payments by ID
* parameters:
+1 -1
View File
@@ -8,7 +8,7 @@ import { schemaPaymentPublic } from "@lib/validations/payment";
/**
* @swagger
* /v1/payments:
* /payments:
* get:
* summary: Get all payments
* security:
+1 -1
View File
@@ -12,7 +12,7 @@ import {
/**
* @swagger
* /v1/schedules/{id}:
* /schedules/{id}:
* get:
* summary: Get a schedule by ID
* parameters:
+1 -1
View File
@@ -8,7 +8,7 @@ import { schemaScheduleBodyParams, schemaSchedulePublic, withValidSchedule } fro
/**
* @swagger
* /v1/schedules:
* /schedules:
* get:
* summary: Get all schedules
* security:
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -11,7 +11,7 @@ import {
/**
* @swagger
* /v1/selected-calendars:
* /selected-calendars:
* get:
* summary: Get all selected calendars
* security:
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -9,7 +9,7 @@ import { schemaTeamBodyParams, schemaTeamPublic, withValidTeam } from "@lib/vali
/**
* @swagger
* /v1/teams:
* /teams:
* get:
* summary: Get all teams
* security:
+1 -1
View File
@@ -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:
+1 -1
View File
@@ -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: