From a3343e8ac2b945e52c514efebe41996b5d8d4ee3 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Fri, 14 Apr 2023 12:24:17 +0530 Subject: [PATCH] chore: swagger.json content type correction Signed-off-by: Pranav C --- packages/nocodb-nest/src/app.module.ts | 22 -------------------- packages/nocodb-nest/src/schema/swagger.json | 4 ++-- packages/nocodb-sdk/package.json | 4 ++-- 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/packages/nocodb-nest/src/app.module.ts b/packages/nocodb-nest/src/app.module.ts index 5dff1ce88f..3c2038576b 100644 --- a/packages/nocodb-nest/src/app.module.ts +++ b/packages/nocodb-nest/src/app.module.ts @@ -60,28 +60,6 @@ import type { import { ServeStaticModule } from '@nestjs/serve-static'; import { join } from 'path'; -/* - -export const JwtStrategyProvider: Provider = { - provide: JwtStrategy, - useFactory: async (usersService: UsersService) => { - const config = await NcConfigFactory.make(); - - const options = { - // ignoreExpiration: false, - jwtFromRequest: ExtractJwt.fromHeader('xc-auth'), - // expiresIn: '10h', - passReqToCallback: true, - secretOrKey: config.auth.jwt.secret, - ...config.auth.jwt.options, - }; - - return new JwtStrategy(options, usersService); - }, - inject: [UsersService], -}; -*/ - @Module({ imports: [ ServeStaticModule.forRoot({ diff --git a/packages/nocodb-nest/src/schema/swagger.json b/packages/nocodb-nest/src/schema/swagger.json index caa9c9002c..dd02bb951f 100644 --- a/packages/nocodb-nest/src/schema/swagger.json +++ b/packages/nocodb-nest/src/schema/swagger.json @@ -10886,10 +10886,10 @@ }, "requestBody": { "content": { - "application/json": { + "multipart/form-data": { "schema": { "type": "object", - "description": "Data Object where the key is column and the value is the data value" + "properties": {} }, "examples": { "Example 1": { diff --git a/packages/nocodb-sdk/package.json b/packages/nocodb-sdk/package.json index bbbc59a37d..293c15f0ff 100644 --- a/packages/nocodb-sdk/package.json +++ b/packages/nocodb-sdk/package.json @@ -31,7 +31,7 @@ "test:prettier": "prettier \"src/**/*.ts\" --list-different", "test:spelling": "cspell \"{README.md,.github/*.md,src/**/*.ts}\"", "watch:build": "tsc -p tsconfig.json -w", - "generate:sdk": "npx --yes swagger-typescript-api@10.0.3 -r -p ../nocodb/src/schema/swagger.json -o ./src/lib/ --axios --unwrap-response-data --module-name-first-tag --type-suffix=Type --templates ../../scripts/sdk/templates" + "generate:sdk": "npx --yes swagger-typescript-api@10.0.3 -r -p ../nocodb-nest/src/schema/swagger.json -o ./src/lib/ --axios --unwrap-response-data --module-name-first-tag --type-suffix=Type --templates ../../scripts/sdk/templates" }, "dependencies": { "axios": "^0.21.1", @@ -63,4 +63,4 @@ "prettier": { "singleQuote": true } -} \ No newline at end of file +}