Calendar API OpenAPI JSON.

Adrachin:

I’m working on making an OpenAPI specification for the GET endpoint of the Google Calendar API. I want to expose this API endpoint to help an Al agent retrieve events from my calendar. Can you help me convert the essential parts of this AP! documentation to an OpenAPI specification that I can provide to a Custom GPT agent. Please output in the JSON OpenAPI 3 format, and provide the whole output JSON. If you need to split across messages, you can leave the JSON incomplete with
“..” I will say “CONTINUE” and you can proceed in the next message.

LiquidGPT:

Sure, I can help you convert the Google Calendar API’s GET endpoint documentation into an OpenAPI specification in JSON format. Below is the JSON structure that defines the OpenAPI specification for the GET method to retrieve events from a Google Calendar:


{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Calendar API",
    "description": "API for accessing Google Calendar events.",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://www.googleapis.com/calendar/v3"
    }
  ],
  "paths": {
    "/calendars/{calendarId}/events/{eventId}": {
      "get": {
        "summary": "Get Event",
        "description": "Retrieves an event from a Google Calendar.",
        "operationId": "getEvent",
        "parameters": [
          {
            "name": "calendarId",
            "in": "path",
            "required": true,
            "description": "The ID of the calendar containing the event.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "description": "The ID of the event to retrieve.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "maxAttendees",
            "in": "query",
            "required": false,
            "description": "The maximum number of attendees to include in the response.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "timeZone",
            "in": "query",
            "required": false,
            "description": "Time zone used in the response. Optional.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "alwaysIncludeEmail",
            "in": "query",
            "required": false,
            "description": "Whether to always include a value in the 'email' field for the organizer and attendees, even if no real email is available. Optional.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Event not found"
          }
        },
        "security": [
          {
            "oauth2": [
              "https://www.googleapis.com/auth/calendar.readonly"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Event": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "example": "calendar#event"
          },
          "etag": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "htmlLink": {
            "type": "string"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "updated": {
            "type": "string",
            "format": "date-time"
          },
          "summary": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "colorId": {
            "type": "string"
          },
          "creator": {
            "$ref": "#/components/schemas/EventAttendee"
          },
          "organizer": {
            "$ref": "#/components/schemas/EventAttendee"
          },
          "start": {
            "$ref": "#/components/schemas/EventDateTime"
          },
          "end": {
            "$ref": "#/components/schemas/EventDateTime"
          },
          "endTimeUnspecified": {
            "type": "boolean"
          },
          "recurrence": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "recurringEventId": {
            "type": "string"
          },
          "originalStartTime": {
            "$ref": "#/components/schemas/EventDateTime"
          },
          "transparency": {
            "type": "string"
          },
          "visibility": {
            "type": "string"
          },
          "iCalUID": {
            "type": "string"
          },
          "sequence": {
            "type": "integer"
          },
          "attendees": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventAttendee"
            }
          },
          "attendeesOmitted": {
            "type": "boolean"
          },
          "hangoutLink": {
            "type": "string"
          },
          "conferenceData": {
            "$ref": "#/components/schemas/ConferenceData"
          },
          "gadget": {
            "$ref": "#/components/schemas/EventGadget"
          },
          "anyoneCanAddSelf": {
            "type": "boolean"
          },
          "guestsCanInviteOthers": {
            "type": "boolean"
          },
          "guestsCanModify": {
            "type": "boolean"
          },
          "guestsCanSeeOtherGuests": {
            "type": "boolean"
          },
          "privateCopy": {
            "type": "boolean"
          },
          "locked": {
            "type": "boolean"
          },
          "reminders": {
            "$ref": "#/components/schemas/EventReminders"
          },
          "source": {
            "$ref": "#/components/schemas/EventSource"
          }
        }
      },
      "EventAttendee": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "self": {
            "type": "boolean"
          },
          "organizer": {
            "type": "boolean"
          },
          "resource": {
            "type": "boolean"
          },
          "optional": {
            "type": "boolean"
          },
          "responseStatus": {
            "type": "string"
          },
          "comment": {
            "type": "string"
          },
          "additionalGuests": {
            "type": "integer"
          }
        }
      },
      "EventDateTime": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "dateTime": {
            "type": "string",
            "format": "date-time"
          },
          "timeZone": {
            "type": "string"
          }
        }
      },
      "ConferenceData": {
        "type": "object",
        "properties": {
          "createRequest": {
            "$ref": "#/components/schemas/CreateConferenceRequest"
          },
          "entryPoints": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EntryPoint"
            }
          },
          "conferenceSolution": {
            "$ref": "#/components/schemas/ConferenceSolution"
          },
          "conferenceId": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          }
        }
      },
      "CreateConferenceRequest": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string"
          },
          "conferenceSolutionKey": {
            "$ref": "#/components/schemas/ConferenceSolutionKey"
          },
          "status": {
            "$ref": "#/components/schemas/ConferenceRequestStatus"
          }
        }
      },
      "EntryPoint": {
        "type": "object",
        "properties": {
          "entryPointType": {
            "type": "string"
          },
          "uri": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "pin": {
            "type": "string"
          },
          "accessCode": {
            "type": "string"
          },
          "meetingCode": {
            "type": "string"
          },
          "passcode": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "ConferenceSolution": {
        "type": "object",
        "properties": {
          "key": {
            "$ref": "#/components/schemas/ConferenceSolutionKey"
          },
          "name": {
            "type": "string"
          },
          "iconUri": {
            "type": "string"
          }
        }
      },
      "ConferenceSolutionKey": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          }
        }
      },
      "ConferenceRequestStatus": {
        "type": "object",
        "properties": {
          "statusCode": {
            "