From 04a27a7a051cfd5c0ae9dd1526e547fd2c176ad2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 4 Dec 2024 14:02:53 +0000 Subject: [PATCH] chore: update swagger.json from lightdash --- swagger.json | 230 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 214 insertions(+), 16 deletions(-) diff --git a/swagger.json b/swagger.json index a489252..de2eef9 100644 --- a/swagger.json +++ b/swagger.json @@ -937,14 +937,143 @@ "type": "object", "additionalProperties": true }, - "Pick_CompiledTable.defaultTimeDimension_": { + "FieldType.DIMENSION": { + "enum": ["dimension"], + "type": "string" + }, + "DimensionType": { + "enum": ["string", "number", "timestamp", "date", "boolean"], + "type": "string" + }, + "Record_string.string_": { + "properties": {}, + "type": "object", + "description": "Construct a type with a set of properties K of type T" + }, + "CompiledDimension": { "properties": { - "defaultTimeDimension": { - "$ref": "#/components/schemas/DefaultTimeDimension" + "fieldType": { + "$ref": "#/components/schemas/FieldType.DIMENSION" + }, + "type": { + "$ref": "#/components/schemas/DimensionType" + }, + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "table": { + "type": "string" + }, + "tableLabel": { + "type": "string" + }, + "sql": { + "type": "string" + }, + "description": { + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/Source" + }, + "hidden": { + "type": "boolean" + }, + "compact": { + "$ref": "#/components/schemas/CompactOrAlias" + }, + "round": { + "type": "number", + "format": "double" + }, + "format": { + "$ref": "#/components/schemas/Format" + }, + "groupLabel": { + "type": "string", + "deprecated": true + }, + "groups": { + "items": { + "type": "string" + }, + "type": "array" + }, + "urls": { + "items": { + "$ref": "#/components/schemas/FieldUrl" + }, + "type": "array" + }, + "index": { + "type": "number", + "format": "double" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "group": { + "type": "string", + "deprecated": true + }, + "requiredAttributes": { + "$ref": "#/components/schemas/Record_string.string-or-string-Array_" + }, + "timeInterval": { + "$ref": "#/components/schemas/TimeFrames" + }, + "timeIntervalBaseDimensionName": { + "type": "string" + }, + "isAdditionalDimension": { + "type": "boolean" + }, + "colors": { + "$ref": "#/components/schemas/Record_string.string_" + }, + "isIntervalBase": { + "type": "boolean" + }, + "compiledSql": { + "type": "string" + }, + "tablesReferences": { + "items": { + "type": "string" + }, + "type": "array" + }, + "tablesRequiredAttributes": { + "$ref": "#/components/schemas/Record_string.Record_string.string-or-string-Array__" } }, + "required": [ + "fieldType", + "type", + "name", + "label", + "table", + "tableLabel", + "sql", + "hidden", + "compiledSql" + ], "type": "object", - "description": "From T, pick a set of properties whose keys are in the union K" + "additionalProperties": true + }, + "DimensionType.DATE": { + "enum": ["date"], + "type": "string" + }, + "DimensionType.TIMESTAMP": { + "enum": ["timestamp"], + "type": "string" }, "MetricWithAssociatedTimeDimension": { "allOf": [ @@ -952,7 +1081,51 @@ "$ref": "#/components/schemas/CompiledMetric" }, { - "$ref": "#/components/schemas/Pick_CompiledTable.defaultTimeDimension_" + "properties": { + "availableTimeDimensions": { + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/CompiledDimension" + }, + { + "properties": { + "type": { + "anyOf": [ + { + "$ref": "#/components/schemas/DimensionType.DATE" + }, + { + "$ref": "#/components/schemas/DimensionType.TIMESTAMP" + } + ] + } + }, + "required": ["type"], + "type": "object" + } + ] + }, + "type": "array" + }, + "timeDimension": { + "allOf": [ + { + "$ref": "#/components/schemas/DefaultTimeDimension" + }, + { + "properties": { + "table": { + "type": "string" + } + }, + "required": ["table"], + "type": "object" + } + ] + } + }, + "type": "object" } ] }, @@ -2113,10 +2286,6 @@ "enum": ["sql"], "type": "string" }, - "DimensionType": { - "enum": ["string", "number", "timestamp", "date", "boolean"], - "type": "string" - }, "CustomSqlDimension": { "properties": { "id": { @@ -2727,11 +2896,6 @@ "enum": ["hidden", "inside", "outside"], "nullable": false }, - "Record_string.string_": { - "properties": {}, - "type": "object", - "description": "Construct a type with a set of properties K of type T" - }, "Record_string.Partial_PieChartValueOptions__": { "properties": {}, "type": "object", @@ -4077,9 +4241,12 @@ "$ref": "#/components/schemas/ResultRow" }, "type": "array" + }, + "metric": { + "$ref": "#/components/schemas/MetricWithAssociatedTimeDimension" } }, - "required": ["fields", "rows"], + "required": ["fields", "rows", "metric"], "type": "object" }, "ApiMetricsExplorerQueryResults": { @@ -4096,6 +4263,22 @@ "required": ["results", "status"], "type": "object" }, + "TimeDimensionConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/DefaultTimeDimension" + }, + { + "properties": { + "table": { + "type": "string" + } + }, + "required": ["table"], + "type": "object" + } + ] + }, "NotificationBase": { "properties": { "url": { @@ -14154,7 +14337,22 @@ "type": "string" } } - ] + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "properties": { + "timeDimensionOverride": { + "$ref": "#/components/schemas/TimeDimensionConfig" + } + }, + "type": "object" + } + } + } + } } }, "/api/v1/notifications": {