You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
boundary/website/lib/swagger-parser.js

9 lines
273 B

const fs = require('fs')
const RefParser = require('@apidevtools/json-schema-ref-parser')
export default async function parseSchema(filePath) {
const content = JSON.parse(fs.readFileSync(filePath))
const schema = await RefParser.dereference(content)
return schema
}