From aa6708f7e8654a96163bf9e65563e7e4d5f426be Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Tue, 28 Jun 2022 13:30:03 +0200 Subject: [PATCH] fix: add new schemas to the snapshot --- .../__snapshots__/openapi.e2e.test.ts.snap | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) diff --git a/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap b/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap index aef508074b..bcae1c0c4e 100644 --- a/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap +++ b/src/test/e2e/api/openapi/__snapshots__/openapi.e2e.test.ts.snap @@ -615,6 +615,73 @@ Object { ], "type": "object", }, + "eventSchema": Object { + "additionalProperties": false, + "properties": Object { + "createdAt": Object { + "format": "date-time", + "type": "string", + }, + "createdBy": Object { + "type": "string", + }, + "data": Object {}, + "environment": Object { + "nullable": true, + "type": "string", + }, + "featureName": Object { + "nullable": true, + "type": "string", + }, + "id": Object { + "minimum": 1, + "type": "integer", + }, + "preData": Object {}, + "project": Object { + "nullable": true, + "type": "string", + }, + "tags": Object { + "items": Object { + "$ref": "#/components/schemas/tagSchema", + }, + "nullable": true, + "type": "array", + }, + "type": Object { + "type": "string", + }, + }, + "required": Array [ + "id", + "createdAt", + "type", + "createdBy", + ], + "type": "object", + }, + "eventsSchema": Object { + "additionalProperties": false, + "properties": Object { + "events": Object { + "items": Object { + "$ref": "#/components/schemas/eventSchema", + }, + "type": "array", + }, + "version": Object { + "minimum": 1, + "type": "integer", + }, + }, + "required": Array [ + "version", + "events", + ], + "type": "object", + }, "exportParametersSchema": Object { "properties": Object { "download": Object { @@ -743,6 +810,25 @@ Object { ], "type": "object", }, + "featureEventsSchema": Object { + "additionalProperties": false, + "properties": Object { + "events": Object { + "items": Object { + "$ref": "#/components/schemas/eventSchema", + }, + "type": "array", + }, + "toggleName": Object { + "type": "string", + }, + }, + "required": Array [ + "toggleName", + "events", + ], + "type": "object", + }, "featureMetricsSchema": Object { "additionalProperties": false, "properties": Object { @@ -2873,6 +2959,56 @@ Object { ], }, }, + "/api/admin/events": Object { + "get": Object { + "operationId": "getEvents", + "responses": Object { + "200": Object { + "content": Object { + "application/json": Object { + "schema": Object { + "$ref": "#/components/schemas/eventsSchema", + }, + }, + }, + "description": "eventsSchema", + }, + }, + "tags": Array [ + "admin", + ], + }, + }, + "/api/admin/events/{name}": Object { + "get": Object { + "operationId": "getEventsForToggle", + "parameters": Array [ + Object { + "in": "path", + "name": "name", + "required": true, + "schema": Object { + "type": "string", + }, + }, + ], + "responses": Object { + "200": Object { + "content": Object { + "application/json": Object { + "schema": Object { + "$ref": "#/components/schemas/featureEventsSchema", + }, + }, + }, + "description": "featureEventsSchema", + }, + }, + "tags": Array [ + "admin", + ], + }, + }, "/api/admin/feature-types": Object { "get": Object { "operationId": "getAllFeatureTypes",