Skip to content

Commit

Permalink
22335: Exclude protected labels from generation output
Browse files Browse the repository at this point in the history
  • Loading branch information
fulpm committed Nov 26, 2024
1 parent b54c53e commit ce2bd42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions codegen/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions codegen/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string[]>((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;
}, []),
];
Expand Down

0 comments on commit ce2bd42

Please sign in to comment.