Attempt to figure out why tests are failing.
This commit is contained in:
parent
cd674b8338
commit
8123a04a8e
|
@ -156,6 +156,7 @@
|
|||
"@types/pouchdb": "6.4.2",
|
||||
"@types/server-destroy": "1.0.1",
|
||||
"@types/supertest": "2.0.14",
|
||||
"@types/swagger-jsdoc": "^6.0.4",
|
||||
"@types/tar": "6.1.5",
|
||||
"@types/tmp": "0.2.6",
|
||||
"@types/uuid": "8.3.4",
|
||||
|
|
|
@ -4,11 +4,11 @@ import { examples, schemas } from "./resources"
|
|||
import * as parameters from "./parameters"
|
||||
import * as security from "./security"
|
||||
|
||||
const swaggerJsdoc = require("swagger-jsdoc")
|
||||
import swaggerJsdoc from "swagger-jsdoc"
|
||||
|
||||
const VARIABLES = {}
|
||||
|
||||
const options = {
|
||||
const opts: swaggerJsdoc.Options = {
|
||||
definition: {
|
||||
openapi: "3.0.0",
|
||||
info: {
|
||||
|
@ -58,7 +58,6 @@ const options = {
|
|||
}
|
||||
|
||||
function writeFile(output: any, filename: string) {
|
||||
try {
|
||||
const path = join(__dirname, filename)
|
||||
let spec = output
|
||||
if (filename.endsWith("json")) {
|
||||
|
@ -71,17 +70,11 @@ function writeFile(output: any, filename: string) {
|
|||
writeFileSync(path, spec)
|
||||
console.log(`Wrote spec to ${path}`)
|
||||
return path
|
||||
} catch (err) {
|
||||
console.error("Error writing spec file", err)
|
||||
}
|
||||
}
|
||||
|
||||
export function run() {
|
||||
const outputJSON = swaggerJsdoc(options)
|
||||
options.format = ".yaml"
|
||||
const outputYAML = swaggerJsdoc(options)
|
||||
writeFile(outputJSON, "openapi.json")
|
||||
return writeFile(outputYAML, "openapi.yaml")
|
||||
writeFile(swaggerJsdoc({ ...opts, format: ".json" }), "openapi.json")
|
||||
return writeFile(swaggerJsdoc({ ...opts, format: ".yaml" }), "openapi.yaml")
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
|
|
11
yarn.lock
11
yarn.lock
|
@ -2796,9 +2796,9 @@
|
|||
through2 "^2.0.0"
|
||||
|
||||
"@budibase/pro@npm:@budibase/pro@latest":
|
||||
version "3.4.20"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-3.4.20.tgz#0d855d6ed8fe92fd178c74a8963d879cc124b034"
|
||||
integrity sha512-hUteGvhMOKjBo0fluxcqNs7d4x8OU5W8Oqqrm7eIS9Ohe7ala2iWNCcrj+x+S9CavIm6s7JZZnAewa2Maiz2zQ==
|
||||
version "3.4.22"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-3.4.22.tgz#943f23cb7056041bc1f433ee60b3d093145e7a4a"
|
||||
integrity sha512-Du3iZsmRLopfoi2SvxQyY1P2Su3Nw0WbITOrKmZFsVLjZ9MzzTZs0Ph/SJHzrfJpM7rn9+8788BLSf3Z3l9KcQ==
|
||||
dependencies:
|
||||
"@anthropic-ai/sdk" "^0.27.3"
|
||||
"@budibase/backend-core" "*"
|
||||
|
@ -7142,6 +7142,11 @@
|
|||
dependencies:
|
||||
"@types/superagent" "*"
|
||||
|
||||
"@types/swagger-jsdoc@^6.0.4":
|
||||
version "6.0.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/swagger-jsdoc/-/swagger-jsdoc-6.0.4.tgz#bb4f60f3a5f103818e022f2e29ff8935113fb83d"
|
||||
integrity sha512-W+Xw5epcOZrF/AooUM/PccNMSAFOKWZA5dasNyMujTwsBkU74njSJBpvCCJhHAJ95XRMzQrrW844Btu0uoetwQ==
|
||||
|
||||
"@types/tar-fs@2.0.1":
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/tar-fs/-/tar-fs-2.0.1.tgz#6391dcad1b03dea2d79fac07371585ab54472bb1"
|
||||
|
|
Loading…
Reference in New Issue