From ce2bd42c285668b83f7d7bf91f9bac2f565c8aef Mon Sep 17 00:00:00 2001 From: Matt Fulp <8397318+fulpm@users.noreply.github.com> Date: Tue, 26 Nov 2024 14:10:24 -0500 Subject: [PATCH] 22335: Exclude protected labels from generation output --- codegen/engine.ts | 1 + codegen/generator.ts | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/codegen/engine.ts b/codegen/engine.ts index ad9173d..bb13ee2 100644 --- a/codegen/engine.ts +++ b/codegen/engine.ts @@ -45,6 +45,7 @@ export interface LabelDefinition { description?: string | null; use_active_session?: boolean; attribute?: SchemaType | null; + protected?: boolean; payload?: boolean; long_running?: boolean; read_only?: boolean; diff --git a/codegen/generator.ts b/codegen/generator.ts index 5e4a79c..c3b4994 100644 --- a/codegen/generator.ts +++ b/codegen/generator.ts @@ -39,14 +39,13 @@ export class Generator { "debug_label", "initialize", "initialize_for_deployment", - "set_contained_trainee_maps", "version", "get_api", "single_react", "single_react_series", ...Object.entries(doc.labels).reduce((ignored, [label, def]) => { - // Ignore all the attribute labels - if (def.attribute != null) ignored.push(label); + // Ignore all the attribute and protected labels + if (def.attribute != null || def.protected) ignored.push(label); return ignored; }, []), ];