From 55281e3965141ea10742961f4d73dcee2c8650c0 Mon Sep 17 00:00:00 2001 From: Gabriel Amorim Date: Thu, 16 Mar 2023 17:58:11 -0300 Subject: [PATCH] FIX: docs --- docsfera.external.json | 47 +++++++++++++++++------ docsfera.json | 47 +++++++++++++++++------ src/modules/catalog/catalog.controller.ts | 10 ++++- 3 files changed, 80 insertions(+), 24 deletions(-) diff --git a/docsfera.external.json b/docsfera.external.json index 6950953..ee94532 100644 --- a/docsfera.external.json +++ b/docsfera.external.json @@ -1591,17 +1591,7 @@ "content": { "application/json": { "schema": { - "type": "object" - } - } - } - }, - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TriggerCatalogRes" + "$ref": "#/components/schemas/GetDatasetCatalogTaskRes" } } } @@ -3092,6 +3082,41 @@ "required": [ "session" ] + }, + "GetDatasetCatalogTaskRes": { + "type": "object", + "properties": { + "created_at": { + "type": "string" + }, + "customer_name": { + "type": "string" + }, + "session_id": { + "type": "string" + }, + "status": { + "type": "string" + }, + "table_name": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "updated_by": { + "type": "string" + } + }, + "required": [ + "created_at", + "customer_name", + "session_id", + "status", + "table_name", + "updated_at", + "updated_by" + ] } } } diff --git a/docsfera.json b/docsfera.json index 07d3949..47f0d6f 100644 --- a/docsfera.json +++ b/docsfera.json @@ -4430,17 +4430,7 @@ "content": { "application/json": { "schema": { - "type": "object" - } - } - } - }, - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TriggerCatalogRes" + "$ref": "#/components/schemas/GetDatasetCatalogTaskRes" } } } @@ -7384,6 +7374,41 @@ "session" ] }, + "GetDatasetCatalogTaskRes": { + "type": "object", + "properties": { + "created_at": { + "type": "string" + }, + "customer_name": { + "type": "string" + }, + "session_id": { + "type": "string" + }, + "status": { + "type": "string" + }, + "table_name": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "updated_by": { + "type": "string" + } + }, + "required": [ + "created_at", + "customer_name", + "session_id", + "status", + "table_name", + "updated_at", + "updated_by" + ] + }, "ConnectionTestPingReq": { "type": "object", "properties": { diff --git a/src/modules/catalog/catalog.controller.ts b/src/modules/catalog/catalog.controller.ts index f3b1d1b..4f86deb 100644 --- a/src/modules/catalog/catalog.controller.ts +++ b/src/modules/catalog/catalog.controller.ts @@ -14,7 +14,12 @@ import { Query, UseFilters, } from '@nestjs/common'; -import { ApiCreatedResponse, ApiHeaders, ApiTags } from '@nestjs/swagger'; +import { + ApiCreatedResponse, + ApiHeaders, + ApiOkResponse, + ApiTags, +} from '@nestjs/swagger'; import { Authenticated, RequireAllPermissions, @@ -26,6 +31,7 @@ import { DadosferaLogger } from '@dadosfera/dadosfera-logs'; import { PackTheMetadata } from 'src/utils/ PackTheMetadata'; import { RequestUser, User } from 'src/decorators/user.decorator'; import { + GetDatasetCatalogTaskRes, ICatalogAllRequest, ICatalogAllResponse, IColumnsMetadataResponse, @@ -608,7 +614,7 @@ export class CatalogController { @RequireAllPermissions( PERMISSIONS_GROUPS.CATALOG.permissions.TRIGGER_CATALOG_TASK, ) - @ApiCreatedResponse({ type: TriggerCatalogRes }) + @ApiOkResponse({ type: GetDatasetCatalogTaskRes }) async getCatalogTask( @User() user: RequestUser, @Param('session') session: string,