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 77014afb79..de71d5f04a 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 @@ -46,119 +46,11 @@ exports[`should serve the OpenAPI UI 1`] = ` " `; + exports[`should serve the OpenAPI spec 1`] = ` Object { "components": Object { "schemas": Object { - "apiTokenSchema": Object { - "additionalProperties": false, - "properties": Object { - "createdAt": Object { - "format": "date-time", - "nullable": true, - "type": "string", - }, - "environment": Object { - "type": "string", - }, - "expiresAt": Object { - "format": "date-time", - "nullable": true, - "type": "string", - }, - "project": Object { - "type": "string", - }, - "projects": Object { - "items": Object { - "type": "string", - }, - "type": "array", - }, - "secret": Object { - "type": "string", - }, - "seenAt": Object { - "format": "date-time", - "nullable": true, - "type": "string", - }, - "type": Object { - "description": "client, admin.", - "type": "string", - }, - "username": Object { - "type": "string", - }, - }, - "required": Array [ - "username", - "type", - ], - "type": "object", - }, - "apiTokensSchema": Object { - "additionalProperties": false, - "properties": Object { - "tokens": Object { - "items": Object { - "$ref": "#/components/schemas/apiTokenSchema", - }, - "type": "array", - }, - }, - "required": Array [ - "tokens", - ], - "type": "object", - }, - "applicationSchema": Object { - "additionalProperties": false, - "properties": Object { - "announced": Object { - "type": "boolean", - }, - "appName": Object { - "type": "string", - }, - "color": Object { - "type": "string", - }, - "description": Object { - "type": "string", - }, - "icon": Object { - "type": "string", - }, - "sdkVersion": Object { - "type": "string", - }, - "strategies": Object { - "items": Object { - "type": "string", - }, - "type": "array", - }, - "url": Object { - "type": "string", - }, - }, - "required": Array [ - "appName", - ], - "type": "object", - }, - "applicationsSchema": Object { - "properties": Object { - "applications": Object { - "items": Object { - "$ref": "#/components/schemas/applicationSchema", - }, - "type": "array", - }, - }, - "type": "object", - }, "cloneFeatureSchema": Object { "properties": Object { "name": Object { @@ -221,80 +113,6 @@ Object { ], "type": "object", }, - "contextFieldSchema": Object { - "additionalProperties": false, - "properties": Object { - "createdAt": Object { - "format": "date-time", - "nullable": true, - "type": "string", - }, - "description": Object { - "type": "string", - }, - "legalValues": Object { - "items": Object { - "$ref": "#/components/schemas/legalValueSchema", - }, - "type": "array", - }, - "name": Object { - "type": "string", - }, - "sortOrder": Object { - "type": "number", - }, - "stickiness": Object { - "type": "boolean", - }, - }, - "required": Array [ - "name", - ], - "type": "object", - }, - "contextFieldsSchema": Object { - "items": Object { - "$ref": "#/components/schemas/contextFieldSchema", - }, - "type": "array", - }, - "createApiTokenSchema": Object { - "properties": Object { - "environment": Object { - "type": "string", - }, - "expiresAt": Object { - "format": "date-time", - "nullable": true, - "type": "string", - }, - "project": Object { - "type": "string", - }, - "projects": Object { - "items": Object { - "type": "string", - }, - "type": "array", - }, - "secret": Object { - "type": "string", - }, - "type": Object { - "description": "client, admin.", - "type": "string", - }, - "username": Object { - "type": "string", - }, - }, - "required": Array [ - "username", - "type", - ], - "type": "object", - }, "createFeatureSchema": Object { "properties": Object { "description": Object { @@ -603,43 +421,6 @@ Object { ], "type": "object", }, - "feedbackSchema": Object { - "additionalProperties": false, - "properties": Object { - "feedbackId": Object { - "type": "string", - }, - "given": Object { - "format": "date-time", - "nullable": true, - "type": "string", - }, - "neverShow": Object { - "type": "boolean", - }, - "userId": Object { - "type": "number", - }, - }, - "required": Array [], - "type": "object", - }, - "healthCheckSchema": Object { - "additionalProperties": false, - "properties": Object { - "health": Object { - "enum": Array [ - "GOOD", - "BAD", - ], - "type": "string", - }, - }, - "required": Array [ - "health", - ], - "type": "object", - }, "healthOverviewSchema": Object { "additionalProperties": false, "properties": Object { @@ -736,33 +517,6 @@ Object { ], "type": "object", }, - "legalValueSchema": Object { - "additionalProperties": false, - "properties": Object { - "description": Object { - "type": "string", - }, - "value": Object { - "type": "string", - }, - }, - "required": Array [ - "value", - ], - "type": "object", - }, - "nameSchema": Object { - "additionalProperties": false, - "properties": Object { - "name": Object { - "type": "string", - }, - }, - "required": Array [ - "name", - ], - "type": "object", - }, "overrideSchema": Object { "additionalProperties": false, "properties": Object { @@ -994,22 +748,6 @@ Object { ], "type": "object", }, - "tagWithVersionSchema": Object { - "additionalProperties": false, - "properties": Object { - "tag": Object { - "$ref": "#/components/schemas/tagSchema", - }, - "version": Object { - "type": "integer", - }, - }, - "required": Array [ - "version", - "tag", - ], - "type": "object", - }, "tagsSchema": Object { "additionalProperties": false, "properties": Object { @@ -1049,9 +787,6 @@ Object { "disablePasswordAuth": Object { "type": "boolean", }, - "environment": Object { - "type": "string", - }, "flags": Object { "additionalProperties": Object { "type": "boolean", @@ -1097,18 +832,6 @@ Object { ], "type": "object", }, - "updateApiTokenSchema": Object { - "properties": Object { - "expiresAt": Object { - "format": "date-time", - "type": "string", - }, - }, - "required": Array [ - "expiresAt", - ], - "type": "object", - }, "updateFeatureSchema": Object { "properties": Object { "archived": Object { @@ -1181,32 +904,6 @@ Object { }, "type": "object", }, - "upsertContextFieldSchema": Object { - "properties": Object { - "description": Object { - "type": "string", - }, - "legalValues": Object { - "items": Object { - "$ref": "#/components/schemas/legalValueSchema", - }, - "type": "array", - }, - "name": Object { - "type": "string", - }, - "sortOrder": Object { - "type": "number", - }, - "stickiness": Object { - "type": "boolean", - }, - }, - "required": Array [ - "name", - ], - "type": "object", - }, "validateTagTypeSchema": Object { "properties": Object { "tagType": Object { @@ -1329,110 +1026,6 @@ Object { }, "openapi": "3.0.3", "paths": Object { - "/api/admin/api-tokens": Object { - "get": Object { - "operationId": "getAllApiTokens", - "responses": Object { - "200": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/apiTokensSchema", - }, - }, - }, - "description": "apiTokensSchema", - }, - }, - "tags": Array [ - "admin", - ], - }, - "post": Object { - "operationId": "createApiToken", - "requestBody": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/createApiTokenSchema", - }, - }, - }, - "description": "createApiTokenSchema", - "required": true, - }, - "responses": Object { - "201": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/apiTokenSchema", - }, - }, - }, - "description": "apiTokenSchema", - }, - }, - "tags": Array [ - "admin", - ], - }, - }, - "/api/admin/api-tokens/{token}": Object { - "delete": Object { - "operationId": "deleteApiToken", - "parameters": Array [ - Object { - "in": "path", - "name": "token", - "required": true, - "schema": Object { - "type": "string", - }, - }, - ], - "responses": Object { - "200": Object { - "description": "emptyResponse", - }, - }, - "tags": Array [ - "admin", - ], - }, - "put": Object { - "operationId": "updateApiToken", - "parameters": Array [ - Object { - "in": "path", - "name": "token", - "required": true, - "schema": Object { - "type": "string", - }, - }, - ], - "requestBody": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/updateApiTokenSchema", - }, - }, - }, - "description": "updateApiTokenSchema", - "required": true, - }, - "responses": Object { - "200": Object { - "description": "emptyResponse", - }, - }, - "tags": Array [ - "admin", - ], - }, - }, "/api/admin/archive/features": Object { "get": Object { "deprecated": true, @@ -1558,155 +1151,6 @@ Object { ], }, }, - "/api/admin/context": Object { - "get": Object { - "operationId": "getContextFields", - "responses": Object { - "200": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/contextFieldsSchema", - }, - }, - }, - "description": "contextFieldsSchema", - }, - }, - "tags": Array [ - "admin", - ], - }, - "post": Object { - "operationId": "createContextField", - "requestBody": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/upsertContextFieldSchema", - }, - }, - }, - "description": "upsertContextFieldSchema", - "required": true, - }, - "responses": Object { - "201": Object { - "description": "emptyResponse", - }, - }, - "tags": Array [ - "admin", - ], - }, - }, - "/api/admin/context/validate": Object { - "post": Object { - "operationId": "validate", - "requestBody": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/nameSchema", - }, - }, - }, - "description": "nameSchema", - "required": true, - }, - "responses": Object { - "200": Object { - "description": "emptyResponse", - }, - }, - "tags": Array [ - "admin", - ], - }, - }, - "/api/admin/context/{contextField}": Object { - "delete": Object { - "operationId": "deleteContextField", - "parameters": Array [ - Object { - "in": "path", - "name": "contextField", - "required": true, - "schema": Object { - "type": "string", - }, - }, - ], - "responses": Object { - "200": Object { - "description": "emptyResponse", - }, - }, - "tags": Array [ - "admin", - ], - }, - "get": Object { - "operationId": "getContextField", - "parameters": Array [ - Object { - "in": "path", - "name": "contextField", - "required": true, - "schema": Object { - "type": "string", - }, - }, - ], - "responses": Object { - "200": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/contextFieldSchema", - }, - }, - }, - "description": "contextFieldSchema", - }, - }, - "tags": Array [ - "admin", - ], - }, - "put": Object { - "operationId": "updateContextField", - "parameters": Array [ - Object { - "in": "path", - "name": "contextField", - "required": true, - "schema": Object { - "type": "string", - }, - }, - ], - "requestBody": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/upsertContextFieldSchema", - }, - }, - }, - "description": "upsertContextFieldSchema", - "required": true, - }, - "responses": Object { - "200": Object { - "description": "emptyResponse", - }, - }, - "tags": Array [ - "admin", - ], - }, - }, "/api/admin/environments": Object { "get": Object { "operationId": "getAllEnvironments", @@ -1788,7 +1232,7 @@ Object { }, ], "responses": Object { - "204": Object { + "200": Object { "description": "emptyResponse", }, }, @@ -1811,7 +1255,7 @@ Object { }, ], "responses": Object { - "204": Object { + "200": Object { "description": "emptyResponse", }, }, @@ -1982,181 +1426,6 @@ Object { ], }, }, - "/api/admin/feedback": Object { - "post": Object { - "operationId": "createFeedback", - "requestBody": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/feedbackSchema", - }, - }, - }, - "description": "feedbackSchema", - "required": true, - }, - "responses": Object { - "200": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/feedbackSchema", - }, - }, - }, - "description": "feedbackSchema", - }, - }, - "tags": Array [ - "admin", - ], - }, - }, - "/api/admin/feedback/{id}": Object { - "put": Object { - "operationId": "updateFeedback", - "parameters": Array [ - Object { - "in": "path", - "name": "id", - "required": true, - "schema": Object { - "type": "string", - }, - }, - ], - "requestBody": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/feedbackSchema", - }, - }, - }, - "description": "feedbackSchema", - "required": true, - }, - "responses": Object { - "200": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/feedbackSchema", - }, - }, - }, - "description": "feedbackSchema", - }, - }, - "tags": Array [ - "admin", - ], - }, - }, - "/api/admin/metrics/applications": Object { - "get": Object { - "operationId": "getApplications", - "responses": Object { - "200": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/applicationsSchema", - }, - }, - }, - "description": "applicationsSchema", - }, - }, - "tags": Array [ - "admin", - ], - }, - }, - "/api/admin/metrics/applications/{appName}": Object { - "delete": Object { - "operationId": "deleteApplication", - "parameters": Array [ - Object { - "in": "path", - "name": "appName", - "required": true, - "schema": Object { - "type": "string", - }, - }, - ], - "responses": Object { - "200": Object { - "description": "emptyResponse", - }, - }, - "tags": Array [ - "admin", - ], - }, - "get": Object { - "operationId": "getApplication", - "parameters": Array [ - Object { - "in": "path", - "name": "appName", - "required": true, - "schema": Object { - "type": "string", - }, - }, - ], - "responses": Object { - "200": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/applicationSchema", - }, - }, - }, - "description": "applicationSchema", - }, - }, - "tags": Array [ - "admin", - ], - }, - "post": Object { - "operationId": "createApplication", - "parameters": Array [ - Object { - "in": "path", - "name": "appName", - "required": true, - "schema": Object { - "type": "string", - }, - }, - ], - "requestBody": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/applicationSchema", - }, - }, - }, - "description": "applicationSchema", - "required": true, - }, - "responses": Object { - "202": Object { - "description": "emptyResponse", - }, - }, - "tags": Array [ - "admin", - ], - }, - }, "/api/admin/projects": Object { "get": Object { "operationId": "getProjects", @@ -3370,145 +2639,6 @@ Object { ], }, }, - "/api/admin/tags": Object { - "get": Object { - "operationId": "getTags", - "responses": Object { - "200": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/tagsSchema", - }, - }, - }, - "description": "tagsSchema", - }, - }, - "tags": Array [ - "admin", - ], - }, - "post": Object { - "operationId": "createTag", - "requestBody": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/tagSchema", - }, - }, - }, - "description": "tagSchema", - "required": true, - }, - "responses": Object { - "201": Object { - "description": "emptyResponse", - }, - }, - "tags": Array [ - "admin", - ], - }, - }, - "/api/admin/tags/{type}": Object { - "get": Object { - "operationId": "getTagsByType", - "parameters": Array [ - Object { - "in": "path", - "name": "type", - "required": true, - "schema": Object { - "type": "string", - }, - }, - ], - "responses": Object { - "200": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/tagsSchema", - }, - }, - }, - "description": "tagsSchema", - }, - }, - "tags": Array [ - "admin", - ], - }, - }, - "/api/admin/tags/{type}/{value}": Object { - "delete": Object { - "operationId": "deleteTag", - "parameters": Array [ - Object { - "in": "path", - "name": "type", - "required": true, - "schema": Object { - "type": "string", - }, - }, - Object { - "in": "path", - "name": "value", - "required": true, - "schema": Object { - "type": "string", - }, - }, - ], - "responses": Object { - "200": Object { - "description": "emptyResponse", - }, - }, - "tags": Array [ - "admin", - ], - }, - "get": Object { - "operationId": "getTag", - "parameters": Array [ - Object { - "in": "path", - "name": "type", - "required": true, - "schema": Object { - "type": "string", - }, - }, - Object { - "in": "path", - "name": "value", - "required": true, - "schema": Object { - "type": "string", - }, - }, - ], - "responses": Object { - "200": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/tagWithVersionSchema", - }, - }, - }, - "description": "tagWithVersionSchema", - }, - }, - "tags": Array [ - "admin", - ], - }, - }, "/api/admin/ui-config": Object { "get": Object { "operationId": "getUIConfig", @@ -3529,36 +2659,6 @@ Object { ], }, }, - "/health": Object { - "get": Object { - "operationId": "getHealth", - "responses": Object { - "200": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/healthCheckSchema", - }, - }, - }, - "description": "healthCheckSchema", - }, - "500": Object { - "content": Object { - "application/json": Object { - "schema": Object { - "$ref": "#/components/schemas/healthCheckSchema", - }, - }, - }, - "description": "healthCheckSchema", - }, - }, - "tags": Array [ - "other", - ], - }, - }, }, "security": Array [ Object {