From c8dd48bc961cf7028ea03f0bf8f558168987e4b7 Mon Sep 17 00:00:00 2001 From: Ludovic Thomas Date: Thu, 25 Jun 2026 14:41:00 +0200 Subject: [PATCH] fix: support of UUID --- src/MockGenerateHelper.ts | 2 +- src/types.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/MockGenerateHelper.ts b/src/MockGenerateHelper.ts index c5b6278..ab483c3 100644 --- a/src/MockGenerateHelper.ts +++ b/src/MockGenerateHelper.ts @@ -33,7 +33,7 @@ export class MockGenerateHelper { if (!format) { // simple string value = `'${propertyName}-${name.toLowerCase()}'`; - } else if (format === StringFormats.Guid || propertyName === PropertyNames.Id) { + } else if (format === StringFormats.Guid || format === StringFormats.Uuid || propertyName === PropertyNames.Id) { value = `'${this.casual.uuid}'`; } else if (format === StringFormats.DateTime || format === StringFormats.TimeSpan) { value = `'2019-06-10T06:20:01.389Z'`; diff --git a/src/types.ts b/src/types.ts index 9a54a56..9f5adde 100644 --- a/src/types.ts +++ b/src/types.ts @@ -27,6 +27,7 @@ export enum StringFormats { Binary = 'binary', Email = 'email', Guid = 'guid', + Uuid = 'uuid', Uri = 'uri', Hostname = 'hostname', Ipv4 = 'ipv4',