Download web/scripts/export-app-api.mjs from loveaa/OneAlign: direct link, hf CLI and curl.
- Browser
- Download file 379 Bytes
-
https://huggingface.co/spaces/loveaa/OneAlign/resolve/main/web/scripts/export-app-api.mjs
- Command line
-
hf download hf://spaces/loveaa/OneAlign/web/scripts/export-app-api.mjs
-
curl -L -o export-app-api.mjs https://huggingface.co/spaces/loveaa/OneAlign/resolve/main/web/scripts/export-app-api.mjs
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') | |