Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaElastic committed Oct 2, 2024
1 parent 32b14be commit 32643e4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
12 changes: 11 additions & 1 deletion x-pack/plugins/fleet/server/routes/epm/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@ describe('schema validation', () => {
],
categories: ['advanced_analytics_ueba'],
savedObject,
owner: { github: 'test', type: 'elastic' },
};
const expectedResponse: GetPackagesResponse = {
items: [packageItem],
Expand Down Expand Up @@ -414,6 +413,17 @@ describe('schema validation', () => {
title: 'test',
},
],
title: 'test',
description: 'test',
icons: [
{
src: 'src',
title: 'title',
size: 'size',
type: 'type',
dark_mode: true,
},
],
},
],
total: 1,
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/fleet/server/services/epm/archive/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,7 @@ type OptionalPackageProp = OptionalPropertyOf<ArchivePackage>;
const requiredArchivePackageProps: readonly RequiredPackageProp[] = [
'name',
'version',
'description',
'title',
'format_version',
'owner',
] as const;

Expand All @@ -130,6 +128,8 @@ const optionalArchivePackageProps: readonly OptionalPackageProp[] = [
'release',
'agent',
'elasticsearch',
'description',
'format_version',
] as const;

const registryInputProps = Object.values(RegistryInputKeys);
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/fleet/server/types/rest_spec/epm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export const InstalledPackageSchema = schema.object({
name: schema.string(),
version: schema.string(),
status: schema.string(),
title: schema.string(),
title: schema.maybe(schema.string()),
description: schema.maybe(schema.string()),
icons: schema.maybe(schema.arrayOf(PackageIconSchema)),
dataStreams: schema.arrayOf(
Expand Down

0 comments on commit 32643e4

Please sign in to comment.