Skip to content

Commit

Permalink
do not requie id & desc
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed Sep 3, 2020
1 parent 7134cd7 commit 38a7455
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions x-pack/plugins/logstash/server/models/pipeline/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import { i18n } from '@kbn/i18n';

interface PipelineOptions {
id: string;
description: string;
description?: string;
pipeline: string;
username?: string;
settings?: Record<string, any>;
}

interface DownstreamPipeline {
description: string;
description?: string;
pipeline: string;
settings?: Record<string, any>;
}
Expand All @@ -27,7 +27,7 @@ interface DownstreamPipeline {
*/
export class Pipeline {
public readonly id: string;
public readonly description: string;
public readonly description?: string;
public readonly username?: string;
public readonly pipeline: string;
private readonly settings: Record<string, any>;
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/logstash/server/routes/pipeline/save.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export function registerPipelineSaveRoute(router: IRouter, security?: SecurityPl
id: schema.string(),
}),
body: schema.object({
id: schema.string(),
description: schema.string(),
id: schema.maybe(schema.string()), // id might be provided when cloning pipeline
description: schema.maybe(schema.string()),
pipeline: schema.string(),
settings: schema.maybe(schema.object({}, { unknowns: 'allow' })),
}),
Expand Down

0 comments on commit 38a7455

Please sign in to comment.