From 331c5561f323b8e01cf9c821cb99dcebc9308da5 Mon Sep 17 00:00:00 2001 From: Diego Temkin <65834932+dtemkin1@users.noreply.github.com> Date: Sat, 5 Oct 2024 18:53:26 -0400 Subject: [PATCH] migrate to openapi 3.1.0 --- templates/openapi.yaml | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/templates/openapi.yaml b/templates/openapi.yaml index c3e9474..10dd447 100644 --- a/templates/openapi.yaml +++ b/templates/openapi.yaml @@ -1,20 +1,38 @@ -openapi: 3.0.0 +openapi: 3.1.0 info: - title: T-REX, the DormCon REX API - description: Backend for REX events + title: T-REX + summary: The DormCon REX API! + description: + This API hosts the structured data and information for the [REX Events + page](https://dormcon.mit.edu/rex/events). Feel free to use it for your own + purposes! The structure of the JSON is documented as `TRexAPIResponse` in + [types.ts](https://github.com/mit-dormcon/website/blob/main/components/t-rex/types.ts) + in the main DormCon website repository. version: 1.0.0 + contact: + name: DormCon Tech Chair + email: dormcon-tech-chair@mit.edu + +tags: + - name: Raw Data + description: Returns raw REX data without filtering or narrowing. + x-displayName: Raw Data servers: - url: https://rex.mit.edu +jsonSchemaDialect: https://spec.openapis.org/oas/3.1/dialect/base + paths: /api.json: get: - summary: Returns all REX Event data. + summary: All REX Event data + tags: + - Raw Data responses: "200": - description: A JSON object containing all REX Event data. + description: This returns a JSON object containing all REX Event data. content: application/json: schema: @@ -73,8 +91,9 @@ components: items: type: string group: - type: string - nullable: true + type: + - "string" + - "null" emoji: type: array items: