init commit

This commit is contained in:
prod-tech
2024-11-17 02:31:42 +03:00
commit cf933c770c
217 changed files with 19340 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
import { $ } from 'bun'
import {writeFileSync} from "node:fs";
const main = async () => {
const res = await fetch('https://{{sensitive_data}}/openapi.json')
let openapi = await res.json()
openapi.paths = Object.fromEntries(Object.entries(openapi.paths).map(([key, value]) => {
value = Object.fromEntries(Object.entries(value).map(([key, value]) => {
value.responses = Object.fromEntries(Object.entries(value.responses).map(([key, value]) => {
if (value['detail']) {
delete value['detail'];
}
return [key, value]
}))
return [key, value]
}))
return [key, value]
}))
writeFileSync('./openapi.json', JSON.stringify(openapi, null, 2))
await $`bun run generate`
}
main()