OneAlign / web /scripts /export-app-api.mjs
loveaa's picture
Home Pulse 1.2: app interface, recommended event policies and independent location reminders
133b124 verified
Raw History Blame Contribute Delete
379 Bytes
import fs from 'node:fs'
import path from 'node:path'
import {openapi} from '../server/app-contract.mjs'
const destination=path.resolve('integration/openapi.json')
fs.mkdirSync(path.dirname(destination),{recursive:true})
fs.writeFileSync(destination,JSON.stringify(openapi(),null,2)+'\n')
console.log('Exported App API schema with '+Object.keys(openapi().paths).length+' paths')