zowe / zowe-cli

Zowe CLI
Eclipse Public License 2.0
114 stars 86 forks source link

Schema validation is broken for typeless base profiles #2302

Open t1m0thyj opened 3 weeks ago

t1m0thyj commented 3 weeks ago

Describe the bug

When using a typeless profile as a base profile and storing tokenValue as a secure field, then schema validation fails.

Expected and actual results

Since typeless profiles are often used as base profiles, I would expect that tokenValue property is supported in them.

For typeless profiles, the first item in the schema array definition gets used which is currently zosmf. We could fix this by re-ordering the schema array to put base profiles first, but will need to consider the impacts of this change.

Describe your environment

Schema created by Zowe CLI v8.0.1 Config edited in VS Code 1.94.1

Additional context

image

github-actions[bot] commented 3 weeks ago

Thank you for creating a bug report. We will investigate the bug and evaluate its impact on the product. If you haven't already, please ensure you have provided steps to reproduce the bug and as much context as possible.

t1m0thyj commented 2 weeks ago

If we switch the order, this may break other properties defined in a typeless profile such as encoding. Ideally IntelliSense for typeless profiles could show all properties available across all profiles, but this might cause conflicts if multiple profiles define the same property (e.g. zosmf user vs zftp user).