mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-25 04:05:26 +00:00
refactor: move swagger.json to nocodb package
Signed-off-by: Pranav C <pranavxc@gmail.com>
This commit is contained in:
6
.github/workflows/publish-api-docs.yml
vendored
6
.github/workflows/publish-api-docs.yml
vendored
@@ -4,7 +4,7 @@ on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths:
|
||||
- "scripts/sdk/swagger.json"
|
||||
- "packages/nocodb/src/schema/swagger.json"
|
||||
release:
|
||||
types: [ published ]
|
||||
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
env:
|
||||
API_TOKEN_GITHUB: ${{ secrets.GH_TOKEN }}
|
||||
with:
|
||||
source_file: 'scripts/sdk/swagger.json'
|
||||
source_file: 'packages/nocodb/src/schema/swagger.json'
|
||||
destination_repo: 'nocodb/noco-apis-doc'
|
||||
destination_folder: 'src'
|
||||
user_email: 'oof1lab@gmail.com'
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
env:
|
||||
API_TOKEN_GITHUB: ${{ secrets.GH_TOKEN }}
|
||||
with:
|
||||
source_file: 'scripts/sdk/swagger.json'
|
||||
source_file: 'packages/nocodb/src/schema/swagger.json'
|
||||
destination_repo: 'nocodb/noco-apis-doc'
|
||||
destination_folder: 'meta-src'
|
||||
user_email: 'oof1lab@gmail.com'
|
||||
|
||||
@@ -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 ../../scripts/sdk/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 ../../packages/nocodb/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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { NextFunction, Request, Response } from 'express';
|
||||
import Ajv, { ErrorObject } from 'ajv';
|
||||
// @ts-ignore
|
||||
import swagger from '../../../../../../../scripts/sdk/swagger.json';
|
||||
import swagger from '../../../../schema/swagger.json';
|
||||
|
||||
export function parseHrtimeToSeconds(hrtime) {
|
||||
const seconds = (hrtime[0] + hrtime[1] / 1e6).toFixed(3);
|
||||
|
||||
@@ -58,8 +58,7 @@
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
// "src/lib/xgene/migrations/*.js",
|
||||
"src/**/*.json",
|
||||
"../../scripts/sdk/swagger.json"
|
||||
"src/**/*.json"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules/**",
|
||||
|
||||
Reference in New Issue
Block a user