From 5d553d0c7bb9f75a971c1b5209d503f3484f0abc Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Fri, 22 Nov 2024 10:18:39 +0100 Subject: [PATCH] chore: allow openapi "date" format of strings (#8837) This change opens up the possibility of using the "date" format for strings in our OpenAPI spec. According to the official docs, [`date` is a built-in string format](https://swagger.io/docs/specification/v3_0/data-models/data-types/#string-formats). --- src/lib/openapi/validate.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/openapi/validate.ts b/src/lib/openapi/validate.ts index 57920dc771..9819807861 100644 --- a/src/lib/openapi/validate.ts +++ b/src/lib/openapi/validate.ts @@ -17,6 +17,7 @@ const ajv = new Ajv({ keywords: ['example', 'x-enforcer-exception-skip-codes'], formats: { 'date-time': true, + date: true, uri: true, }, });