Fix
Some checks failed
Lint / lint (push) Failing after 10s

This commit is contained in:
Julien Valverdé
2026-02-03 14:11:47 +01:00
parent 9bee83a385
commit 933537803f
3 changed files with 4 additions and 9 deletions

View File

@@ -23,7 +23,6 @@
"openapi-to-effect": "^0.9.3",
"tsx": "^4.21.0",
"undici": "^7.19.0",
"yaml": "^2.8.2",
},
"peerDependencies": {
"@effect/platform": "^0.94.2",
@@ -323,7 +322,5 @@
"uuid": ["uuid@11.1.0", "", { "bin": { "uuid": "dist/esm/bin/uuid" } }, "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A=="],
"ws": ["ws@8.19.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg=="],
"yaml": ["yaml@2.8.2", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A=="],
}
}

View File

@@ -42,8 +42,7 @@
"@effect/platform-node": "^0.104.1",
"openapi-to-effect": "^0.9.3",
"tsx": "^4.21.0",
"undici": "^7.19.0",
"yaml": "^2.8.2"
"undici": "^7.19.0"
},
"peerDependencies": {
"@effect/platform": "^0.94.2",

View File

@@ -1,8 +1,7 @@
import { FetchHttpClient, FileSystem, HttpClient, Path } from "@effect/platform"
import { BunContext, BunRuntime } from "@effect/platform-bun"
import { Effect, pipe } from "effect"
import { Effect } from "effect"
import { run } from "openapi-to-effect"
import * as YAML from "yaml"
const versions = ["v1.53"]
@@ -13,8 +12,8 @@ const downloadDockerOpenApiSpec = Effect.fn("downloadDockerOpenApiSpec")(functio
const fs = yield* FileSystem.FileSystem
const outputFilePath = yield* fs.makeTempFileScoped()
const response = yield* client.get(`https://docs.docker.com/reference/api/engine/version/${ version }.yaml`)
const json = pipe(yield* response.text, YAML.parse, JSON.stringify)
const response = yield* client.get(`https://converter.swagger.io/api/convert?url=https://docs.docker.com/reference/api/engine/version/${ version }.yaml`)
const json = JSON.stringify({ ...(yield* response.json) as object, openapi: "3.1.0" })
yield* fs.writeFileString(outputFilePath, json)
return outputFilePath