diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4e6cff5..a675674 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,8 +16,8 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: '20.x' - registry-url: 'https://registry.npmjs.org' + node-version: "20.x" + registry-url: "https://registry.npmjs.org" - uses: denoland/setup-deno@v1 - run: deno run -A scripts/npm.ts - run: deno publish diff --git a/tests/petstore/schemas/petstore.yaml b/tests/petstore/schemas/petstore.yaml index 2b42dfe..a956f24 100644 --- a/tests/petstore/schemas/petstore.yaml +++ b/tests/petstore/schemas/petstore.yaml @@ -23,7 +23,7 @@ paths: maximum: 100 format: int32 responses: - '200': + "200": description: A paged array of pets headers: x-next: @@ -31,7 +31,7 @@ paths: schema: type: string content: - application/json: + application/json: schema: $ref: "#/components/schemas/Pets" default: @@ -49,10 +49,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Pet' + $ref: "#/components/schemas/Pet" required: true responses: - '201': + "201": description: Null response default: description: unexpected error @@ -74,7 +74,7 @@ paths: schema: type: string responses: - '200': + "200": description: Expected response to a valid request content: application/json: @@ -116,4 +116,4 @@ components: type: integer format: int32 message: - type: string \ No newline at end of file + type: string diff --git a/tests/test.ts b/tests/test.ts index 9a7e9a5..bcfe28d 100644 --- a/tests/test.ts +++ b/tests/test.ts @@ -14,7 +14,7 @@ Deno.test("Generate schemas", async ({ step }) => { ) { await step(`Generating schema for ${schema.path}`, async () => { const path = import.meta.resolve(`../${schema.path}`); - const output = await new Deno.Command("deno", { + const output = await new Deno.Command(Deno.execPath(), { args: ["run", "-A", main, `-o=${path}.ts`, `--import=${pwd}`, path], stdout: "inherit", stderr: "inherit", @@ -31,7 +31,7 @@ Deno.test("Generate schemas", async ({ step }) => { const { default: path } = await import(`../${schema.path}`); const dir = dirname(schema.path); await step(`Generating schema for ${path}`, async () => { - const output = await new Deno.Command("deno", { + const output = await new Deno.Command(Deno.execPath(), { args: [ "run", "-A", @@ -56,7 +56,7 @@ Deno.test("Check types", async ({ step }) => { ) { await step(`Checking types for ${test.path}`, async () => { const path = import.meta.resolve(`../${test.path}`); - const output = await new Deno.Command("deno", { + const output = await new Deno.Command(Deno.execPath(), { args: ["check", path], stdout: "inherit", stderr: "inherit",