diff --git a/pages/api/typescript-to-json-schema.ts b/pages/api/typescript-to-json-schema.ts index e9ff18d..3cc4fed 100644 --- a/pages/api/typescript-to-json-schema.ts +++ b/pages/api/typescript-to-json-schema.ts @@ -29,6 +29,8 @@ export default (req: NextApiRequest, res: NextApiResponse) => { createFormatter(config) ); const schema = generator.createSchema("*"); + + fs.unlink(filePath, () => {}); res.status(200).send(schema); } catch (e) { res.status(500).send(e.message);