From b8f94d6f341854b0cae74ff0e3e74bbe6e0ea776 Mon Sep 17 00:00:00 2001 From: Max Mykal Date: Thu, 20 Jul 2023 17:29:12 -0700 Subject: [PATCH] add boolean to fix request params type --- web/client/openapi.json | 87 ++++++++++++++++++++++++++++++++++ web/client/src/api/instance.ts | 2 +- 2 files changed, 88 insertions(+), 1 deletion(-) diff --git a/web/client/openapi.json b/web/client/openapi.json index 139128fc28..e7f3463f52 100644 --- a/web/client/openapi.json +++ b/web/client/openapi.json @@ -127,6 +127,49 @@ } } }, + "/api/commands/test": { + "get": { + "summary": "Test", + "description": "Run one or all model tests", + "operationId": "test_api_commands_test_get", + "parameters": [ + { + "required": false, + "schema": { "type": "string", "title": "Test" }, + "name": "test", + "in": "query" + }, + { + "required": false, + "schema": { + "type": "boolean", + "title": "Verbose", + "default": false + }, + "name": "verbose", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/TestResult" } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + } + } + }, "/api/files": { "get": { "summary": "Get Files", @@ -1127,6 +1170,7 @@ "enum": [ "INCREMENTAL_BY_TIME_RANGE", "INCREMENTAL_BY_UNIQUE_KEY", + "INCREMENTAL_UNMANAGED", "FULL", "VIEW", "EMBEDDED", @@ -1452,6 +1496,49 @@ "required": ["schema_diff", "row_diff", "on"], "title": "TableDiff" }, + "TestErrorOrFailure": { + "properties": { + "name": { "type": "string", "title": "Name" }, + "path": { "type": "string", "format": "path", "title": "Path" }, + "tb": { "type": "string", "title": "Tb" } + }, + "type": "object", + "required": ["name", "path", "tb"], + "title": "TestErrorOrFailure" + }, + "TestResult": { + "properties": { + "tests_run": { "type": "integer", "title": "Tests Run" }, + "failures": { + "items": { "$ref": "#/components/schemas/TestErrorOrFailure" }, + "type": "array", + "title": "Failures" + }, + "errors": { + "items": { "$ref": "#/components/schemas/TestErrorOrFailure" }, + "type": "array", + "title": "Errors" + }, + "skipped": { + "items": { "$ref": "#/components/schemas/TestSkipped" }, + "type": "array", + "title": "Skipped" + } + }, + "type": "object", + "required": ["tests_run", "failures", "errors", "skipped"], + "title": "TestResult" + }, + "TestSkipped": { + "properties": { + "name": { "type": "string", "title": "Name" }, + "path": { "type": "string", "format": "path", "title": "Path" }, + "reason": { "type": "string", "title": "Reason" } + }, + "type": "object", + "required": ["name", "path", "reason"], + "title": "TestSkipped" + }, "ValidationError": { "properties": { "loc": { diff --git a/web/client/src/api/instance.ts b/web/client/src/api/instance.ts index 999f62d6ea..0969522793 100644 --- a/web/client/src/api/instance.ts +++ b/web/client/src/api/instance.ts @@ -26,7 +26,7 @@ export interface FetchOptions { | 'no-cache' | 'force-cache' | 'only-if-cached' - params?: Record + params?: Record } export async function fetchAPI(