diff --git a/docsfera.external.json b/docsfera.external.json index d3aa50e..b0c23f8 100644 --- a/docsfera.external.json +++ b/docsfera.external.json @@ -1544,24 +1544,16 @@ } }, "info": { - "title": "Maestro - fix/upload-files", + "title": "Maestro - fix/delete-connector", "description": "This is the Maestro API", "version": "1.0.0", "contact": {} }, "tags": [], "servers": [ - { - "url": "https://maestro.stg.dadosfera.ai", - "description": "Ambiente STG" - }, - { - "url": "https://maestro-2.stg.dadosfera.ai", - "description": "Ambiente STG2" - }, { "url": "https://maestro.dadosfera.ai", - "description": "Ambiente PRD" + "description": "Dadosfera API" } ], "components": { diff --git a/docsfera.json b/docsfera.json index cde4eee..637dece 100644 --- a/docsfera.json +++ b/docsfera.json @@ -4716,26 +4716,13 @@ } }, "info": { - "title": "Maestro - fix/upload-files", + "title": "Maestro - fix/delete-connector", "description": "This is the Maestro API", "version": "1.0.0", "contact": {} }, "tags": [], - "servers": [ - { - "url": "https://maestro.stg.dadosfera.ai", - "description": "Ambiente STG" - }, - { - "url": "https://maestro-2.stg.dadosfera.ai", - "description": "Ambiente STG2" - }, - { - "url": "https://maestro.dadosfera.ai", - "description": "Ambiente PRD" - } - ], + "servers": [], "components": { "securitySchemes": { "access-token": { diff --git a/src/main.ts b/src/main.ts index 728022b..46f1701 100644 --- a/src/main.ts +++ b/src/main.ts @@ -42,7 +42,7 @@ function configureSwagger(app: INestApplication) { } const swaggerTitle = branchName ? `Maestro - ${branchName}` : 'Maestro'; - const config = new DocumentBuilder() + const swaggerConfig = new DocumentBuilder() .setTitle(swaggerTitle) .setDescription('Documentation for Maestro gateway') .addSecurity('access-token', { @@ -50,11 +50,12 @@ function configureSwagger(app: INestApplication) { name: 'Authorization', in: 'header', }) - .setDescription('This is the Maestro API') - .addServer('https://maestro.stg.dadosfera.ai', 'Ambiente STG') - .addServer('https://maestro-2.stg.dadosfera.ai', 'Ambiente STG2') - .addServer('https://maestro.dadosfera.ai', 'Ambiente PRD') - .build(); + .setDescription('This is the Maestro API'); + + if (process.env.INTERNAL_SWAGGER !== 'true') + swaggerConfig.addServer('https://maestro.dadosfera.ai', 'Dadosfera API'); + + const config = swaggerConfig.build(); const document = SwaggerModule.createDocument(app, config); diff --git a/src/modules/connector/connector.controller.ts b/src/modules/connector/connector.controller.ts index 10c57e4..c755ae8 100644 --- a/src/modules/connector/connector.controller.ts +++ b/src/modules/connector/connector.controller.ts @@ -273,16 +273,13 @@ export class ConnectorController { @Param('plugin') plugin: string, @Query('version') version: string, ) { - this.logger.info('/upload - Upload Connector Route'); + this.logger.info('DELETE /:plugin - Delete Connector Route'); - const response: any = await this.connectorClientService.deleteConnector( + const response = await this.connectorClientService.deleteConnector( plugin, version, ); - return { - message: response.message || 'ok', - connector: { ...JSON.parse(response.connector) }, - }; + return { message: response.message, connector: response.connector }; } }