diff --git a/docsfera.external.json b/docsfera.external.json index 2251d18..d850da3 100644 --- a/docsfera.external.json +++ b/docsfera.external.json @@ -841,7 +841,7 @@ "name": "sort_by", "required": false, "in": "query", - "description": "Campo do data asset para usar na ordenação. Padrão: `created_at`", + "description": "Campo do data asset para usar na ordenação. Padrão: `created_at` ", "schema": { "type": "string" } @@ -1362,186 +1362,6 @@ ] } }, - "/connection-test/ping": { - "post": { - "operationId": "ConnectionTestController_connectionTestPing", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectionTestPingReq" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectionTestPingRes" - } - } - } - } - }, - "tags": [ - "Connection Test" - ], - "security": [ - { - "access-token": [] - } - ] - } - }, - "/connection-test/credentials": { - "post": { - "operationId": "ConnectionTestController_connectionTestCredentials", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectionTestCredentialsReq" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectionTestCredentialsRes" - } - } - } - } - }, - "tags": [ - "Connection Test" - ], - "security": [ - { - "access-token": [] - } - ] - } - }, - "/connection-test/schemas": { - "post": { - "operationId": "ConnectionTestController_connectionTestListSchemas", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectionTestListSchemasReq" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectionTestListSchemasRes" - } - } - } - } - }, - "tags": [ - "Connection Test" - ], - "security": [ - { - "access-token": [] - } - ] - } - }, - "/connection-test/tables": { - "post": { - "operationId": "ConnectionTestController_connectionTestListTables", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectionTestListTablesReq" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectionTestListTablesRes" - } - } - } - } - }, - "tags": [ - "Connection Test" - ], - "security": [ - { - "access-token": [] - } - ] - } - }, - "/connection-test/table-metadata": { - "post": { - "operationId": "ConnectionTestController_getTableMetadata", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetTableMetadataReq" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetTableMetadataRes" - } - } - } - } - }, - "tags": [ - "Connection Test" - ], - "security": [ - { - "access-token": [] - } - ] - } - }, "/oauth/hubspot": { "get": { "operationId": "OauthController_oauthHubspot", @@ -2982,278 +2802,6 @@ "required": [ "comment" ] - }, - "ConnectionTestPingReq": { - "type": "object", - "properties": { - "plugin": { - "type": "string" - }, - "host": { - "type": "string" - }, - "port": { - "type": "number" - }, - "network_config_id": { - "type": "string" - }, - "connection_id": { - "type": "string" - } - } - }, - "ConnectionTestPingRes": { - "type": "object", - "properties": { - "operation_result": { - "type": "boolean" - } - }, - "required": [ - "operation_result" - ] - }, - "ConnectionTestCredentialsProperties": { - "type": "object", - "properties": { - "host": { - "type": "string" - }, - "port": { - "type": "string" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" - }, - "database": { - "type": "string" - } - }, - "required": [ - "host", - "port", - "username", - "password", - "database" - ] - }, - "ConnectionTestCredentialsReq": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string" - }, - "network_config_id": { - "type": "string" - }, - "connector_id": { - "type": "string" - }, - "connector_name": { - "type": "string" - }, - "plugin": { - "type": "string" - }, - "image_url": { - "type": "string" - }, - "properties": { - "$ref": "#/components/schemas/ConnectionTestCredentialsProperties" - }, - "connection_id": { - "type": "string" - } - }, - "required": [ - "name", - "description", - "type", - "connector_id", - "connector_name", - "plugin", - "image_url", - "properties" - ] - }, - "ConnectionTestCredentialsRes": { - "type": "object", - "properties": { - "operation_result": { - "type": "boolean" - }, - "connection_id": { - "type": "string" - } - }, - "required": [ - "operation_result", - "connection_id" - ] - }, - "ConnectionTestListSchemasReq": { - "type": "object", - "properties": { - "plugin": { - "type": "string" - }, - "connection_id": { - "type": "string" - } - }, - "required": [ - "plugin", - "connection_id" - ] - }, - "ConnectionTestListSchemasRes": { - "type": "object", - "properties": { - "operation_result": { - "type": "boolean" - }, - "schema_list": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "operation_result", - "schema_list" - ] - }, - "ConnectionTestListTablesReq": { - "type": "object", - "properties": { - "plugin": { - "type": "string" - }, - "connection_id": { - "type": "string" - }, - "schema": { - "type": "string" - } - }, - "required": [ - "plugin", - "connection_id", - "schema" - ] - }, - "ConnectionTestListTablesRes": { - "type": "object", - "properties": { - "operation_result": { - "type": "boolean" - }, - "table_list": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "operation_result", - "table_list" - ] - }, - "GetTableMetadataReq": { - "type": "object", - "properties": { - "connection_id": { - "type": "string" - }, - "plugin": { - "type": "string" - }, - "schema": { - "type": "string" - }, - "table_list": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "connection_id", - "plugin", - "schema", - "table_list" - ] - }, - "ColumnDto": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "name", - "type" - ] - }, - "TableMetadataDto": { - "type": "object", - "properties": { - "table_name": { - "type": "string" - }, - "columns": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ColumnDto" - } - }, - "references": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ColumnDto" - } - } - }, - "required": [ - "table_name", - "columns", - "references" - ] - }, - "GetTableMetadataRes": { - "type": "object", - "properties": { - "operation_result": { - "type": "boolean" - }, - "tables_metadata": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TableMetadataDto" - } - } - }, - "required": [ - "operation_result", - "tables_metadata" - ] } } } diff --git a/package.json b/package.json index 4eaa62a..84e105f 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "start": "nest start", "start:dev": "nest start --watch", "start:debug": "nest start --debug --watch", + "start:kill": "export KILL_AFTER_START=1 && nest start && export KILL_AFTER_START=0", "start:prod": "npm run build && node dist/main", "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", "test": "jest", diff --git a/src/main.ts b/src/main.ts index f5872cc..728022b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -27,6 +27,7 @@ async function bootstrap() { app.use(helmet()); configureSwagger(app); await app.listen(3333); + if (process.env.KILL_AFTER_START) await app.close(); } function configureSwagger(app: INestApplication) { diff --git a/src/modules/catalog/dtos/index.ts b/src/modules/catalog/dtos/index.ts index ffccab0..3d29575 100644 --- a/src/modules/catalog/dtos/index.ts +++ b/src/modules/catalog/dtos/index.ts @@ -137,7 +137,7 @@ export class ICatalogAllRequest { @ApiPropertyOptional({ description: - 'Campo do data asset para usar na ordenação. Padrão: `created_at`', + 'Campo do data asset para usar na ordenação. Padrão: `created_at` ', }) sort_by: string; diff --git a/src/modules/connection-test/connection-test.controller.ts b/src/modules/connection-test/connection-test.controller.ts index cc5c6c8..f197358 100644 --- a/src/modules/connection-test/connection-test.controller.ts +++ b/src/modules/connection-test/connection-test.controller.ts @@ -26,7 +26,9 @@ import { import { DadosferaLogger } from '@dadosfera/dadosfera-logs'; import { Authenticated } from 'src/decorators/authentication.decorator'; import { GrpcToHttpExceptionFilter } from 'src/error/grpc-to-http-exception.filter'; +import { ApiInternalOnlyController } from 'src/decorators/swagger.decorator'; +@ApiInternalOnlyController() @ApiTags('Connection Test') @Controller('connection-test') @UseFilters(new GrpcToHttpExceptionFilter())