Skip to content

Commit

Permalink
chore: allow openapi "date" format of strings (#8837)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
thomasheartman authored Nov 22, 2024
1 parent cf741c6 commit 5d553d0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/openapi/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const ajv = new Ajv({
keywords: ['example', 'x-enforcer-exception-skip-codes'],
formats: {
'date-time': true,
date: true,
uri: true,
},
});
Expand Down

0 comments on commit 5d553d0

Please sign in to comment.