Skip to content

fix(zod): parser generation when content-type contains charset precision #788

fix(zod): parser generation when content-type contains charset precision

fix(zod): parser generation when content-type contains charset precision #788

Status Failure
Total duration 4m 6s
Artifacts

pr-checks.yaml

on: pull_request
Matrix: pr-checks
Fit to window
Zoom out
Zoom in

Annotations

12 errors and 1 notice
[orval-tests] api-generation.spec.ts > API Generation Snapshots > tests/generated/hono/petstore-tags-with-handlers/pets.zod.ts: test-utils/snapshot-testing.ts#L75
Error: Snapshot `API Generation Snapshots > tests/generated/hono/petstore-tags-with-handlers/pets.zod.ts 1` mismatched - Expected + Received @@ -20,10 +20,47 @@ export const ListPetsHeader = zod.object({ 'X-EXAMPLE': zod.enum(['ONE', 'TWO', 'THREE']).describe('Header parameters'), }); + export const ListPetsResponseItem = zod + .union([ + zod + .union([ + zod.object({ + cuteness: zod.number(), + breed: zod.enum(['Labradoodle']), + }), + zod.object({ + length: zod.number(), + breed: zod.enum(['Dachshund']), + }), + ]) + .and( + zod.object({ + barksPerMinute: zod.number().optional(), + type: zod.enum(['dog']), + }), + ), + zod.object({ + petsRequested: zod.number().optional(), + type: zod.enum(['cat']), + }), + ]) + .and( + zod.object({ + '@id': zod.string().optional(), + id: zod.number(), + name: zod.string(), + tag: zod.string().optional(), + email: zod.string().email().optional(), + callingCode: zod.enum(['+33', '+420']).optional(), + country: zod.enum(["People's Republic of China", 'Uruguay']).optional(), + }), + ); + export const ListPetsResponse = zod.array(ListPetsResponseItem); + export const CreatePetsQueryParams = zod.object({ limit: zod .string() .optional() .describe('How many items to return at one time (max 100)'), ❯ ../test-utils/snapshot-testing.ts:75:9
[orval-tests] api-generation.spec.ts > API Generation Snapshots > tests/generated/hono/petstore-tags-split-with-handlers/pets/pets.zod.ts: test-utils/snapshot-testing.ts#L75
Error: Snapshot `API Generation Snapshots > tests/generated/hono/petstore-tags-split-with-handlers/pets/pets.zod.ts 1` mismatched - Expected + Received @@ -20,10 +20,47 @@ export const ListPetsHeader = zod.object({ 'X-EXAMPLE': zod.enum(['ONE', 'TWO', 'THREE']).describe('Header parameters'), }); + export const ListPetsResponseItem = zod + .union([ + zod + .union([ + zod.object({ + cuteness: zod.number(), + breed: zod.enum(['Labradoodle']), + }), + zod.object({ + length: zod.number(), + breed: zod.enum(['Dachshund']), + }), + ]) + .and( + zod.object({ + barksPerMinute: zod.number().optional(), + type: zod.enum(['dog']), + }), + ), + zod.object({ + petsRequested: zod.number().optional(), + type: zod.enum(['cat']), + }), + ]) + .and( + zod.object({ + '@id': zod.string().optional(), + id: zod.number(), + name: zod.string(), + tag: zod.string().optional(), + email: zod.string().email().optional(), + callingCode: zod.enum(['+33', '+420']).optional(), + country: zod.enum(["People's Republic of China", 'Uruguay']).optional(), + }), + ); + export const ListPetsResponse = zod.array(ListPetsResponseItem); + export const CreatePetsQueryParams = zod.object({ limit: zod .string() .optional() .describe('How many items to return at one time (max 100)'), ❯ ../test-utils/snapshot-testing.ts:75:9
[orval-tests] api-generation.spec.ts > API Generation Snapshots > tests/generated/hono/petstore-tags-split/pets/pets.zod.ts: test-utils/snapshot-testing.ts#L75
Error: Snapshot `API Generation Snapshots > tests/generated/hono/petstore-tags-split/pets/pets.zod.ts 1` mismatched - Expected + Received @@ -20,10 +20,47 @@ export const ListPetsHeader = zod.object({ 'X-EXAMPLE': zod.enum(['ONE', 'TWO', 'THREE']).describe('Header parameters'), }); + export const ListPetsResponseItem = zod + .union([ + zod + .union([ + zod.object({ + cuteness: zod.number(), + breed: zod.enum(['Labradoodle']), + }), + zod.object({ + length: zod.number(), + breed: zod.enum(['Dachshund']), + }), + ]) + .and( + zod.object({ + barksPerMinute: zod.number().optional(), + type: zod.enum(['dog']), + }), + ), + zod.object({ + petsRequested: zod.number().optional(), + type: zod.enum(['cat']), + }), + ]) + .and( + zod.object({ + '@id': zod.string().optional(), + id: zod.number(), + name: zod.string(), + tag: zod.string().optional(), + email: zod.string().email().optional(), + callingCode: zod.enum(['+33', '+420']).optional(), + country: zod.enum(["People's Republic of China", 'Uruguay']).optional(), + }), + ); + export const ListPetsResponse = zod.array(ListPetsResponseItem); + export const CreatePetsQueryParams = zod.object({ limit: zod .string() .optional() .describe('How many items to return at one time (max 100)'), ❯ ../test-utils/snapshot-testing.ts:75:9
[orval-tests] api-generation.spec.ts > API Generation Snapshots > tests/generated/hono/petstore-tags/pets.zod.ts: test-utils/snapshot-testing.ts#L75
Error: Snapshot `API Generation Snapshots > tests/generated/hono/petstore-tags/pets.zod.ts 1` mismatched - Expected + Received @@ -20,10 +20,47 @@ export const ListPetsHeader = zod.object({ 'X-EXAMPLE': zod.enum(['ONE', 'TWO', 'THREE']).describe('Header parameters'), }); + export const ListPetsResponseItem = zod + .union([ + zod + .union([ + zod.object({ + cuteness: zod.number(), + breed: zod.enum(['Labradoodle']), + }), + zod.object({ + length: zod.number(), + breed: zod.enum(['Dachshund']), + }), + ]) + .and( + zod.object({ + barksPerMinute: zod.number().optional(), + type: zod.enum(['dog']), + }), + ), + zod.object({ + petsRequested: zod.number().optional(), + type: zod.enum(['cat']), + }), + ]) + .and( + zod.object({ + '@id': zod.string().optional(), + id: zod.number(), + name: zod.string(), + tag: zod.string().optional(), + email: zod.string().email().optional(), + callingCode: zod.enum(['+33', '+420']).optional(), + country: zod.enum(["People's Republic of China", 'Uruguay']).optional(), + }), + ); + export const ListPetsResponse = zod.array(ListPetsResponseItem); + export const CreatePetsQueryParams = zod.object({ limit: zod .string() .optional() .describe('How many items to return at one time (max 100)'), ❯ ../test-utils/snapshot-testing.ts:75:9
[orval-tests] api-generation.spec.ts > API Generation Snapshots > tests/generated/hono/petstore-split-with-handlers/endpoints.zod.ts: test-utils/snapshot-testing.ts#L75
Error: Snapshot `API Generation Snapshots > tests/generated/hono/petstore-split-with-handlers/endpoints.zod.ts 1` mismatched - Expected + Received @@ -20,10 +20,47 @@ export const ListPetsHeader = zod.object({ 'X-EXAMPLE': zod.enum(['ONE', 'TWO', 'THREE']).describe('Header parameters'), }); + export const ListPetsResponseItem = zod + .union([ + zod + .union([ + zod.object({ + cuteness: zod.number(), + breed: zod.enum(['Labradoodle']), + }), + zod.object({ + length: zod.number(), + breed: zod.enum(['Dachshund']), + }), + ]) + .and( + zod.object({ + barksPerMinute: zod.number().optional(), + type: zod.enum(['dog']), + }), + ), + zod.object({ + petsRequested: zod.number().optional(), + type: zod.enum(['cat']), + }), + ]) + .and( + zod.object({ + '@id': zod.string().optional(), + id: zod.number(), + name: zod.string(), + tag: zod.string().optional(), + email: zod.string().email().optional(), + callingCode: zod.enum(['+33', '+420']).optional(), + country: zod.enum(["People's Republic of China", 'Uruguay']).optional(), + }), + ); + export const ListPetsResponse = zod.array(ListPetsResponseItem); + export const CreatePetsQueryParams = zod.object({ limit: zod .string() .optional() .describe('How many items to return at one time (max 100)'), ❯ ../test-utils/snapshot-testing.ts:75:9
[orval-tests] api-generation.spec.ts > API Generation Snapshots > tests/generated/hono/petstore-split/endpoints.zod.ts: test-utils/snapshot-testing.ts#L75
Error: Snapshot `API Generation Snapshots > tests/generated/hono/petstore-split/endpoints.zod.ts 1` mismatched - Expected + Received @@ -20,10 +20,47 @@ export const ListPetsHeader = zod.object({ 'X-EXAMPLE': zod.enum(['ONE', 'TWO', 'THREE']).describe('Header parameters'), }); + export const ListPetsResponseItem = zod + .union([ + zod + .union([ + zod.object({ + cuteness: zod.number(), + breed: zod.enum(['Labradoodle']), + }), + zod.object({ + length: zod.number(), + breed: zod.enum(['Dachshund']), + }), + ]) + .and( + zod.object({ + barksPerMinute: zod.number().optional(), + type: zod.enum(['dog']), + }), + ), + zod.object({ + petsRequested: zod.number().optional(), + type: zod.enum(['cat']), + }), + ]) + .and( + zod.object({ + '@id': zod.string().optional(), + id: zod.number(), + name: zod.string(), + tag: zod.string().optional(), + email: zod.string().email().optional(), + callingCode: zod.enum(['+33', '+420']).optional(), + country: zod.enum(["People's Republic of China", 'Uruguay']).optional(), + }), + ); + export const ListPetsResponse = zod.array(ListPetsResponseItem); + export const CreatePetsQueryParams = zod.object({ limit: zod .string() .optional() .describe('How many items to return at one time (max 100)'), ❯ ../test-utils/snapshot-testing.ts:75:9
[orval-tests] api-generation.spec.ts > API Generation Snapshots > tests/generated/hono/petstore-single/endpoints.zod.ts: test-utils/snapshot-testing.ts#L75
Error: Snapshot `API Generation Snapshots > tests/generated/hono/petstore-single/endpoints.zod.ts 1` mismatched - Expected + Received @@ -20,10 +20,47 @@ export const ListPetsHeader = zod.object({ 'X-EXAMPLE': zod.enum(['ONE', 'TWO', 'THREE']).describe('Header parameters'), }); + export const ListPetsResponseItem = zod + .union([ + zod + .union([ + zod.object({ + cuteness: zod.number(), + breed: zod.enum(['Labradoodle']), + }), + zod.object({ + length: zod.number(), + breed: zod.enum(['Dachshund']), + }), + ]) + .and( + zod.object({ + barksPerMinute: zod.number().optional(), + type: zod.enum(['dog']), + }), + ), + zod.object({ + petsRequested: zod.number().optional(), + type: zod.enum(['cat']), + }), + ]) + .and( + zod.object({ + '@id': zod.string().optional(), + id: zod.number(), + name: zod.string(), + tag: zod.string().optional(), + email: zod.string().email().optional(), + callingCode: zod.enum(['+33', '+420']).optional(), + country: zod.enum(["People's Republic of China", 'Uruguay']).optional(), + }), + ); + export const ListPetsResponse = zod.array(ListPetsResponseItem); + export const CreatePetsQueryParams = zod.object({ limit: zod .string() .optional() .describe('How many items to return at one time (max 100)'), ❯ ../test-utils/snapshot-testing.ts:75:9
[orval-tests] api-generation.spec.ts > API Generation Snapshots > tests/generated/hono/endpoint-parameters/endpoints.zod.ts: test-utils/snapshot-testing.ts#L75
Error: Snapshot `API Generation Snapshots > tests/generated/hono/endpoint-parameters/endpoints.zod.ts 1` mismatched - Expected + Received @@ -37,10 +37,26 @@ .optional() .describe('Only return pets from China?\nExample: true\n'), tag: zod.array(zod.string()).optional().describe('include pets tag'), }); + export const listPetsByCountryResponseCountryCodeDefault = `UY`; + + export const ListPetsByCountryResponseItem = zod.object({ + '@id': zod.string().optional(), + id: zod.number(), + name: zod.string(), + tag: zod.string().optional(), + age: zod.number().optional(), + countryCode: zod + .enum(['CN', 'UY']) + .default(listPetsByCountryResponseCountryCodeDefault), + }); + export const ListPetsByCountryResponse = zod.array( + ListPetsByCountryResponseItem, + ); + export const listPetsByAgePathAgeDefault = 5; export const ListPetsByAgeParams = zod.object({ age: zod .number() @@ -58,5 +74,19 @@ .datetime({ offset: true }) .optional() .describe('Filter by latest birthdate.\nExample: 2020-01-01T00:00:00Z\n'), }); + export const listPetsByAgeResponseCountryCodeDefault = `UY`; + + export const ListPetsByAgeResponseItem = zod.object({ + '@id': zod.string().optional(), + id: zod.number(), + name: zod.string(), + tag: zod.string().optional(), + age: zod.number().optional(), + countryCode: zod + .enum(['CN', 'UY']) + .default(listPetsByAgeResponseCountryCodeDefault), + }); + export const ListPetsByAgeResponse = zod.array(ListPetsByAgeResponseItem); + ❯ ../test-utils/snapshot-testing.ts:75:9
[orval-tests] api-generation.spec.ts > API Generation Snapshots > tests/generated/default/schemas-zod-only/endpoints.ts: test-utils/snapshot-testing.ts#L75
Error: Snapshot `API Generation Snapshots > tests/generated/default/schemas-zod-only/endpoints.ts 1` mismatched - Expected + Received @@ -23,10 +23,47 @@ export const ListPetsHeader = zod.object({ 'X-EXAMPLE': zod.enum(['ONE', 'TWO', 'THREE']).describe('Header parameters'), }); + export const ListPetsResponseItem = zod + .union([ + zod + .union([ + zod.object({ + cuteness: zod.number(), + breed: zod.enum(['Labradoodle']), + }), + zod.object({ + length: zod.number(), + breed: zod.enum(['Dachshund']), + }), + ]) + .and( + zod.object({ + barksPerMinute: zod.number().optional(), + type: zod.enum(['dog']), + }), + ), + zod.object({ + petsRequested: zod.number().optional(), + type: zod.enum(['cat']), + }), + ]) + .and( + zod.object({ + '@id': zod.string().optional(), + id: zod.number(), + name: zod.string(), + tag: zod.string().optional(), + email: zod.string().email().optional(), + callingCode: zod.enum(['+33', '+420']).optional(), + country: zod.enum(["People's Republic of China", 'Uruguay']).optional(), + }), + ); + export const ListPetsResponse = zod.array(ListPetsResponseItem); + /** * @summary Create a pet */ export const CreatePetsQueryParams = zod.object({ limit: zod ❯ ../test-utils/snapshot-testing.ts:75:9
pr-checks (ubuntu-latest, 22.x)
orval-tests#test:snapshots: command (/home/runner/work/orval/orval/tests) /home/runner/.bun/bin/bun run test:snapshots exited (1)
pr-checks (windows-latest, 22.x)
The strategy configuration was canceled because "pr-checks.ubuntu-latest_22_x" failed
pr-checks (windows-latest, 22.x)
The operation was canceled.
pr-checks (windows-latest, 22.x)
NOTICE: windows-latest requests are being redirected to windows-2025-vs2026 by June 15, 2026