* Add dependencies for openapi-page component * Add openapi-page component * Use openapi-page component for /api-docs page * add /api link to nav (#570) * website: remove superflous netlify config file * website: misc clean up website/readme - remove netlify badge - run through prettier markdown fmt * website: add /api docs to nav - adds /api-docs => /api rewrite - updates open-api component base api path to be /api - adds .html rewrite for good measure * Fix currentPath highlight issue in subnav * Clean up inline styles in operation-object * Remove React imports * Remove api-docs rewrite Co-authored-by: Kyle MacDonald <kylemac@users.noreply.github.com>
9 lines
273 B
JavaScript
9 lines
273 B
JavaScript
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
|
|
}
|