From 0b810c7b00f21dd86dab7e46573e8ed398794a22 Mon Sep 17 00:00:00 2001 From: Leah Tacke genannt Unterberg <leah.tgu@pads.rwth-aachen.de> Date: Thu, 27 Feb 2025 13:44:20 +0100 Subject: [PATCH] openapi schema --- .env | 1 - app/config.py | 37 +- app/db/setup.py | 32 +- app/main.py | 10 +- app/models/imported_mitm.py | 13 + pyproject.toml | 6 +- schema/gen_open_api_schema.py | 50 +- schema/openapi.json | 2 +- schema/openapi.yaml | 1346 +++++++++++++++++++++++++++++++-- 9 files changed, 1345 insertions(+), 152 deletions(-) create mode 100644 app/models/imported_mitm.py diff --git a/.env b/.env index 5f5396a..fb72e32 100644 --- a/.env +++ b/.env @@ -1,6 +1,5 @@ API_BASE=http://localhost API_PORT=8180 -API_PREFIX=/api EXPORT_DIR=exports/ UPLOAD_DIR=uploads/ CORS_ORIGIN=http://localhost:8080 \ No newline at end of file diff --git a/app/config.py b/app/config.py index a8e4a05..12ce97c 100644 --- a/app/config.py +++ b/app/config.py @@ -1,22 +1,37 @@ +import logging import os -from typing import Any import dotenv -from fastapi import FastAPI -from fastapi.routing import APIRoute -ENV_CONFIG = {'API_PORT': '8180', - 'API_PREFIX': None, - 'CORS_ORIGIN': 'http://localhost:8080', - 'EXPORT_DIR': 'exports/', - 'UPLOAD_DIR': 'uploads/', - 'root_path': '' - } +logger = logging.getLogger(__name__) + +FASTAPI_CONFIG = {'API_PORT': '8180', + 'API_PREFIX': '', + 'CORS_ORIGIN': 'http://localhost:8080', + } + +PATH_CONFIG = { + 'EXPORT_DIR': 'exports/', + 'UPLOAD_DIR': 'uploads/', +} + +MITM_DB_CONFIG = { + 'MITM_DATABASE_DIALECT': 'sqlite', + 'MITM_DATABASE_USER': None, + 'MITM_DATABASE_PASSWORD': None, + 'MITM_DATABASE_HOST': None, + 'MITM_DATABASE_PORT': None, + 'MITM_DATABASE_DB': 'db/database.sqlite', +} + +ENV_CONFIG = FASTAPI_CONFIG | PATH_CONFIG | MITM_DB_CONFIG def read_env() -> dict[str, str | None]: dotenv.load_dotenv(override=False) - return {k: os.environ.get(k, dv) for k, dv in ENV_CONFIG.items()} + return {k: os.getenv(k, dv) for k, dv in ENV_CONFIG.items()} app_cfg = read_env() + +logger.info(f'Loaded app config:\n{app_cfg}') diff --git a/app/db/setup.py b/app/db/setup.py index 73b2fc1..a500f72 100644 --- a/app/db/setup.py +++ b/app/db/setup.py @@ -1,22 +1,22 @@ -from contextlib import asynccontextmanager +import logging -import pydantic -import sqlmodel -from fastapi import FastAPI -from mitm_tooling.definition import MITM -from mitm_tooling.transformation.superset.definitions import SupersetAssetsDef -from sqlalchemy.orm import Session import sqlalchemy as sa +from mitm_tooling.utilities.python_utils import pick_from_mapping from sqlalchemy import create_engine -from sqlmodel import SQLModel, Field -engine = create_engine('sqlite:///db/database.db', execution_options=dict(check_same_thread=False)) +from ..config import app_cfg +logger = logging.getLogger() +MITM_DATABASE_URL = sa.engine.URL.create(*pick_from_mapping(app_cfg, ['MITM_DATABASE_DIALECT', 'MITM_DATABASE_USER', + 'MITM_DATABASE_PASSWORD', 'MITM_DATABASE_HOST', + 'MITM_DATABASE_PORT', 'MITM_DATABASE_DB'], flatten=True)) -class ImportedMitM(SQLModel): - id: int = Field(sa_column_kwargs={'autoincrement': True}, primary_key=True, nullable=False) - superset_id: int - uuid: str - mitm: MITM - asset_def: SupersetAssetsDef - superset_response: pydantic.JsonValue +execution_options = {} +if MITM_DATABASE_URL.get_dialect().name == 'sqlite': + execution_options.update(check_same_thread=False) + +engine = create_engine(MITM_DATABASE_URL, execution_options=execution_options) +logger.info(f'Setting up MITM DB @ {MITM_DATABASE_URL}') + +#with engine.connect() as connection: +# connection.execute(sa.text('SELECT 1')) diff --git a/app/main.py b/app/main.py index ad5c5b3..c76888d 100644 --- a/app/main.py +++ b/app/main.py @@ -1,15 +1,11 @@ -from contextlib import asynccontextmanager -from typing import Annotated - -from fastapi import FastAPI, Depends -from fastapi.routing import APIRoute +from fastapi import FastAPI +from .config import app_cfg from .dependencies.startup import lifecycle, use_route_names_as_operation_ids from .routers import upload, definitions -from .config import app_cfg +app = FastAPI(title='SupersetMitMService', lifespan=lifecycle, root_path=app_cfg['API_PREFIX']) -app = FastAPI(title='SupersetMitMService', lifespan=lifecycle, root_path=app_cfg['root_path']) app.include_router(definitions.router) app.include_router(upload.router) diff --git a/app/models/imported_mitm.py b/app/models/imported_mitm.py new file mode 100644 index 0000000..1ca0f02 --- /dev/null +++ b/app/models/imported_mitm.py @@ -0,0 +1,13 @@ +import sqlmodel +from mitm_tooling.definition import MITM +from mitm_tooling.transformation.superset.definitions import SupersetAssetsDef +from sqlmodel import SQLModel +import pydantic + +class ImportedMitM(SQLModel): + id: int = sqlmodel.Field(sa_column_kwargs={'autoincrement': True}, primary_key=True, nullable=False) + superset_id: int + uuid: str + mitm: MITM + asset_def: SupersetAssetsDef + superset_response: pydantic.JsonValue diff --git a/pyproject.toml b/pyproject.toml index 4c0b5c9..c01cf57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,16 +11,18 @@ python = "^3.12,<3.14" python-dotenv = "^1.0.1" pyyaml = "*" +pydantic = "*" fastapi = { version = "^0.115.8", extras = ["standard"] } uvicorn = "^0.34.0" python-multipart = "*" sqlalchemy = "^2.0.38" sqlmodel = "^0.0.22" mitm-tooling = { version = "*" } - -#[tool.poetry.dev-dependencies] #mitm-tooling = { version = "*", source = "local", develop = true } +[tool.poetry.dev.dependencies] +datamodel-code-generator = "*" + [[tool.poetry.source]] name = "local" url = "file:///C:/Users/leah/PycharmProjects/mitm-tooling" diff --git a/schema/gen_open_api_schema.py b/schema/gen_open_api_schema.py index af6d5a8..f4ee3ff 100644 --- a/schema/gen_open_api_schema.py +++ b/schema/gen_open_api_schema.py @@ -1,40 +1,24 @@ import json import yaml -from fastapi import FastAPI from fastapi.openapi.utils import get_openapi -from fastapi.routing import APIRoute from app.main import app - -def use_route_names_as_operation_ids(app: FastAPI) -> None: - """ - Simplify operation IDs so that generated API clients have simpler function - names. - - Should be called only after all routes have been added. - """ - for route in app.routes: - if isinstance(route, APIRoute): - route.operation_id = route.name - - -use_route_names_as_operation_ids(app) - -with open('openapi.yaml', 'w') as f: - yaml.dump(get_openapi( - title=app.title, - version=app.version, - openapi_version=app.openapi_version, - description=app.description, - routes=app.routes - ), f) -with open('openapi.json', 'w') as f: - json.dump(get_openapi( - title=app.title, - version=app.version, - openapi_version=app.openapi_version, - description=app.description, - routes=app.routes - ), f) \ No newline at end of file +if __name__ == "__main__": + with open('openapi.yaml', 'w') as f: + yaml.dump(get_openapi( + title=app.title, + version=app.version, + openapi_version=app.openapi_version, + description=app.description, + routes=app.routes + ), f) + with open('openapi.json', 'w') as f: + json.dump(get_openapi( + title=app.title, + version=app.version, + openapi_version=app.openapi_version, + description=app.description, + routes=app.routes + ), f) diff --git a/schema/openapi.json b/schema/openapi.json index 9b169c4..0b1bec5 100644 --- a/schema/openapi.json +++ b/schema/openapi.json @@ -1 +1 @@ -{"openapi": "3.1.0", "info": {"title": "SupersetMitMService", "version": "0.1.0"}, "paths": {"/definitions/database_def": {"post": {"tags": ["definitions"], "summary": "Generate Dataset Def", "operationId": "generate_dataset_def", "parameters": [{"name": "name", "in": "query", "required": true, "schema": {"type": "string", "title": "Name"}}, {"name": "mitm", "in": "query", "required": true, "schema": {"$ref": "#/components/schemas/MITM"}}], "requestBody": {"required": true, "content": {"multipart/form-data": {"schema": {"$ref": "#/components/schemas/Body_generate_dataset_def_definitions_database_def_post"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ImportMitMResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm": {"post": {"tags": ["definitions"], "summary": "Generate Mitm Def", "operationId": "generate_mitm_def", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/upload/upload": {"get": {"tags": ["upload"], "summary": "Upload", "operationId": "upload", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/": {"get": {"summary": "Root", "operationId": "root", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}}, "components": {"schemas": {"Body_generate_dataset_def_definitions_database_def_post": {"properties": {"mitm_zip": {"type": "string", "format": "binary", "title": "Mitm Zip"}}, "type": "object", "required": ["mitm_zip"], "title": "Body_generate_dataset_def_definitions_database_def_post"}, "ChartDataResultType": {"type": "string", "enum": ["columns", "full", "query", "results", "samples", "timegrains", "post_processed", "drill_detail"], "title": "ChartDataResultType"}, "ChartParams": {"properties": {"datasource": {"anyOf": [{"type": "string"}, {"$ref": "#/components/schemas/DatasourceIdentifier"}], "title": "Datasource"}, "viz_type": {"$ref": "#/components/schemas/SupersetVizType"}, "groupby": {"items": {"type": "string"}, "type": "array", "title": "Groupby"}, "adhoc_filters": {"items": {"$ref": "#/components/schemas/SupersetAdhocFilter"}, "type": "array", "title": "Adhoc Filters"}, "row_limit": {"type": "integer", "title": "Row Limit", "default": 10000}, "sort_by_metric": {"type": "boolean", "title": "Sort By Metric", "default": true}, "color_scheme": {"type": "string", "enum": ["blueToGreen", "supersetColors"], "title": "Color Scheme", "default": "supersetColors"}, "show_legend": {"type": "boolean", "title": "Show Legend", "default": true}, "legendType": {"type": "string", "title": "Legendtype", "default": "scroll"}, "legendOrientation": {"type": "string", "title": "Legendorientation", "default": "top"}, "extra_form_data": {"type": "object", "title": "Extra Form Data"}, "slice_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Slice Id"}, "dashboards": {"items": {"type": "integer"}, "type": "array", "title": "Dashboards"}}, "type": "object", "required": ["datasource", "viz_type"], "title": "ChartParams"}, "DatasourceIdentifier": {"properties": {"id": {"type": "integer", "title": "Id", "default": "placeholder"}, "type": {"type": "string", "enum": ["table", "annotation"], "title": "Type", "default": "table"}}, "type": "object", "title": "DatasourceIdentifier"}, "ExpressionType": {"type": "string", "enum": ["SIMPLE", "SQL"], "title": "ExpressionType"}, "FilterOperator": {"type": "string", "enum": ["==", "!=", ">", "<", ">=", "<=", "LIKE", "NOT LIKE", "ILIKE", "IS NULL", "IS NOT NULL", "IN", "NOT IN", "IS TRUE", "IS FALSE", "TEMPORAL_RANGE"], "title": "FilterOperator"}, "FilterStringOperators": {"type": "string", "enum": ["EQUALS", "NOT_EQUALS", "LESS_THAN", "GREATER_THAN", "LESS_THAN_OR_EQUAL", "GREATER_THAN_OR_EQUAL", "IN", "NOT_IN", "ILIKE", "LIKE", "IS_NOT_NULL", "IS_NULL", "LATEST_PARTITION", "IS_TRUE", "IS_FALSE"], "title": "FilterStringOperators"}, "GenericDataType": {"type": "integer", "enum": [0, 1, 2, 3], "title": "GenericDataType"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "ImportMitMResponse": {"properties": {"superset_asset_def": {"$ref": "#/components/schemas/SupersetAssetsDef"}}, "type": "object", "required": ["superset_asset_def"], "title": "ImportMitMResponse"}, "MITM": {"type": "string", "enum": ["MAED", "OCEL2"], "title": "MITM"}, "MetadataType": {"type": "string", "enum": ["Database", "SqlaTable", "Slice", "Chart", "Dashboard", "Asset"], "title": "MetadataType"}, "SupersetAdhocFilter": {"properties": {"clause": {"type": "string", "title": "Clause", "default": "WHERE"}, "subject": {"type": "string", "title": "Subject"}, "operator": {"$ref": "#/components/schemas/FilterOperator"}, "operatorId": {"anyOf": [{"$ref": "#/components/schemas/FilterStringOperators"}, {"type": "null"}]}, "comparator": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Comparator", "default": "No filter"}, "expressionType": {"$ref": "#/components/schemas/ExpressionType", "default": "SIMPLE"}, "isExtra": {"type": "boolean", "title": "Isextra", "default": false}, "isNew": {"type": "boolean", "title": "Isnew", "default": false}, "sqlExpression": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sqlexpression"}}, "type": "object", "required": ["subject", "operator"], "title": "SupersetAdhocFilter"}, "SupersetAdhocMetric": {"properties": {"label": {"type": "string", "title": "Label"}, "column": {"$ref": "#/components/schemas/SupersetColumn"}, "expressionType": {"$ref": "#/components/schemas/ExpressionType", "default": "SIMPLE"}, "aggregate": {"$ref": "#/components/schemas/SupersetAggregate", "default": "COUNT"}, "sqlExpression": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sqlexpression"}, "datasourceWarning": {"type": "boolean", "title": "Datasourcewarning", "default": false}, "hasCustomLabel": {"type": "boolean", "title": "Hascustomlabel", "default": false}, "optionName": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Optionname"}}, "type": "object", "required": ["label", "column"], "title": "SupersetAdhocMetric"}, "SupersetAggregate": {"type": "string", "enum": ["COUNT", "SUM", "MIN", "MAX", "AVG"], "title": "SupersetAggregate"}, "SupersetAssetsDef": {"properties": {"databases": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetDatabaseDef"}, "type": "array"}, {"type": "null"}], "title": "Databases"}, "datasets": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetDatasetDef"}, "type": "array"}, {"type": "null"}], "title": "Datasets"}, "charts": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetChartDef"}, "type": "array"}, {"type": "null"}], "title": "Charts"}, "dashboards": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetDashboardDef"}, "type": "array"}, {"type": "null"}], "title": "Dashboards"}, "metadata": {"$ref": "#/components/schemas/SupersetMetadataDef"}}, "type": "object", "title": "SupersetAssetsDef"}, "SupersetChartDef": {"properties": {"uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "slice_name": {"type": "string", "title": "Slice Name"}, "viz_type": {"$ref": "#/components/schemas/SupersetVizType"}, "dataset_uuid": {"type": "string", "format": "uuid", "title": "Dataset Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "certified_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Certified By"}, "certification_details": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Certification Details"}, "params": {"anyOf": [{"$ref": "#/components/schemas/ChartParams"}, {"type": "object"}], "title": "Params"}, "query_context": {"title": "Query Context"}, "cache_timeout": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Cache Timeout"}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}, "is_managed_externally": {"type": "boolean", "title": "Is Managed Externally", "default": false}, "external_url": {"anyOf": [{"type": "string", "minLength": 1, "format": "uri", "description": "Better annotation for AnyUrl. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "External Url"}}, "type": "object", "required": ["uuid", "slice_name", "viz_type", "dataset_uuid"], "title": "SupersetChartDef"}, "SupersetColumn": {"properties": {"column_name": {"type": "string", "title": "Column Name"}, "verbose_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Verbose Name"}, "id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id"}, "is_dttm": {"type": "boolean", "title": "Is Dttm", "default": false}, "is_active": {"type": "boolean", "title": "Is Active", "default": true}, "type": {"type": "string", "title": "Type", "default": "VARCHAR"}, "type_generic": {"$ref": "#/components/schemas/GenericDataType", "default": 1}, "advanced_data_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Advanced Data Type"}, "groupby": {"type": "boolean", "title": "Groupby", "default": true}, "filterable": {"type": "boolean", "title": "Filterable", "default": true}, "expression": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Expression"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "python_date_format": {"type": "string", "title": "Python Date Format"}, "extra": {"type": "object", "title": "Extra"}}, "type": "object", "required": ["column_name"], "title": "SupersetColumn"}, "SupersetDashboardDef": {"properties": {}, "type": "object", "title": "SupersetDashboardDef"}, "SupersetDatabaseDef": {"properties": {"database_name": {"type": "string", "title": "Database Name"}, "sqlalchemy_uri": {"type": "string", "minLength": 1, "format": "uri", "title": "Sqlalchemy Uri", "description": "Better annotation for AnyUrl. Parses from string format, serializes to string format."}, "uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "cache_timeout": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cache Timeout"}, "expose_in_sqllab": {"type": "boolean", "title": "Expose In Sqllab", "default": true}, "allow_run_async": {"type": "boolean", "title": "Allow Run Async", "default": false}, "allow_ctas": {"type": "boolean", "title": "Allow Ctas", "default": false}, "allow_cvas": {"type": "boolean", "title": "Allow Cvas", "default": false}, "allow_dml": {"type": "boolean", "title": "Allow Dml", "default": false}, "allow_file_upload": {"type": "boolean", "title": "Allow File Upload", "default": false}, "extra": {"type": "object", "title": "Extra"}, "impersonate_user": {"type": "boolean", "title": "Impersonate User", "default": false}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}, "ssh_tunnel": {"type": "null", "title": "Ssh Tunnel"}}, "type": "object", "required": ["database_name", "sqlalchemy_uri", "uuid"], "title": "SupersetDatabaseDef"}, "SupersetDatasetDef": {"properties": {"table_name": {"type": "string", "title": "Table Name"}, "schema": {"type": "string", "title": "Schema"}, "uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "database_uuid": {"type": "string", "format": "uuid", "title": "Database Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "main_dttm_col": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Main Dttm Col"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "default_endpoint": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Default Endpoint"}, "offset": {"type": "integer", "title": "Offset", "default": 0}, "cache_timeout": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cache Timeout"}, "catalog": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Catalog"}, "sql": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sql"}, "params": {"title": "Params"}, "template_params": {"title": "Template Params"}, "filter_select_enabled": {"type": "boolean", "title": "Filter Select Enabled", "default": true}, "fetch_values_predicate": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Fetch Values Predicate"}, "extra": {"type": "object", "title": "Extra"}, "normalize_columns": {"type": "boolean", "title": "Normalize Columns", "default": false}, "always_filter_main_dttm": {"type": "boolean", "title": "Always Filter Main Dttm", "default": false}, "metrics": {"items": {"$ref": "#/components/schemas/SupersetMetric"}, "type": "array", "title": "Metrics"}, "columns": {"items": {"$ref": "#/components/schemas/SupersetColumn"}, "type": "array", "title": "Columns"}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}}, "type": "object", "required": ["table_name", "schema", "uuid", "database_uuid"], "title": "SupersetDatasetDef"}, "SupersetMetadataDef": {"properties": {"version": {"type": "string", "title": "Version", "default": "1.0.0"}, "type": {"$ref": "#/components/schemas/MetadataType", "default": "SqlaTable"}, "timestamp": {"type": "string", "format": "date-time", "title": "Timestamp", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}}, "type": "object", "title": "SupersetMetadataDef"}, "SupersetMetric": {"properties": {"metric_name": {"type": "string", "title": "Metric Name"}, "verbose_name": {"type": "string", "title": "Verbose Name"}, "expression": {"type": "string", "title": "Expression"}, "metric_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Metric Type"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "d3format": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "D3Format"}, "currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Currency"}, "extra": {"type": "object", "title": "Extra"}, "warning_text": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Warning Text"}}, "type": "object", "required": ["metric_name", "verbose_name", "expression"], "title": "SupersetMetric"}, "SupersetVizType": {"type": "string", "enum": ["pie", "echarts_timeseries_bar", "echarts_timeseries_line"], "title": "SupersetVizType"}, "TimeGrain": {"type": "string", "enum": ["PT1S", "PT5S", "PT30S", "PT1M", "PT5M", "PT10M", "PT15M", "PT30M", "PT0.5H", "PT1H", "PT6H", "P1D", "P1W", "1969-12-28T00:00:00Z/P1W", "1969-12-29T00:00:00Z/P1W", "P1W/1970-01-03T00:00:00Z", "P1W/1970-01-04T00:00:00Z", "P1M", "P3M", "P0.25Y", "P1Y"], "title": "TimeGrain"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}}}} \ No newline at end of file +{"openapi": "3.1.0", "info": {"title": "SupersetMitMService", "version": "0.1.0"}, "paths": {"/definitions/mitm_dataset": {"post": {"tags": ["definitions"], "summary": "Generate Mitm Dataset Def", "operationId": "generate_mitm_dataset_def", "parameters": [{"name": "dataset_name", "in": "query", "required": true, "schema": {"type": "string", "title": "Dataset Name"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Header"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MitMDatasetImportResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm_viz": {"post": {"tags": ["definitions"], "summary": "Generate Mitm Viz Def", "operationId": "generate_mitm_viz_def", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Body_generate_mitm_viz_def_definitions_mitm_viz_post"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MitMVisualizationResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/upload/mitm_dataset": {"post": {"tags": ["upload"], "summary": "Upload Mitm Dataset", "operationId": "upload_mitm_dataset", "parameters": [{"name": "dataset_identifier", "in": "query", "required": true, "schema": {"type": "string", "title": "Dataset Identifier"}}, {"name": "mitm", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/MITM", "default": "MAED"}}], "requestBody": {"required": true, "content": {"multipart/form-data": {"schema": {"$ref": "#/components/schemas/Body_upload_mitm_dataset_upload_mitm_dataset_post"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/upload/mitm_datasets": {"get": {"tags": ["upload"], "summary": "Get Mitm Datasets", "operationId": "get_mitm_datasets", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/": {"get": {"summary": "Root", "operationId": "root__get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}}, "components": {"schemas": {"AnnotationLayer": {"properties": {"name": {"type": "string", "title": "Name"}, "value": {"type": "integer", "title": "Value"}, "annotationType": {"$ref": "#/components/schemas/AnnotationType"}, "sourceType": {"$ref": "#/components/schemas/AnnotationSource", "default": "table"}, "opacity": {"type": "string", "title": "Opacity", "default": ""}, "overrides": {"$ref": "#/components/schemas/AnnotationOverrides"}, "hideLine": {"type": "boolean", "title": "Hideline", "default": false}, "show": {"type": "boolean", "title": "Show", "default": false}, "showLabel": {"type": "boolean", "title": "Showlabel", "default": false}, "showMarkers": {"type": "boolean", "title": "Showmarkers", "default": false}, "style": {"type": "string", "title": "Style", "default": "solid"}, "width": {"type": "integer", "title": "Width", "default": 1}}, "type": "object", "required": ["name", "value", "annotationType", "overrides"], "title": "AnnotationLayer"}, "AnnotationOverrides": {"properties": {"time_range": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Time Range"}}, "type": "object", "title": "AnnotationOverrides"}, "AnnotationSource": {"type": "string", "enum": ["line", "NATIVE", "table", ""], "title": "AnnotationSource"}, "AnnotationType": {"type": "string", "enum": ["EVENT", "FORMULA", "INTERVAL", "TIME_SERIES"], "title": "AnnotationType"}, "Body_generate_mitm_viz_def_definitions_mitm_viz_post": {"properties": {"header": {"$ref": "#/components/schemas/Header"}, "mitm_dataset_bundle": {"$ref": "#/components/schemas/SupersetMitMDatasetBundle-Input"}}, "type": "object", "required": ["header", "mitm_dataset_bundle"], "title": "Body_generate_mitm_viz_def_definitions_mitm_viz_post"}, "Body_upload_mitm_dataset_upload_mitm_dataset_post": {"properties": {"mitm_zip": {"type": "string", "format": "binary", "title": "Mitm Zip"}}, "type": "object", "required": ["mitm_zip"], "title": "Body_upload_mitm_dataset_upload_mitm_dataset_post"}, "ChartDataResultFormat": {"type": "string", "enum": ["csv", "json", "xlsx"], "title": "ChartDataResultFormat"}, "ChartDataResultType": {"type": "string", "enum": ["columns", "full", "query", "results", "samples", "timegrains", "post_processed", "drill_detail"], "title": "ChartDataResultType"}, "ChartParams-Input": {"properties": {"datasource": {"anyOf": [{"type": "string"}, {"$ref": "#/components/schemas/DatasourceIdentifier-Input"}], "title": "Datasource"}, "viz_type": {"$ref": "#/components/schemas/SupersetVizType"}, "groupby": {"items": {"type": "string"}, "type": "array", "title": "Groupby"}, "adhoc_filters": {"items": {"$ref": "#/components/schemas/SupersetAdhocFilter"}, "type": "array", "title": "Adhoc Filters"}, "row_limit": {"type": "integer", "title": "Row Limit", "default": 10000}, "sort_by_metric": {"type": "boolean", "title": "Sort By Metric", "default": true}, "color_scheme": {"type": "string", "enum": ["blueToGreen", "supersetColors"], "title": "Color Scheme", "default": "supersetColors"}, "show_legend": {"type": "boolean", "title": "Show Legend", "default": true}, "legendType": {"type": "string", "title": "Legendtype", "default": "scroll"}, "legendOrientation": {"type": "string", "title": "Legendorientation", "default": "top"}, "extra_form_data": {"type": "object", "title": "Extra Form Data"}, "slice_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Slice Id"}, "dashboards": {"items": {"type": "integer"}, "type": "array", "title": "Dashboards"}}, "type": "object", "required": ["datasource", "viz_type"], "title": "ChartParams"}, "ChartParams-Output": {"properties": {"datasource": {"anyOf": [{"type": "string"}, {"$ref": "#/components/schemas/DatasourceIdentifier-Output"}], "title": "Datasource"}, "viz_type": {"$ref": "#/components/schemas/SupersetVizType"}, "groupby": {"items": {"type": "string"}, "type": "array", "title": "Groupby"}, "adhoc_filters": {"items": {"$ref": "#/components/schemas/SupersetAdhocFilter"}, "type": "array", "title": "Adhoc Filters"}, "row_limit": {"type": "integer", "title": "Row Limit", "default": 10000}, "sort_by_metric": {"type": "boolean", "title": "Sort By Metric", "default": true}, "color_scheme": {"type": "string", "enum": ["blueToGreen", "supersetColors"], "title": "Color Scheme", "default": "supersetColors"}, "show_legend": {"type": "boolean", "title": "Show Legend", "default": true}, "legendType": {"type": "string", "title": "Legendtype", "default": "scroll"}, "legendOrientation": {"type": "string", "title": "Legendorientation", "default": "top"}, "extra_form_data": {"type": "object", "title": "Extra Form Data"}, "slice_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Slice Id"}, "dashboards": {"items": {"type": "integer"}, "type": "array", "title": "Dashboards"}}, "type": "object", "required": ["datasource", "viz_type"], "title": "ChartParams"}, "DatasourceIdentifier-Input": {"properties": {"id": {"type": "integer", "title": "Id", "default": "placeholder"}, "type": {"type": "string", "enum": ["table", "annotation"], "title": "Type", "default": "table"}, "dataset_uuid": {"type": "string", "format": "uuid", "title": "Dataset Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}}, "type": "object", "required": ["dataset_uuid"], "title": "DatasourceIdentifier"}, "DatasourceIdentifier-Output": {"properties": {"id": {"type": "integer", "title": "Id", "default": "placeholder"}, "type": {"type": "string", "enum": ["table", "annotation"], "title": "Type", "default": "table"}}, "type": "object", "title": "DatasourceIdentifier"}, "ExpressionType": {"type": "string", "enum": ["SIMPLE", "SQL"], "title": "ExpressionType"}, "FilterOperator": {"type": "string", "enum": ["==", "!=", ">", "<", ">=", "<=", "LIKE", "NOT LIKE", "ILIKE", "IS NULL", "IS NOT NULL", "IN", "NOT IN", "IS TRUE", "IS FALSE", "TEMPORAL_RANGE"], "title": "FilterOperator"}, "FilterStringOperators": {"type": "string", "enum": ["EQUALS", "NOT_EQUALS", "LESS_THAN", "GREATER_THAN", "LESS_THAN_OR_EQUAL", "GREATER_THAN_OR_EQUAL", "IN", "NOT_IN", "ILIKE", "LIKE", "IS_NOT_NULL", "IS_NULL", "LATEST_PARTITION", "IS_TRUE", "IS_FALSE"], "title": "FilterStringOperators"}, "FormData": {"properties": {}, "type": "object", "title": "FormData"}, "GenericDataType": {"type": "integer", "enum": [0, 1, 2, 3], "title": "GenericDataType"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "Header": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "header_entries": {"items": {"$ref": "#/components/schemas/HeaderEntry"}, "type": "array", "title": "Header Entries"}}, "type": "object", "required": ["mitm"], "title": "Header"}, "HeaderEntry": {"properties": {"concept": {"type": "string", "title": "Concept"}, "kind": {"type": "string", "title": "Kind"}, "type_name": {"type": "string", "title": "Type Name"}, "attributes": {"items": {"type": "string"}, "type": "array", "title": "Attributes"}, "attribute_dtypes": {"items": {"$ref": "#/components/schemas/MITMDataType"}, "type": "array", "title": "Attribute Dtypes"}}, "type": "object", "required": ["concept", "kind", "type_name", "attributes", "attribute_dtypes"], "title": "HeaderEntry"}, "MITM": {"type": "string", "enum": ["MAED", "OCEL2"], "title": "MITM"}, "MITMDataType": {"type": "string", "enum": ["text", "json", "integer", "numeric", "boolean", "datetime", "unknown", "infer"], "title": "MITMDataType"}, "MetadataType": {"type": "string", "enum": ["Database", "SqlaTable", "Slice", "Chart", "Dashboard", "Asset", "MitMDataset"], "title": "MetadataType"}, "MitMDatasetImportResponse": {"properties": {"definition_bundle": {"$ref": "#/components/schemas/SupersetMitMDatasetBundle-Output"}, "base_assets": {"$ref": "#/components/schemas/SupersetAssetsDef"}}, "type": "object", "required": ["definition_bundle", "base_assets"], "title": "MitMDatasetImportResponse"}, "MitMVisualizationResponse": {"properties": {"definition_bundle": {"$ref": "#/components/schemas/SupersetMitMDatasetBundle-Output"}, "base_assets": {"$ref": "#/components/schemas/SupersetAssetsDef"}}, "type": "object", "required": ["definition_bundle", "base_assets"], "title": "MitMVisualizationResponse"}, "QueryContext-Input": {"properties": {"datasource": {"$ref": "#/components/schemas/DatasourceIdentifier-Input"}, "queries": {"items": {"$ref": "#/components/schemas/QueryObject-Input"}, "type": "array", "title": "Queries"}, "form_data": {"anyOf": [{"$ref": "#/components/schemas/FormData"}, {"type": "object"}, {"type": "null"}], "title": "Form Data"}, "result_type": {"$ref": "#/components/schemas/ChartDataResultType", "default": "full"}, "result_format": {"$ref": "#/components/schemas/ChartDataResultFormat", "default": "json"}, "force": {"type": "boolean", "title": "Force", "default": false}, "custom_cache_timeout": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Custom Cache Timeout"}}, "type": "object", "required": ["datasource"], "title": "QueryContext"}, "QueryContext-Output": {"properties": {"datasource": {"$ref": "#/components/schemas/DatasourceIdentifier-Output"}, "queries": {"items": {"$ref": "#/components/schemas/QueryObject-Output"}, "type": "array", "title": "Queries"}, "form_data": {"anyOf": [{"$ref": "#/components/schemas/FormData"}, {"type": "object"}, {"type": "null"}], "title": "Form Data"}, "result_type": {"$ref": "#/components/schemas/ChartDataResultType", "default": "full"}, "result_format": {"$ref": "#/components/schemas/ChartDataResultFormat", "default": "json"}, "force": {"type": "boolean", "title": "Force", "default": false}, "custom_cache_timeout": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Custom Cache Timeout"}}, "type": "object", "required": ["datasource"], "title": "QueryContext"}, "QueryObject-Input": {"properties": {"annotation_layers": {"items": {"$ref": "#/components/schemas/AnnotationLayer"}, "type": "array", "title": "Annotation Layers"}, "applied_time_extras": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Applied Time Extras"}, "columns": {"items": {"anyOf": [{"type": "string"}, {"$ref": "#/components/schemas/SupersetAdhocColumn"}]}, "type": "array", "title": "Columns"}, "datasource": {"anyOf": [{"$ref": "#/components/schemas/DatasourceIdentifier-Input"}, {"type": "null"}]}, "extras": {"$ref": "#/components/schemas/QueryObjectExtras"}, "filters": {"items": {"$ref": "#/components/schemas/QueryObjectFilterClause"}, "type": "array", "title": "Filters"}, "metrics": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetAdhocMetric-Input"}, "type": "array"}, {"type": "null"}], "title": "Metrics"}, "granularity": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Granularity"}, "from_dttm": {"anyOf": [{"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "From Dttm"}, "to_dttm": {"anyOf": [{"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "To Dttm"}, "inner_from_dttm": {"anyOf": [{"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "Inner From Dttm"}, "inner_to_dttm": {"anyOf": [{"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "Inner To Dttm"}, "is_rowcount": {"type": "boolean", "title": "Is Rowcount", "default": false}, "is_timeseries": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Timeseries"}, "order_desc": {"type": "boolean", "title": "Order Desc", "default": true}, "orderby": {"items": {"prefixItems": [{"anyOf": [{"$ref": "#/components/schemas/SupersetAdhocMetric-Input"}, {"type": "string"}]}, {"type": "boolean"}], "type": "array", "maxItems": 2, "minItems": 2}, "type": "array", "title": "Orderby"}, "post_processing": {"items": {"anyOf": [{"$ref": "#/components/schemas/SupersetPostProcessing-Input"}, {"type": "object"}]}, "type": "array", "title": "Post Processing"}, "result_type": {"anyOf": [{"$ref": "#/components/schemas/ChartDataResultType"}, {"type": "null"}]}, "row_limit": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Row Limit"}, "row_offset": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Row Offset"}, "series_columns": {"items": {"type": "string"}, "type": "array", "title": "Series Columns"}, "series_limit": {"type": "integer", "title": "Series Limit", "default": 0}, "series_limit_metric": {"anyOf": [{"$ref": "#/components/schemas/SupersetAdhocMetric-Input"}, {"type": "null"}]}, "time_offsets": {"items": {"type": "string"}, "type": "array", "title": "Time Offsets"}, "time_shift": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Time Shift"}, "time_range": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Time Range"}, "url_params": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "title": "Url Params"}}, "type": "object", "title": "QueryObject"}, "QueryObject-Output": {"properties": {"annotation_layers": {"items": {"$ref": "#/components/schemas/AnnotationLayer"}, "type": "array", "title": "Annotation Layers"}, "applied_time_extras": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Applied Time Extras"}, "columns": {"items": {"anyOf": [{"type": "string"}, {"$ref": "#/components/schemas/SupersetAdhocColumn"}]}, "type": "array", "title": "Columns"}, "datasource": {"anyOf": [{"$ref": "#/components/schemas/DatasourceIdentifier-Output"}, {"type": "null"}]}, "extras": {"$ref": "#/components/schemas/QueryObjectExtras"}, "filters": {"items": {"$ref": "#/components/schemas/QueryObjectFilterClause"}, "type": "array", "title": "Filters"}, "metrics": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetAdhocMetric-Output"}, "type": "array"}, {"type": "null"}], "title": "Metrics"}, "granularity": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Granularity"}, "from_dttm": {"anyOf": [{"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "From Dttm"}, "to_dttm": {"anyOf": [{"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "To Dttm"}, "inner_from_dttm": {"anyOf": [{"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "Inner From Dttm"}, "inner_to_dttm": {"anyOf": [{"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "Inner To Dttm"}, "is_rowcount": {"type": "boolean", "title": "Is Rowcount", "default": false}, "is_timeseries": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Timeseries"}, "order_desc": {"type": "boolean", "title": "Order Desc", "default": true}, "orderby": {"items": {"prefixItems": [{"anyOf": [{"$ref": "#/components/schemas/SupersetAdhocMetric-Output"}, {"type": "string"}]}, {"type": "boolean"}], "type": "array", "maxItems": 2, "minItems": 2}, "type": "array", "title": "Orderby"}, "post_processing": {"items": {"anyOf": [{"$ref": "#/components/schemas/SupersetPostProcessing-Output"}, {"type": "object"}]}, "type": "array", "title": "Post Processing"}, "result_type": {"anyOf": [{"$ref": "#/components/schemas/ChartDataResultType"}, {"type": "null"}]}, "row_limit": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Row Limit"}, "row_offset": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Row Offset"}, "series_columns": {"items": {"type": "string"}, "type": "array", "title": "Series Columns"}, "series_limit": {"type": "integer", "title": "Series Limit", "default": 0}, "series_limit_metric": {"anyOf": [{"$ref": "#/components/schemas/SupersetAdhocMetric-Output"}, {"type": "null"}]}, "time_offsets": {"items": {"type": "string"}, "type": "array", "title": "Time Offsets"}, "time_shift": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Time Shift"}, "time_range": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Time Range"}, "url_params": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "title": "Url Params"}}, "type": "object", "title": "QueryObject"}, "QueryObjectExtras": {"properties": {"having": {"type": "string", "title": "Having", "default": ""}, "where": {"type": "string", "title": "Where", "default": ""}, "time_grain_sqla": {"anyOf": [{"$ref": "#/components/schemas/TimeGrain"}, {"type": "null"}]}}, "type": "object", "title": "QueryObjectExtras"}, "QueryObjectFilterClause": {"properties": {"col": {"type": "string", "title": "Col"}, "op": {"$ref": "#/components/schemas/FilterOperator"}, "val": {"anyOf": [{"type": "boolean"}, {"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "number"}, {"type": "integer"}, {"type": "string"}, {"items": {"anyOf": [{"type": "boolean"}, {"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}, "type": "array"}, {"prefixItems": [{"anyOf": [{"type": "boolean"}, {"type": "string", "format": "date-time", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}], "type": "array", "maxItems": 1, "minItems": 1}, {"type": "null"}], "title": "Val"}, "grain": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Grain"}, "isExtra": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Isextra"}}, "type": "object", "required": ["col", "op"], "title": "QueryObjectFilterClause"}, "SupersetAdhocColumn": {"properties": {"label": {"type": "string", "title": "Label"}, "sqlExpression": {"type": "string", "title": "Sqlexpression"}, "columnType": {"type": "string", "title": "Columntype", "default": "BASE_AXIS"}, "expressionType": {"type": "string", "title": "Expressiontype", "default": "SQL"}, "timeGrain": {"anyOf": [{"$ref": "#/components/schemas/TimeGrain"}, {"type": "null"}]}}, "type": "object", "required": ["label", "sqlExpression"], "title": "SupersetAdhocColumn"}, "SupersetAdhocFilter": {"properties": {"clause": {"type": "string", "title": "Clause", "default": "WHERE"}, "subject": {"type": "string", "title": "Subject"}, "operator": {"$ref": "#/components/schemas/FilterOperator"}, "operatorId": {"anyOf": [{"$ref": "#/components/schemas/FilterStringOperators"}, {"type": "null"}]}, "comparator": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Comparator", "default": "No filter"}, "expressionType": {"$ref": "#/components/schemas/ExpressionType", "default": "SIMPLE"}, "isExtra": {"type": "boolean", "title": "Isextra", "default": false}, "isNew": {"type": "boolean", "title": "Isnew", "default": false}, "sqlExpression": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sqlexpression"}}, "type": "object", "required": ["subject", "operator"], "title": "SupersetAdhocFilter"}, "SupersetAdhocMetric-Input": {"properties": {"label": {"type": "string", "title": "Label"}, "column": {"$ref": "#/components/schemas/SupersetColumn"}, "expressionType": {"$ref": "#/components/schemas/ExpressionType", "default": "SIMPLE"}, "aggregate": {"$ref": "#/components/schemas/SupersetAggregate", "default": "COUNT"}, "sqlExpression": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sqlexpression"}, "datasourceWarning": {"type": "boolean", "title": "Datasourcewarning", "default": false}, "hasCustomLabel": {"type": "boolean", "title": "Hascustomlabel", "default": false}, "optionName": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Optionname"}}, "type": "object", "required": ["label", "column"], "title": "SupersetAdhocMetric"}, "SupersetAdhocMetric-Output": {"properties": {"label": {"type": "string", "title": "Label"}, "column": {"$ref": "#/components/schemas/SupersetColumn"}, "expressionType": {"$ref": "#/components/schemas/ExpressionType", "default": "SIMPLE"}, "aggregate": {"$ref": "#/components/schemas/SupersetAggregate", "default": "COUNT"}, "sqlExpression": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sqlexpression"}, "datasourceWarning": {"type": "boolean", "title": "Datasourcewarning", "default": false}, "hasCustomLabel": {"type": "boolean", "title": "Hascustomlabel", "default": false}, "optionName": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Optionname"}}, "type": "object", "required": ["label", "column"], "title": "SupersetAdhocMetric"}, "SupersetAggregate": {"type": "string", "enum": ["COUNT", "SUM", "MIN", "MAX", "AVG"], "title": "SupersetAggregate"}, "SupersetAssetsDef": {"properties": {"databases": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetDatabaseDef"}, "type": "array"}, {"type": "null"}], "title": "Databases"}, "datasets": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetDatasetDef-Output"}, "type": "array"}, {"type": "null"}], "title": "Datasets"}, "charts": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetChartDef-Output"}, "type": "array"}, {"type": "null"}], "title": "Charts"}, "dashboards": {"anyOf": [{"items": {"$ref": "#/components/schemas/SupersetDashboardDef"}, "type": "array"}, {"type": "null"}], "title": "Dashboards"}, "metadata": {"$ref": "#/components/schemas/SupersetMetadataDef"}}, "type": "object", "title": "SupersetAssetsDef"}, "SupersetChartDef-Input": {"properties": {"uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "slice_name": {"type": "string", "title": "Slice Name"}, "viz_type": {"$ref": "#/components/schemas/SupersetVizType"}, "dataset_uuid": {"type": "string", "format": "uuid", "title": "Dataset Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "certified_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Certified By"}, "certification_details": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Certification Details"}, "params": {"anyOf": [{"$ref": "#/components/schemas/ChartParams-Input"}, {"type": "object"}], "title": "Params"}, "query_context": {"anyOf": [{"type": "string", "contentMediaType": "application/json", "contentSchema": {}}, {"$ref": "#/components/schemas/QueryContext-Input"}, {"type": "null"}], "title": "Query Context"}, "cache_timeout": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Cache Timeout"}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}, "is_managed_externally": {"type": "boolean", "title": "Is Managed Externally", "default": false}, "external_url": {"anyOf": [{"type": "string", "minLength": 1, "format": "uri", "description": "Better annotation for AnyUrl. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "External Url"}}, "type": "object", "required": ["uuid", "slice_name", "viz_type", "dataset_uuid"], "title": "SupersetChartDef"}, "SupersetChartDef-Output": {"properties": {"uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "slice_name": {"type": "string", "title": "Slice Name"}, "viz_type": {"$ref": "#/components/schemas/SupersetVizType"}, "dataset_uuid": {"type": "string", "format": "uuid", "title": "Dataset Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "certified_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Certified By"}, "certification_details": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Certification Details"}, "params": {"anyOf": [{"$ref": "#/components/schemas/ChartParams-Output"}, {"type": "object"}], "title": "Params"}, "query_context": {"title": "Query Context"}, "cache_timeout": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Cache Timeout"}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}, "is_managed_externally": {"type": "boolean", "title": "Is Managed Externally", "default": false}, "external_url": {"anyOf": [{"type": "string", "minLength": 1, "format": "uri", "description": "Better annotation for AnyUrl. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "External Url"}}, "type": "object", "required": ["uuid", "slice_name", "viz_type", "dataset_uuid"], "title": "SupersetChartDef"}, "SupersetColumn": {"properties": {"column_name": {"type": "string", "title": "Column Name"}, "verbose_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Verbose Name"}, "id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Id"}, "is_dttm": {"type": "boolean", "title": "Is Dttm", "default": false}, "is_active": {"type": "boolean", "title": "Is Active", "default": true}, "type": {"type": "string", "title": "Type", "default": "VARCHAR"}, "type_generic": {"$ref": "#/components/schemas/GenericDataType", "default": 1}, "advanced_data_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Advanced Data Type"}, "groupby": {"type": "boolean", "title": "Groupby", "default": true}, "filterable": {"type": "boolean", "title": "Filterable", "default": true}, "expression": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Expression"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "python_date_format": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Python Date Format"}, "extra": {"type": "object", "title": "Extra"}}, "type": "object", "required": ["column_name"], "title": "SupersetColumn"}, "SupersetDashboardDef": {"properties": {"uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "dashboard_title": {"type": "string", "title": "Dashboard Title"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "css": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Css"}, "slug": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Slug"}, "position": {"type": "object", "title": "Position"}, "metadata": {"type": "object", "title": "Metadata"}, "is_managed_externally": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Managed Externally", "default": false}, "external_url": {"anyOf": [{"type": "string", "minLength": 1, "format": "uri", "description": "Better annotation for AnyUrl. Parses from string format, serializes to string format."}, {"type": "null"}], "title": "External Url"}, "certified_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Certified By"}, "certification_details": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Certification Details"}, "published": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Published", "default": false}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}}, "type": "object", "required": ["uuid", "dashboard_title"], "title": "SupersetDashboardDef"}, "SupersetDatabaseDef": {"properties": {"database_name": {"type": "string", "title": "Database Name"}, "sqlalchemy_uri": {"type": "string", "minLength": 1, "format": "uri", "title": "Sqlalchemy Uri", "description": "Better annotation for AnyUrl. Parses from string format, serializes to string format."}, "uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "cache_timeout": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cache Timeout"}, "expose_in_sqllab": {"type": "boolean", "title": "Expose In Sqllab", "default": true}, "allow_run_async": {"type": "boolean", "title": "Allow Run Async", "default": false}, "allow_ctas": {"type": "boolean", "title": "Allow Ctas", "default": false}, "allow_cvas": {"type": "boolean", "title": "Allow Cvas", "default": false}, "allow_dml": {"type": "boolean", "title": "Allow Dml", "default": false}, "allow_file_upload": {"type": "boolean", "title": "Allow File Upload", "default": false}, "extra": {"type": "object", "title": "Extra"}, "impersonate_user": {"type": "boolean", "title": "Impersonate User", "default": false}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}, "ssh_tunnel": {"type": "null", "title": "Ssh Tunnel"}}, "type": "object", "required": ["database_name", "sqlalchemy_uri", "uuid"], "title": "SupersetDatabaseDef"}, "SupersetDatasetDef-Input": {"properties": {"table_name": {"type": "string", "title": "Table Name"}, "schema": {"type": "string", "title": "Schema"}, "uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "database_uuid": {"type": "string", "format": "uuid", "title": "Database Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "main_dttm_col": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Main Dttm Col"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "default_endpoint": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Default Endpoint"}, "offset": {"type": "integer", "title": "Offset", "default": 0}, "cache_timeout": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cache Timeout"}, "catalog": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Catalog"}, "sql": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sql"}, "params": {"title": "Params"}, "template_params": {"title": "Template Params"}, "filter_select_enabled": {"type": "boolean", "title": "Filter Select Enabled", "default": true}, "fetch_values_predicate": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Fetch Values Predicate"}, "extra": {"type": "object", "title": "Extra"}, "normalize_columns": {"type": "boolean", "title": "Normalize Columns", "default": false}, "always_filter_main_dttm": {"type": "boolean", "title": "Always Filter Main Dttm", "default": false}, "metrics": {"items": {"$ref": "#/components/schemas/SupersetMetric"}, "type": "array", "title": "Metrics"}, "columns": {"items": {"$ref": "#/components/schemas/SupersetColumn"}, "type": "array", "title": "Columns"}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}}, "type": "object", "required": ["table_name", "schema", "uuid", "database_uuid"], "title": "SupersetDatasetDef"}, "SupersetDatasetDef-Output": {"properties": {"table_name": {"type": "string", "title": "Table Name"}, "schema": {"type": "string", "title": "Schema"}, "uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "database_uuid": {"type": "string", "format": "uuid", "title": "Database Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "main_dttm_col": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Main Dttm Col"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "default_endpoint": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Default Endpoint"}, "offset": {"type": "integer", "title": "Offset", "default": 0}, "cache_timeout": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cache Timeout"}, "catalog": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Catalog"}, "sql": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sql"}, "params": {"title": "Params"}, "template_params": {"title": "Template Params"}, "filter_select_enabled": {"type": "boolean", "title": "Filter Select Enabled", "default": true}, "fetch_values_predicate": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Fetch Values Predicate"}, "extra": {"type": "object", "title": "Extra"}, "normalize_columns": {"type": "boolean", "title": "Normalize Columns", "default": false}, "always_filter_main_dttm": {"type": "boolean", "title": "Always Filter Main Dttm", "default": false}, "metrics": {"items": {"$ref": "#/components/schemas/SupersetMetric"}, "type": "array", "title": "Metrics"}, "columns": {"items": {"$ref": "#/components/schemas/SupersetColumn"}, "type": "array", "title": "Columns"}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}}, "type": "object", "required": ["table_name", "schema", "uuid", "database_uuid"], "title": "SupersetDatasetDef"}, "SupersetDatasourceBundle-Input": {"properties": {"database": {"$ref": "#/components/schemas/SupersetDatabaseDef"}, "datasets": {"items": {"$ref": "#/components/schemas/SupersetDatasetDef-Input"}, "type": "array", "title": "Datasets"}}, "type": "object", "required": ["database"], "title": "SupersetDatasourceBundle"}, "SupersetDatasourceBundle-Output": {"properties": {"database": {"$ref": "#/components/schemas/SupersetDatabaseDef"}, "datasets": {"items": {"$ref": "#/components/schemas/SupersetDatasetDef-Output"}, "type": "array", "title": "Datasets"}}, "type": "object", "required": ["database"], "title": "SupersetDatasourceBundle"}, "SupersetMetadataDef": {"properties": {"version": {"type": "string", "title": "Version", "default": "1.0.0"}, "type": {"$ref": "#/components/schemas/MetadataType", "default": "SqlaTable"}, "timestamp": {"type": "string", "format": "date-time", "title": "Timestamp", "description": "Better annotation for datetime. Parses from string format, serializes to string format."}}, "type": "object", "title": "SupersetMetadataDef"}, "SupersetMetric": {"properties": {"metric_name": {"type": "string", "title": "Metric Name"}, "verbose_name": {"type": "string", "title": "Verbose Name"}, "expression": {"type": "string", "title": "Expression"}, "metric_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Metric Type"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "d3format": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "D3Format"}, "currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Currency"}, "extra": {"type": "object", "title": "Extra"}, "warning_text": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Warning Text"}}, "type": "object", "required": ["metric_name", "verbose_name", "expression"], "title": "SupersetMetric"}, "SupersetMitMDatasetBundle-Input": {"properties": {"mitm_dataset": {"$ref": "#/components/schemas/SupersetMitMDatasetDef"}, "datasource_bundle": {"$ref": "#/components/schemas/SupersetDatasourceBundle-Input"}, "visualization_bundle": {"$ref": "#/components/schemas/SupersetVisualizationBundle-Input"}}, "type": "object", "required": ["mitm_dataset", "datasource_bundle"], "title": "SupersetMitMDatasetBundle"}, "SupersetMitMDatasetBundle-Output": {"properties": {"mitm_dataset": {"$ref": "#/components/schemas/SupersetMitMDatasetDef"}, "datasource_bundle": {"$ref": "#/components/schemas/SupersetDatasourceBundle-Output"}, "visualization_bundle": {"$ref": "#/components/schemas/SupersetVisualizationBundle-Output"}}, "type": "object", "required": ["mitm_dataset", "datasource_bundle"], "title": "SupersetMitMDatasetBundle"}, "SupersetMitMDatasetDef": {"properties": {"uuid": {"type": "string", "format": "uuid", "title": "Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "dataset_name": {"type": "string", "title": "Dataset Name"}, "mitm": {"$ref": "#/components/schemas/MITM"}, "database_uuid": {"type": "string", "format": "uuid", "title": "Database Uuid", "description": "Better annotation for UUID. Parses from string format, serializes to string format."}, "version": {"type": "string", "title": "Version", "default": "1.0.0"}}, "type": "object", "required": ["uuid", "dataset_name", "mitm", "database_uuid"], "title": "SupersetMitMDatasetDef"}, "SupersetPostProcessing-Input": {"properties": {}, "type": "object", "title": "SupersetPostProcessing"}, "SupersetPostProcessing-Output": {"properties": {"operation": {"type": "string", "title": "Operation", "readOnly": true}}, "type": "object", "required": ["operation"], "title": "SupersetPostProcessing"}, "SupersetVisualizationBundle-Input": {"properties": {"charts": {"items": {"$ref": "#/components/schemas/SupersetChartDef-Input"}, "type": "array", "title": "Charts"}, "dashboards": {"items": {"$ref": "#/components/schemas/SupersetDashboardDef"}, "type": "array", "title": "Dashboards"}}, "type": "object", "title": "SupersetVisualizationBundle"}, "SupersetVisualizationBundle-Output": {"properties": {"charts": {"items": {"$ref": "#/components/schemas/SupersetChartDef-Output"}, "type": "array", "title": "Charts"}, "dashboards": {"items": {"$ref": "#/components/schemas/SupersetDashboardDef"}, "type": "array", "title": "Dashboards"}}, "type": "object", "title": "SupersetVisualizationBundle"}, "SupersetVizType": {"type": "string", "enum": ["pie", "echarts_timeseries_bar", "echarts_timeseries_line"], "title": "SupersetVizType"}, "TimeGrain": {"type": "string", "enum": ["PT1S", "PT5S", "PT30S", "PT1M", "PT5M", "PT10M", "PT15M", "PT30M", "PT0.5H", "PT1H", "PT6H", "P1D", "P1W", "1969-12-28T00:00:00Z/P1W", "1969-12-29T00:00:00Z/P1W", "P1W/1970-01-03T00:00:00Z", "P1W/1970-01-04T00:00:00Z", "P1M", "P3M", "P0.25Y", "P1Y"], "title": "TimeGrain"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}}}} \ No newline at end of file diff --git a/schema/openapi.yaml b/schema/openapi.yaml index 31dbae1..05362dc 100644 --- a/schema/openapi.yaml +++ b/schema/openapi.yaml @@ -1,6 +1,92 @@ components: schemas: - Body_generate_dataset_def_definitions_database_def_post: + AnnotationLayer: + properties: + annotationType: + $ref: '#/components/schemas/AnnotationType' + hideLine: + default: false + title: Hideline + type: boolean + name: + title: Name + type: string + opacity: + default: '' + title: Opacity + type: string + overrides: + $ref: '#/components/schemas/AnnotationOverrides' + show: + default: false + title: Show + type: boolean + showLabel: + default: false + title: Showlabel + type: boolean + showMarkers: + default: false + title: Showmarkers + type: boolean + sourceType: + $ref: '#/components/schemas/AnnotationSource' + default: table + style: + default: solid + title: Style + type: string + value: + title: Value + type: integer + width: + default: 1 + title: Width + type: integer + required: + - name + - value + - annotationType + - overrides + title: AnnotationLayer + type: object + AnnotationOverrides: + properties: + time_range: + anyOf: + - type: string + - type: 'null' + title: Time Range + title: AnnotationOverrides + type: object + AnnotationSource: + enum: + - line + - NATIVE + - table + - '' + title: AnnotationSource + type: string + AnnotationType: + enum: + - EVENT + - FORMULA + - INTERVAL + - TIME_SERIES + title: AnnotationType + type: string + Body_generate_mitm_viz_def_definitions_mitm_viz_post: + properties: + header: + $ref: '#/components/schemas/Header' + mitm_dataset_bundle: + $ref: '#/components/schemas/SupersetMitMDatasetBundle-Input' + required: + - header + - mitm_dataset_bundle + title: Body_generate_mitm_viz_def_definitions_mitm_viz_post + type: object + Body_upload_mitm_dataset_upload_mitm_dataset_post: properties: mitm_zip: format: binary @@ -8,8 +94,15 @@ components: type: string required: - mitm_zip - title: Body_generate_dataset_def_definitions_database_def_post + title: Body_upload_mitm_dataset_upload_mitm_dataset_post type: object + ChartDataResultFormat: + enum: + - csv + - json + - xlsx + title: ChartDataResultFormat + type: string ChartDataResultType: enum: - columns @@ -22,7 +115,7 @@ components: - drill_detail title: ChartDataResultType type: string - ChartParams: + ChartParams-Input: properties: adhoc_filters: items: @@ -44,7 +137,7 @@ components: datasource: anyOf: - type: string - - $ref: '#/components/schemas/DatasourceIdentifier' + - $ref: '#/components/schemas/DatasourceIdentifier-Input' title: Datasource extra_form_data: title: Extra Form Data @@ -86,7 +179,94 @@ components: - viz_type title: ChartParams type: object - DatasourceIdentifier: + ChartParams-Output: + properties: + adhoc_filters: + items: + $ref: '#/components/schemas/SupersetAdhocFilter' + title: Adhoc Filters + type: array + color_scheme: + default: supersetColors + enum: + - blueToGreen + - supersetColors + title: Color Scheme + type: string + dashboards: + items: + type: integer + title: Dashboards + type: array + datasource: + anyOf: + - type: string + - $ref: '#/components/schemas/DatasourceIdentifier-Output' + title: Datasource + extra_form_data: + title: Extra Form Data + type: object + groupby: + items: + type: string + title: Groupby + type: array + legendOrientation: + default: top + title: Legendorientation + type: string + legendType: + default: scroll + title: Legendtype + type: string + row_limit: + default: 10000 + title: Row Limit + type: integer + show_legend: + default: true + title: Show Legend + type: boolean + slice_id: + anyOf: + - type: integer + - type: 'null' + title: Slice Id + sort_by_metric: + default: true + title: Sort By Metric + type: boolean + viz_type: + $ref: '#/components/schemas/SupersetVizType' + required: + - datasource + - viz_type + title: ChartParams + type: object + DatasourceIdentifier-Input: + properties: + dataset_uuid: + description: Better annotation for UUID. Parses from string format, serializes + to string format. + format: uuid + title: Dataset Uuid + type: string + id: + default: placeholder + title: Id + type: integer + type: + default: table + enum: + - table + - annotation + title: Type + type: string + required: + - dataset_uuid + title: DatasourceIdentifier + type: object + DatasourceIdentifier-Output: properties: id: default: placeholder @@ -146,6 +326,10 @@ components: - IS_FALSE title: FilterStringOperators type: string + FormData: + properties: {} + title: FormData + type: object GenericDataType: enum: - 0 @@ -158,35 +342,585 @@ components: properties: detail: items: - $ref: '#/components/schemas/ValidationError' - title: Detail + $ref: '#/components/schemas/ValidationError' + title: Detail + type: array + title: HTTPValidationError + type: object + Header: + properties: + header_entries: + items: + $ref: '#/components/schemas/HeaderEntry' + title: Header Entries + type: array + mitm: + $ref: '#/components/schemas/MITM' + required: + - mitm + title: Header + type: object + HeaderEntry: + properties: + attribute_dtypes: + items: + $ref: '#/components/schemas/MITMDataType' + title: Attribute Dtypes + type: array + attributes: + items: + type: string + title: Attributes + type: array + concept: + title: Concept + type: string + kind: + title: Kind + type: string + type_name: + title: Type Name + type: string + required: + - concept + - kind + - type_name + - attributes + - attribute_dtypes + title: HeaderEntry + type: object + MITM: + enum: + - MAED + - OCEL2 + title: MITM + type: string + MITMDataType: + enum: + - text + - json + - integer + - numeric + - boolean + - datetime + - unknown + - infer + title: MITMDataType + type: string + MetadataType: + enum: + - Database + - SqlaTable + - Slice + - Chart + - Dashboard + - Asset + - MitMDataset + title: MetadataType + type: string + MitMDatasetImportResponse: + properties: + base_assets: + $ref: '#/components/schemas/SupersetAssetsDef' + definition_bundle: + $ref: '#/components/schemas/SupersetMitMDatasetBundle-Output' + required: + - definition_bundle + - base_assets + title: MitMDatasetImportResponse + type: object + MitMVisualizationResponse: + properties: + base_assets: + $ref: '#/components/schemas/SupersetAssetsDef' + definition_bundle: + $ref: '#/components/schemas/SupersetMitMDatasetBundle-Output' + required: + - definition_bundle + - base_assets + title: MitMVisualizationResponse + type: object + QueryContext-Input: + properties: + custom_cache_timeout: + anyOf: + - type: integer + - type: 'null' + title: Custom Cache Timeout + datasource: + $ref: '#/components/schemas/DatasourceIdentifier-Input' + force: + default: false + title: Force + type: boolean + form_data: + anyOf: + - $ref: '#/components/schemas/FormData' + - type: object + - type: 'null' + title: Form Data + queries: + items: + $ref: '#/components/schemas/QueryObject-Input' + title: Queries + type: array + result_format: + $ref: '#/components/schemas/ChartDataResultFormat' + default: json + result_type: + $ref: '#/components/schemas/ChartDataResultType' + default: full + required: + - datasource + title: QueryContext + type: object + QueryContext-Output: + properties: + custom_cache_timeout: + anyOf: + - type: integer + - type: 'null' + title: Custom Cache Timeout + datasource: + $ref: '#/components/schemas/DatasourceIdentifier-Output' + force: + default: false + title: Force + type: boolean + form_data: + anyOf: + - $ref: '#/components/schemas/FormData' + - type: object + - type: 'null' + title: Form Data + queries: + items: + $ref: '#/components/schemas/QueryObject-Output' + title: Queries + type: array + result_format: + $ref: '#/components/schemas/ChartDataResultFormat' + default: json + result_type: + $ref: '#/components/schemas/ChartDataResultType' + default: full + required: + - datasource + title: QueryContext + type: object + QueryObject-Input: + properties: + annotation_layers: + items: + $ref: '#/components/schemas/AnnotationLayer' + title: Annotation Layers + type: array + applied_time_extras: + additionalProperties: + type: string + title: Applied Time Extras + type: object + columns: + items: + anyOf: + - type: string + - $ref: '#/components/schemas/SupersetAdhocColumn' + title: Columns + type: array + datasource: + anyOf: + - $ref: '#/components/schemas/DatasourceIdentifier-Input' + - type: 'null' + extras: + $ref: '#/components/schemas/QueryObjectExtras' + filters: + items: + $ref: '#/components/schemas/QueryObjectFilterClause' + title: Filters + type: array + from_dttm: + anyOf: + - description: Better annotation for datetime. Parses from string format, + serializes to string format. + format: date-time + type: string + - type: 'null' + title: From Dttm + granularity: + anyOf: + - type: string + - type: 'null' + title: Granularity + inner_from_dttm: + anyOf: + - description: Better annotation for datetime. Parses from string format, + serializes to string format. + format: date-time + type: string + - type: 'null' + title: Inner From Dttm + inner_to_dttm: + anyOf: + - description: Better annotation for datetime. Parses from string format, + serializes to string format. + format: date-time + type: string + - type: 'null' + title: Inner To Dttm + is_rowcount: + default: false + title: Is Rowcount + type: boolean + is_timeseries: + anyOf: + - type: boolean + - type: 'null' + title: Is Timeseries + metrics: + anyOf: + - items: + $ref: '#/components/schemas/SupersetAdhocMetric-Input' + type: array + - type: 'null' + title: Metrics + order_desc: + default: true + title: Order Desc + type: boolean + orderby: + items: + maxItems: 2 + minItems: 2 + prefixItems: + - anyOf: + - $ref: '#/components/schemas/SupersetAdhocMetric-Input' + - type: string + - type: boolean + type: array + title: Orderby + type: array + post_processing: + items: + anyOf: + - $ref: '#/components/schemas/SupersetPostProcessing-Input' + - type: object + title: Post Processing + type: array + result_type: + anyOf: + - $ref: '#/components/schemas/ChartDataResultType' + - type: 'null' + row_limit: + anyOf: + - type: integer + - type: 'null' + title: Row Limit + row_offset: + anyOf: + - type: integer + - type: 'null' + title: Row Offset + series_columns: + items: + type: string + title: Series Columns + type: array + series_limit: + default: 0 + title: Series Limit + type: integer + series_limit_metric: + anyOf: + - $ref: '#/components/schemas/SupersetAdhocMetric-Input' + - type: 'null' + time_offsets: + items: + type: string + title: Time Offsets + type: array + time_range: + anyOf: + - type: string + - type: 'null' + title: Time Range + time_shift: + anyOf: + - type: string + - type: 'null' + title: Time Shift + to_dttm: + anyOf: + - description: Better annotation for datetime. Parses from string format, + serializes to string format. + format: date-time + type: string + - type: 'null' + title: To Dttm + url_params: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + title: Url Params + title: QueryObject + type: object + QueryObject-Output: + properties: + annotation_layers: + items: + $ref: '#/components/schemas/AnnotationLayer' + title: Annotation Layers + type: array + applied_time_extras: + additionalProperties: + type: string + title: Applied Time Extras + type: object + columns: + items: + anyOf: + - type: string + - $ref: '#/components/schemas/SupersetAdhocColumn' + title: Columns + type: array + datasource: + anyOf: + - $ref: '#/components/schemas/DatasourceIdentifier-Output' + - type: 'null' + extras: + $ref: '#/components/schemas/QueryObjectExtras' + filters: + items: + $ref: '#/components/schemas/QueryObjectFilterClause' + title: Filters + type: array + from_dttm: + anyOf: + - description: Better annotation for datetime. Parses from string format, + serializes to string format. + format: date-time + type: string + - type: 'null' + title: From Dttm + granularity: + anyOf: + - type: string + - type: 'null' + title: Granularity + inner_from_dttm: + anyOf: + - description: Better annotation for datetime. Parses from string format, + serializes to string format. + format: date-time + type: string + - type: 'null' + title: Inner From Dttm + inner_to_dttm: + anyOf: + - description: Better annotation for datetime. Parses from string format, + serializes to string format. + format: date-time + type: string + - type: 'null' + title: Inner To Dttm + is_rowcount: + default: false + title: Is Rowcount + type: boolean + is_timeseries: + anyOf: + - type: boolean + - type: 'null' + title: Is Timeseries + metrics: + anyOf: + - items: + $ref: '#/components/schemas/SupersetAdhocMetric-Output' + type: array + - type: 'null' + title: Metrics + order_desc: + default: true + title: Order Desc + type: boolean + orderby: + items: + maxItems: 2 + minItems: 2 + prefixItems: + - anyOf: + - $ref: '#/components/schemas/SupersetAdhocMetric-Output' + - type: string + - type: boolean + type: array + title: Orderby + type: array + post_processing: + items: + anyOf: + - $ref: '#/components/schemas/SupersetPostProcessing-Output' + - type: object + title: Post Processing + type: array + result_type: + anyOf: + - $ref: '#/components/schemas/ChartDataResultType' + - type: 'null' + row_limit: + anyOf: + - type: integer + - type: 'null' + title: Row Limit + row_offset: + anyOf: + - type: integer + - type: 'null' + title: Row Offset + series_columns: + items: + type: string + title: Series Columns type: array - title: HTTPValidationError + series_limit: + default: 0 + title: Series Limit + type: integer + series_limit_metric: + anyOf: + - $ref: '#/components/schemas/SupersetAdhocMetric-Output' + - type: 'null' + time_offsets: + items: + type: string + title: Time Offsets + type: array + time_range: + anyOf: + - type: string + - type: 'null' + title: Time Range + time_shift: + anyOf: + - type: string + - type: 'null' + title: Time Shift + to_dttm: + anyOf: + - description: Better annotation for datetime. Parses from string format, + serializes to string format. + format: date-time + type: string + - type: 'null' + title: To Dttm + url_params: + anyOf: + - additionalProperties: + type: string + type: object + - type: 'null' + title: Url Params + title: QueryObject type: object - ImportMitMResponse: + QueryObjectExtras: properties: - superset_asset_def: - $ref: '#/components/schemas/SupersetAssetsDef' + having: + default: '' + title: Having + type: string + time_grain_sqla: + anyOf: + - $ref: '#/components/schemas/TimeGrain' + - type: 'null' + where: + default: '' + title: Where + type: string + title: QueryObjectExtras + type: object + QueryObjectFilterClause: + properties: + col: + title: Col + type: string + grain: + anyOf: + - type: string + - type: 'null' + title: Grain + isExtra: + anyOf: + - type: boolean + - type: 'null' + title: Isextra + op: + $ref: '#/components/schemas/FilterOperator' + val: + anyOf: + - type: boolean + - description: Better annotation for datetime. Parses from string format, + serializes to string format. + format: date-time + type: string + - type: number + - type: integer + - type: string + - items: + anyOf: + - type: boolean + - description: Better annotation for datetime. Parses from string format, + serializes to string format. + format: date-time + type: string + - type: number + - type: integer + - type: string + type: array + - maxItems: 1 + minItems: 1 + prefixItems: + - anyOf: + - type: boolean + - description: Better annotation for datetime. Parses from string format, + serializes to string format. + format: date-time + type: string + - type: number + - type: integer + - type: string + type: array + - type: 'null' + title: Val required: - - superset_asset_def - title: ImportMitMResponse + - col + - op + title: QueryObjectFilterClause + type: object + SupersetAdhocColumn: + properties: + columnType: + default: BASE_AXIS + title: Columntype + type: string + expressionType: + default: SQL + title: Expressiontype + type: string + label: + title: Label + type: string + sqlExpression: + title: Sqlexpression + type: string + timeGrain: + anyOf: + - $ref: '#/components/schemas/TimeGrain' + - type: 'null' + required: + - label + - sqlExpression + title: SupersetAdhocColumn type: object - MITM: - enum: - - MAED - - OCEL2 - title: MITM - type: string - MetadataType: - enum: - - Database - - SqlaTable - - Slice - - Chart - - Dashboard - - Asset - title: MetadataType - type: string SupersetAdhocFilter: properties: clause: @@ -229,7 +963,43 @@ components: - operator title: SupersetAdhocFilter type: object - SupersetAdhocMetric: + SupersetAdhocMetric-Input: + properties: + aggregate: + $ref: '#/components/schemas/SupersetAggregate' + default: COUNT + column: + $ref: '#/components/schemas/SupersetColumn' + datasourceWarning: + default: false + title: Datasourcewarning + type: boolean + expressionType: + $ref: '#/components/schemas/ExpressionType' + default: SIMPLE + hasCustomLabel: + default: false + title: Hascustomlabel + type: boolean + label: + title: Label + type: string + optionName: + anyOf: + - type: string + - type: 'null' + title: Optionname + sqlExpression: + anyOf: + - type: string + - type: 'null' + title: Sqlexpression + required: + - label + - column + title: SupersetAdhocMetric + type: object + SupersetAdhocMetric-Output: properties: aggregate: $ref: '#/components/schemas/SupersetAggregate' @@ -279,7 +1049,7 @@ components: charts: anyOf: - items: - $ref: '#/components/schemas/SupersetChartDef' + $ref: '#/components/schemas/SupersetChartDef-Output' type: array - type: 'null' title: Charts @@ -300,7 +1070,7 @@ components: datasets: anyOf: - items: - $ref: '#/components/schemas/SupersetDatasetDef' + $ref: '#/components/schemas/SupersetDatasetDef-Output' type: array - type: 'null' title: Datasets @@ -308,7 +1078,83 @@ components: $ref: '#/components/schemas/SupersetMetadataDef' title: SupersetAssetsDef type: object - SupersetChartDef: + SupersetChartDef-Input: + properties: + cache_timeout: + anyOf: + - type: integer + - type: 'null' + title: Cache Timeout + certification_details: + anyOf: + - type: string + - type: 'null' + title: Certification Details + certified_by: + anyOf: + - type: string + - type: 'null' + title: Certified By + dataset_uuid: + description: Better annotation for UUID. Parses from string format, serializes + to string format. + format: uuid + title: Dataset Uuid + type: string + description: + anyOf: + - type: string + - type: 'null' + title: Description + external_url: + anyOf: + - description: Better annotation for AnyUrl. Parses from string format, + serializes to string format. + format: uri + minLength: 1 + type: string + - type: 'null' + title: External Url + is_managed_externally: + default: false + title: Is Managed Externally + type: boolean + params: + anyOf: + - $ref: '#/components/schemas/ChartParams-Input' + - type: object + title: Params + query_context: + anyOf: + - contentMediaType: application/json + contentSchema: {} + type: string + - $ref: '#/components/schemas/QueryContext-Input' + - type: 'null' + title: Query Context + slice_name: + title: Slice Name + type: string + uuid: + description: Better annotation for UUID. Parses from string format, serializes + to string format. + format: uuid + title: Uuid + type: string + version: + default: 1.0.0 + title: Version + type: string + viz_type: + $ref: '#/components/schemas/SupersetVizType' + required: + - uuid + - slice_name + - viz_type + - dataset_uuid + title: SupersetChartDef + type: object + SupersetChartDef-Output: properties: cache_timeout: anyOf: @@ -351,7 +1197,7 @@ components: type: boolean params: anyOf: - - $ref: '#/components/schemas/ChartParams' + - $ref: '#/components/schemas/ChartParams-Output' - type: object title: Params query_context: @@ -411,38 +1257,108 @@ components: type: boolean id: anyOf: - - type: integer + - type: integer + - type: 'null' + title: Id + is_active: + default: true + title: Is Active + type: boolean + is_dttm: + default: false + title: Is Dttm + type: boolean + python_date_format: + anyOf: + - type: string + - type: 'null' + title: Python Date Format + type: + default: VARCHAR + title: Type + type: string + type_generic: + $ref: '#/components/schemas/GenericDataType' + default: 1 + verbose_name: + anyOf: + - type: string + - type: 'null' + title: Verbose Name + required: + - column_name + title: SupersetColumn + type: object + SupersetDashboardDef: + properties: + certification_details: + anyOf: + - type: string + - type: 'null' + title: Certification Details + certified_by: + anyOf: + - type: string + - type: 'null' + title: Certified By + css: + anyOf: + - type: string + - type: 'null' + title: Css + dashboard_title: + title: Dashboard Title + type: string + description: + anyOf: + - type: string + - type: 'null' + title: Description + external_url: + anyOf: + - description: Better annotation for AnyUrl. Parses from string format, + serializes to string format. + format: uri + minLength: 1 + type: string + - type: 'null' + title: External Url + is_managed_externally: + anyOf: + - type: boolean + - type: 'null' + default: false + title: Is Managed Externally + metadata: + title: Metadata + type: object + position: + title: Position + type: object + published: + anyOf: + - type: boolean - type: 'null' - title: Id - is_active: - default: true - title: Is Active - type: boolean - is_dttm: default: false - title: Is Dttm - type: boolean - python_date_format: - title: Python Date Format - type: string - type: - default: VARCHAR - title: Type - type: string - type_generic: - $ref: '#/components/schemas/GenericDataType' - default: 1 - verbose_name: + title: Published + slug: anyOf: - type: string - type: 'null' - title: Verbose Name + title: Slug + uuid: + description: Better annotation for UUID. Parses from string format, serializes + to string format. + format: uuid + title: Uuid + type: string + version: + default: 1.0.0 + title: Version + type: string required: - - column_name - title: SupersetColumn - type: object - SupersetDashboardDef: - properties: {} + - uuid + - dashboard_title title: SupersetDashboardDef type: object SupersetDatabaseDef: @@ -512,7 +1428,106 @@ components: - uuid title: SupersetDatabaseDef type: object - SupersetDatasetDef: + SupersetDatasetDef-Input: + properties: + always_filter_main_dttm: + default: false + title: Always Filter Main Dttm + type: boolean + cache_timeout: + anyOf: + - type: string + - type: 'null' + title: Cache Timeout + catalog: + anyOf: + - type: string + - type: 'null' + title: Catalog + columns: + items: + $ref: '#/components/schemas/SupersetColumn' + title: Columns + type: array + database_uuid: + description: Better annotation for UUID. Parses from string format, serializes + to string format. + format: uuid + title: Database Uuid + type: string + default_endpoint: + anyOf: + - type: string + - type: 'null' + title: Default Endpoint + description: + anyOf: + - type: string + - type: 'null' + title: Description + extra: + title: Extra + type: object + fetch_values_predicate: + anyOf: + - type: string + - type: 'null' + title: Fetch Values Predicate + filter_select_enabled: + default: true + title: Filter Select Enabled + type: boolean + main_dttm_col: + anyOf: + - type: string + - type: 'null' + title: Main Dttm Col + metrics: + items: + $ref: '#/components/schemas/SupersetMetric' + title: Metrics + type: array + normalize_columns: + default: false + title: Normalize Columns + type: boolean + offset: + default: 0 + title: Offset + type: integer + params: + title: Params + schema: + title: Schema + type: string + sql: + anyOf: + - type: string + - type: 'null' + title: Sql + table_name: + title: Table Name + type: string + template_params: + title: Template Params + uuid: + description: Better annotation for UUID. Parses from string format, serializes + to string format. + format: uuid + title: Uuid + type: string + version: + default: 1.0.0 + title: Version + type: string + required: + - table_name + - schema + - uuid + - database_uuid + title: SupersetDatasetDef + type: object + SupersetDatasetDef-Output: properties: always_filter_main_dttm: default: false @@ -611,6 +1626,32 @@ components: - database_uuid title: SupersetDatasetDef type: object + SupersetDatasourceBundle-Input: + properties: + database: + $ref: '#/components/schemas/SupersetDatabaseDef' + datasets: + items: + $ref: '#/components/schemas/SupersetDatasetDef-Input' + title: Datasets + type: array + required: + - database + title: SupersetDatasourceBundle + type: object + SupersetDatasourceBundle-Output: + properties: + database: + $ref: '#/components/schemas/SupersetDatabaseDef' + datasets: + items: + $ref: '#/components/schemas/SupersetDatasetDef-Output' + title: Datasets + type: array + required: + - database + title: SupersetDatasourceBundle + type: object SupersetMetadataDef: properties: timestamp: @@ -673,6 +1714,104 @@ components: - expression title: SupersetMetric type: object + SupersetMitMDatasetBundle-Input: + properties: + datasource_bundle: + $ref: '#/components/schemas/SupersetDatasourceBundle-Input' + mitm_dataset: + $ref: '#/components/schemas/SupersetMitMDatasetDef' + visualization_bundle: + $ref: '#/components/schemas/SupersetVisualizationBundle-Input' + required: + - mitm_dataset + - datasource_bundle + title: SupersetMitMDatasetBundle + type: object + SupersetMitMDatasetBundle-Output: + properties: + datasource_bundle: + $ref: '#/components/schemas/SupersetDatasourceBundle-Output' + mitm_dataset: + $ref: '#/components/schemas/SupersetMitMDatasetDef' + visualization_bundle: + $ref: '#/components/schemas/SupersetVisualizationBundle-Output' + required: + - mitm_dataset + - datasource_bundle + title: SupersetMitMDatasetBundle + type: object + SupersetMitMDatasetDef: + properties: + database_uuid: + description: Better annotation for UUID. Parses from string format, serializes + to string format. + format: uuid + title: Database Uuid + type: string + dataset_name: + title: Dataset Name + type: string + mitm: + $ref: '#/components/schemas/MITM' + uuid: + description: Better annotation for UUID. Parses from string format, serializes + to string format. + format: uuid + title: Uuid + type: string + version: + default: 1.0.0 + title: Version + type: string + required: + - uuid + - dataset_name + - mitm + - database_uuid + title: SupersetMitMDatasetDef + type: object + SupersetPostProcessing-Input: + properties: {} + title: SupersetPostProcessing + type: object + SupersetPostProcessing-Output: + properties: + operation: + readOnly: true + title: Operation + type: string + required: + - operation + title: SupersetPostProcessing + type: object + SupersetVisualizationBundle-Input: + properties: + charts: + items: + $ref: '#/components/schemas/SupersetChartDef-Input' + title: Charts + type: array + dashboards: + items: + $ref: '#/components/schemas/SupersetDashboardDef' + title: Dashboards + type: array + title: SupersetVisualizationBundle + type: object + SupersetVisualizationBundle-Output: + properties: + charts: + items: + $ref: '#/components/schemas/SupersetChartDef-Output' + title: Charts + type: array + dashboards: + items: + $ref: '#/components/schemas/SupersetDashboardDef' + title: Dashboards + type: array + title: SupersetVisualizationBundle + type: object SupersetVizType: enum: - pie @@ -733,7 +1872,7 @@ openapi: 3.1.0 paths: /: get: - operationId: root + operationId: root__get responses: '200': content: @@ -741,33 +1880,53 @@ paths: schema: {} description: Successful Response summary: Root - /definitions/database_def: + /definitions/mitm_dataset: post: - operationId: generate_dataset_def + operationId: generate_mitm_dataset_def parameters: - in: query - name: name + name: dataset_name required: true schema: - title: Name + title: Dataset Name type: string - - in: query - name: mitm + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Header' required: true - schema: - $ref: '#/components/schemas/MITM' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MitMDatasetImportResponse' + description: Successful Response + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + summary: Generate Mitm Dataset Def + tags: + - definitions + /definitions/mitm_viz: + post: + operationId: generate_mitm_viz_def requestBody: content: - multipart/form-data: + application/json: schema: - $ref: '#/components/schemas/Body_generate_dataset_def_definitions_database_def_post' + $ref: '#/components/schemas/Body_generate_mitm_viz_def_definitions_mitm_viz_post' required: true responses: '200': content: application/json: schema: - $ref: '#/components/schemas/ImportMitMResponse' + $ref: '#/components/schemas/MitMVisualizationResponse' description: Successful Response '422': content: @@ -775,30 +1934,55 @@ paths: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error - summary: Generate Dataset Def + summary: Generate Mitm Viz Def tags: - definitions - /definitions/mitm: + /upload/mitm_dataset: post: - operationId: generate_mitm_def + operationId: upload_mitm_dataset + parameters: + - in: query + name: dataset_identifier + required: true + schema: + title: Dataset Identifier + type: string + - in: query + name: mitm + required: false + schema: + $ref: '#/components/schemas/MITM' + default: MAED + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/Body_upload_mitm_dataset_upload_mitm_dataset_post' + required: true responses: '200': content: application/json: schema: {} description: Successful Response - summary: Generate Mitm Def + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + summary: Upload Mitm Dataset tags: - - definitions - /upload/upload: + - upload + /upload/mitm_datasets: get: - operationId: upload + operationId: get_mitm_datasets responses: '200': content: application/json: schema: {} description: Successful Response - summary: Upload + summary: Get Mitm Datasets tags: - upload -- GitLab