diff --git a/api-rest/src/main/java/com/homihq/db2rest/parser/StoredProcedureParser.java b/api-rest/src/main/java/com/homihq/db2rest/parser/StoredProcedureParser.java new file mode 100644 index 00000000..d6962e96 --- /dev/null +++ b/api-rest/src/main/java/com/homihq/db2rest/parser/StoredProcedureParser.java @@ -0,0 +1,107 @@ +package com.homihq.db2rest.parser; + +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class StoredProcedureParser { + private String procedureName; + private List parameters; + + public StoredProcedureParser() { + this.parameters = new ArrayList<>(); + } + + public void parse(String procedureCall) throws IllegalArgumentException { + // Validate input + if (procedureCall == null || procedureCall.trim().isEmpty()) { + throw new IllegalArgumentException("Procedure call cannot be null or empty"); + } + + // Pattern to match procedure name and parameters + // Matches: procedure_name(param1, param2, ...) + Pattern pattern = Pattern.compile("([\\w_]+)\\s*\\((.*)\\)"); + Matcher matcher = pattern.matcher(procedureCall.trim()); + + if (!matcher.matches()) { + throw new IllegalArgumentException("Invalid stored procedure call format"); + } + + // Extract procedure name + procedureName = matcher.group(1); + + // Extract parameters + String paramString = matcher.group(2); + parseParameters(paramString); + } + + private void parseParameters(String paramString) { + parameters.clear(); + if (paramString.trim().isEmpty()) { + return; + } + + boolean inQuotes = false; + StringBuilder currentParam = new StringBuilder(); + int nestedLevel = 0; + + for (char c : paramString.toCharArray()) { + if (c == '\'' && !inQuotes) { + inQuotes = true; + currentParam.append(c); + } else if (c == '\'' && inQuotes) { + inQuotes = false; + currentParam.append(c); + } else if (c == '(' && !inQuotes) { + nestedLevel++; + currentParam.append(c); + } else if (c == ')' && !inQuotes) { + nestedLevel--; + currentParam.append(c); + } else if (c == ',' && !inQuotes && nestedLevel == 0) { + parameters.add(currentParam.toString().trim()); + currentParam = new StringBuilder(); + } else { + currentParam.append(c); + } + } + + // Add the last parameter + if (currentParam.length() > 0) { + parameters.add(currentParam.toString().trim()); + } + } + + public String getProcedureName() { + return procedureName; + } + + public List getParameters() { + return new ArrayList<>(parameters); + } + + // Main method with usage example + public static void main(String[] args) { + StoredProcedureParser parser = new StoredProcedureParser(); + + try { + // Test cases + String[] testCalls = { + "search_series_group('Absolute', col_1, col_2)", + "complex_procedure('Test', nested_func(param1, param2), col_3)", + "no_param_procedure()", + "single_param_procedure('value')" + }; + + for (String call : testCalls) { + System.out.println("\nParsing: " + call); + parser.parse(call); + System.out.println("Procedure Name: " + parser.getProcedureName()); + System.out.println("Parameters: " + parser.getParameters()); + } + } catch (IllegalArgumentException e) { + System.err.println("Error: " + e.getMessage()); + } + } +} diff --git a/db2rest-oas3.json b/db2rest-oas3.json new file mode 100644 index 00000000..c36bdbf1 --- /dev/null +++ b/db2rest-oas3.json @@ -0,0 +1,1714 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "DB2REST", + "description": "Low-code REST Data API for your databases", + "contact": { + "name": "DB2REST Support", + "url": "https://db2rest.com", + "email": "help@db2rest.com" + }, + "license": { + "name": "Apache-2.0 Licence", + "url": "https://github.com/kdhrubo/db2rest?tab=Apache-2.0-1-ov-file" + } + }, + "servers": [ + { + "url": "http://localhost:8080", + "description": "Generated server url" + } + ], + "tags": [ + { + "name": "Schema Objects", + "description": "Details about schemas and tables" + }, + { + "name": "Parameterized SQL Template ", + "description": "Details about schemas and tables" + } + ], + "paths": { + "/v1/rdbms/{dbId}/{tableName}": { + "get": { + "tags": [ + "read-controller" + ], + "operationId": "findAll", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tableName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Profile", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "fields", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "*" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": -1 + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "default": -1 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + } + }, + "post": { + "tags": [ + "create-controller" + ], + "operationId": "save", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Content-Profile", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "tableName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "columns", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "sequences", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "tsIdEnabled", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/CreateResponse" + } + } + } + } + } + }, + "delete": { + "tags": [ + "delete-controller" + ], + "operationId": "delete", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Content-Profile", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "tableName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/DeleteResponse" + } + } + } + } + } + }, + "patch": { + "tags": [ + "update-controller" + ], + "operationId": "save_3", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tableName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Content-Profile", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/UpdateResponse" + } + } + } + } + } + } + }, + "/v1/rdbms/{dbId}/{tableName}/upload": { + "post": { + "tags": [ + "bulk-create-controller" + ], + "operationId": "saveMultipartFile", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tableName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Content-Profile", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "columns", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "sequences", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "tsIdEnabled", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "required": [ + "file" + ], + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + } + } + } + }, + "application/json": { + "schema": { + "required": [ + "file" + ], + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/CreateResponse" + } + } + } + } + } + } + }, + "/v1/rdbms/{dbId}/{tableName}/exists/_expand": { + "post": { + "tags": [ + "exists-query-controller" + ], + "operationId": "exists", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tableName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Profile", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JoinDetail" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExistsResponse" + } + } + } + } + } + } + }, + "/v1/rdbms/{dbId}/{tableName}/bulk": { + "post": { + "tags": [ + "bulk-create-controller" + ], + "operationId": "save_1", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tableName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Content-Profile", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "columns", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "sequences", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "tsIdEnabled", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "201": { + "description": "Created", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/CreateBulkResponse" + } + } + } + } + } + } + }, + "/v1/rdbms/{dbId}/{tableName}/_expand": { + "post": { + "tags": [ + "read-controller" + ], + "operationId": "find", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tableName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Profile", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "fields", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "*" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": -1 + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "default": -1 + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/JoinDetail" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + } + } + }, + "/v1/rdbms/{dbId}/procedure/{procName}": { + "post": { + "tags": [ + "procedure-controller" + ], + "operationId": "execute", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "procName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + } + } + } + } + }, + "/v1/rdbms/{dbId}/function/{funcName}": { + "post": { + "tags": [ + "function-controller" + ], + "operationId": "execute_1", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "funcName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + } + } + } + } + }, + "/v1/mongo/{dbId}/{collectionName}": { + "get": { + "tags": [ + "mongo-controller" + ], + "operationId": "findAll_1", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collectionName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fields", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "*" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": -1 + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "default": -1 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "object" + } + } + } + } + } + }, + "post": { + "tags": [ + "mongo-controller" + ], + "operationId": "save_2", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collectionName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fields", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/CreateResponse" + } + } + } + } + } + }, + "delete": { + "tags": [ + "mongo-controller" + ], + "operationId": "delete_1", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collectionName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/DeleteResponse" + } + } + } + } + } + }, + "patch": { + "tags": [ + "mongo-controller" + ], + "operationId": "patch", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collectionName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/UpdateResponse" + } + } + } + } + } + } + }, + "/v1/mongo/{dbId}/{collectionName}/bulk": { + "post": { + "tags": [ + "mongo-controller" + ], + "operationId": "saveAll", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collectionName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fields", + "in": "query", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Created", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/CreateBulkResponse" + } + } + } + } + } + } + }, + "/v1/rdbms/{dbId}/{tableName}/one": { + "get": { + "tags": [ + "find-one-controller" + ], + "operationId": "findOne", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tableName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Profile", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "fields", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "*" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + } + } + } + } + }, + "/v1/rdbms/{dbId}/{tableName}/exists": { + "get": { + "tags": [ + "exists-query-controller" + ], + "operationId": "exists_1", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tableName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Profile", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExistsResponse" + } + } + } + } + } + } + }, + "/v1/rdbms/{dbId}/{tableName}/count": { + "get": { + "tags": [ + "count-query-controller" + ], + "operationId": "count", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tableName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Profile", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/CountResponse" + } + } + } + } + } + } + }, + "/v1/rdbms/{dbId}/sql/{fileName}/{*userPathVariable}": { + "get": { + "tags": [ + "Parameterized SQL Template " + ], + "operationId": "sqlTemplate", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fileName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "userPathVariable", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "requestParams", + "in": "query", + "required": true, + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "object" + } + } + } + } + } + } + }, + "/v1/rdbms/{dbId}/$schemas": { + "get": { + "tags": [ + "Schema Objects" + ], + "summary": "Get all database objects for a given dbId", + "description": "Get all database objects from all schemas/catalogs, tables, columns", + "operationId": "getObjects", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "columns", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/TableObject" + }, + { + "$ref": "#/components/schemas/TableWithColumnsObject" + } + ] + } + } + } + } + } + } + }, + "/v1/mongo/{dbId}/{collectionName}/one": { + "get": { + "tags": [ + "mongo-controller" + ], + "operationId": "findOne_1", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collectionName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fields", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "*" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + } + } + } + } + }, + "/v1/mongo/{dbId}/{collectionName}/exists": { + "get": { + "tags": [ + "mongo-controller" + ], + "operationId": "exists_2", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collectionName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ExistsResponse" + } + } + } + } + } + } + }, + "/v1/mongo/{dbId}/{collectionName}/count": { + "get": { + "tags": [ + "mongo-controller" + ], + "operationId": "count_1", + "parameters": [ + { + "name": "dbId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collectionName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/CountResponse" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "CreateResponse": { + "type": "object", + "properties": { + "row": { + "type": "integer", + "format": "int32" + }, + "keys": { + "type": "object" + } + } + }, + "JoinDetail": { + "type": "object", + "properties": { + "schemaName": { + "type": "string" + }, + "table": { + "type": "string" + }, + "withTable": { + "type": "string" + }, + "fields": { + "type": "array", + "items": { + "type": "string" + } + }, + "on": { + "type": "array", + "items": { + "type": "string" + } + }, + "filter": { + "type": "string" + }, + "joinType": { + "type": "string" + } + } + }, + "ExistsResponse": { + "type": "object", + "properties": { + "exists": { + "type": "boolean" + } + } + }, + "CreateBulkResponse": { + "type": "object", + "properties": { + "rows": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + }, + "keys": { + "type": "object" + } + } + }, + "UpdateResponse": { + "type": "object", + "properties": { + "rows": { + "type": "integer", + "format": "int32" + } + } + }, + "CountResponse": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "format": "int64" + } + } + }, + "TableObject": { + "type": "object", + "properties": { + "schema": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "ColumnObject": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "pk": { + "type": "boolean" + }, + "dataType": { + "type": "string" + } + } + }, + "TableWithColumnsObject": { + "type": "object", + "properties": { + "schema": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ColumnObject" + } + } + } + }, + "DeleteResponse": { + "type": "object", + "properties": { + "rows": { + "type": "integer", + "format": "int32" + } + } + } + } + } +} diff --git a/pom.xml b/pom.xml index 452a0123..79695716 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.springframework.boot spring-boot-starter-parent - 3.3.5 + 3.4.1 @@ -75,7 +75,7 @@ - 1.4.2 + 1.5.0-SNAPSHOT 21 3.0.1 2.17.2