diff --git a/app/core/__init__.py b/app/core/__init__.py index 085c3894e0239863c4c905f2bdfac5843f2aa7c8..d850917ae5c98eb642b9413a5f234f73adf2bc07 100644 --- a/app/core/__init__.py +++ b/app/core/__init__.py @@ -3,6 +3,10 @@ import mitm_tooling # noinspection PyUnresolvedReferences from mitm_tooling import * # noinspection PyUnresolvedReferences +from mitm_tooling.data_types import * +# noinspection PyUnresolvedReferences +from mitm_tooling.definition import * +# noinspection PyUnresolvedReferences from mitm_tooling.extraction.sql.data_models import * # noinspection PyUnresolvedReferences from mitm_tooling.extraction.sql.data_models.base import * @@ -13,25 +17,22 @@ from mitm_tooling.extraction.sql.mapping import * # noinspection PyUnresolvedReferences from mitm_tooling.extraction.sql.transformation import * # noinspection PyUnresolvedReferences -from mitm_tooling.data_types import * -# noinspection PyUnresolvedReferences -from mitm_tooling.definition import * +from mitm_tooling.io import * # noinspection PyUnresolvedReferences from mitm_tooling.representation import * # noinspection PyUnresolvedReferences -from mitm_tooling.io import * -# noinspection PyUnresolvedReferences from mitm_tooling.utilities import * __all__ = [ MITMDataType, SA_SQLTypeName, MITM, MITMDefinition, get_mitm_def, mitm_definitions, ExplicitTableSelection, ExplicitColumnSelection, DBMetaQuery, - ConceptMapping, GroupValidationResult, MappingExport, - ForeignKeyConstraintBase, + ConceptMapping, MappingGroupValidationContext, GroupValidationResult, MappingExport, + ForeignKeyConstraintBase, add_foreign_key_constraint, SchemaName, TableName, SourceDBType, TableMetaInfoBase, DBMetaInfoBase, TableProbeBase, DBProbeBase, VirtualViewBase, VirtualDBBase, DBProbe, DBMetaInfo, VirtualDB, + StandaloneDBMapping, DBMapping, VirtualDBCreation, VirtualViewCreation ] diff --git a/app/dependencies/db_dependencies.py b/app/dependencies/db_dependencies.py index 2af155d1e073b51bf4fa3362f92643d3a4f45af6..962a7cd3f8160d41d2c30c83c5ca343b0877ec4e 100644 --- a/app/dependencies/db_dependencies.py +++ b/app/dependencies/db_dependencies.py @@ -1,5 +1,5 @@ import logging -from typing import Annotated +from typing import Annotated, Any, Generator from fastapi import Depends from sqlalchemy.orm import Session @@ -41,12 +41,12 @@ WorkingDBConnStateDependency = Annotated[DBConnectionState, Depends(get_working_ WorkingDBMetaStateDependency = Annotated[DBMetadataState, Depends(get_working_db_meta_state)] -def get_db_session(db_conn_state: DBConnStateDependency) -> Session: +def get_db_session(db_conn_state: DBConnStateDependency) -> Generator[Session, Any, None]: with db_conn_state.DBSession() as sess: yield sess -def get_working_db_session(db_conn_state: WorkingDBConnStateDependency) -> Session: +def get_working_db_session(db_conn_state: WorkingDBConnStateDependency) -> Generator[Session, Any, None]: with db_conn_state.DBSession() as sess: yield sess diff --git a/app/logic/mitm.py b/app/logic/mitm.py index 9924bb6ab1ce20064dcce66001648a17d7b2c12c..37f60425e7aebb239cdbdfd0f3f33dd4b887bb68 100644 --- a/app/logic/mitm.py +++ b/app/logic/mitm.py @@ -1,13 +1,13 @@ import pathlib from fastapi import HTTPException -from mitm_tooling.extraction.sql.data_models import SourceDBType +from app.core import SourceDBType from starlette import status from app.dependencies import DBSessionDependency from app.models.export import MappingExportRequest -from app.core import Exportable, ConceptMapping, GroupValidationResult -from app.core import validation_models, mapping +from app.core import Exportable, ConceptMapping, GroupValidationResult, MappingGroupValidationContext +from app.core import validation_models, concept_mapping from app.core import python_utils from app.state.db_state import DBMetadataState @@ -19,7 +19,7 @@ async def create_exportable(source_db_meta_state: DBMetadataState, virtual_db_me try: return request.apply(db_metas={SourceDBType.OriginalDB: source_db_meta_state.current_meta, SourceDBType.VirtualDB: virtual_db_meta_state.current_meta}) - except mapping.ConceptMappingException as e: + except concept_mapping.ConceptMappingException as e: raise HTTPException(status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=str(e)) @@ -31,7 +31,7 @@ async def validate_mappings(source_db_meta_state: DBMetadataState, virtual_db_me per_mitm = python_utils.grouped(((cm.mitm, cm) for cm in concept_mappings)) for mitm, cms in per_mitm.items(): - ctxt = mapping.MappingGroupValidationContext.for_mitm(mitm=mitm, db_metas={ + ctxt = MappingGroupValidationContext.for_mitm(mitm=mitm, db_metas={ SourceDBType.OriginalDB: source_db_meta_state.current_meta, SourceDBType.VirtualDB: virtual_db_meta_state.current_meta}) for cm in cms: diff --git a/app/models/export.py b/app/models/export.py index 835f1b82deeec6052f148469b109601080013f91..b2764bc0ec4af172bc6cc2e04d86354708b48e25 100644 --- a/app/models/export.py +++ b/app/models/export.py @@ -1,4 +1,12 @@ -from app.core import MappingExport +import pydantic + +from app.core import MappingExport, ConceptMapping, MITM, VirtualViewCreation + + +class DBMappingExportRequest(pydantic.BaseModel): + mitm: MITM + concept_mappings: list[ConceptMapping] + virtual_view_creations: list[VirtualViewCreation] = pydantic.Field(default_factory=list) class MappingExportRequest(MappingExport): diff --git a/app/models/mitm.py b/app/models/mitm.py index 127595d3cbed5673ce7a654d7eab27e3e8e8d59b..4d43d866228b9a7f9f3f6bad625c6885c22afe78 100644 --- a/app/models/mitm.py +++ b/app/models/mitm.py @@ -11,11 +11,6 @@ class MitMDataTypeInfo(pydantic.BaseModel): MitMDataTypesInfo = dict[MITMDataType, MitMDataTypeInfo] -class MappingGroupValidationResult(pydantic.BaseModel): - #evaluated_mappings: list[ConceptMapping] | None = None - validation_result: GroupValidationResult - - class PublishedMitMResponse(pydantic.BaseModel): url: HttpUrl relative_uri: str diff --git a/app/routers/control.py b/app/routers/control.py index 9d271a1a31f47b4bb481c906bf9597251a8b23a3..d98f0dc3d8edecf47d9eac4fcc7115dfcce7c828 100644 --- a/app/routers/control.py +++ b/app/routers/control.py @@ -1,20 +1,18 @@ import logging -import pydantic from fastapi import APIRouter from fastapi import HTTPException +from mitm_tooling.extraction.sql.transformation import VirtualDBCreation from starlette import status - -from mitm_tooling.extraction.sql.data_models import SourceDBType, SchemaName, TableName, CompiledVirtualView, \ - DBMetaInfo, VirtualView -from mitm_tooling.extraction.sql.db import add_foreign_key_constraint -from app.models.foreign_key import FKCreationResponse, FKCreationRequest -from app.models.virtual_view import VirtualViewResponse, VirtualViewCreationRequest +from app.core import SourceDBType, SchemaName, TableName, CompiledVirtualView, \ + DBMetaInfo, VirtualView, CompiledVirtualDB, add_foreign_key_constraint from app.dependencies import SessionDependency, DBConnStateDependency, DBMetaStateDependency, DBStateDependency, \ DBSessionDependency from app.dependencies.virtual_db_dependencies import VirtualDBStateDependency -from app.state_accessors.retrievers import retrieve_virtual_view, retrieve_virtual_views +from app.models.foreign_key import FKCreationResponse, FKCreationRequest +from app.models.virtual_view import VirtualViewResponse, VirtualViewCreationRequest +from app.state_accessors.retrievers import retrieve_virtual_view, retrieve_virtual_views, retrieve_virtual_db from app.state_mutators.db_state_mutators import create_and_store_working_db, create_and_store_db_reflection, \ update_db_reflection_inplace from app.state_mutators.virtual_db_state_mutators import create_and_store_virtual_view, drop_virtual_view_from_state, \ @@ -35,7 +33,6 @@ async def init_working_db(session: SessionDependency): await create_and_store_working_db(session) - @router.post('/mark-foreign-key') async def mark_foreign_key(source_db_state: DBStateDependency, virtual_db_state: VirtualDBStateDependency, foreign_key: FKCreationRequest, @@ -100,11 +97,18 @@ async def get_compiled_virtual_view(virtual_db_state: VirtualDBStateDependency, return vv.as_compiled(db_conn_state.engine.dialect) -@router.get('/compiled-virtual-views') -async def get_compiled_virtual_views(virtual_db_state: VirtualDBStateDependency, - db_conn_state: DBConnStateDependency) -> list[CompiledVirtualView]: - vvs = await retrieve_virtual_views(virtual_db_state) - return [vv.as_compiled(db_conn_state.engine.dialect) for vv in vvs.values()] +@router.get('/compiled-virtual-db') +async def get_compiled_virtual_db(virtual_db_state: VirtualDBStateDependency, + db_conn_state: DBConnStateDependency) -> CompiledVirtualDB: + vdb = await retrieve_virtual_db(virtual_db_state) + return vdb.as_compiled(db_conn_state.engine.dialect) + + +@router.get('/virtual-db-creation') +async def get_virtual_db_creation(virtual_db_state: VirtualDBStateDependency, + db_conn_state: DBConnStateDependency) -> VirtualDBCreation: + vdb = await retrieve_virtual_db(virtual_db_state) + return VirtualDBCreation.from_virtual_db(vdb, db_conn_state.engine.dialect) @router.put('/virtual-views-batch', response_model=list[VirtualViewResponse]) diff --git a/app/routers/mitm.py b/app/routers/mitm.py index 9b1e40c2fe8ec113024e01131c5611d16680f3d4..3fb6f762e489e17132a735dec4df0bd550264c5b 100644 --- a/app/routers/mitm.py +++ b/app/routers/mitm.py @@ -1,18 +1,20 @@ import logging -from fastapi import APIRouter, BackgroundTasks +from fastapi import APIRouter, BackgroundTasks, HTTPException from pydantic import HttpUrl from starlette.background import BackgroundTask from starlette.requests import Request -from starlette.responses import Response +from starlette.responses import Response, StreamingResponse -from app.dependencies import DBSessionDependency, DBMetaStateDependency, SessionDependency +from app.core import GroupValidationResult +from app.core import StandaloneDBMapping +from app.core import VirtualDBCreation +from app.dependencies import DBSessionDependency, DBMetaStateDependency, SessionDependency, DBConnStateDependency from app.dependencies.virtual_db_dependencies import VirtualDBStateDependency from app.export_tools.file_utils import create_session_folder, delete_session_folder from app.logic.mitm import create_exportable, validate_mappings, exec_export_to_zip_file -from app.models.export import MappingExportRequest -from app.models.mitm import ConceptMappingRequest -from app.models.mitm import MappingGroupValidationResult, PublishedMitMResponse +from app.models.export import MappingExportRequest, DBMappingExportRequest +from app.models.mitm import ConceptMappingRequest, PublishedMitMResponse logger = logging.getLogger('api') @@ -22,24 +24,71 @@ router = APIRouter(prefix='/mitm', tags=['mitm']) @router.post('/validate-concept-mappings') async def validate_concept_mappings(source_db_meta_state: DBMetaStateDependency, virtual_db_state: VirtualDBStateDependency, - concept_mappings: list[ConceptMappingRequest]) -> MappingGroupValidationResult: + concept_mappings: list[ConceptMappingRequest]) -> GroupValidationResult: result = await validate_mappings(source_db_meta_state, virtual_db_state.to_db_meta_state(), concept_mappings) logger.info('Validated a concept mappings:\n' + str(result)) - return MappingGroupValidationResult(validation_result=result) - - -@router.post('/export-mitm', response_class=Response) -async def export_mitm(db_session: DBSessionDependency, source_db_meta_state: DBMetaStateDependency, - virtual_db_state: VirtualDBStateDependency, request: MappingExportRequest) -> Response: + return result + + +@router.post('/export-standalone-db-mapping') +async def export_standalone_db_mapping(source_db_meta_state: DBMetaStateDependency, + virtual_db_state: VirtualDBStateDependency, + db_conn_state: DBConnStateDependency, + request: DBMappingExportRequest, + include_virtual_db: bool = True, + validate: bool = True) -> StandaloneDBMapping: + from .control import get_compiled_virtual_db + + if validate: + gvr = await validate_mappings(source_db_meta_state, + virtual_db_state.to_db_meta_state(), + request.concept_mappings) + if not gvr.is_valid: + raise HTTPException(400, f'The concept mappings are not valid: {gvr.individual_validations}') + + if include_virtual_db: + vdbc = await get_compiled_virtual_db(virtual_db_state, db_conn_state) + virtual_db_creation = VirtualDBCreation.from_compiled(vdbc) + else: + virtual_db_creation = VirtualDBCreation() + + virtual_db_creation.virtual_view_creations.extend(request.virtual_view_creations) + + # error-prone handling of post-processing transforms + # pp_dict = defaultdict(list) + # for pp in request.post_processing.table_postprocessing: + # ti = TableIdentifier.from_any(pp.target_table) + # if ti.source == SourceDBType.VirtualDB: + # pp_dict[ti.as_tuple()].append(pp.transforms) + + # for vvc in virtual_db_creation.virtual_view_creations: + # if pps := pp_dict.get(vvc.table_identifier.as_tuple()): + # vvc.transforms = list(itertools.chain(*pps)) + + return StandaloneDBMapping(mitm=request.mitm, + concept_mappings=request.concept_mappings, + virtual_db_creation=virtual_db_creation) + + +@router.post('/export-mitm', response_class=StreamingResponse) +async def export_mitm(db_session: DBSessionDependency, + source_db_meta_state: DBMetaStateDependency, + virtual_db_state: VirtualDBStateDependency, + request: MappingExportRequest, + use_streaming: bool = False) -> StreamingResponse: exportable = await create_exportable(source_db_meta_state, virtual_db_state.to_db_meta_state(), request) - export = exportable.execute_to_memory(db_session) - buf = export.to_buffer() - byts = buf.getvalue() - headers = {'Content-Disposition': f'attachment; filename="{export.filename}"', - "Content-Length": str(len(byts))} - - return Response(byts, headers=headers, media_type='application/zip') + export = exportable.export_to_memory(db_session) + if use_streaming: + ze = exportable.export_as_stream(db_session) + data = ze.iter_bytes() + else: + ze = exportable.export_to_memory(db_session) + data = ze.to_buffer() + headers = {'Content-Disposition': f'attachment; filename="{export.filename}"'} + return StreamingResponse(data, + #media_type='application/zip', + headers=headers) @router.post('/publish-mitm-export') @@ -49,7 +98,7 @@ async def publish_mitm_export(session: SessionDependency, db_session: DBSessionD background_tasks: BackgroundTasks, request: MappingExportRequest, req: Request, - use_streaming_export: bool = False) -> PublishedMitMResponse: + use_streaming: bool = False) -> PublishedMitMResponse: current_url = str(req.url) base_url = current_url.rsplit(router.prefix + '/publish-mitm-export')[0] logger.info(f'Received (publish) export request from {current_url}.') @@ -63,7 +112,7 @@ async def publish_mitm_export(session: SessionDependency, db_session: DBSessionD export_uri = export_uri + f'/{exportable.filename}' background_tasks.add_task( - BackgroundTask(exec_export_to_zip_file, exportable, db_session, export_folder, stream=use_streaming_export)) + BackgroundTask(exec_export_to_zip_file, exportable, db_session, export_folder, stream=use_streaming)) logger.info(f'Created asynchronous export task for export_id {export_id} under link {base_url + "/" + export_uri}.') deletion_rel_path = router.url_path_for('delete_mitm_export') @@ -74,7 +123,10 @@ async def publish_mitm_export(session: SessionDependency, db_session: DBSessionD @router.post('/delete-mitm-export') async def delete_mitm_export(session: SessionDependency, background_tasks: BackgroundTasks, export_id: int): - background_tasks.add_task(BackgroundTask(delete_session_folder, session.session_id, folder_kind='exports', subfolder_id=export_id)) + background_tasks.add_task(BackgroundTask(delete_session_folder, + session.session_id, + folder_kind='exports', + subfolder_id=export_id)) @router.post('/delete-mitm-exports') diff --git a/app/state_accessors/retrievers.py b/app/state_accessors/retrievers.py index 2902f71343195f6790050d4e1a3c4b45ce2d2b69..dbef43f44bf4f0dc78a9eb5e92ad9f037ea2e8d4 100644 --- a/app/state_accessors/retrievers.py +++ b/app/state_accessors/retrievers.py @@ -4,7 +4,7 @@ from typing import TypeVar, Callable from fastapi import HTTPException from starlette import status -from app.core import TableMetaInfo, TableProbe, VirtualView, TableName, ShortTableIdentifier, SchemaName +from app.core import TableMetaInfo, TableProbe, VirtualView, TableName, ShortTableIdentifier, SchemaName, VirtualDB from app.core import sql_utils from app.state.db_state import DBMetadataState, DBProbeState from app.state.virtual_db_state import VirtualDBState @@ -49,6 +49,9 @@ async def retrieve_virtual_view(virtual_db_state: VirtualDBState, schema: Schema detail=f'Table {sql_utils.qualify(schema=schema, table=view)} is not present in virtual DB ({virtual_db_state.virtual_db.virtual_views}).') ) +async def retrieve_virtual_db(virtual_db_state: VirtualDBState, skip_locking: bool = False) -> VirtualDB: + return await retrieve(lambda: virtual_db_state.virtual_db, + lock=(virtual_db_state.lock if not skip_locking else None)) async def retrieve_virtual_views(virtual_db_state: VirtualDBState, skip_locking: bool = False) -> dict[ ShortTableIdentifier, VirtualView]: diff --git a/app/state_mutators/virtual_db_state_mutators.py b/app/state_mutators/virtual_db_state_mutators.py index d8797d0676ccaf620b1a339087cb8fb571650f89..2680dcc2b21b863cda43248e90d6b47c16c8aac8 100644 --- a/app/state_mutators/virtual_db_state_mutators.py +++ b/app/state_mutators/virtual_db_state_mutators.py @@ -3,7 +3,7 @@ from typing import Callable import sqlalchemy as sa -from app.core import python_utils, DBMetaInfo, VirtualView, TableName, SchemaName, SourceDBType, test_query, make_virtual_view +from app.core import python_utils, DBMetaInfo, VirtualView, TableName, SchemaName, SourceDBType, test_query from app.dependencies.virtual_db_dependencies import VirtualDBStateDependency from app.models.virtual_view import VirtualViewCreationRequest from app.state.virtual_db_state import VirtualDBState @@ -36,23 +36,24 @@ async def create_and_store_virtual_view(db_session: sa.orm.Session, virtual_db_s virtual_db = virtual_db_state.virtual_db if not override_if_exists and ( - vv := virtual_db.get_view(vv_creation_request.schema_name, vv_creation_request.name)): + vv := virtual_db.get_view(vv_creation_request.schema_name, vv_creation_request.name)): raise VirtualViewExists( f'The Virtual View {vv_creation_request.schema_name}.{vv_creation_request.name} already exists.') - queryable_verifier = lambda q: test_query(db_session, q) if verify_immediately else None # this updates sa_meta inplace by table creation # throws exception - vv = make_virtual_view( - {SourceDBType.OriginalDB: source_db_meta, SourceDBType.VirtualDB: virtual_db.to_db_meta_info()}, - vv_creation_request, - override_if_exists=override_if_exists, queryable_verifier=queryable_verifier) + vv = vv_creation_request.apply({ + SourceDBType.OriginalDB: source_db_meta, + SourceDBType.VirtualDB: virtual_db.to_db_meta_info()}, + override_if_exists=override_if_exists, + queryable_verifier=queryable_verifier) if vv is not None: virtual_db.put_view(vv) virtual_db_state.db_probe.current_probe.update_meta(virtual_db.to_db_meta_info()) return vv + return None async def drop_virtual_view_from_state(virtual_db_state: VirtualDBState, schema: SchemaName, view: TableName): diff --git a/forks/eralchemy b/forks/eralchemy index 54c01ea771f8d31d15b96bce5ec2061d92dc2c97..9d85aa338928c2a0903d3f5b1ce9aa39e2afe850 160000 --- a/forks/eralchemy +++ b/forks/eralchemy @@ -1 +1 @@ -Subproject commit 54c01ea771f8d31d15b96bce5ec2061d92dc2c97 +Subproject commit 9d85aa338928c2a0903d3f5b1ce9aa39e2afe850 diff --git a/pyproject.toml b/pyproject.toml index 4c4ed15bebf4d5464649d8c68b5029bb05278a05..a13cdac37a977d289edb356bfce99d7ae8e07a6b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,6 +38,7 @@ default-groups = ["test"] [tool.uv.sources] eralchemy = { path = "forks/eralchemy", editable = true } +mitm-tooling = { git = "https://git-ce.rwth-aachen.de/machine-data/mitm-tooling.git", branch = "develop" } [build-system] requires = ["hatchling"] diff --git a/schema/gen_open_api_schema.py b/schema/gen_open_api_schema.py index af6d5a8a9918adbae23908caabfe1bd9ec891fb7..6642fef598d17acd1a26a58b6fe411098b1796f7 100644 --- a/schema/gen_open_api_schema.py +++ b/schema/gen_open_api_schema.py @@ -37,4 +37,7 @@ with open('openapi.json', 'w') as f: openapi_version=app.openapi_version, description=app.description, routes=app.routes - ), f) \ No newline at end of file + ), f) +with open('standalone-mapping-schema.yaml', 'w') as f: + from mitm_tooling.extraction.sql.mapping import StandaloneDBMapping + yaml.dump(StandaloneDBMapping.model_json_schema(by_alias=True), f) \ No newline at end of file diff --git a/schema/openapi.json b/schema/openapi.json index aec619a8fec3aecf6eea7cf8f957fd875e64f258..c4a4e6d68482b77a1fa56e75969e47d7d982a247 100644 --- a/schema/openapi.json +++ b/schema/openapi.json @@ -1 +1 @@ -{"openapi": "3.1.0", "info": {"title": "MitMExtractorBackend", "version": "0.1.0"}, "paths": {"/admin/clear-sessions": {"post": {"tags": ["admin"], "summary": "Clear Sessions", "operationId": "clear_sessions", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/admin/active-sessions": {"get": {"tags": ["admin"], "summary": "Get Active Sessions", "operationId": "get_active_sessions", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"additionalProperties": {"type": "string", "format": "date-time"}, "propertyNames": {"format": "uuid"}, "type": "object", "title": "Response Get Active Sessions Admin Active Sessions Get"}}}}}}}, "/admin/clear-exports": {"post": {"tags": ["admin"], "summary": "Clear Exports", "operationId": "clear_exports", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/admin/clear-uploads": {"post": {"tags": ["admin"], "summary": "Clear Uploads", "operationId": "clear_uploads", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/definitions/mitms": {"get": {"tags": ["definitions"], "summary": "Get Mitms", "operationId": "get_mitms", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/MITM"}, "type": "array", "title": "Response Get Mitms Definitions Mitms Get"}}}}}}}, "/definitions/mitm-definition": {"get": {"tags": ["definitions"], "summary": "Get Mitm Definition", "operationId": "get_mitm_definition", "parameters": [{"name": "mitm", "in": "query", "required": true, "schema": {"$ref": "#/components/schemas/MITM"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MITMDefinition"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm-data-types": {"get": {"tags": ["definitions"], "summary": "Get Mitm Data Types", "operationId": "get_mitm_data_types", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"additionalProperties": {"$ref": "#/components/schemas/MitMDataTypeInfo"}, "propertyNames": {"$ref": "#/components/schemas/MITMDataType"}, "type": "object", "title": "Response Get Mitm Data Types Definitions Mitm Data Types Get"}}}}}}}, "/session/start-session": {"post": {"tags": ["session"], "summary": "Start Session", "operationId": "start_session", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SessionIdResponse"}}}}}}}, "/session/get-session": {"get": {"tags": ["session"], "summary": "Get Session", "operationId": "get_session", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SessionIdResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/session/stop-session": {"post": {"tags": ["session"], "summary": "Stop Session", "operationId": "stop_session", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/session/upload-db": {"post": {"tags": ["session"], "summary": "Upload Db", "operationId": "upload_db", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"multipart/form-data": {"schema": {"$ref": "#/components/schemas/Body_upload_db_session_upload_db_post"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/session/connect-db": {"post": {"tags": ["session"], "summary": "Connect Db", "operationId": "connect_db", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Body_connect_db_session_connect_db_post"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/session/test-db-conn": {"get": {"tags": ["session"], "summary": "Test Db Conn", "operationId": "test_db_conn", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBConnTestResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/session/keep-alive": {"get": {"tags": ["session"], "summary": "Keep Alive", "operationId": "keep_alive", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/KeepAliveResponse"}}}}}}}, "/control/reflect-db": {"post": {"tags": ["control"], "summary": "Reflect Db", "operationId": "reflect_db", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/init-working-db": {"post": {"tags": ["control"], "summary": "Init Working Db", "operationId": "init_working_db", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/mark-foreign-key": {"post": {"tags": ["control"], "summary": "Mark Foreign Key", "operationId": "mark_foreign_key", "parameters": [{"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FKCreationRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FKCreationResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/virtual-view": {"put": {"tags": ["control"], "summary": "Create Virtual View", "operationId": "create_virtual_view", "parameters": [{"name": "override_if_exists", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Override If Exists"}}, {"name": "verify_immediately", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Verify Immediately"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VirtualViewCreationRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VirtualViewResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["control"], "summary": "Get Virtual View", "operationId": "get_virtual_view", "parameters": [{"name": "view", "in": "query", "required": true, "schema": {"type": "string", "title": "View"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "virtual", "title": "Schema"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VirtualViewResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["control"], "summary": "Drop Virtual View", "operationId": "drop_virtual_view", "parameters": [{"name": "view", "in": "query", "required": true, "schema": {"type": "string", "title": "View"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "virtual", "title": "Schema"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/virtual-views": {"get": {"tags": ["control"], "summary": "Get Virtual Views", "operationId": "get_virtual_views", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/VirtualViewResponse"}, "title": "Response Get Virtual Views Control Virtual Views Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/compiled-virtual-view": {"get": {"tags": ["control"], "summary": "Get Compiled Virtual View", "operationId": "get_compiled_virtual_view", "parameters": [{"name": "view", "in": "query", "required": true, "schema": {"type": "string", "title": "View"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "virtual", "title": "Schema"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CompiledVirtualView"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/compiled-virtual-views": {"get": {"tags": ["control"], "summary": "Get Compiled Virtual Views", "operationId": "get_compiled_virtual_views", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/CompiledVirtualView"}, "title": "Response Get Compiled Virtual Views Control Compiled Virtual Views Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/virtual-views-batch": {"put": {"tags": ["control"], "summary": "Create Virtual Views Batch", "operationId": "create_virtual_views_batch", "parameters": [{"name": "override_if_exists", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Override If Exists"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/VirtualViewCreationRequest"}, "title": "Requests"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/VirtualViewResponse"}, "title": "Response Create Virtual Views Batch Control Virtual Views Batch Put"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/raw-query": {"post": {"tags": ["data"], "summary": "Raw Query", "operationId": "raw_query", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Body_raw_query_data_raw_query_post"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"type": "array", "items": {}}, "title": "Response Raw Query Data Raw Query Post"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/query-table": {"get": {"tags": ["data"], "summary": "Query Table", "operationId": "query_table", "parameters": [{"name": "name", "in": "query", "required": true, "schema": {"type": "string", "title": "Name"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "main", "title": "Schema"}}, {"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "offset", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Offset"}}, {"name": "limit", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Limit"}}, {"name": "include_table_meta", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Include Table Meta"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableQueryResult"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/query-unique-values": {"get": {"tags": ["data"], "summary": "Query Unique Values", "operationId": "query_unique_values", "parameters": [{"name": "table", "in": "query", "required": true, "schema": {"type": "string", "title": "Table"}}, {"name": "column", "in": "query", "required": true, "schema": {"type": "string", "title": "Column"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "main", "title": "Schema"}}, {"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {}, "title": "Response Query Unique Values Data Query Unique Values Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/er-diagram": {"get": {"tags": ["data"], "summary": "Make Erd", "operationId": "make_erd", "parameters": [{"name": "version", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/ERVariant", "default": "mermaid"}}, {"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/filtered-er-diagram": {"post": {"tags": ["data"], "summary": "Make Filtered Erd", "operationId": "make_filtered_erd", "parameters": [{"name": "version", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/ERVariant", "default": "mermaid"}}, {"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBSchemaSelectionRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/table-schema": {"get": {"tags": ["reflection"], "summary": "Get Table Schema", "operationId": "get_table_schema", "parameters": [{"name": "name", "in": "query", "required": true, "schema": {"type": "string", "title": "Name"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "main", "title": "Schema"}}, {"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableMetaInfoResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/db-schema": {"get": {"tags": ["reflection"], "summary": "Get Db Schema", "operationId": "get_db_schema", "parameters": [{"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBMetaInfoResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/filter-db-schema": {"post": {"tags": ["reflection"], "summary": "Filter Db Schema", "operationId": "filter_db_schema", "parameters": [{"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBSchemaSelectionRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBMetaInfoResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/query-db-schema": {"post": {"tags": ["reflection"], "summary": "Query Db Schema", "operationId": "query_db_schema", "parameters": [{"name": "store_intermediate_table_probes", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Store Intermediate Table Probes"}}, {"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBSchemaQueryRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBMetaInfoResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/suggest-joins": {"get": {"tags": ["reflection"], "summary": "Suggest Joins", "operationId": "suggest_joins", "parameters": [{"name": "name", "in": "query", "required": true, "schema": {"type": "string", "title": "Name"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "main", "title": "Schema"}}, {"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"type": "array", "prefixItems": [{"type": "string"}, {"type": "string"}], "minItems": 2, "maxItems": 2}, "title": "Response Suggest Joins Reflection Suggest Joins Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/probe-table": {"post": {"tags": ["reflection"], "summary": "Probe Table", "operationId": "probe_table", "parameters": [{"name": "name", "in": "query", "required": true, "schema": {"type": "string", "title": "Name"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "main", "title": "Schema"}}, {"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "sample_size", "in": "query", "required": false, "schema": {"type": "integer", "default": 100, "title": "Sample Size"}}, {"name": "override_if_exists", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Override If Exists"}}, {"name": "store_results", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Store Results"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableProbeResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/probe-db": {"post": {"tags": ["reflection"], "summary": "Probe Db", "operationId": "probe_db", "parameters": [{"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "sample_size", "in": "query", "required": false, "schema": {"type": "integer", "default": 100, "title": "Sample Size"}}, {"name": "override_if_exists", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Override If Exists"}}, {"name": "store_results", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Store Results"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "additionalProperties": {"type": "array", "uniqueItems": true, "items": {"type": "string"}}, "title": "Table Selection"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBProbeResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/validate-concept-mappings": {"post": {"tags": ["mitm"], "summary": "Validate Concept Mappings", "operationId": "validate_concept_mappings", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/ConceptMappingRequest"}, "title": "Concept Mappings"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MappingGroupValidationResult"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/export-mitm": {"post": {"tags": ["mitm"], "summary": "Export Mitm", "operationId": "export_mitm", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MappingExportRequest"}}}}, "responses": {"200": {"description": "Successful Response"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/publish-mitm-export": {"post": {"tags": ["mitm"], "summary": "Publish Mitm Export", "operationId": "publish_mitm_export", "parameters": [{"name": "use_streaming_export", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Use Streaming Export"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MappingExportRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PublishedMitMResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/delete-mitm-export": {"post": {"tags": ["mitm"], "summary": "Delete Mitm Export", "operationId": "delete_mitm_export", "parameters": [{"name": "export_id", "in": "query", "required": true, "schema": {"type": "integer", "title": "Export Id"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/delete-mitm-exports": {"post": {"tags": ["mitm"], "summary": "Delete Mitm Exports", "operationId": "delete_mitm_exports", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/health": {"get": {"summary": "Check Health", "operationId": "check_health", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}}, "components": {"schemas": {"AddColumn": {"properties": {"operation": {"type": "string", "const": "add_column", "title": "Operation", "default": "add_column"}, "col_name": {"type": "string", "title": "Col Name"}, "value": {"title": "Value"}, "target_type": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}], "title": "Target Type"}}, "type": "object", "required": ["col_name", "value", "target_type"], "title": "AddColumn"}, "Body_connect_db_session_connect_db_post": {"properties": {"db_url": {"type": "string", "minLength": 1, "format": "uri", "title": "Db Url"}}, "type": "object", "required": ["db_url"], "title": "Body_connect_db_session_connect_db_post"}, "Body_raw_query_data_raw_query_post": {"properties": {"query": {"type": "string", "title": "Query"}}, "type": "object", "required": ["query"], "title": "Body_raw_query_data_raw_query_post"}, "Body_upload_db_session_upload_db_post": {"properties": {"sqlite": {"type": "string", "format": "binary", "title": "Sqlite", "description": "Upload a sqlite db file here."}}, "type": "object", "required": ["sqlite"], "title": "Body_upload_db_session_upload_db_post"}, "CastColumn": {"properties": {"operation": {"type": "string", "const": "cast_column", "title": "Operation", "default": "cast_column"}, "target_type": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}], "title": "Target Type"}}, "type": "object", "required": ["target_type"], "title": "CastColumn"}, "CategoricalSummaryStatistics": {"properties": {"count": {"type": "integer", "minimum": 0.0, "title": "Count"}, "unique": {"type": "integer", "minimum": 0.0, "title": "Unique"}, "top": {"type": "string", "title": "Top"}, "freq": {"type": "integer", "minimum": 0.0, "title": "Freq"}}, "type": "object", "required": ["count", "unique", "top", "freq"], "title": "CategoricalSummaryStatistics"}, "ColumnProperties": {"properties": {"nullable": {"type": "boolean", "title": "Nullable"}, "unique": {"type": "boolean", "title": "Unique"}, "part_of_pk": {"type": "boolean", "title": "Part Of Pk"}, "part_of_fk": {"type": "boolean", "title": "Part Of Fk"}, "part_of_index": {"type": "boolean", "title": "Part Of Index"}, "mitm_data_type": {"$ref": "#/components/schemas/MITMDataType"}}, "type": "object", "required": ["nullable", "unique", "part_of_pk", "part_of_fk", "part_of_index", "mitm_data_type"], "title": "ColumnProperties"}, "CompiledVirtualView": {"properties": {"dialect": {"type": "string", "title": "Dialect"}, "compiled_sql": {"type": "string", "title": "Compiled Sql"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "column_dtypes": {"items": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}]}, "type": "array", "title": "Column Dtypes"}, "name": {"type": "string", "title": "Name"}, "schema_name": {"type": "string", "title": "Schema Name"}}, "type": "object", "required": ["dialect", "compiled_sql", "columns", "column_dtypes", "name", "schema_name"], "title": "CompiledVirtualView"}, "ConceptKind": {"type": "string", "enum": ["concrete", "abstract"], "title": "ConceptKind"}, "ConceptLevel": {"type": "string", "enum": ["main", "sub", "weak"], "title": "ConceptLevel"}, "ConceptMapping": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "concept": {"type": "string", "title": "Concept"}, "base_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Base Table"}, "kind_col": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Kind Col"}, "type_col": {"type": "string", "title": "Type Col"}, "identity_columns": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Identity Columns"}, "inline_relations": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Inline Relations"}, "foreign_relations": {"additionalProperties": {"$ref": "#/components/schemas/ForeignRelation"}, "type": "object", "title": "Foreign Relations"}, "attributes": {"items": {"type": "string"}, "type": "array", "title": "Attributes"}, "attribute_dtypes": {"items": {"$ref": "#/components/schemas/MITMDataType"}, "type": "array", "title": "Attribute Dtypes"}}, "type": "object", "required": ["mitm", "concept", "base_table", "type_col"], "title": "ConceptMapping"}, "ConceptMappingRequest": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "concept": {"type": "string", "title": "Concept"}, "base_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Base Table"}, "kind_col": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Kind Col"}, "type_col": {"type": "string", "title": "Type Col"}, "identity_columns": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Identity Columns"}, "inline_relations": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Inline Relations"}, "foreign_relations": {"additionalProperties": {"$ref": "#/components/schemas/ForeignRelation"}, "type": "object", "title": "Foreign Relations"}, "attributes": {"items": {"type": "string"}, "type": "array", "title": "Attributes"}, "attribute_dtypes": {"items": {"$ref": "#/components/schemas/MITMDataType"}, "type": "array", "title": "Attribute Dtypes"}}, "type": "object", "required": ["mitm", "concept", "base_table", "type_col"], "title": "ConceptMappingRequest"}, "ConceptProperties": {"properties": {"nature": {"prefixItems": [{"$ref": "#/components/schemas/ConceptLevel"}, {"$ref": "#/components/schemas/ConceptKind"}], "type": "array", "maxItems": 2, "minItems": 2, "title": "Nature"}, "key": {"type": "string", "title": "Key"}, "plural": {"type": "string", "title": "Plural"}, "typing_concept": {"type": "string", "title": "Typing Concept", "default": "type"}, "column_group_ordering": {"items": {"type": "string", "enum": ["kind", "type", "identity-relations", "inline-relations", "foreign-relations", "attributes"]}, "type": "array", "title": "Column Group Ordering", "default": ["kind", "type", "identity-relations", "inline-relations", "foreign-relations", "attributes"]}, "permit_attributes": {"type": "boolean", "title": "Permit Attributes", "default": true}}, "type": "object", "required": ["nature", "key", "plural"], "title": "ConceptProperties"}, "DBConnTestResponse": {"properties": {"db_url": {"type": "string", "minLength": 1, "format": "uri", "title": "Db Url"}, "success": {"type": "boolean", "title": "Success"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}}, "type": "object", "required": ["db_url", "success"], "title": "DBConnTestResponse"}, "DBMetaInfoBase": {"properties": {"db_structure": {"additionalProperties": {"additionalProperties": {"$ref": "#/components/schemas/TableMetaInfoBase"}, "type": "object"}, "type": "object", "title": "Db Structure"}, "tables": {"additionalProperties": {"$ref": "#/components/schemas/TableMetaInfoBase"}, "type": "object", "title": "Tables", "readOnly": true}}, "type": "object", "required": ["db_structure", "tables"], "title": "DBMetaInfoBase"}, "DBMetaInfoResponse": {"properties": {"db_structure": {"additionalProperties": {"additionalProperties": {"$ref": "#/components/schemas/TableMetaInfoBase"}, "type": "object"}, "type": "object", "title": "Db Structure"}, "tables": {"additionalProperties": {"$ref": "#/components/schemas/TableMetaInfoBase"}, "type": "object", "title": "Tables", "readOnly": true}}, "type": "object", "required": ["db_structure", "tables"], "title": "DBMetaInfoResponse"}, "DBMetaQuery": {"properties": {"syntactic_table_conditions": {"items": {"$ref": "#/components/schemas/SyntacticTableCondition"}, "type": "array", "title": "Syntactic Table Conditions"}, "semantic_table_conditions": {"items": {"$ref": "#/components/schemas/SemanticTableCondition"}, "type": "array", "title": "Semantic Table Conditions"}, "syntactic_column_conditions": {"items": {"$ref": "#/components/schemas/SyntacticColumnCondition"}, "type": "array", "title": "Syntactic Column Conditions"}, "semantic_column_conditions": {"items": {"$ref": "#/components/schemas/SemanticColumnCondition"}, "type": "array", "title": "Semantic Column Conditions"}}, "type": "object", "title": "DBMetaQuery"}, "DBProbeResponse": {"properties": {"table_probes": {"additionalProperties": {"$ref": "#/components/schemas/TableProbeBase"}, "type": "object", "title": "Table Probes"}, "db_meta": {"$ref": "#/components/schemas/DBMetaInfoBase"}}, "type": "object", "required": ["db_meta"], "title": "DBProbeResponse"}, "DBSchemaQueryRequest": {"properties": {"query": {"$ref": "#/components/schemas/DBMetaQuery"}, "filter_columns": {"type": "boolean", "title": "Filter Columns", "default": false}}, "type": "object", "required": ["query"], "title": "DBSchemaQueryRequest"}, "DBSchemaSelectionRequest": {"properties": {"selection": {"anyOf": [{"additionalProperties": {"items": {"type": "string"}, "type": "array", "uniqueItems": true}, "type": "object"}, {"additionalProperties": {"additionalProperties": {"items": {"type": "string"}, "type": "array", "uniqueItems": true}, "type": "object"}, "type": "object"}], "title": "Selection"}, "filter_columns": {"type": "boolean", "title": "Filter Columns", "default": false}}, "type": "object", "required": ["selection"], "title": "DBSchemaSelectionRequest"}, "DatetimeSummaryStatistics": {"properties": {"count": {"type": "integer", "title": "Count"}, "mean": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Mean"}, "min": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Min"}, "max": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Max"}, "percentile_25": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Percentile 25"}, "percentile_50": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Percentile 50"}, "percentile_75": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Percentile 75"}}, "type": "object", "required": ["count"], "title": "DatetimeSummaryStatistics"}, "ERVariant": {"type": "string", "enum": ["image", "mermaid"], "title": "ERVariant"}, "EditColumns": {"properties": {"operation": {"type": "string", "const": "edit_columns", "title": "Operation", "default": "edit_columns"}, "transforms": {"additionalProperties": {"oneOf": [{"$ref": "#/components/schemas/CastColumn"}], "discriminator": {"propertyName": "operation", "mapping": {"cast_column": "#/components/schemas/CastColumn"}}}, "type": "object", "title": "Transforms"}, "renames": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Renames"}, "drops": {"items": {"type": "string"}, "type": "array", "uniqueItems": true, "title": "Drops"}, "additions": {"additionalProperties": {"items": {"oneOf": [{"$ref": "#/components/schemas/AddColumn"}, {"$ref": "#/components/schemas/ExtractJson"}], "discriminator": {"propertyName": "operation", "mapping": {"add_column": "#/components/schemas/AddColumn", "extract_json": "#/components/schemas/ExtractJson"}}}, "type": "array"}, "type": "object", "title": "Additions"}}, "type": "object", "title": "EditColumns"}, "ExistingTable": {"properties": {"operation": {"type": "string", "const": "existing", "title": "Operation", "default": "existing"}, "base_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Base Table"}}, "type": "object", "required": ["base_table"], "title": "ExistingTable"}, "ExtractJson": {"properties": {"operation": {"type": "string", "const": "extract_json", "title": "Operation", "default": "extract_json"}, "json_col": {"type": "string", "title": "Json Col"}, "attributes": {"additionalProperties": {"items": {"type": "string"}, "type": "array"}, "type": "object", "title": "Attributes"}}, "type": "object", "required": ["json_col", "attributes"], "title": "ExtractJson"}, "FKCreationRequest": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "table": {"anyOf": [{"$ref": "#/components/schemas/LocalTableIdentifier"}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Table"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "target_table": {"anyOf": [{"$ref": "#/components/schemas/LocalTableIdentifier"}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Target Table"}, "target_columns": {"items": {"type": "string"}, "type": "array", "title": "Target Columns"}}, "type": "object", "required": ["table", "columns", "target_table", "target_columns"], "title": "FKCreationRequest"}, "FKCreationResponse": {"properties": {"status": {"type": "boolean", "title": "Status"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}}, "type": "object", "required": ["status"], "title": "FKCreationResponse"}, "ForeignKeyConstraintBase": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "table": {"anyOf": [{"$ref": "#/components/schemas/LocalTableIdentifier"}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Table"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "target_table": {"anyOf": [{"$ref": "#/components/schemas/LocalTableIdentifier"}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Target Table"}, "target_columns": {"items": {"type": "string"}, "type": "array", "title": "Target Columns"}}, "type": "object", "required": ["table", "columns", "target_table", "target_columns"], "title": "ForeignKeyConstraintBase"}, "ForeignRelation": {"properties": {"fk_columns": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Fk Columns"}, "referred_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Referred Table"}}, "type": "object", "required": ["fk_columns", "referred_table"], "title": "ForeignRelation"}, "ForeignRelationInfo": {"properties": {"target_concept": {"type": "string", "title": "Target Concept"}, "fk_relations": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Fk Relations"}}, "type": "object", "required": ["target_concept", "fk_relations"], "title": "ForeignRelationInfo"}, "GroupValidationResult": {"properties": {"individual_validations": {"additionalProperties": {"items": {"prefixItems": [{"$ref": "#/components/schemas/TableIdentifier"}, {"$ref": "#/components/schemas/IndividualValidationResult"}], "type": "array", "maxItems": 2, "minItems": 2}, "type": "array"}, "type": "object", "title": "Individual Validations"}, "is_valid": {"type": "boolean", "title": "Is Valid", "readOnly": true}}, "type": "object", "required": ["is_valid"], "title": "GroupValidationResult"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "IndividualValidationResult": {"properties": {"is_valid": {"type": "boolean", "title": "Is Valid", "default": true}, "violations": {"items": {"type": "string"}, "type": "array", "title": "Violations"}}, "type": "object", "title": "IndividualValidationResult"}, "KeepAliveResponse": {"properties": {"server_status": {"type": "string", "const": "available", "title": "Server Status", "default": "available"}, "session_status": {"type": "string", "enum": ["missing session cookie", "session invalid", "session valid"], "title": "Session Status"}}, "type": "object", "required": ["session_status"], "title": "KeepAliveResponse"}, "Limit": {"properties": {"operation": {"type": "string", "const": "limit", "title": "Operation", "default": "limit"}, "limit": {"type": "integer", "title": "Limit"}}, "type": "object", "required": ["limit"], "title": "Limit"}, "LocalTableIdentifier": {"properties": {"name": {"type": "string", "title": "Name"}, "schema": {"type": "string", "title": "Schema", "default": "main"}}, "type": "object", "required": ["name"], "title": "LocalTableIdentifier"}, "MITM": {"type": "string", "enum": ["MAED", "OCEL2"], "title": "MITM"}, "MITMDataType": {"type": "string", "enum": ["text", "json", "integer", "numeric", "boolean", "datetime", "unknown", "infer"], "title": "MITMDataType"}, "MITMDefinition": {"properties": {"main_concepts": {"items": {"type": "string"}, "type": "array", "uniqueItems": true, "title": "Main Concepts"}, "weak_concepts": {"additionalProperties": {"$ref": "#/components/schemas/MITMDataType"}, "type": "object", "title": "Weak Concepts"}, "sub_concept_map": {"additionalProperties": {"items": {"type": "string"}, "type": "array", "uniqueItems": true}, "type": "object", "title": "Sub Concept Map"}, "concept_relations": {"additionalProperties": {"$ref": "#/components/schemas/OwnedRelations"}, "type": "object", "title": "Concept Relations"}, "concept_properties": {"additionalProperties": {"$ref": "#/components/schemas/ConceptProperties"}, "type": "object", "title": "Concept Properties"}, "leaf_concepts": {"items": {"type": "string"}, "type": "array", "uniqueItems": true, "title": "Leaf Concepts", "readOnly": true}, "abstract_concepts": {"items": {"type": "string"}, "type": "array", "uniqueItems": true, "title": "Abstract Concepts", "readOnly": true}, "parent_concept_map": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Parent Concept Map", "readOnly": true}}, "type": "object", "required": ["main_concepts", "weak_concepts", "sub_concept_map", "concept_relations", "concept_properties", "leaf_concepts", "abstract_concepts", "parent_concept_map"], "title": "MITMDefinition"}, "MappingExportRequest": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "mapped_concepts": {"items": {"$ref": "#/components/schemas/ConceptMapping"}, "type": "array", "title": "Mapped Concepts"}, "post_processing": {"anyOf": [{"$ref": "#/components/schemas/PostProcessing"}, {"type": "null"}]}, "filename": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Filename"}}, "type": "object", "required": ["mitm", "mapped_concepts"], "title": "MappingExportRequest"}, "MappingGroupValidationResult": {"properties": {"validation_result": {"$ref": "#/components/schemas/GroupValidationResult"}}, "type": "object", "required": ["validation_result"], "title": "MappingGroupValidationResult"}, "MitMDataTypeInfo": {"properties": {"sql_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sql Type"}}, "type": "object", "required": ["sql_type"], "title": "MitMDataTypeInfo"}, "NumericSummaryStatistics": {"properties": {"count": {"type": "integer", "title": "Count"}, "mean": {"type": "number", "title": "Mean"}, "min": {"type": "number", "title": "Min"}, "max": {"type": "number", "title": "Max"}, "std": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Std"}, "percentile_25": {"type": "number", "title": "Percentile 25"}, "percentile_50": {"type": "number", "title": "Percentile 50"}, "percentile_75": {"type": "number", "title": "Percentile 75"}}, "type": "object", "required": ["count", "mean", "min", "max", "percentile_25", "percentile_50", "percentile_75"], "title": "NumericSummaryStatistics"}, "OwnedRelations": {"properties": {"identity": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Identity"}, "inline": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Inline"}, "foreign": {"additionalProperties": {"$ref": "#/components/schemas/ForeignRelationInfo"}, "type": "object", "title": "Foreign"}}, "type": "object", "required": ["identity", "inline", "foreign"], "title": "OwnedRelations"}, "PostProcessing": {"properties": {"table_postprocessing": {"items": {"$ref": "#/components/schemas/TablePostProcessing"}, "type": "array", "title": "Table Postprocessing"}}, "type": "object", "required": ["table_postprocessing"], "title": "PostProcessing"}, "PublishedMitMResponse": {"properties": {"url": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Url"}, "relative_uri": {"type": "string", "title": "Relative Uri"}, "deletion_request_url": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Deletion Request Url"}, "export_id": {"type": "integer", "title": "Export Id"}}, "type": "object", "required": ["url", "relative_uri", "deletion_request_url", "export_id"], "title": "PublishedMitMResponse"}, "RawCompiled": {"properties": {"operation": {"type": "string", "const": "raw", "title": "Operation", "default": "raw"}, "typed_query": {"$ref": "#/components/schemas/TypedRawQuery"}}, "type": "object", "required": ["typed_query"], "title": "RawCompiled"}, "ReselectColumns": {"properties": {"operation": {"type": "string", "const": "reselect_columns", "title": "Operation", "default": "reselect_columns"}, "selection": {"items": {"type": "string"}, "type": "array", "title": "Selection"}}, "type": "object", "required": ["selection"], "title": "ReselectColumns"}, "SampleSummary": {"properties": {"sample_size": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Sample Size"}, "na_fraction": {"anyOf": [{"type": "number", "maximum": 1.0, "minimum": 0.0}, {"type": "null"}], "title": "Na Fraction"}, "unique_fraction": {"anyOf": [{"type": "number", "maximum": 1.0, "minimum": 0.0}, {"type": "null"}], "title": "Unique Fraction"}, "value_counts": {"anyOf": [{"additionalProperties": {"type": "integer"}, "type": "object"}, {"type": "null"}], "title": "Value Counts"}, "summary_statistics": {"anyOf": [{"$ref": "#/components/schemas/NumericSummaryStatistics"}, {"$ref": "#/components/schemas/CategoricalSummaryStatistics"}, {"$ref": "#/components/schemas/DatetimeSummaryStatistics"}, {"type": "null"}], "title": "Summary Statistics"}, "json_schema": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Json Schema"}}, "type": "object", "title": "SampleSummary"}, "SemanticColumnCondition": {"properties": {"inferred_data_type": {"anyOf": [{"$ref": "#/components/schemas/MITMDataType"}, {"type": "null"}]}, "max_na_fraction": {"anyOf": [{"type": "number", "maximum": 1.0, "minimum": 0.0}, {"type": "null"}], "title": "Max Na Fraction"}, "value_in_range": {"anyOf": [{}, {"type": "null"}], "title": "Value In Range"}, "contained_value": {"anyOf": [{}, {"type": "null"}], "title": "Contained Value"}, "contained_datetime": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Contained Datetime"}}, "type": "object", "title": "SemanticColumnCondition"}, "SemanticTableCondition": {"properties": {"min_row_count": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Min Row Count"}, "max_row_count": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Max Row Count"}}, "type": "object", "title": "SemanticTableCondition"}, "SessionIdResponse": {"properties": {"session_id": {"type": "string", "format": "uuid", "title": "Session Id"}}, "type": "object", "required": ["session_id"], "title": "SessionIdResponse"}, "SimpleJoin": {"properties": {"operation": {"type": "string", "const": "join", "title": "Operation", "default": "join"}, "left_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Left Table"}, "right_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Right Table"}, "on_cols_left": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "On Cols Left"}, "on_cols_right": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "On Cols Right"}, "is_outer": {"type": "boolean", "title": "Is Outer", "default": false}, "full": {"type": "boolean", "title": "Full", "default": false}, "selected_cols_left": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Selected Cols Left"}, "selected_cols_right": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Selected Cols Right"}, "left_alias": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Left Alias"}, "right_alias": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Right Alias"}}, "type": "object", "required": ["left_table", "right_table"], "title": "SimpleJoin"}, "SimpleSQLOperator": {"type": "string", "enum": ["ilike", "like", "eq", "ge", "gt", "le", "lt", "in", "notin"], "title": "SimpleSQLOperator"}, "SimpleWhere": {"properties": {"lhs": {"type": "string", "title": "Lhs"}, "operator": {"$ref": "#/components/schemas/SimpleSQLOperator"}, "rhs": {"anyOf": [{"type": "string"}, {"prefixItems": [{}, {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}]}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Rhs"}}, "type": "object", "required": ["lhs", "operator", "rhs"], "title": "SimpleWhere"}, "SourceDBType": {"type": "string", "enum": ["original", "working", "virtual"], "title": "SourceDBType"}, "SyntacticColumnCondition": {"properties": {"name_regex": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Regex"}, "sql_data_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sql Data Type"}, "mitm_data_type": {"anyOf": [{"$ref": "#/components/schemas/MITMDataType"}, {"type": "null"}]}}, "type": "object", "title": "SyntacticColumnCondition"}, "SyntacticTableCondition": {"properties": {"schema_regex": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Schema Regex"}, "name_regex": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Regex"}, "min_col_count": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Min Col Count"}, "max_col_count": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Max Col Count"}, "has_foreign_key": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Has Foreign Key"}}, "type": "object", "title": "SyntacticTableCondition"}, "TableFilter": {"properties": {"operation": {"type": "string", "const": "table_filter", "title": "Operation", "default": "table_filter"}, "wheres": {"items": {"$ref": "#/components/schemas/SimpleWhere"}, "type": "array", "title": "Wheres"}, "limit": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Limit"}}, "type": "object", "required": ["wheres"], "title": "TableFilter"}, "TableIdentifier": {"properties": {"source": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}, "schema": {"type": "string", "title": "Schema", "default": "main"}, "name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "TableIdentifier"}, "TableMetaInfoBase": {"properties": {"schema_name": {"type": "string", "title": "Schema Name", "default": "main"}, "name": {"type": "string", "title": "Name"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "sql_column_types": {"items": {"type": "string"}, "type": "array", "title": "Sql Column Types"}, "primary_key": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Primary Key"}, "indexes": {"anyOf": [{"items": {"items": {"type": "string"}, "type": "array"}, "type": "array"}, {"type": "null"}], "title": "Indexes"}, "foreign_key_constraints": {"items": {"$ref": "#/components/schemas/ForeignKeyConstraintBase"}, "type": "array", "title": "Foreign Key Constraints"}, "column_properties": {"additionalProperties": {"$ref": "#/components/schemas/ColumnProperties"}, "type": "object", "title": "Column Properties"}}, "type": "object", "required": ["name", "columns", "sql_column_types"], "title": "TableMetaInfoBase"}, "TableMetaInfoResponse": {"properties": {"schema_name": {"type": "string", "title": "Schema Name", "default": "main"}, "name": {"type": "string", "title": "Name"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "sql_column_types": {"items": {"type": "string"}, "type": "array", "title": "Sql Column Types"}, "primary_key": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Primary Key"}, "indexes": {"anyOf": [{"items": {"items": {"type": "string"}, "type": "array"}, "type": "array"}, {"type": "null"}], "title": "Indexes"}, "foreign_key_constraints": {"items": {"$ref": "#/components/schemas/ForeignKeyConstraintBase"}, "type": "array", "title": "Foreign Key Constraints"}, "column_properties": {"additionalProperties": {"$ref": "#/components/schemas/ColumnProperties"}, "type": "object", "title": "Column Properties"}}, "type": "object", "required": ["name", "columns", "sql_column_types"], "title": "TableMetaInfoResponse"}, "TablePostProcessing": {"properties": {"target_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Target Table"}, "transforms": {"items": {"oneOf": [{"$ref": "#/components/schemas/EditColumns"}, {"$ref": "#/components/schemas/ReselectColumns"}, {"$ref": "#/components/schemas/TableFilter"}, {"$ref": "#/components/schemas/Limit"}], "discriminator": {"propertyName": "operation", "mapping": {"edit_columns": "#/components/schemas/EditColumns", "limit": "#/components/schemas/Limit", "reselect_columns": "#/components/schemas/ReselectColumns", "table_filter": "#/components/schemas/TableFilter"}}}, "type": "array", "title": "Transforms"}}, "type": "object", "required": ["target_table", "transforms"], "title": "TablePostProcessing"}, "TableProbeBase": {"properties": {"row_count": {"type": "integer", "minimum": 0.0, "title": "Row Count"}, "inferred_types": {"additionalProperties": {"$ref": "#/components/schemas/MITMDataType"}, "type": "object", "title": "Inferred Types"}, "sample_summaries": {"additionalProperties": {"$ref": "#/components/schemas/SampleSummary"}, "type": "object", "title": "Sample Summaries"}, "table_meta": {"$ref": "#/components/schemas/TableMetaInfoBase"}, "sampled_values": {"additionalProperties": {"items": {}, "type": "array"}, "type": "object", "title": "Sampled Values"}}, "type": "object", "required": ["row_count", "inferred_types", "sample_summaries", "table_meta", "sampled_values"], "title": "TableProbeBase"}, "TableProbeResponse": {"properties": {"row_count": {"type": "integer", "minimum": 0.0, "title": "Row Count"}, "inferred_types": {"additionalProperties": {"$ref": "#/components/schemas/MITMDataType"}, "type": "object", "title": "Inferred Types"}, "sample_summaries": {"additionalProperties": {"$ref": "#/components/schemas/SampleSummary"}, "type": "object", "title": "Sample Summaries"}, "table_meta": {"$ref": "#/components/schemas/TableMetaInfoBase"}, "sampled_values": {"additionalProperties": {"items": {}, "type": "array"}, "type": "object", "title": "Sampled Values"}}, "type": "object", "required": ["row_count", "inferred_types", "sample_summaries", "table_meta", "sampled_values"], "title": "TableProbeResponse"}, "TableQueryResult": {"properties": {"table_info": {"anyOf": [{"$ref": "#/components/schemas/TableMetaInfoResponse"}, {"type": "null"}]}, "rows": {"items": {"items": {}, "type": "array"}, "type": "array", "title": "Rows"}}, "type": "object", "required": ["table_info", "rows"], "title": "TableQueryResult"}, "TypedRawQuery": {"properties": {"dialect": {"type": "string", "title": "Dialect"}, "compiled_sql": {"type": "string", "title": "Compiled Sql"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "column_dtypes": {"items": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}]}, "type": "array", "title": "Column Dtypes"}}, "type": "object", "required": ["dialect", "compiled_sql", "columns", "column_dtypes"], "title": "TypedRawQuery"}, "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"}, "VirtualViewCreationRequest": {"properties": {"name": {"type": "string", "title": "Name"}, "table_creation": {"oneOf": [{"$ref": "#/components/schemas/SimpleJoin"}, {"$ref": "#/components/schemas/ExistingTable"}, {"$ref": "#/components/schemas/RawCompiled"}], "title": "Table Creation", "discriminator": {"propertyName": "operation", "mapping": {"existing": "#/components/schemas/ExistingTable", "join": "#/components/schemas/SimpleJoin", "raw": "#/components/schemas/RawCompiled"}}}, "transforms": {"anyOf": [{"items": {"oneOf": [{"$ref": "#/components/schemas/EditColumns"}, {"$ref": "#/components/schemas/ReselectColumns"}, {"$ref": "#/components/schemas/TableFilter"}, {"$ref": "#/components/schemas/Limit"}], "discriminator": {"propertyName": "operation", "mapping": {"edit_columns": "#/components/schemas/EditColumns", "limit": "#/components/schemas/Limit", "reselect_columns": "#/components/schemas/ReselectColumns", "table_filter": "#/components/schemas/TableFilter"}}}, "type": "array"}, {"type": "null"}], "title": "Transforms"}, "schema": {"type": "string", "title": "Schema", "default": "virtual"}}, "type": "object", "required": ["name", "table_creation"], "title": "VirtualViewCreationRequest"}, "VirtualViewResponse": {"properties": {"table_meta": {"$ref": "#/components/schemas/TableMetaInfoResponse"}}, "type": "object", "required": ["table_meta"], "title": "VirtualViewResponse"}, "WrappedMITMDataType": {"properties": {"mitm": {"$ref": "#/components/schemas/MITMDataType"}}, "type": "object", "required": ["mitm"], "title": "WrappedMITMDataType"}}}} \ No newline at end of file +{"openapi": "3.1.0", "info": {"title": "MitMExtractorBackend", "version": "0.1.0"}, "paths": {"/admin/clear-sessions": {"post": {"tags": ["admin"], "summary": "Clear Sessions", "operationId": "clear_sessions", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/admin/active-sessions": {"get": {"tags": ["admin"], "summary": "Get Active Sessions", "operationId": "get_active_sessions", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"additionalProperties": {"type": "string", "format": "date-time"}, "propertyNames": {"format": "uuid"}, "type": "object", "title": "Response Get Active Sessions Admin Active Sessions Get"}}}}}}}, "/admin/clear-exports": {"post": {"tags": ["admin"], "summary": "Clear Exports", "operationId": "clear_exports", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/admin/clear-uploads": {"post": {"tags": ["admin"], "summary": "Clear Uploads", "operationId": "clear_uploads", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/definitions/mitms": {"get": {"tags": ["definitions"], "summary": "Get Mitms", "operationId": "get_mitms", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/MITM"}, "type": "array", "title": "Response Get Mitms Definitions Mitms Get"}}}}}}}, "/definitions/mitm-definition": {"get": {"tags": ["definitions"], "summary": "Get Mitm Definition", "operationId": "get_mitm_definition", "parameters": [{"name": "mitm", "in": "query", "required": true, "schema": {"$ref": "#/components/schemas/MITM"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MITMDefinition"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/definitions/mitm-data-types": {"get": {"tags": ["definitions"], "summary": "Get Mitm Data Types", "operationId": "get_mitm_data_types", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"additionalProperties": {"$ref": "#/components/schemas/MitMDataTypeInfo"}, "propertyNames": {"$ref": "#/components/schemas/MITMDataType"}, "type": "object", "title": "Response Get Mitm Data Types Definitions Mitm Data Types Get"}}}}}}}, "/session/start-session": {"post": {"tags": ["session"], "summary": "Start Session", "operationId": "start_session", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SessionIdResponse"}}}}}}}, "/session/get-session": {"get": {"tags": ["session"], "summary": "Get Session", "operationId": "get_session", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SessionIdResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/session/stop-session": {"post": {"tags": ["session"], "summary": "Stop Session", "operationId": "stop_session", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/session/upload-db": {"post": {"tags": ["session"], "summary": "Upload Db", "operationId": "upload_db", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"multipart/form-data": {"schema": {"$ref": "#/components/schemas/Body_upload_db_session_upload_db_post"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/session/connect-db": {"post": {"tags": ["session"], "summary": "Connect Db", "operationId": "connect_db", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Body_connect_db_session_connect_db_post"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/session/test-db-conn": {"get": {"tags": ["session"], "summary": "Test Db Conn", "operationId": "test_db_conn", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBConnTestResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/session/keep-alive": {"get": {"tags": ["session"], "summary": "Keep Alive", "operationId": "keep_alive", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/KeepAliveResponse"}}}}}}}, "/control/reflect-db": {"post": {"tags": ["control"], "summary": "Reflect Db", "operationId": "reflect_db", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/init-working-db": {"post": {"tags": ["control"], "summary": "Init Working Db", "operationId": "init_working_db", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/mark-foreign-key": {"post": {"tags": ["control"], "summary": "Mark Foreign Key", "operationId": "mark_foreign_key", "parameters": [{"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FKCreationRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FKCreationResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/virtual-view": {"put": {"tags": ["control"], "summary": "Create Virtual View", "operationId": "create_virtual_view", "parameters": [{"name": "override_if_exists", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Override If Exists"}}, {"name": "verify_immediately", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Verify Immediately"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VirtualViewCreationRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VirtualViewResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["control"], "summary": "Get Virtual View", "operationId": "get_virtual_view", "parameters": [{"name": "view", "in": "query", "required": true, "schema": {"type": "string", "title": "View"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "virtual", "title": "Schema"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VirtualViewResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["control"], "summary": "Drop Virtual View", "operationId": "drop_virtual_view", "parameters": [{"name": "view", "in": "query", "required": true, "schema": {"type": "string", "title": "View"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "virtual", "title": "Schema"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/virtual-views": {"get": {"tags": ["control"], "summary": "Get Virtual Views", "operationId": "get_virtual_views", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/VirtualViewResponse"}, "title": "Response Get Virtual Views Control Virtual Views Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/compiled-virtual-view": {"get": {"tags": ["control"], "summary": "Get Compiled Virtual View", "operationId": "get_compiled_virtual_view", "parameters": [{"name": "view", "in": "query", "required": true, "schema": {"type": "string", "title": "View"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "virtual", "title": "Schema"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CompiledVirtualView"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/compiled-virtual-db": {"get": {"tags": ["control"], "summary": "Get Compiled Virtual Db", "operationId": "get_compiled_virtual_db", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CompiledVirtualDB"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/virtual-db-creation": {"get": {"tags": ["control"], "summary": "Get Virtual Db Creation", "operationId": "get_virtual_db_creation", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VirtualDBCreation"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/control/virtual-views-batch": {"put": {"tags": ["control"], "summary": "Create Virtual Views Batch", "operationId": "create_virtual_views_batch", "parameters": [{"name": "override_if_exists", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Override If Exists"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/VirtualViewCreationRequest"}, "title": "Requests"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/VirtualViewResponse"}, "title": "Response Create Virtual Views Batch Control Virtual Views Batch Put"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/raw-query": {"post": {"tags": ["data"], "summary": "Raw Query", "operationId": "raw_query", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Body_raw_query_data_raw_query_post"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"type": "array", "items": {}}, "title": "Response Raw Query Data Raw Query Post"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/query-table": {"get": {"tags": ["data"], "summary": "Query Table", "operationId": "query_table", "parameters": [{"name": "name", "in": "query", "required": true, "schema": {"type": "string", "title": "Name"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "main", "title": "Schema"}}, {"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "offset", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Offset"}}, {"name": "limit", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Limit"}}, {"name": "include_table_meta", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Include Table Meta"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableQueryResult"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/query-unique-values": {"get": {"tags": ["data"], "summary": "Query Unique Values", "operationId": "query_unique_values", "parameters": [{"name": "table", "in": "query", "required": true, "schema": {"type": "string", "title": "Table"}}, {"name": "column", "in": "query", "required": true, "schema": {"type": "string", "title": "Column"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "main", "title": "Schema"}}, {"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {}, "title": "Response Query Unique Values Data Query Unique Values Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/er-diagram": {"get": {"tags": ["data"], "summary": "Make Erd", "operationId": "make_erd", "parameters": [{"name": "version", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/ERVariant", "default": "mermaid"}}, {"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/data/filtered-er-diagram": {"post": {"tags": ["data"], "summary": "Make Filtered Erd", "operationId": "make_filtered_erd", "parameters": [{"name": "version", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/ERVariant", "default": "mermaid"}}, {"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBSchemaSelectionRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/table-schema": {"get": {"tags": ["reflection"], "summary": "Get Table Schema", "operationId": "get_table_schema", "parameters": [{"name": "name", "in": "query", "required": true, "schema": {"type": "string", "title": "Name"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "main", "title": "Schema"}}, {"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableMetaInfoResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/db-schema": {"get": {"tags": ["reflection"], "summary": "Get Db Schema", "operationId": "get_db_schema", "parameters": [{"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBMetaInfoResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/filter-db-schema": {"post": {"tags": ["reflection"], "summary": "Filter Db Schema", "operationId": "filter_db_schema", "parameters": [{"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBSchemaSelectionRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBMetaInfoResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/query-db-schema": {"post": {"tags": ["reflection"], "summary": "Query Db Schema", "operationId": "query_db_schema", "parameters": [{"name": "store_intermediate_table_probes", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Store Intermediate Table Probes"}}, {"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBSchemaQueryRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBMetaInfoResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/suggest-joins": {"get": {"tags": ["reflection"], "summary": "Suggest Joins", "operationId": "suggest_joins", "parameters": [{"name": "name", "in": "query", "required": true, "schema": {"type": "string", "title": "Name"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "main", "title": "Schema"}}, {"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"type": "array", "prefixItems": [{"type": "string"}, {"type": "string"}], "minItems": 2, "maxItems": 2}, "title": "Response Suggest Joins Reflection Suggest Joins Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/probe-table": {"post": {"tags": ["reflection"], "summary": "Probe Table", "operationId": "probe_table", "parameters": [{"name": "name", "in": "query", "required": true, "schema": {"type": "string", "title": "Name"}}, {"name": "schema", "in": "query", "required": false, "schema": {"type": "string", "default": "main", "title": "Schema"}}, {"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "sample_size", "in": "query", "required": false, "schema": {"type": "integer", "default": 100, "title": "Sample Size"}}, {"name": "override_if_exists", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Override If Exists"}}, {"name": "store_results", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Store Results"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableProbeResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/reflection/probe-db": {"post": {"tags": ["reflection"], "summary": "Probe Db", "operationId": "probe_db", "parameters": [{"name": "source", "in": "query", "required": false, "schema": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}}, {"name": "sample_size", "in": "query", "required": false, "schema": {"type": "integer", "default": 100, "title": "Sample Size"}}, {"name": "override_if_exists", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Override If Exists"}}, {"name": "store_results", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Store Results"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "additionalProperties": {"type": "array", "uniqueItems": true, "items": {"type": "string"}}, "title": "Table Selection"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBProbeResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/validate-concept-mappings": {"post": {"tags": ["mitm"], "summary": "Validate Concept Mappings", "operationId": "validate_concept_mappings", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/ConceptMappingRequest"}, "title": "Concept Mappings"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupValidationResult"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/export-standalone-db-mapping": {"post": {"tags": ["mitm"], "summary": "Export Standalone Db Mapping", "operationId": "export_standalone_db_mapping", "parameters": [{"name": "include_virtual_db", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Include Virtual Db"}}, {"name": "validate", "in": "query", "required": false, "schema": {"type": "boolean", "default": true, "title": "Validate"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DBMappingExportRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StandaloneDBMapping"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/export-mitm": {"post": {"tags": ["mitm"], "summary": "Export Mitm", "operationId": "export_mitm", "parameters": [{"name": "use_streaming", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Use Streaming"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MappingExportRequest"}}}}, "responses": {"200": {"description": "Successful Response"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/publish-mitm-export": {"post": {"tags": ["mitm"], "summary": "Publish Mitm Export", "operationId": "publish_mitm_export", "parameters": [{"name": "use_streaming", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Use Streaming"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MappingExportRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PublishedMitMResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/delete-mitm-export": {"post": {"tags": ["mitm"], "summary": "Delete Mitm Export", "operationId": "delete_mitm_export", "parameters": [{"name": "export_id", "in": "query", "required": true, "schema": {"type": "integer", "title": "Export Id"}}, {"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/mitm/delete-mitm-exports": {"post": {"tags": ["mitm"], "summary": "Delete Mitm Exports", "operationId": "delete_mitm_exports", "parameters": [{"name": "simple_session", "in": "cookie", "required": true, "schema": {"type": "string", "title": "Simple Session"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/health": {"get": {"summary": "Check Health", "operationId": "check_health", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}}, "components": {"schemas": {"AddColumn-Input": {"properties": {"operation": {"type": "string", "const": "add_column", "title": "Operation", "default": "add_column"}, "col_name": {"type": "string", "title": "Col Name"}, "value": {"title": "Value"}, "target_type": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}], "title": "Target Type"}}, "type": "object", "required": ["col_name", "value", "target_type"], "title": "AddColumn"}, "AddColumn-Output": {"properties": {"operation": {"type": "string", "const": "add_column", "title": "Operation", "default": "add_column"}, "col_name": {"type": "string", "title": "Col Name"}, "value": {"title": "Value"}, "target_type": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}], "title": "Target Type"}}, "type": "object", "required": ["col_name", "value", "target_type"], "title": "AddColumn"}, "Body_connect_db_session_connect_db_post": {"properties": {"db_url": {"type": "string", "minLength": 1, "format": "uri", "title": "Db Url"}}, "type": "object", "required": ["db_url"], "title": "Body_connect_db_session_connect_db_post"}, "Body_raw_query_data_raw_query_post": {"properties": {"query": {"type": "string", "title": "Query"}}, "type": "object", "required": ["query"], "title": "Body_raw_query_data_raw_query_post"}, "Body_upload_db_session_upload_db_post": {"properties": {"sqlite": {"type": "string", "format": "binary", "title": "Sqlite", "description": "Upload a sqlite db file here."}}, "type": "object", "required": ["sqlite"], "title": "Body_upload_db_session_upload_db_post"}, "CastColumn-Input": {"properties": {"operation": {"type": "string", "const": "cast_column", "title": "Operation", "default": "cast_column"}, "target_type": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}], "title": "Target Type"}}, "type": "object", "required": ["target_type"], "title": "CastColumn"}, "CastColumn-Output": {"properties": {"operation": {"type": "string", "const": "cast_column", "title": "Operation", "default": "cast_column"}, "target_type": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}], "title": "Target Type"}}, "type": "object", "required": ["target_type"], "title": "CastColumn"}, "CategoricalSummaryStatistics": {"properties": {"count": {"type": "integer", "minimum": 0.0, "title": "Count"}, "unique": {"type": "integer", "minimum": 0.0, "title": "Unique"}, "top": {"type": "string", "title": "Top"}, "freq": {"type": "integer", "minimum": 0.0, "title": "Freq"}}, "type": "object", "required": ["count", "unique", "top", "freq"], "title": "CategoricalSummaryStatistics"}, "ColumnProperties": {"properties": {"nullable": {"type": "boolean", "title": "Nullable"}, "unique": {"type": "boolean", "title": "Unique"}, "part_of_pk": {"type": "boolean", "title": "Part Of Pk"}, "part_of_fk": {"type": "boolean", "title": "Part Of Fk"}, "part_of_index": {"type": "boolean", "title": "Part Of Index"}, "mitm_data_type": {"$ref": "#/components/schemas/MITMDataType"}}, "type": "object", "required": ["nullable", "unique", "part_of_pk", "part_of_fk", "part_of_index", "mitm_data_type"], "title": "ColumnProperties"}, "CompiledVirtualDB": {"properties": {"compiled_virtual_views": {"items": {"$ref": "#/components/schemas/CompiledVirtualView"}, "type": "array", "title": "Compiled Virtual Views"}, "views": {"additionalProperties": {"$ref": "#/components/schemas/CompiledVirtualView"}, "type": "object", "title": "Views", "readOnly": true}}, "type": "object", "required": ["views"], "title": "CompiledVirtualDB"}, "CompiledVirtualView": {"properties": {"dialect": {"type": "string", "title": "Dialect"}, "compiled_sql": {"type": "string", "title": "Compiled Sql"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "column_dtypes": {"items": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}]}, "type": "array", "title": "Column Dtypes"}, "name": {"type": "string", "title": "Name"}, "schema_name": {"type": "string", "title": "Schema Name"}}, "type": "object", "required": ["dialect", "compiled_sql", "columns", "column_dtypes", "name", "schema_name"], "title": "CompiledVirtualView"}, "ConceptKind": {"type": "string", "enum": ["concrete", "abstract"], "title": "ConceptKind"}, "ConceptLevel": {"type": "string", "enum": ["main", "sub", "weak"], "title": "ConceptLevel"}, "ConceptMapping-Input": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "concept": {"type": "string", "title": "Concept"}, "base_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Base Table"}, "kind_col": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Kind Col"}, "type_col": {"type": "string", "title": "Type Col"}, "identity_columns": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Identity Columns"}, "inline_relations": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Inline Relations"}, "foreign_relations": {"additionalProperties": {"$ref": "#/components/schemas/ForeignRelation-Input"}, "type": "object", "title": "Foreign Relations"}, "attributes": {"items": {"type": "string"}, "type": "array", "title": "Attributes"}, "attribute_dtypes": {"items": {"$ref": "#/components/schemas/MITMDataType"}, "type": "array", "title": "Attribute Dtypes"}}, "type": "object", "required": ["mitm", "concept", "base_table", "type_col"], "title": "ConceptMapping"}, "ConceptMapping-Output": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "concept": {"type": "string", "title": "Concept"}, "base_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Base Table"}, "kind_col": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Kind Col"}, "type_col": {"type": "string", "title": "Type Col"}, "identity_columns": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Identity Columns"}, "inline_relations": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Inline Relations"}, "foreign_relations": {"additionalProperties": {"$ref": "#/components/schemas/ForeignRelation-Output"}, "type": "object", "title": "Foreign Relations"}, "attributes": {"items": {"type": "string"}, "type": "array", "title": "Attributes"}, "attribute_dtypes": {"items": {"$ref": "#/components/schemas/MITMDataType"}, "type": "array", "title": "Attribute Dtypes"}}, "type": "object", "required": ["mitm", "concept", "base_table", "type_col"], "title": "ConceptMapping"}, "ConceptMappingRequest": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "concept": {"type": "string", "title": "Concept"}, "base_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Base Table"}, "kind_col": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Kind Col"}, "type_col": {"type": "string", "title": "Type Col"}, "identity_columns": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Identity Columns"}, "inline_relations": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Inline Relations"}, "foreign_relations": {"additionalProperties": {"$ref": "#/components/schemas/ForeignRelation-Input"}, "type": "object", "title": "Foreign Relations"}, "attributes": {"items": {"type": "string"}, "type": "array", "title": "Attributes"}, "attribute_dtypes": {"items": {"$ref": "#/components/schemas/MITMDataType"}, "type": "array", "title": "Attribute Dtypes"}}, "type": "object", "required": ["mitm", "concept", "base_table", "type_col"], "title": "ConceptMappingRequest"}, "ConceptProperties": {"properties": {"nature": {"prefixItems": [{"$ref": "#/components/schemas/ConceptLevel"}, {"$ref": "#/components/schemas/ConceptKind"}], "type": "array", "maxItems": 2, "minItems": 2, "title": "Nature"}, "key": {"type": "string", "title": "Key"}, "plural": {"type": "string", "title": "Plural"}, "typing_concept": {"type": "string", "title": "Typing Concept", "default": "type"}, "column_group_ordering": {"items": {"type": "string", "enum": ["kind", "type", "identity-relations", "inline-relations", "foreign-relations", "attributes"]}, "type": "array", "title": "Column Group Ordering", "default": ["kind", "type", "identity-relations", "inline-relations", "foreign-relations", "attributes"]}, "permit_attributes": {"type": "boolean", "title": "Permit Attributes", "default": true}}, "type": "object", "required": ["nature", "key", "plural"], "title": "ConceptProperties"}, "DBConnTestResponse": {"properties": {"db_url": {"type": "string", "minLength": 1, "format": "uri", "title": "Db Url"}, "success": {"type": "boolean", "title": "Success"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}}, "type": "object", "required": ["db_url", "success"], "title": "DBConnTestResponse"}, "DBMappingExportRequest": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "concept_mappings": {"items": {"$ref": "#/components/schemas/ConceptMapping-Input"}, "type": "array", "title": "Concept Mappings"}, "virtual_view_creations": {"items": {"$ref": "#/components/schemas/VirtualViewCreation-Input"}, "type": "array", "title": "Virtual View Creations"}}, "type": "object", "required": ["mitm", "concept_mappings"], "title": "DBMappingExportRequest"}, "DBMetaInfoBase": {"properties": {"db_structure": {"additionalProperties": {"additionalProperties": {"$ref": "#/components/schemas/TableMetaInfoBase"}, "type": "object"}, "type": "object", "title": "Db Structure"}}, "type": "object", "required": ["db_structure"], "title": "DBMetaInfoBase"}, "DBMetaInfoResponse": {"properties": {"db_structure": {"additionalProperties": {"additionalProperties": {"$ref": "#/components/schemas/TableMetaInfoBase"}, "type": "object"}, "type": "object", "title": "Db Structure"}}, "type": "object", "required": ["db_structure"], "title": "DBMetaInfoResponse"}, "DBMetaQuery": {"properties": {"syntactic_table_conditions": {"items": {"$ref": "#/components/schemas/SyntacticTableCondition"}, "type": "array", "title": "Syntactic Table Conditions"}, "semantic_table_conditions": {"items": {"$ref": "#/components/schemas/SemanticTableCondition"}, "type": "array", "title": "Semantic Table Conditions"}, "syntactic_column_conditions": {"items": {"$ref": "#/components/schemas/SyntacticColumnCondition"}, "type": "array", "title": "Syntactic Column Conditions"}, "semantic_column_conditions": {"items": {"$ref": "#/components/schemas/SemanticColumnCondition"}, "type": "array", "title": "Semantic Column Conditions"}}, "type": "object", "title": "DBMetaQuery"}, "DBProbeResponse": {"properties": {"db_table_probes": {"additionalProperties": {"additionalProperties": {"$ref": "#/components/schemas/TableProbeBase"}, "type": "object"}, "type": "object", "title": "Db Table Probes"}, "db_meta": {"$ref": "#/components/schemas/DBMetaInfoBase"}}, "type": "object", "required": ["db_meta"], "title": "DBProbeResponse"}, "DBSchemaQueryRequest": {"properties": {"query": {"$ref": "#/components/schemas/DBMetaQuery"}, "filter_columns": {"type": "boolean", "title": "Filter Columns", "default": false}}, "type": "object", "required": ["query"], "title": "DBSchemaQueryRequest"}, "DBSchemaSelectionRequest": {"properties": {"selection": {"anyOf": [{"additionalProperties": {"items": {"type": "string"}, "type": "array", "uniqueItems": true}, "type": "object"}, {"additionalProperties": {"additionalProperties": {"items": {"type": "string"}, "type": "array", "uniqueItems": true}, "type": "object"}, "type": "object"}], "title": "Selection"}, "filter_columns": {"type": "boolean", "title": "Filter Columns", "default": false}}, "type": "object", "required": ["selection"], "title": "DBSchemaSelectionRequest"}, "DatetimeSummaryStatistics": {"properties": {"count": {"type": "integer", "title": "Count"}, "mean": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Mean"}, "min": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Min"}, "max": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Max"}, "percentile_25": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Percentile 25"}, "percentile_50": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Percentile 50"}, "percentile_75": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Percentile 75"}}, "type": "object", "required": ["count"], "title": "DatetimeSummaryStatistics"}, "ERVariant": {"type": "string", "enum": ["image", "mermaid"], "title": "ERVariant"}, "EditColumns-Input": {"properties": {"operation": {"type": "string", "const": "edit_columns", "title": "Operation", "default": "edit_columns"}, "transforms": {"additionalProperties": {"oneOf": [{"$ref": "#/components/schemas/CastColumn-Input"}], "discriminator": {"propertyName": "operation", "mapping": {"cast_column": "#/components/schemas/CastColumn-Input"}}}, "type": "object", "title": "Transforms"}, "renames": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Renames"}, "drops": {"items": {"type": "string"}, "type": "array", "uniqueItems": true, "title": "Drops"}, "additions": {"additionalProperties": {"items": {"oneOf": [{"$ref": "#/components/schemas/AddColumn-Input"}, {"$ref": "#/components/schemas/ExtractJson"}], "discriminator": {"propertyName": "operation", "mapping": {"add_column": "#/components/schemas/AddColumn-Input", "extract_json": "#/components/schemas/ExtractJson"}}}, "type": "array"}, "type": "object", "title": "Additions"}}, "type": "object", "title": "EditColumns"}, "EditColumns-Output": {"properties": {"operation": {"type": "string", "const": "edit_columns", "title": "Operation", "default": "edit_columns"}, "transforms": {"additionalProperties": {"oneOf": [{"$ref": "#/components/schemas/CastColumn-Output"}], "discriminator": {"propertyName": "operation", "mapping": {"cast_column": "#/components/schemas/CastColumn-Output"}}}, "type": "object", "title": "Transforms"}, "renames": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Renames"}, "drops": {"items": {"type": "string"}, "type": "array", "uniqueItems": true, "title": "Drops"}, "additions": {"additionalProperties": {"items": {"oneOf": [{"$ref": "#/components/schemas/AddColumn-Output"}, {"$ref": "#/components/schemas/ExtractJson"}], "discriminator": {"propertyName": "operation", "mapping": {"add_column": "#/components/schemas/AddColumn-Output", "extract_json": "#/components/schemas/ExtractJson"}}}, "type": "array"}, "type": "object", "title": "Additions"}}, "type": "object", "title": "EditColumns"}, "ExistingTable-Input": {"properties": {"operation": {"type": "string", "const": "existing", "title": "Operation", "default": "existing"}, "base_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Base Table"}}, "type": "object", "required": ["base_table"], "title": "ExistingTable"}, "ExistingTable-Output": {"properties": {"operation": {"type": "string", "const": "existing", "title": "Operation", "default": "existing"}, "base_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Base Table"}}, "type": "object", "required": ["base_table"], "title": "ExistingTable"}, "ExtractJson": {"properties": {"operation": {"type": "string", "const": "extract_json", "title": "Operation", "default": "extract_json"}, "json_col": {"type": "string", "title": "Json Col"}, "attributes": {"additionalProperties": {"items": {"type": "string"}, "type": "array"}, "type": "object", "title": "Attributes"}}, "type": "object", "required": ["json_col", "attributes"], "title": "ExtractJson"}, "FKCreationRequest": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "table": {"anyOf": [{"$ref": "#/components/schemas/LocalTableIdentifier"}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Table"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "target_table": {"anyOf": [{"$ref": "#/components/schemas/LocalTableIdentifier"}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Target Table"}, "target_columns": {"items": {"type": "string"}, "type": "array", "title": "Target Columns"}}, "type": "object", "required": ["table", "columns", "target_table", "target_columns"], "title": "FKCreationRequest"}, "FKCreationResponse": {"properties": {"status": {"type": "boolean", "title": "Status"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}}, "type": "object", "required": ["status"], "title": "FKCreationResponse"}, "ForeignKeyConstraintBase": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "table": {"anyOf": [{"$ref": "#/components/schemas/LocalTableIdentifier"}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Table"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "target_table": {"anyOf": [{"$ref": "#/components/schemas/LocalTableIdentifier"}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Target Table"}, "target_columns": {"items": {"type": "string"}, "type": "array", "title": "Target Columns"}}, "type": "object", "required": ["table", "columns", "target_table", "target_columns"], "title": "ForeignKeyConstraintBase"}, "ForeignRelation-Input": {"properties": {"fk_columns": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Fk Columns"}, "referred_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Referred Table"}}, "type": "object", "required": ["fk_columns", "referred_table"], "title": "ForeignRelation"}, "ForeignRelation-Output": {"properties": {"fk_columns": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"items": {"type": "string"}, "type": "array"}], "title": "Fk Columns"}, "referred_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Referred Table"}}, "type": "object", "required": ["fk_columns", "referred_table"], "title": "ForeignRelation"}, "ForeignRelationInfo": {"properties": {"target_concept": {"type": "string", "title": "Target Concept"}, "fk_relations": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Fk Relations"}}, "type": "object", "required": ["target_concept", "fk_relations"], "title": "ForeignRelationInfo"}, "GroupValidationResult": {"properties": {"individual_validations": {"additionalProperties": {"items": {"prefixItems": [{"$ref": "#/components/schemas/TableIdentifier"}, {"$ref": "#/components/schemas/IndividualValidationResult"}], "type": "array", "maxItems": 2, "minItems": 2}, "type": "array"}, "type": "object", "title": "Individual Validations"}, "is_valid": {"type": "boolean", "title": "Is Valid", "readOnly": true}}, "type": "object", "required": ["is_valid"], "title": "GroupValidationResult"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "IndividualValidationResult": {"properties": {"is_valid": {"type": "boolean", "title": "Is Valid", "default": true}, "violations": {"items": {"type": "string"}, "type": "array", "title": "Violations"}}, "type": "object", "title": "IndividualValidationResult"}, "KeepAliveResponse": {"properties": {"server_status": {"type": "string", "const": "available", "title": "Server Status", "default": "available"}, "session_status": {"type": "string", "enum": ["missing session cookie", "session invalid", "session valid"], "title": "Session Status"}}, "type": "object", "required": ["session_status"], "title": "KeepAliveResponse"}, "Limit": {"properties": {"operation": {"type": "string", "const": "limit", "title": "Operation", "default": "limit"}, "limit": {"type": "integer", "title": "Limit"}}, "type": "object", "required": ["limit"], "title": "Limit"}, "LocalTableIdentifier": {"properties": {"name": {"type": "string", "title": "Name"}, "schema": {"type": "string", "title": "Schema", "default": "main"}}, "type": "object", "required": ["name"], "title": "LocalTableIdentifier"}, "MITM": {"type": "string", "enum": ["MAED", "OCEL2"], "title": "MITM"}, "MITMDataType": {"type": "string", "enum": ["text", "json", "integer", "numeric", "boolean", "datetime", "unknown", "infer"], "title": "MITMDataType"}, "MITMDefinition": {"properties": {"main_concepts": {"items": {"type": "string"}, "type": "array", "uniqueItems": true, "title": "Main Concepts"}, "weak_concepts": {"additionalProperties": {"$ref": "#/components/schemas/MITMDataType"}, "type": "object", "title": "Weak Concepts"}, "sub_concept_map": {"additionalProperties": {"items": {"type": "string"}, "type": "array", "uniqueItems": true}, "type": "object", "title": "Sub Concept Map"}, "concept_relations": {"additionalProperties": {"$ref": "#/components/schemas/OwnedRelations"}, "type": "object", "title": "Concept Relations"}, "concept_properties": {"additionalProperties": {"$ref": "#/components/schemas/ConceptProperties"}, "type": "object", "title": "Concept Properties"}, "leaf_concepts": {"items": {"type": "string"}, "type": "array", "uniqueItems": true, "title": "Leaf Concepts", "readOnly": true}, "abstract_concepts": {"items": {"type": "string"}, "type": "array", "uniqueItems": true, "title": "Abstract Concepts", "readOnly": true}, "parent_concept_map": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Parent Concept Map", "readOnly": true}}, "type": "object", "required": ["main_concepts", "weak_concepts", "sub_concept_map", "concept_relations", "concept_properties", "leaf_concepts", "abstract_concepts", "parent_concept_map"], "title": "MITMDefinition"}, "MappingExportRequest": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "concept_mappings": {"items": {"$ref": "#/components/schemas/ConceptMapping-Input"}, "type": "array", "title": "Concept Mappings"}, "post_processing": {"anyOf": [{"$ref": "#/components/schemas/PostProcessing"}, {"type": "null"}]}, "filename": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Filename"}}, "type": "object", "required": ["mitm", "concept_mappings"], "title": "MappingExportRequest"}, "MitMDataTypeInfo": {"properties": {"sql_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sql Type"}}, "type": "object", "required": ["sql_type"], "title": "MitMDataTypeInfo"}, "NumericSummaryStatistics": {"properties": {"count": {"type": "integer", "title": "Count"}, "mean": {"type": "number", "title": "Mean"}, "min": {"type": "number", "title": "Min"}, "max": {"type": "number", "title": "Max"}, "std": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Std"}, "percentile_25": {"type": "number", "title": "Percentile 25"}, "percentile_50": {"type": "number", "title": "Percentile 50"}, "percentile_75": {"type": "number", "title": "Percentile 75"}}, "type": "object", "required": ["count", "mean", "min", "max", "percentile_25", "percentile_50", "percentile_75"], "title": "NumericSummaryStatistics"}, "OwnedRelations": {"properties": {"identity": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Identity"}, "inline": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Inline"}, "foreign": {"additionalProperties": {"$ref": "#/components/schemas/ForeignRelationInfo"}, "type": "object", "title": "Foreign"}}, "type": "object", "required": ["identity", "inline", "foreign"], "title": "OwnedRelations"}, "PostProcessing": {"properties": {"table_postprocessing": {"items": {"$ref": "#/components/schemas/TablePostProcessing"}, "type": "array", "title": "Table Postprocessing"}}, "type": "object", "required": ["table_postprocessing"], "title": "PostProcessing"}, "PublishedMitMResponse": {"properties": {"url": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Url"}, "relative_uri": {"type": "string", "title": "Relative Uri"}, "deletion_request_url": {"type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Deletion Request Url"}, "export_id": {"type": "integer", "title": "Export Id"}}, "type": "object", "required": ["url", "relative_uri", "deletion_request_url", "export_id"], "title": "PublishedMitMResponse"}, "RawCompiled-Input": {"properties": {"operation": {"type": "string", "const": "compiled", "title": "Operation", "default": "compiled"}, "typed_query": {"$ref": "#/components/schemas/TypedRawQuery-Input"}}, "type": "object", "required": ["typed_query"], "title": "RawCompiled"}, "RawCompiled-Output": {"properties": {"operation": {"type": "string", "const": "compiled", "title": "Operation", "default": "compiled"}, "typed_query": {"$ref": "#/components/schemas/TypedRawQuery-Output"}}, "type": "object", "required": ["typed_query"], "title": "RawCompiled"}, "ReselectColumns": {"properties": {"operation": {"type": "string", "const": "reselect_columns", "title": "Operation", "default": "reselect_columns"}, "selection": {"items": {"type": "string"}, "type": "array", "title": "Selection"}}, "type": "object", "required": ["selection"], "title": "ReselectColumns"}, "SampleSummary": {"properties": {"sample_size": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Sample Size"}, "na_fraction": {"anyOf": [{"type": "number", "maximum": 1.0, "minimum": 0.0}, {"type": "null"}], "title": "Na Fraction"}, "unique_fraction": {"anyOf": [{"type": "number", "maximum": 1.0, "minimum": 0.0}, {"type": "null"}], "title": "Unique Fraction"}, "value_counts": {"anyOf": [{"additionalProperties": {"type": "integer"}, "type": "object"}, {"type": "null"}], "title": "Value Counts"}, "summary_statistics": {"anyOf": [{"$ref": "#/components/schemas/NumericSummaryStatistics"}, {"$ref": "#/components/schemas/CategoricalSummaryStatistics"}, {"$ref": "#/components/schemas/DatetimeSummaryStatistics"}, {"type": "null"}], "title": "Summary Statistics"}, "json_schema": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Json Schema"}}, "type": "object", "title": "SampleSummary"}, "SemanticColumnCondition": {"properties": {"inferred_data_type": {"anyOf": [{"$ref": "#/components/schemas/MITMDataType"}, {"type": "null"}]}, "max_na_fraction": {"anyOf": [{"type": "number", "maximum": 1.0, "minimum": 0.0}, {"type": "null"}], "title": "Max Na Fraction"}, "value_in_range": {"anyOf": [{}, {"type": "null"}], "title": "Value In Range"}, "contained_value": {"anyOf": [{}, {"type": "null"}], "title": "Contained Value"}, "contained_datetime": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Contained Datetime"}}, "type": "object", "title": "SemanticColumnCondition"}, "SemanticTableCondition": {"properties": {"min_row_count": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Min Row Count"}, "max_row_count": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Max Row Count"}}, "type": "object", "title": "SemanticTableCondition"}, "SessionIdResponse": {"properties": {"session_id": {"type": "string", "format": "uuid", "title": "Session Id"}}, "type": "object", "required": ["session_id"], "title": "SessionIdResponse"}, "SimpleJoin-Input": {"properties": {"operation": {"type": "string", "const": "join", "title": "Operation", "default": "join"}, "left_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Left Table"}, "right_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Right Table"}, "on_cols_left": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "On Cols Left"}, "on_cols_right": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "On Cols Right"}, "is_outer": {"type": "boolean", "title": "Is Outer", "default": false}, "full": {"type": "boolean", "title": "Full", "default": false}, "selected_cols_left": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Selected Cols Left"}, "selected_cols_right": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Selected Cols Right"}, "left_alias": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Left Alias"}, "right_alias": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Right Alias"}}, "type": "object", "required": ["left_table", "right_table"], "title": "SimpleJoin"}, "SimpleJoin-Output": {"properties": {"operation": {"type": "string", "const": "join", "title": "Operation", "default": "join"}, "left_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Left Table"}, "right_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Right Table"}, "on_cols_left": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "On Cols Left"}, "on_cols_right": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "On Cols Right"}, "is_outer": {"type": "boolean", "title": "Is Outer", "default": false}, "full": {"type": "boolean", "title": "Full", "default": false}, "selected_cols_left": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Selected Cols Left"}, "selected_cols_right": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Selected Cols Right"}, "left_alias": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Left Alias"}, "right_alias": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Right Alias"}}, "type": "object", "required": ["left_table", "right_table"], "title": "SimpleJoin"}, "SimpleSQLOperator": {"type": "string", "enum": ["ilike", "like", "eq", "ge", "gt", "le", "lt", "in", "notin"], "title": "SimpleSQLOperator"}, "SimpleWhere-Input": {"properties": {"lhs": {"type": "string", "title": "Lhs"}, "operator": {"$ref": "#/components/schemas/SimpleSQLOperator"}, "rhs": {"anyOf": [{"type": "string"}, {"prefixItems": [{}, {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}]}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Rhs"}}, "type": "object", "required": ["lhs", "operator", "rhs"], "title": "SimpleWhere"}, "SimpleWhere-Output": {"properties": {"lhs": {"type": "string", "title": "Lhs"}, "operator": {"$ref": "#/components/schemas/SimpleSQLOperator"}, "rhs": {"anyOf": [{"type": "string"}, {"prefixItems": [{}, {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}]}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Rhs"}, "rhs_is_literal": {"type": "boolean", "title": "Rhs Is Literal", "readOnly": true}}, "type": "object", "required": ["lhs", "operator", "rhs", "rhs_is_literal"], "title": "SimpleWhere"}, "SourceDBType": {"type": "string", "enum": ["original", "working", "virtual"], "title": "SourceDBType"}, "StandaloneDBMapping": {"properties": {"mitm": {"$ref": "#/components/schemas/MITM"}, "concept_mappings": {"items": {"$ref": "#/components/schemas/ConceptMapping-Output"}, "type": "array", "title": "Concept Mappings"}, "virtual_db_creation": {"$ref": "#/components/schemas/VirtualDBCreation"}}, "type": "object", "required": ["mitm", "concept_mappings", "virtual_db_creation"], "title": "StandaloneDBMapping"}, "SyntacticColumnCondition": {"properties": {"name_regex": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Regex"}, "sql_data_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sql Data Type"}, "mitm_data_type": {"anyOf": [{"$ref": "#/components/schemas/MITMDataType"}, {"type": "null"}]}}, "type": "object", "title": "SyntacticColumnCondition"}, "SyntacticTableCondition": {"properties": {"schema_regex": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Schema Regex"}, "name_regex": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name Regex"}, "min_col_count": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Min Col Count"}, "max_col_count": {"anyOf": [{"type": "integer", "minimum": 0.0}, {"type": "null"}], "title": "Max Col Count"}, "has_foreign_key": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Has Foreign Key"}}, "type": "object", "title": "SyntacticTableCondition"}, "TableFilter-Input": {"properties": {"operation": {"type": "string", "const": "table_filter", "title": "Operation", "default": "table_filter"}, "wheres": {"items": {"$ref": "#/components/schemas/SimpleWhere-Input"}, "type": "array", "title": "Wheres"}, "limit": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Limit"}}, "type": "object", "required": ["wheres"], "title": "TableFilter"}, "TableFilter-Output": {"properties": {"operation": {"type": "string", "const": "table_filter", "title": "Operation", "default": "table_filter"}, "wheres": {"items": {"$ref": "#/components/schemas/SimpleWhere-Output"}, "type": "array", "title": "Wheres"}, "limit": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Limit"}}, "type": "object", "required": ["wheres"], "title": "TableFilter"}, "TableIdentifier": {"properties": {"source": {"$ref": "#/components/schemas/SourceDBType", "default": "original"}, "schema": {"type": "string", "title": "Schema", "default": "main"}, "name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["name"], "title": "TableIdentifier"}, "TableMetaInfoBase": {"properties": {"schema_name": {"type": "string", "title": "Schema Name", "default": "main"}, "name": {"type": "string", "title": "Name"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "sql_column_types": {"items": {"type": "string"}, "type": "array", "title": "Sql Column Types"}, "primary_key": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Primary Key"}, "indexes": {"anyOf": [{"items": {"items": {"type": "string"}, "type": "array"}, "type": "array"}, {"type": "null"}], "title": "Indexes"}, "foreign_key_constraints": {"items": {"$ref": "#/components/schemas/ForeignKeyConstraintBase"}, "type": "array", "title": "Foreign Key Constraints"}, "column_properties": {"additionalProperties": {"$ref": "#/components/schemas/ColumnProperties"}, "type": "object", "title": "Column Properties"}}, "type": "object", "required": ["name", "columns", "sql_column_types"], "title": "TableMetaInfoBase"}, "TableMetaInfoResponse": {"properties": {"schema_name": {"type": "string", "title": "Schema Name", "default": "main"}, "name": {"type": "string", "title": "Name"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "sql_column_types": {"items": {"type": "string"}, "type": "array", "title": "Sql Column Types"}, "primary_key": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Primary Key"}, "indexes": {"anyOf": [{"items": {"items": {"type": "string"}, "type": "array"}, "type": "array"}, {"type": "null"}], "title": "Indexes"}, "foreign_key_constraints": {"items": {"$ref": "#/components/schemas/ForeignKeyConstraintBase"}, "type": "array", "title": "Foreign Key Constraints"}, "column_properties": {"additionalProperties": {"$ref": "#/components/schemas/ColumnProperties"}, "type": "object", "title": "Column Properties"}}, "type": "object", "required": ["name", "columns", "sql_column_types"], "title": "TableMetaInfoResponse"}, "TablePostProcessing": {"properties": {"target_table": {"anyOf": [{"$ref": "#/components/schemas/TableIdentifier"}, {"prefixItems": [{"$ref": "#/components/schemas/SourceDBType"}, {"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 3, "minItems": 3}, {"prefixItems": [{"type": "string"}, {"type": "string"}], "type": "array", "maxItems": 2, "minItems": 2}], "title": "Target Table"}, "transforms": {"items": {"oneOf": [{"$ref": "#/components/schemas/EditColumns-Input"}, {"$ref": "#/components/schemas/ReselectColumns"}, {"$ref": "#/components/schemas/TableFilter-Input"}, {"$ref": "#/components/schemas/Limit"}], "discriminator": {"propertyName": "operation", "mapping": {"edit_columns": "#/components/schemas/EditColumns-Input", "limit": "#/components/schemas/Limit", "reselect_columns": "#/components/schemas/ReselectColumns", "table_filter": "#/components/schemas/TableFilter-Input"}}}, "type": "array", "title": "Transforms"}}, "type": "object", "required": ["target_table", "transforms"], "title": "TablePostProcessing"}, "TableProbeBase": {"properties": {"row_count": {"type": "integer", "minimum": 0.0, "title": "Row Count"}, "inferred_types": {"additionalProperties": {"$ref": "#/components/schemas/MITMDataType"}, "type": "object", "title": "Inferred Types"}, "sample_summaries": {"additionalProperties": {"$ref": "#/components/schemas/SampleSummary"}, "type": "object", "title": "Sample Summaries"}, "table_meta": {"$ref": "#/components/schemas/TableMetaInfoBase"}, "sampled_values": {"additionalProperties": {"items": {}, "type": "array"}, "type": "object", "title": "Sampled Values"}}, "type": "object", "required": ["row_count", "inferred_types", "sample_summaries", "table_meta", "sampled_values"], "title": "TableProbeBase"}, "TableProbeResponse": {"properties": {"row_count": {"type": "integer", "minimum": 0.0, "title": "Row Count"}, "inferred_types": {"additionalProperties": {"$ref": "#/components/schemas/MITMDataType"}, "type": "object", "title": "Inferred Types"}, "sample_summaries": {"additionalProperties": {"$ref": "#/components/schemas/SampleSummary"}, "type": "object", "title": "Sample Summaries"}, "table_meta": {"$ref": "#/components/schemas/TableMetaInfoBase"}, "sampled_values": {"additionalProperties": {"items": {}, "type": "array"}, "type": "object", "title": "Sampled Values"}}, "type": "object", "required": ["row_count", "inferred_types", "sample_summaries", "table_meta", "sampled_values"], "title": "TableProbeResponse"}, "TableQueryResult": {"properties": {"table_info": {"anyOf": [{"$ref": "#/components/schemas/TableMetaInfoResponse"}, {"type": "null"}]}, "rows": {"items": {"items": {}, "type": "array"}, "type": "array", "title": "Rows"}}, "type": "object", "required": ["table_info", "rows"], "title": "TableQueryResult"}, "TypedRawQuery-Input": {"properties": {"dialect": {"type": "string", "title": "Dialect"}, "compiled_sql": {"type": "string", "title": "Compiled Sql"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "column_dtypes": {"items": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}]}, "type": "array", "title": "Column Dtypes"}}, "type": "object", "required": ["dialect", "compiled_sql", "columns", "column_dtypes"], "title": "TypedRawQuery"}, "TypedRawQuery-Output": {"properties": {"dialect": {"type": "string", "title": "Dialect"}, "compiled_sql": {"type": "string", "title": "Compiled Sql"}, "columns": {"items": {"type": "string"}, "type": "array", "title": "Columns"}, "column_dtypes": {"items": {"anyOf": [{"$ref": "#/components/schemas/WrappedMITMDataType"}, {"type": "string"}]}, "type": "array", "title": "Column Dtypes"}}, "type": "object", "required": ["dialect", "compiled_sql", "columns", "column_dtypes"], "title": "TypedRawQuery"}, "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"}, "VirtualDBCreation": {"properties": {"virtual_view_creations": {"items": {"$ref": "#/components/schemas/VirtualViewCreation-Output"}, "type": "array", "title": "Virtual View Creations"}}, "type": "object", "title": "VirtualDBCreation"}, "VirtualViewCreation-Input": {"properties": {"name": {"type": "string", "title": "Name"}, "schema": {"type": "string", "title": "Schema", "default": "virtual"}, "table_creation": {"oneOf": [{"$ref": "#/components/schemas/SimpleJoin-Input"}, {"$ref": "#/components/schemas/ExistingTable-Input"}, {"$ref": "#/components/schemas/RawCompiled-Input"}], "title": "Table Creation", "discriminator": {"propertyName": "operation", "mapping": {"compiled": "#/components/schemas/RawCompiled-Input", "existing": "#/components/schemas/ExistingTable-Input", "join": "#/components/schemas/SimpleJoin-Input"}}}, "transforms": {"anyOf": [{"items": {"oneOf": [{"$ref": "#/components/schemas/EditColumns-Input"}, {"$ref": "#/components/schemas/ReselectColumns"}, {"$ref": "#/components/schemas/TableFilter-Input"}, {"$ref": "#/components/schemas/Limit"}], "discriminator": {"propertyName": "operation", "mapping": {"edit_columns": "#/components/schemas/EditColumns-Input", "limit": "#/components/schemas/Limit", "reselect_columns": "#/components/schemas/ReselectColumns", "table_filter": "#/components/schemas/TableFilter-Input"}}}, "type": "array"}, {"type": "null"}], "title": "Transforms"}}, "type": "object", "required": ["name", "table_creation"], "title": "VirtualViewCreation"}, "VirtualViewCreation-Output": {"properties": {"name": {"type": "string", "title": "Name"}, "schema": {"type": "string", "title": "Schema", "default": "virtual"}, "table_creation": {"oneOf": [{"$ref": "#/components/schemas/SimpleJoin-Output"}, {"$ref": "#/components/schemas/ExistingTable-Output"}, {"$ref": "#/components/schemas/RawCompiled-Output"}], "title": "Table Creation", "discriminator": {"propertyName": "operation", "mapping": {"compiled": "#/components/schemas/RawCompiled-Output", "existing": "#/components/schemas/ExistingTable-Output", "join": "#/components/schemas/SimpleJoin-Output"}}}, "transforms": {"anyOf": [{"items": {"oneOf": [{"$ref": "#/components/schemas/EditColumns-Output"}, {"$ref": "#/components/schemas/ReselectColumns"}, {"$ref": "#/components/schemas/TableFilter-Output"}, {"$ref": "#/components/schemas/Limit"}], "discriminator": {"propertyName": "operation", "mapping": {"edit_columns": "#/components/schemas/EditColumns-Output", "limit": "#/components/schemas/Limit", "reselect_columns": "#/components/schemas/ReselectColumns", "table_filter": "#/components/schemas/TableFilter-Output"}}}, "type": "array"}, {"type": "null"}], "title": "Transforms"}}, "type": "object", "required": ["name", "table_creation"], "title": "VirtualViewCreation"}, "VirtualViewCreationRequest": {"properties": {"name": {"type": "string", "title": "Name"}, "schema": {"type": "string", "title": "Schema", "default": "virtual"}, "table_creation": {"oneOf": [{"$ref": "#/components/schemas/SimpleJoin-Input"}, {"$ref": "#/components/schemas/ExistingTable-Input"}, {"$ref": "#/components/schemas/RawCompiled-Input"}], "title": "Table Creation", "discriminator": {"propertyName": "operation", "mapping": {"compiled": "#/components/schemas/RawCompiled-Input", "existing": "#/components/schemas/ExistingTable-Input", "join": "#/components/schemas/SimpleJoin-Input"}}}, "transforms": {"anyOf": [{"items": {"oneOf": [{"$ref": "#/components/schemas/EditColumns-Input"}, {"$ref": "#/components/schemas/ReselectColumns"}, {"$ref": "#/components/schemas/TableFilter-Input"}, {"$ref": "#/components/schemas/Limit"}], "discriminator": {"propertyName": "operation", "mapping": {"edit_columns": "#/components/schemas/EditColumns-Input", "limit": "#/components/schemas/Limit", "reselect_columns": "#/components/schemas/ReselectColumns", "table_filter": "#/components/schemas/TableFilter-Input"}}}, "type": "array"}, {"type": "null"}], "title": "Transforms"}}, "type": "object", "required": ["name", "table_creation"], "title": "VirtualViewCreationRequest"}, "VirtualViewResponse": {"properties": {"table_meta": {"$ref": "#/components/schemas/TableMetaInfoResponse"}}, "type": "object", "required": ["table_meta"], "title": "VirtualViewResponse"}, "WrappedMITMDataType": {"properties": {"mitm": {"$ref": "#/components/schemas/MITMDataType"}}, "type": "object", "required": ["mitm"], "title": "WrappedMITMDataType"}}}} \ No newline at end of file diff --git a/schema/openapi.yaml b/schema/openapi.yaml index 7a334c4b67a6542efb4d7636b682fd5669c31132..6bcd1819899b47ff4ec270faf13d4c167f5533d7 100644 --- a/schema/openapi.yaml +++ b/schema/openapi.yaml @@ -1,6 +1,29 @@ components: schemas: - AddColumn: + AddColumn-Input: + properties: + col_name: + title: Col Name + type: string + operation: + const: add_column + default: add_column + title: Operation + type: string + target_type: + anyOf: + - $ref: '#/components/schemas/WrappedMITMDataType' + - type: string + title: Target Type + value: + title: Value + required: + - col_name + - value + - target_type + title: AddColumn + type: object + AddColumn-Output: properties: col_name: title: Col Name @@ -54,7 +77,23 @@ components: - sqlite title: Body_upload_db_session_upload_db_post type: object - CastColumn: + CastColumn-Input: + properties: + operation: + const: cast_column + default: cast_column + title: Operation + type: string + target_type: + anyOf: + - $ref: '#/components/schemas/WrappedMITMDataType' + - type: string + title: Target Type + required: + - target_type + title: CastColumn + type: object + CastColumn-Output: properties: operation: const: cast_column @@ -122,6 +161,23 @@ components: - mitm_data_type title: ColumnProperties type: object + CompiledVirtualDB: + properties: + compiled_virtual_views: + items: + $ref: '#/components/schemas/CompiledVirtualView' + title: Compiled Virtual Views + type: array + views: + additionalProperties: + $ref: '#/components/schemas/CompiledVirtualView' + readOnly: true + title: Views + type: object + required: + - views + title: CompiledVirtualDB + type: object CompiledVirtualView: properties: column_dtypes: @@ -170,7 +226,7 @@ components: - weak title: ConceptLevel type: string - ConceptMapping: + ConceptMapping-Input: properties: attribute_dtypes: items: @@ -204,7 +260,79 @@ components: type: string foreign_relations: additionalProperties: - $ref: '#/components/schemas/ForeignRelation' + $ref: '#/components/schemas/ForeignRelation-Input' + title: Foreign Relations + type: object + identity_columns: + anyOf: + - additionalProperties: + type: string + type: object + - items: + type: string + type: array + title: Identity Columns + inline_relations: + anyOf: + - additionalProperties: + type: string + type: object + - items: + type: string + type: array + title: Inline Relations + kind_col: + anyOf: + - type: string + - type: 'null' + title: Kind Col + mitm: + $ref: '#/components/schemas/MITM' + type_col: + title: Type Col + type: string + required: + - mitm + - concept + - base_table + - type_col + title: ConceptMapping + type: object + ConceptMapping-Output: + properties: + attribute_dtypes: + items: + $ref: '#/components/schemas/MITMDataType' + title: Attribute Dtypes + type: array + attributes: + items: + type: string + title: Attributes + type: array + base_table: + anyOf: + - $ref: '#/components/schemas/TableIdentifier' + - maxItems: 3 + minItems: 3 + prefixItems: + - $ref: '#/components/schemas/SourceDBType' + - type: string + - type: string + type: array + - maxItems: 2 + minItems: 2 + prefixItems: + - type: string + - type: string + type: array + title: Base Table + concept: + title: Concept + type: string + foreign_relations: + additionalProperties: + $ref: '#/components/schemas/ForeignRelation-Output' title: Foreign Relations type: object identity_columns: @@ -276,7 +404,7 @@ components: type: string foreign_relations: additionalProperties: - $ref: '#/components/schemas/ForeignRelation' + $ref: '#/components/schemas/ForeignRelation-Input' title: Foreign Relations type: object identity_columns: @@ -383,6 +511,25 @@ components: - success title: DBConnTestResponse type: object + DBMappingExportRequest: + properties: + concept_mappings: + items: + $ref: '#/components/schemas/ConceptMapping-Input' + title: Concept Mappings + type: array + mitm: + $ref: '#/components/schemas/MITM' + virtual_view_creations: + items: + $ref: '#/components/schemas/VirtualViewCreation-Input' + title: Virtual View Creations + type: array + required: + - mitm + - concept_mappings + title: DBMappingExportRequest + type: object DBMetaInfoBase: properties: db_structure: @@ -392,15 +539,8 @@ components: type: object title: Db Structure type: object - tables: - additionalProperties: - $ref: '#/components/schemas/TableMetaInfoBase' - readOnly: true - title: Tables - type: object required: - db_structure - - tables title: DBMetaInfoBase type: object DBMetaInfoResponse: @@ -412,15 +552,8 @@ components: type: object title: Db Structure type: object - tables: - additionalProperties: - $ref: '#/components/schemas/TableMetaInfoBase' - readOnly: true - title: Tables - type: object required: - db_structure - - tables title: DBMetaInfoResponse type: object DBMetaQuery: @@ -451,10 +584,12 @@ components: properties: db_meta: $ref: '#/components/schemas/DBMetaInfoBase' - table_probes: + db_table_probes: additionalProperties: - $ref: '#/components/schemas/TableProbeBase' - title: Table Probes + additionalProperties: + $ref: '#/components/schemas/TableProbeBase' + type: object + title: Db Table Probes type: object required: - db_meta @@ -550,18 +685,18 @@ components: - mermaid title: ERVariant type: string - EditColumns: + EditColumns-Input: properties: additions: additionalProperties: items: discriminator: mapping: - add_column: '#/components/schemas/AddColumn' + add_column: '#/components/schemas/AddColumn-Input' extract_json: '#/components/schemas/ExtractJson' propertyName: operation oneOf: - - $ref: '#/components/schemas/AddColumn' + - $ref: '#/components/schemas/AddColumn-Input' - $ref: '#/components/schemas/ExtractJson' type: array title: Additions @@ -586,15 +721,87 @@ components: additionalProperties: discriminator: mapping: - cast_column: '#/components/schemas/CastColumn' + cast_column: '#/components/schemas/CastColumn-Input' propertyName: operation oneOf: - - $ref: '#/components/schemas/CastColumn' + - $ref: '#/components/schemas/CastColumn-Input' title: Transforms type: object title: EditColumns type: object - ExistingTable: + EditColumns-Output: + properties: + additions: + additionalProperties: + items: + discriminator: + mapping: + add_column: '#/components/schemas/AddColumn-Output' + extract_json: '#/components/schemas/ExtractJson' + propertyName: operation + oneOf: + - $ref: '#/components/schemas/AddColumn-Output' + - $ref: '#/components/schemas/ExtractJson' + type: array + title: Additions + type: object + drops: + items: + type: string + title: Drops + type: array + uniqueItems: true + operation: + const: edit_columns + default: edit_columns + title: Operation + type: string + renames: + additionalProperties: + type: string + title: Renames + type: object + transforms: + additionalProperties: + discriminator: + mapping: + cast_column: '#/components/schemas/CastColumn-Output' + propertyName: operation + oneOf: + - $ref: '#/components/schemas/CastColumn-Output' + title: Transforms + type: object + title: EditColumns + type: object + ExistingTable-Input: + properties: + base_table: + anyOf: + - $ref: '#/components/schemas/TableIdentifier' + - maxItems: 3 + minItems: 3 + prefixItems: + - $ref: '#/components/schemas/SourceDBType' + - type: string + - type: string + type: array + - maxItems: 2 + minItems: 2 + prefixItems: + - type: string + - type: string + type: array + title: Base Table + operation: + const: existing + default: existing + title: Operation + type: string + required: + - base_table + title: ExistingTable + type: object + ExistingTable-Output: properties: base_table: anyOf: @@ -746,7 +953,40 @@ components: - target_columns title: ForeignKeyConstraintBase type: object - ForeignRelation: + ForeignRelation-Input: + properties: + fk_columns: + anyOf: + - additionalProperties: + type: string + type: object + - items: + type: string + type: array + title: Fk Columns + referred_table: + anyOf: + - $ref: '#/components/schemas/TableIdentifier' + - maxItems: 3 + minItems: 3 + prefixItems: + - $ref: '#/components/schemas/SourceDBType' + - type: string + - type: string + type: array + - maxItems: 2 + minItems: 2 + prefixItems: + - type: string + - type: string + type: array + title: Referred Table + required: + - fk_columns + - referred_table + title: ForeignRelation + type: object + ForeignRelation-Output: properties: fk_columns: anyOf: @@ -965,16 +1205,16 @@ components: type: object MappingExportRequest: properties: + concept_mappings: + items: + $ref: '#/components/schemas/ConceptMapping-Input' + title: Concept Mappings + type: array filename: anyOf: - type: string - type: 'null' title: Filename - mapped_concepts: - items: - $ref: '#/components/schemas/ConceptMapping' - title: Mapped Concepts - type: array mitm: $ref: '#/components/schemas/MITM' post_processing: @@ -983,17 +1223,9 @@ components: - type: 'null' required: - mitm - - mapped_concepts + - concept_mappings title: MappingExportRequest type: object - MappingGroupValidationResult: - properties: - validation_result: - $ref: '#/components/schemas/GroupValidationResult' - required: - - validation_result - title: MappingGroupValidationResult - type: object MitMDataTypeInfo: properties: sql_type: @@ -1104,15 +1336,28 @@ components: - export_id title: PublishedMitMResponse type: object - RawCompiled: + RawCompiled-Input: + properties: + operation: + const: compiled + default: compiled + title: Operation + type: string + typed_query: + $ref: '#/components/schemas/TypedRawQuery-Input' + required: + - typed_query + title: RawCompiled + type: object + RawCompiled-Output: properties: operation: - const: raw - default: raw + const: compiled + default: compiled title: Operation type: string typed_query: - $ref: '#/components/schemas/TypedRawQuery' + $ref: '#/components/schemas/TypedRawQuery-Output' required: - typed_query title: RawCompiled @@ -1231,10 +1476,102 @@ components: title: Session Id type: string required: - - session_id - title: SessionIdResponse + - session_id + title: SessionIdResponse + type: object + SimpleJoin-Input: + properties: + full: + default: false + title: Full + type: boolean + is_outer: + default: false + title: Is Outer + type: boolean + left_alias: + anyOf: + - type: string + - type: 'null' + title: Left Alias + left_table: + anyOf: + - $ref: '#/components/schemas/TableIdentifier' + - maxItems: 3 + minItems: 3 + prefixItems: + - $ref: '#/components/schemas/SourceDBType' + - type: string + - type: string + type: array + - maxItems: 2 + minItems: 2 + prefixItems: + - type: string + - type: string + type: array + title: Left Table + on_cols_left: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: On Cols Left + on_cols_right: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: On Cols Right + operation: + const: join + default: join + title: Operation + type: string + right_alias: + anyOf: + - type: string + - type: 'null' + title: Right Alias + right_table: + anyOf: + - $ref: '#/components/schemas/TableIdentifier' + - maxItems: 3 + minItems: 3 + prefixItems: + - $ref: '#/components/schemas/SourceDBType' + - type: string + - type: string + type: array + - maxItems: 2 + minItems: 2 + prefixItems: + - type: string + - type: string + type: array + title: Right Table + selected_cols_left: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Selected Cols Left + selected_cols_right: + anyOf: + - items: + type: string + type: array + - type: 'null' + title: Selected Cols Right + required: + - left_table + - right_table + title: SimpleJoin type: object - SimpleJoin: + SimpleJoin-Output: properties: full: default: false @@ -1339,7 +1676,32 @@ components: - notin title: SimpleSQLOperator type: string - SimpleWhere: + SimpleWhere-Input: + properties: + lhs: + title: Lhs + type: string + operator: + $ref: '#/components/schemas/SimpleSQLOperator' + rhs: + anyOf: + - type: string + - maxItems: 2 + minItems: 2 + prefixItems: + - {} + - anyOf: + - $ref: '#/components/schemas/WrappedMITMDataType' + - type: string + type: array + title: Rhs + required: + - lhs + - operator + - rhs + title: SimpleWhere + type: object + SimpleWhere-Output: properties: lhs: title: Lhs @@ -1358,10 +1720,15 @@ components: - type: string type: array title: Rhs + rhs_is_literal: + readOnly: true + title: Rhs Is Literal + type: boolean required: - lhs - operator - rhs + - rhs_is_literal title: SimpleWhere type: object SourceDBType: @@ -1371,6 +1738,23 @@ components: - virtual title: SourceDBType type: string + StandaloneDBMapping: + properties: + concept_mappings: + items: + $ref: '#/components/schemas/ConceptMapping-Output' + title: Concept Mappings + type: array + mitm: + $ref: '#/components/schemas/MITM' + virtual_db_creation: + $ref: '#/components/schemas/VirtualDBCreation' + required: + - mitm + - concept_mappings + - virtual_db_creation + title: StandaloneDBMapping + type: object SyntacticColumnCondition: properties: mitm_data_type: @@ -1420,7 +1804,28 @@ components: title: Schema Regex title: SyntacticTableCondition type: object - TableFilter: + TableFilter-Input: + properties: + limit: + anyOf: + - type: integer + - type: 'null' + title: Limit + operation: + const: table_filter + default: table_filter + title: Operation + type: string + wheres: + items: + $ref: '#/components/schemas/SimpleWhere-Input' + title: Wheres + type: array + required: + - wheres + title: TableFilter + type: object + TableFilter-Output: properties: limit: anyOf: @@ -1434,7 +1839,7 @@ components: type: string wheres: items: - $ref: '#/components/schemas/SimpleWhere' + $ref: '#/components/schemas/SimpleWhere-Output' title: Wheres type: array required: @@ -1582,15 +1987,15 @@ components: items: discriminator: mapping: - edit_columns: '#/components/schemas/EditColumns' + edit_columns: '#/components/schemas/EditColumns-Input' limit: '#/components/schemas/Limit' reselect_columns: '#/components/schemas/ReselectColumns' - table_filter: '#/components/schemas/TableFilter' + table_filter: '#/components/schemas/TableFilter-Input' propertyName: operation oneOf: - - $ref: '#/components/schemas/EditColumns' + - $ref: '#/components/schemas/EditColumns-Input' - $ref: '#/components/schemas/ReselectColumns' - - $ref: '#/components/schemas/TableFilter' + - $ref: '#/components/schemas/TableFilter-Input' - $ref: '#/components/schemas/Limit' title: Transforms type: array @@ -1680,7 +2085,34 @@ components: - rows title: TableQueryResult type: object - TypedRawQuery: + TypedRawQuery-Input: + properties: + column_dtypes: + items: + anyOf: + - $ref: '#/components/schemas/WrappedMITMDataType' + - type: string + title: Column Dtypes + type: array + columns: + items: + type: string + title: Columns + type: array + compiled_sql: + title: Compiled Sql + type: string + dialect: + title: Dialect + type: string + required: + - dialect + - compiled_sql + - columns + - column_dtypes + title: TypedRawQuery + type: object + TypedRawQuery-Output: properties: column_dtypes: items: @@ -1728,6 +2160,103 @@ components: - type title: ValidationError type: object + VirtualDBCreation: + properties: + virtual_view_creations: + items: + $ref: '#/components/schemas/VirtualViewCreation-Output' + title: Virtual View Creations + type: array + title: VirtualDBCreation + type: object + VirtualViewCreation-Input: + properties: + name: + title: Name + type: string + schema: + default: virtual + title: Schema + type: string + table_creation: + discriminator: + mapping: + compiled: '#/components/schemas/RawCompiled-Input' + existing: '#/components/schemas/ExistingTable-Input' + join: '#/components/schemas/SimpleJoin-Input' + propertyName: operation + oneOf: + - $ref: '#/components/schemas/SimpleJoin-Input' + - $ref: '#/components/schemas/ExistingTable-Input' + - $ref: '#/components/schemas/RawCompiled-Input' + title: Table Creation + transforms: + anyOf: + - items: + discriminator: + mapping: + edit_columns: '#/components/schemas/EditColumns-Input' + limit: '#/components/schemas/Limit' + reselect_columns: '#/components/schemas/ReselectColumns' + table_filter: '#/components/schemas/TableFilter-Input' + propertyName: operation + oneOf: + - $ref: '#/components/schemas/EditColumns-Input' + - $ref: '#/components/schemas/ReselectColumns' + - $ref: '#/components/schemas/TableFilter-Input' + - $ref: '#/components/schemas/Limit' + type: array + - type: 'null' + title: Transforms + required: + - name + - table_creation + title: VirtualViewCreation + type: object + VirtualViewCreation-Output: + properties: + name: + title: Name + type: string + schema: + default: virtual + title: Schema + type: string + table_creation: + discriminator: + mapping: + compiled: '#/components/schemas/RawCompiled-Output' + existing: '#/components/schemas/ExistingTable-Output' + join: '#/components/schemas/SimpleJoin-Output' + propertyName: operation + oneOf: + - $ref: '#/components/schemas/SimpleJoin-Output' + - $ref: '#/components/schemas/ExistingTable-Output' + - $ref: '#/components/schemas/RawCompiled-Output' + title: Table Creation + transforms: + anyOf: + - items: + discriminator: + mapping: + edit_columns: '#/components/schemas/EditColumns-Output' + limit: '#/components/schemas/Limit' + reselect_columns: '#/components/schemas/ReselectColumns' + table_filter: '#/components/schemas/TableFilter-Output' + propertyName: operation + oneOf: + - $ref: '#/components/schemas/EditColumns-Output' + - $ref: '#/components/schemas/ReselectColumns' + - $ref: '#/components/schemas/TableFilter-Output' + - $ref: '#/components/schemas/Limit' + type: array + - type: 'null' + title: Transforms + required: + - name + - table_creation + title: VirtualViewCreation + type: object VirtualViewCreationRequest: properties: name: @@ -1740,29 +2269,29 @@ components: table_creation: discriminator: mapping: - existing: '#/components/schemas/ExistingTable' - join: '#/components/schemas/SimpleJoin' - raw: '#/components/schemas/RawCompiled' + compiled: '#/components/schemas/RawCompiled-Input' + existing: '#/components/schemas/ExistingTable-Input' + join: '#/components/schemas/SimpleJoin-Input' propertyName: operation oneOf: - - $ref: '#/components/schemas/SimpleJoin' - - $ref: '#/components/schemas/ExistingTable' - - $ref: '#/components/schemas/RawCompiled' + - $ref: '#/components/schemas/SimpleJoin-Input' + - $ref: '#/components/schemas/ExistingTable-Input' + - $ref: '#/components/schemas/RawCompiled-Input' title: Table Creation transforms: anyOf: - items: discriminator: mapping: - edit_columns: '#/components/schemas/EditColumns' + edit_columns: '#/components/schemas/EditColumns-Input' limit: '#/components/schemas/Limit' reselect_columns: '#/components/schemas/ReselectColumns' - table_filter: '#/components/schemas/TableFilter' + table_filter: '#/components/schemas/TableFilter-Input' propertyName: operation oneOf: - - $ref: '#/components/schemas/EditColumns' + - $ref: '#/components/schemas/EditColumns-Input' - $ref: '#/components/schemas/ReselectColumns' - - $ref: '#/components/schemas/TableFilter' + - $ref: '#/components/schemas/TableFilter-Input' - $ref: '#/components/schemas/Limit' type: array - type: 'null' @@ -1848,23 +2377,10 @@ paths: summary: Clear Uploads tags: - admin - /control/compiled-virtual-view: + /control/compiled-virtual-db: get: - operationId: get_compiled_virtual_view + operationId: get_compiled_virtual_db parameters: - - in: query - name: view - required: true - schema: - title: View - type: string - - in: query - name: schema - required: false - schema: - default: virtual - title: Schema - type: string - in: cookie name: simple_session required: true @@ -1876,7 +2392,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CompiledVirtualView' + $ref: '#/components/schemas/CompiledVirtualDB' description: Successful Response '422': content: @@ -1884,13 +2400,26 @@ paths: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error - summary: Get Compiled Virtual View + summary: Get Compiled Virtual Db tags: - control - /control/compiled-virtual-views: + /control/compiled-virtual-view: get: - operationId: get_compiled_virtual_views + operationId: get_compiled_virtual_view parameters: + - in: query + name: view + required: true + schema: + title: View + type: string + - in: query + name: schema + required: false + schema: + default: virtual + title: Schema + type: string - in: cookie name: simple_session required: true @@ -1902,11 +2431,7 @@ paths: content: application/json: schema: - items: - $ref: '#/components/schemas/CompiledVirtualView' - title: Response Get Compiled Virtual Views Control Compiled Virtual - Views Get - type: array + $ref: '#/components/schemas/CompiledVirtualView' description: Successful Response '422': content: @@ -1914,7 +2439,7 @@ paths: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error - summary: Get Compiled Virtual Views + summary: Get Compiled Virtual View tags: - control /control/init-working-db: @@ -2005,6 +2530,32 @@ paths: summary: Reflect Db tags: - control + /control/virtual-db-creation: + get: + operationId: get_virtual_db_creation + parameters: + - in: cookie + name: simple_session + required: true + schema: + title: Simple Session + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/VirtualDBCreation' + description: Successful Response + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + summary: Get Virtual Db Creation + tags: + - control /control/virtual-view: delete: operationId: drop_virtual_view @@ -2567,6 +3118,13 @@ paths: post: operationId: export_mitm parameters: + - in: query + name: use_streaming + required: false + schema: + default: false + title: Use Streaming + type: boolean - in: cookie name: simple_session required: true @@ -2591,16 +3149,62 @@ paths: summary: Export Mitm tags: - mitm + /mitm/export-standalone-db-mapping: + post: + operationId: export_standalone_db_mapping + parameters: + - in: query + name: include_virtual_db + required: false + schema: + default: true + title: Include Virtual Db + type: boolean + - in: query + name: validate + required: false + schema: + default: true + title: Validate + type: boolean + - in: cookie + name: simple_session + required: true + schema: + title: Simple Session + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DBMappingExportRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/StandaloneDBMapping' + description: Successful Response + '422': + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + description: Validation Error + summary: Export Standalone Db Mapping + tags: + - mitm /mitm/publish-mitm-export: post: operationId: publish_mitm_export parameters: - in: query - name: use_streaming_export + name: use_streaming required: false schema: default: false - title: Use Streaming Export + title: Use Streaming type: boolean - in: cookie name: simple_session @@ -2654,7 +3258,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/MappingGroupValidationResult' + $ref: '#/components/schemas/GroupValidationResult' description: Successful Response '422': content: diff --git a/schema/standalone-mapping-schema.yaml b/schema/standalone-mapping-schema.yaml new file mode 100644 index 0000000000000000000000000000000000000000..37045ef8e8eafa1beb6d629980bc981b198864b1 --- /dev/null +++ b/schema/standalone-mapping-schema.yaml @@ -0,0 +1,587 @@ +$defs: + AddColumn: + properties: + col_name: + title: Col Name + type: string + operation: + const: add_column + default: add_column + title: Operation + type: string + target_type: + anyOf: + - $ref: '#/$defs/WrappedMITMDataType' + - type: string + title: Target Type + value: + title: Value + required: + - col_name + - value + - target_type + title: AddColumn + type: object + CastColumn: + properties: + operation: + const: cast_column + default: cast_column + title: Operation + type: string + target_type: + anyOf: + - $ref: '#/$defs/WrappedMITMDataType' + - type: string + title: Target Type + required: + - target_type + title: CastColumn + type: object + ConceptMapping: + properties: + attribute_dtypes: + items: + $ref: '#/$defs/MITMDataType' + title: Attribute Dtypes + type: array + attributes: + items: + type: string + title: Attributes + type: array + base_table: + anyOf: + - $ref: '#/$defs/TableIdentifier' + - maxItems: 3 + minItems: 3 + prefixItems: + - $ref: '#/$defs/SourceDBType' + - type: string + - type: string + type: array + - maxItems: 2 + minItems: 2 + prefixItems: + - type: string + - type: string + type: array + title: Base Table + concept: + title: Concept + type: string + foreign_relations: + additionalProperties: + $ref: '#/$defs/ForeignRelation' + title: Foreign Relations + type: object + identity_columns: + anyOf: + - additionalProperties: + type: string + type: object + - items: + type: string + type: array + title: Identity Columns + inline_relations: + anyOf: + - additionalProperties: + type: string + type: object + - items: + type: string + type: array + title: Inline Relations + kind_col: + anyOf: + - type: string + - type: 'null' + default: null + title: Kind Col + mitm: + $ref: '#/$defs/MITM' + type_col: + title: Type Col + type: string + required: + - mitm + - concept + - base_table + - type_col + title: ConceptMapping + type: object + EditColumns: + properties: + additions: + additionalProperties: + items: + discriminator: + mapping: + add_column: '#/$defs/AddColumn' + extract_json: '#/$defs/ExtractJson' + propertyName: operation + oneOf: + - $ref: '#/$defs/AddColumn' + - $ref: '#/$defs/ExtractJson' + type: array + title: Additions + type: object + drops: + items: + type: string + title: Drops + type: array + uniqueItems: true + operation: + const: edit_columns + default: edit_columns + title: Operation + type: string + renames: + additionalProperties: + type: string + title: Renames + type: object + transforms: + additionalProperties: + discriminator: + mapping: + cast_column: '#/$defs/CastColumn' + propertyName: operation + oneOf: + - $ref: '#/$defs/CastColumn' + title: Transforms + type: object + title: EditColumns + type: object + ExistingTable: + properties: + base_table: + anyOf: + - $ref: '#/$defs/TableIdentifier' + - maxItems: 3 + minItems: 3 + prefixItems: + - $ref: '#/$defs/SourceDBType' + - type: string + - type: string + type: array + - maxItems: 2 + minItems: 2 + prefixItems: + - type: string + - type: string + type: array + title: Base Table + operation: + const: existing + default: existing + title: Operation + type: string + required: + - base_table + title: ExistingTable + type: object + ExtractJson: + properties: + attributes: + additionalProperties: + items: + type: string + type: array + title: Attributes + type: object + json_col: + title: Json Col + type: string + operation: + const: extract_json + default: extract_json + title: Operation + type: string + required: + - json_col + - attributes + title: ExtractJson + type: object + ForeignRelation: + properties: + fk_columns: + anyOf: + - additionalProperties: + type: string + type: object + - items: + type: string + type: array + title: Fk Columns + referred_table: + anyOf: + - $ref: '#/$defs/TableIdentifier' + - maxItems: 3 + minItems: 3 + prefixItems: + - $ref: '#/$defs/SourceDBType' + - type: string + - type: string + type: array + - maxItems: 2 + minItems: 2 + prefixItems: + - type: string + - type: string + type: array + title: Referred Table + required: + - fk_columns + - referred_table + title: ForeignRelation + type: object + Limit: + properties: + limit: + title: Limit + type: integer + operation: + const: limit + default: limit + title: Operation + type: string + required: + - limit + title: Limit + type: object + MITM: + enum: + - MAED + - OCEL2 + title: MITM + type: string + MITMDataType: + enum: + - text + - json + - integer + - numeric + - boolean + - datetime + - unknown + - infer + title: MITMDataType + type: string + RawCompiled: + properties: + operation: + const: compiled + default: compiled + title: Operation + type: string + typed_query: + $ref: '#/$defs/TypedRawQuery' + required: + - typed_query + title: RawCompiled + type: object + ReselectColumns: + properties: + operation: + const: reselect_columns + default: reselect_columns + title: Operation + type: string + selection: + items: + type: string + title: Selection + type: array + required: + - selection + title: ReselectColumns + type: object + SimpleJoin: + properties: + full: + default: false + title: Full + type: boolean + is_outer: + default: false + title: Is Outer + type: boolean + left_alias: + anyOf: + - type: string + - type: 'null' + default: null + title: Left Alias + left_table: + anyOf: + - $ref: '#/$defs/TableIdentifier' + - maxItems: 3 + minItems: 3 + prefixItems: + - $ref: '#/$defs/SourceDBType' + - type: string + - type: string + type: array + - maxItems: 2 + minItems: 2 + prefixItems: + - type: string + - type: string + type: array + title: Left Table + on_cols_left: + anyOf: + - items: + type: string + type: array + - type: 'null' + default: null + title: On Cols Left + on_cols_right: + anyOf: + - items: + type: string + type: array + - type: 'null' + default: null + title: On Cols Right + operation: + const: join + default: join + title: Operation + type: string + right_alias: + anyOf: + - type: string + - type: 'null' + default: null + title: Right Alias + right_table: + anyOf: + - $ref: '#/$defs/TableIdentifier' + - maxItems: 3 + minItems: 3 + prefixItems: + - $ref: '#/$defs/SourceDBType' + - type: string + - type: string + type: array + - maxItems: 2 + minItems: 2 + prefixItems: + - type: string + - type: string + type: array + title: Right Table + selected_cols_left: + anyOf: + - items: + type: string + type: array + - type: 'null' + default: null + title: Selected Cols Left + selected_cols_right: + anyOf: + - items: + type: string + type: array + - type: 'null' + default: null + title: Selected Cols Right + required: + - left_table + - right_table + title: SimpleJoin + type: object + SimpleSQLOperator: + enum: + - ilike + - like + - eq + - ge + - gt + - le + - lt + - in + - notin + title: SimpleSQLOperator + type: string + SimpleWhere: + properties: + lhs: + title: Lhs + type: string + operator: + $ref: '#/$defs/SimpleSQLOperator' + rhs: + anyOf: + - type: string + - maxItems: 2 + minItems: 2 + prefixItems: + - {} + - anyOf: + - $ref: '#/$defs/WrappedMITMDataType' + - type: string + type: array + title: Rhs + required: + - lhs + - operator + - rhs + title: SimpleWhere + type: object + SourceDBType: + enum: + - original + - working + - virtual + title: SourceDBType + type: string + TableFilter: + properties: + limit: + anyOf: + - type: integer + - type: 'null' + default: null + title: Limit + operation: + const: table_filter + default: table_filter + title: Operation + type: string + wheres: + items: + $ref: '#/$defs/SimpleWhere' + title: Wheres + type: array + required: + - wheres + title: TableFilter + type: object + TableIdentifier: + properties: + name: + title: Name + type: string + schema: + default: main + title: Schema + type: string + source: + $ref: '#/$defs/SourceDBType' + default: original + required: + - name + title: TableIdentifier + type: object + TypedRawQuery: + properties: + column_dtypes: + items: + anyOf: + - $ref: '#/$defs/WrappedMITMDataType' + - type: string + title: Column Dtypes + type: array + columns: + items: + type: string + title: Columns + type: array + compiled_sql: + title: Compiled Sql + type: string + dialect: + title: Dialect + type: string + required: + - dialect + - compiled_sql + - columns + - column_dtypes + title: TypedRawQuery + type: object + VirtualDBCreation: + properties: + virtual_view_creations: + items: + $ref: '#/$defs/VirtualViewCreation' + title: Virtual View Creations + type: array + title: VirtualDBCreation + type: object + VirtualViewCreation: + properties: + name: + title: Name + type: string + schema: + default: virtual + title: Schema + type: string + table_creation: + discriminator: + mapping: + compiled: '#/$defs/RawCompiled' + existing: '#/$defs/ExistingTable' + join: '#/$defs/SimpleJoin' + propertyName: operation + oneOf: + - $ref: '#/$defs/SimpleJoin' + - $ref: '#/$defs/ExistingTable' + - $ref: '#/$defs/RawCompiled' + title: Table Creation + transforms: + anyOf: + - items: + discriminator: + mapping: + edit_columns: '#/$defs/EditColumns' + limit: '#/$defs/Limit' + reselect_columns: '#/$defs/ReselectColumns' + table_filter: '#/$defs/TableFilter' + propertyName: operation + oneOf: + - $ref: '#/$defs/EditColumns' + - $ref: '#/$defs/ReselectColumns' + - $ref: '#/$defs/TableFilter' + - $ref: '#/$defs/Limit' + type: array + - type: 'null' + default: null + title: Transforms + required: + - name + - table_creation + title: VirtualViewCreation + type: object + WrappedMITMDataType: + properties: + mitm: + $ref: '#/$defs/MITMDataType' + required: + - mitm + title: WrappedMITMDataType + type: object +properties: + concept_mappings: + items: + $ref: '#/$defs/ConceptMapping' + title: Concept Mappings + type: array + mitm: + $ref: '#/$defs/MITM' + virtual_db_creation: + $ref: '#/$defs/VirtualDBCreation' +required: +- mitm +- concept_mappings +- virtual_db_creation +title: StandaloneDBMapping +type: object