diff --git a/x-pack/plugins/event_log/generated/schemas.ts b/x-pack/plugins/event_log/generated/schemas.ts index 7cecba1efa43..15dc182dbe65 100644 --- a/x-pack/plugins/event_log/generated/schemas.ts +++ b/x-pack/plugins/event_log/generated/schemas.ts @@ -149,10 +149,6 @@ function ecsDate() { return schema.maybe(schema.string({ validate: validateDate })); } -function ecsVersion() { - return schema.maybe(schema.string({ validate: validateVersion })); -} - const ISO_DATE_PATTERN = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/; function validateDate(isoDate: string) { @@ -160,6 +156,10 @@ function validateDate(isoDate: string) { return 'string is not a valid ISO date: ' + isoDate; } +function ecsVersion() { + return schema.maybe(schema.string({ validate: validateVersion })); +} + function validateVersion(version: string) { if (semver.valid(version)) return; return 'string is not a valid version: ' + version; diff --git a/x-pack/plugins/event_log/scripts/create_schemas.js b/x-pack/plugins/event_log/scripts/create_schemas.js index 0a53165630a2..c86722ccd76c 100755 --- a/x-pack/plugins/event_log/scripts/create_schemas.js +++ b/x-pack/plugins/event_log/scripts/create_schemas.js @@ -283,6 +283,7 @@ const SchemaFileTemplate = ` // the event log import { schema, TypeOf } from '@kbn/config-schema'; +import semver from 'semver'; type DeepWriteable = { -readonly [P in keyof T]: DeepWriteable }; type DeepPartial = {