Skip to content

Commit

Permalink
[8.17][Fleet] fix schema validation to allow undefined/null (#202732) (
Browse files Browse the repository at this point in the history
…#202878)

Backport #202732 to 8.17

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
juliaElastic and kibanamachine authored Dec 9, 2024
1 parent 04111eb commit bace51f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/fleet/common/types/models/agent_policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export interface NewAgentPolicy {
global_data_tags?: GlobalDataTag[];
monitoring_pprof_enabled?: boolean;
monitoring_http?: {
enabled: boolean;
enabled?: boolean;
host?: string;
port?: number;
};
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/fleet/server/types/models/agent_policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export const AgentPolicyBaseSchema = {
monitoring_pprof_enabled: schema.maybe(schema.boolean()),
monitoring_http: schema.maybe(
schema.object({
enabled: schema.boolean(),
enabled: schema.maybe(schema.boolean()),
host: schema.maybe(schema.string({ defaultValue: 'localhost' })),
port: schema.maybe(schema.number({ min: 0, max: 65353, defaultValue: 6791 })),
buffer: schema.maybe(schema.object({ enabled: schema.boolean({ defaultValue: false }) })),
Expand Down

0 comments on commit bace51f

Please sign in to comment.