Skip to content

Commit

Permalink
make EntityDefinition 'type' a plain string instead of an enum (elast…
Browse files Browse the repository at this point in the history
…ic#187451)

make EntityDefinition 'type' a plain string instead of an enum
  • Loading branch information
tommyers-elastic authored Jul 3, 2024
1 parent 93e127e commit 19db776
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
9 changes: 0 additions & 9 deletions x-pack/packages/kbn-entities-schema/src/schema/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,8 @@
import { z } from 'zod';
import moment from 'moment';

export enum EntityType {
service = 'service',
host = 'host',
pod = 'pod',
node = 'node',
}

export const arrayOfStringsSchema = z.array(z.string());

export const entityTypeSchema = z.nativeEnum(EntityType);

export enum BasicAggregations {
avg = 'avg',
max = 'max',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import { z } from 'zod';
import {
arrayOfStringsSchema,
entityTypeSchema,
keyMetricSchema,
metadataSchema,
filterSchema,
Expand All @@ -20,7 +19,7 @@ export const entityDefinitionSchema = z.object({
id: z.string().regex(/^[\w-]+$/),
name: z.string(),
description: z.optional(z.string()),
type: entityTypeSchema,
type: z.string(),
filter: filterSchema,
indexPatterns: arrayOfStringsSchema,
identityFields: z.array(identityFieldsSchema),
Expand Down

0 comments on commit 19db776

Please sign in to comment.