fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix zod plugin unicode regex: add u flag for patterns with unicode property escapes

Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>

+87 -39
+4 -2
packages/openapi-ts-tests/zod/v3/__snapshots__/2.0.x/mini/default/zod.gen.ts
··· 382 382 text: z.optional(z.string().check(z.regex(/^\w+$/))), 383 383 patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))), 384 384 patternWithNewline: z.optional(z.string().check(z.regex(/aaa\nbbb/))), 385 - patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))) 385 + patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))), 386 + patternWithUnicode: z.optional(z.string().check(z.regex(/^\p{L}+$/u))) 386 387 }); 387 388 388 389 export const zParameterActivityParams = z.object({ ··· 447 448 text: z.optional(z.string().check(z.regex(/^\w+$/))), 448 449 patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))), 449 450 patternWithNewline: z.optional(z.string().check(z.regex(/aaa\nbbb/))), 450 - patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))) 451 + patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))), 452 + patternWithUnicode: z.optional(z.string().check(z.regex(/^\p{L}+$/u))) 451 453 }); 452 454 453 455 export const zServiceWithEmptyTagData = z.object({
+4 -2
packages/openapi-ts-tests/zod/v3/__snapshots__/2.0.x/v3/default/zod.gen.ts
··· 382 382 text: z.string().regex(/^\w+$/).optional(), 383 383 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 384 384 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 385 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 385 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 386 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 386 387 }); 387 388 388 389 export const zParameterActivityParams = z.object({ ··· 447 448 text: z.string().regex(/^\w+$/).optional(), 448 449 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 449 450 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 450 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 451 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 452 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 451 453 }); 452 454 453 455 export const zServiceWithEmptyTagData = z.object({
+4 -2
packages/openapi-ts-tests/zod/v3/__snapshots__/2.0.x/v4/default/zod.gen.ts
··· 382 382 text: z.string().regex(/^\w+$/).optional(), 383 383 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 384 384 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 385 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 385 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 386 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 386 387 }); 387 388 388 389 export const zParameterActivityParams = z.object({ ··· 447 448 text: z.string().regex(/^\w+$/).optional(), 448 449 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 449 450 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 450 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 451 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 452 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 451 453 }); 452 454 453 455 export const zServiceWithEmptyTagData = z.object({
+4 -2
packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/mini/default/zod.gen.ts
··· 651 651 text: z.optional(z.string().check(z.regex(/^\w+$/))), 652 652 patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))), 653 653 patternWithNewline: z.optional(z.string().check(z.regex(/aaa\nbbb/))), 654 - patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))) 654 + patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))), 655 + patternWithUnicode: z.optional(z.string().check(z.regex(/^\p{L}+$/u))) 655 656 }); 656 657 657 658 export const zFile = z.object({ ··· 992 993 text: z.optional(z.string().check(z.regex(/^\w+$/))), 993 994 patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))), 994 995 patternWithNewline: z.optional(z.string().check(z.regex(/aaa\nbbb/))), 995 - patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))) 996 + patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))), 997 + patternWithUnicode: z.optional(z.string().check(z.regex(/^\p{L}+$/u))) 996 998 }); 997 999 998 1000 export const zFileWritable = z.object({
+4 -2
packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v3/default/zod.gen.ts
··· 651 651 text: z.string().regex(/^\w+$/).optional(), 652 652 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 653 653 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 654 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 654 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 655 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 655 656 }); 656 657 657 658 export const zFile = z.object({ ··· 992 993 text: z.string().regex(/^\w+$/).optional(), 993 994 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 994 995 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 995 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 996 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 997 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 996 998 }); 997 999 998 1000 export const zFileWritable = z.object({
+4 -2
packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v4/default/zod.gen.ts
··· 651 651 text: z.string().regex(/^\w+$/).optional(), 652 652 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 653 653 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 654 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 654 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 655 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 655 656 }); 656 657 657 658 export const zFile = z.object({ ··· 992 993 text: z.string().regex(/^\w+$/).optional(), 993 994 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 994 995 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 995 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 996 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 997 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 996 998 }); 997 999 998 1000 export const zFileWritable = z.object({
+4 -2
packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/mini/default/zod.gen.ts
··· 651 651 text: z.optional(z.string().check(z.regex(/^\w+$/))), 652 652 patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))), 653 653 patternWithNewline: z.optional(z.string().check(z.regex(/aaa\nbbb/))), 654 - patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))) 654 + patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))), 655 + patternWithUnicode: z.optional(z.string().check(z.regex(/^\p{L}+$/u))) 655 656 }); 656 657 657 658 export const zFile = z.object({ ··· 1001 1002 text: z.optional(z.string().check(z.regex(/^\w+$/))), 1002 1003 patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))), 1003 1004 patternWithNewline: z.optional(z.string().check(z.regex(/aaa\nbbb/))), 1004 - patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))) 1005 + patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))), 1006 + patternWithUnicode: z.optional(z.string().check(z.regex(/^\p{L}+$/u))) 1005 1007 }); 1006 1008 1007 1009 export const zFileWritable = z.object({
+4 -2
packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v3/default/zod.gen.ts
··· 651 651 text: z.string().regex(/^\w+$/).optional(), 652 652 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 653 653 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 654 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 654 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 655 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 655 656 }); 656 657 657 658 export const zFile = z.object({ ··· 1001 1002 text: z.string().regex(/^\w+$/).optional(), 1002 1003 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 1003 1004 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 1004 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 1005 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 1006 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 1005 1007 }); 1006 1008 1007 1009 export const zFileWritable = z.object({
+4 -2
packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/default/zod.gen.ts
··· 651 651 text: z.string().regex(/^\w+$/).optional(), 652 652 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 653 653 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 654 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 654 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 655 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 655 656 }); 656 657 657 658 export const zFile = z.object({ ··· 1001 1002 text: z.string().regex(/^\w+$/).optional(), 1002 1003 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 1003 1004 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 1004 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 1005 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 1006 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 1005 1007 }); 1006 1008 1007 1009 export const zFileWritable = z.object({
+4 -2
packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/mini/default/zod.gen.ts
··· 382 382 text: z.optional(z.string().check(z.regex(/^\w+$/))), 383 383 patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))), 384 384 patternWithNewline: z.optional(z.string().check(z.regex(/aaa\nbbb/))), 385 - patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))) 385 + patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))), 386 + patternWithUnicode: z.optional(z.string().check(z.regex(/^\p{L}+$/u))) 386 387 }); 387 388 388 389 export const zParameterActivityParams = z.object({ ··· 447 448 text: z.optional(z.string().check(z.regex(/^\w+$/))), 448 449 patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))), 449 450 patternWithNewline: z.optional(z.string().check(z.regex(/aaa\nbbb/))), 450 - patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))) 451 + patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))), 452 + patternWithUnicode: z.optional(z.string().check(z.regex(/^\p{L}+$/u))) 451 453 }); 452 454 453 455 export const zServiceWithEmptyTagData = z.object({
+4 -2
packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v3/default/zod.gen.ts
··· 382 382 text: z.string().regex(/^\w+$/).optional(), 383 383 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 384 384 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 385 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 385 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 386 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 386 387 }); 387 388 388 389 export const zParameterActivityParams = z.object({ ··· 447 448 text: z.string().regex(/^\w+$/).optional(), 448 449 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 449 450 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 450 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 451 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 452 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 451 453 }); 452 454 453 455 export const zServiceWithEmptyTagData = z.object({
+4 -2
packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/default/zod.gen.ts
··· 382 382 text: z.string().regex(/^\w+$/).optional(), 383 383 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 384 384 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 385 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 385 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 386 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 386 387 }); 387 388 388 389 export const zParameterActivityParams = z.object({ ··· 447 448 text: z.string().regex(/^\w+$/).optional(), 448 449 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 449 450 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 450 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 451 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 452 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 451 453 }); 452 454 453 455 export const zServiceWithEmptyTagData = z.object({
+4 -2
packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/default/zod.gen.ts
··· 651 651 text: z.optional(z.string().check(z.regex(/^\w+$/))), 652 652 patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))), 653 653 patternWithNewline: z.optional(z.string().check(z.regex(/aaa\nbbb/))), 654 - patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))) 654 + patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))), 655 + patternWithUnicode: z.optional(z.string().check(z.regex(/^\p{L}+$/u))) 655 656 }); 656 657 657 658 export const zFile = z.object({ ··· 992 993 text: z.optional(z.string().check(z.regex(/^\w+$/))), 993 994 patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))), 994 995 patternWithNewline: z.optional(z.string().check(z.regex(/aaa\nbbb/))), 995 - patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))) 996 + patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))), 997 + patternWithUnicode: z.optional(z.string().check(z.regex(/^\p{L}+$/u))) 996 998 }); 997 999 998 1000 export const zFileWritable = z.object({
+4 -2
packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v3/default/zod.gen.ts
··· 651 651 text: z.string().regex(/^\w+$/).optional(), 652 652 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 653 653 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 654 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 654 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 655 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 655 656 }); 656 657 657 658 export const zFile = z.object({ ··· 992 993 text: z.string().regex(/^\w+$/).optional(), 993 994 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 994 995 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 995 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 996 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 997 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 996 998 }); 997 999 998 1000 export const zFileWritable = z.object({
+4 -2
packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/default/zod.gen.ts
··· 651 651 text: z.string().regex(/^\w+$/).optional(), 652 652 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 653 653 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 654 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 654 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 655 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 655 656 }); 656 657 657 658 export const zFile = z.object({ ··· 992 993 text: z.string().regex(/^\w+$/).optional(), 993 994 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 994 995 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 995 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 996 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 997 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 996 998 }); 997 999 998 1000 export const zFileWritable = z.object({
+4 -2
packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/mini/default/zod.gen.ts
··· 651 651 text: z.optional(z.string().check(z.regex(/^\w+$/))), 652 652 patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))), 653 653 patternWithNewline: z.optional(z.string().check(z.regex(/aaa\nbbb/))), 654 - patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))) 654 + patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))), 655 + patternWithUnicode: z.optional(z.string().check(z.regex(/^\p{L}+$/u))) 655 656 }); 656 657 657 658 export const zFile = z.object({ ··· 1001 1002 text: z.optional(z.string().check(z.regex(/^\w+$/))), 1002 1003 patternWithSingleQuotes: z.optional(z.string().check(z.regex(/^[a-zA-Z0-9']*$/))), 1003 1004 patternWithNewline: z.optional(z.string().check(z.regex(/aaa\nbbb/))), 1004 - patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))) 1005 + patternWithBacktick: z.optional(z.string().check(z.regex(/aaa`bbb/))), 1006 + patternWithUnicode: z.optional(z.string().check(z.regex(/^\p{L}+$/u))) 1005 1007 }); 1006 1008 1007 1009 export const zFileWritable = z.object({
+4 -2
packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v3/default/zod.gen.ts
··· 651 651 text: z.string().regex(/^\w+$/).optional(), 652 652 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 653 653 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 654 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 654 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 655 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 655 656 }); 656 657 657 658 export const zFile = z.object({ ··· 1001 1002 text: z.string().regex(/^\w+$/).optional(), 1002 1003 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 1003 1004 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 1004 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 1005 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 1006 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 1005 1007 }); 1006 1008 1007 1009 export const zFileWritable = z.object({
+4 -2
packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/default/zod.gen.ts
··· 651 651 text: z.string().regex(/^\w+$/).optional(), 652 652 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 653 653 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 654 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 654 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 655 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 655 656 }); 656 657 657 658 export const zFile = z.object({ ··· 1001 1002 text: z.string().regex(/^\w+$/).optional(), 1002 1003 patternWithSingleQuotes: z.string().regex(/^[a-zA-Z0-9']*$/).optional(), 1003 1004 patternWithNewline: z.string().regex(/aaa\nbbb/).optional(), 1004 - patternWithBacktick: z.string().regex(/aaa`bbb/).optional() 1005 + patternWithBacktick: z.string().regex(/aaa`bbb/).optional(), 1006 + patternWithUnicode: z.string().regex(/^\p{L}+$/u).optional() 1005 1007 }); 1006 1008 1007 1009 export const zFileWritable = z.object({
+2 -1
packages/openapi-ts/src/plugins/zod/mini/toAst/string.ts
··· 76 76 const { schema, symbols } = ctx; 77 77 const { z } = symbols; 78 78 if (!schema.pattern) return; 79 - return $(z).attr(identifiers.regex).call($.regexp(schema.pattern)); 79 + const flags = /\\[pP]\{/.test(schema.pattern) ? 'u' : undefined; 80 + return $(z).attr(identifiers.regex).call($.regexp(schema.pattern, flags)); 80 81 } 81 82 82 83 function stringResolver(ctx: StringResolverContext): Chain {
+2 -1
packages/openapi-ts/src/plugins/zod/v3/toAst/string.ts
··· 67 67 function patternNode(ctx: StringResolverContext): Chain | undefined { 68 68 const { chain, schema } = ctx; 69 69 if (!schema.pattern) return; 70 - return chain.current.attr(identifiers.regex).call($.regexp(schema.pattern)); 70 + const flags = /\\[pP]\{/.test(schema.pattern) ? 'u' : undefined; 71 + return chain.current.attr(identifiers.regex).call($.regexp(schema.pattern, flags)); 71 72 } 72 73 73 74 function stringResolver(ctx: StringResolverContext): Chain {
+2 -1
packages/openapi-ts/src/plugins/zod/v4/toAst/string.ts
··· 72 72 function patternNode(ctx: StringResolverContext): Chain | undefined { 73 73 const { chain, schema } = ctx; 74 74 if (!schema.pattern) return; 75 - return chain.current.attr(identifiers.regex).call($.regexp(schema.pattern)); 75 + const flags = /\\[pP]\{/.test(schema.pattern) ? 'u' : undefined; 76 + return chain.current.attr(identifiers.regex).call($.regexp(schema.pattern, flags)); 76 77 } 77 78 78 79 function stringResolver(ctx: StringResolverContext): Chain {
+3
specs/2.0.x/full.yaml
··· 1127 1127 patternWithBacktick: 1128 1128 type: string 1129 1129 pattern: aaa`bbb 1130 + patternWithUnicode: 1131 + type: string 1132 + pattern: ^\p{L}+$ 1130 1133 parameter.ActivityParams: 1131 1134 type: object 1132 1135 properties:
+3
specs/3.0.x/full.yaml
··· 2064 2064 patternWithBacktick: 2065 2065 type: string 2066 2066 pattern: aaa`bbb 2067 + patternWithUnicode: 2068 + type: string 2069 + pattern: ^\p{L}+$ 2067 2070 File: 2068 2071 required: 2069 2072 - mime
+3
specs/3.1.x/full.yaml
··· 2107 2107 patternWithBacktick: 2108 2108 type: string 2109 2109 pattern: aaa`bbb 2110 + patternWithUnicode: 2111 + type: string 2112 + pattern: ^\p{L}+$ 2110 2113 File: 2111 2114 required: 2112 2115 - mime