• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

teableio / teable / 8389034572

22 Mar 2024 10:38AM CUT coverage: 26.087% (-2.1%) from 28.208%
8389034572

Pull #487

github

web-flow
Merge 3045b1f94 into a06c6afb1
Pull Request #487: refactor: move zod schema to openapi

2100 of 3363 branches covered (62.44%)

282 of 757 new or added lines in 74 files covered. (37.25%)

224 existing lines in 8 files now uncovered.

25574 of 98035 relevant lines covered (26.09%)

5.17 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/apps/nestjs-backend/src/features/import/open-api/import-open-api.controller.ts
1
/* eslint-disable sonarjs/no-duplicate-string */
×
2
import { Controller, Get, UseGuards, Query, Post, Body, Param } from '@nestjs/common';
×
NEW
3
import type { IAnalyzeVo } from '@teable/core';
×
4
import { analyzeRoSchema, IAnalyzeRo, IImportOptionRo, importOptionRoSchema } from '@teable/core';
×
NEW
5
import type { ITableFullVo } from '@teable/openapi';
×
6
import { ZodValidationPipe } from '../../../zod.validation.pipe';
×
7
import { PermissionGuard } from '../../auth/guard/permission.guard';
×
8
import { ImportOpenApiService } from './import-open-api.service';
×
9

×
10
@Controller('api/import')
×
11
@UseGuards(PermissionGuard)
×
12
export class ImportController {
×
13
  constructor(private readonly importOpenService: ImportOpenApiService) {}
×
14
  @Get('/analyze')
×
15
  async analyzeSheetFromFile(
×
16
    @Query(new ZodValidationPipe(analyzeRoSchema)) analyzeRo: IAnalyzeRo
×
17
  ): Promise<IAnalyzeVo> {
×
18
    return await this.importOpenService.analyze(analyzeRo);
×
19
  }
×
20

×
21
  @Post(':baseId')
×
22
  async createTableFromImport(
×
23
    @Param('baseId') baseId: string,
×
24
    @Body(new ZodValidationPipe(importOptionRoSchema)) importRo: IImportOptionRo
×
25
  ): Promise<ITableFullVo[]> {
×
26
    return await this.importOpenService.createTableFromImport(baseId, importRo);
×
27
  }
×
28
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc