diff --git a/packages/kbn-router-to-openapispec/src/oas_converter/kbn_config_schema/post_process_mutations/mutations/utils.ts b/packages/kbn-router-to-openapispec/src/oas_converter/kbn_config_schema/post_process_mutations/mutations/utils.ts index c2b17f05dacd4..abce6d470a35d 100644 --- a/packages/kbn-router-to-openapispec/src/oas_converter/kbn_config_schema/post_process_mutations/mutations/utils.ts +++ b/packages/kbn-router-to-openapispec/src/oas_converter/kbn_config_schema/post_process_mutations/mutations/utils.ts @@ -43,8 +43,8 @@ export const processDiscontinued = (schema: OpenAPIV3.SchemaObject): void => { }; /** Just for type convenience */ -export const deleteField = (schema: Record, field: string): void => { - delete schema[field]; +export const deleteField = (schema: object, field: string): void => { + delete (schema as Record)[field]; }; export const isAnyType = (schema: OpenAPIV3.SchemaObject): boolean => {