### Hierarchy

- ConfigSchema

## Index

### Properties

- JSON_SCHEMA
- SCHEMA_VERSION

### Methods

- _updateSchemaActive
- _updateSchemaAll
- _updateSchemaGlobal
- buildSchema
- findPropertyType
- generateSchema
- loadSchema
- parseSchema
- updateSchema

### Object literals

- explainSchemaSummary

## Properties

### Static Private Readonly JSON_SCHEMA

JSON_SCHEMA: "https://json-schema.org/draft/2020-12/schema" = "https://json-schema.org/draft/2020-12/schema"

- Defined in @zowe/imperative/src/config/src/ConfigSchema.ts:30

JSON schema URI stored in $schema property of the schema

readonly
memberof

  ConfigSchema

### Static Private Readonly SCHEMA_VERSION

SCHEMA_VERSION: "1.0" = "1.0"

- Defined in @zowe/imperative/src/config/src/ConfigSchema.ts:37

Version number stored in $version property of the schema

readonly
memberof

  ConfigSchema

## Methods

### Static Private _updateSchemaActive

- _updateSchemaActive(opts: IConfigUpdateSchemaHelperOptions, forceSetSchema?: boolean, checkContrastingLayer?: boolean): IConfigUpdateSchemaPaths

- - Defined in @zowe/imperative/src/config/src/ConfigSchema.ts:148

  HELPER function for updating the active layer's schema files This operation is divided in 2 steps:

  1. Update the schema file corresponding to the active layer
  2. Update the opposite (user/non-user) layer if it exists

  #### Parameters

  - ##### opts: IConfigUpdateSchemaHelperOptions

    The various properties needed to accomplish a recursive UpdateSchema operation

  - ##### Default value forceSetSchema: boolean = false

    Indicates if we should force the creation of the schema file even if the config doesn't exist (e.g. config init)

  - ##### Default value checkContrastingLayer: boolean = true

    Indicates if we should check for the opposite (user/non-user) layer

  #### Returns IConfigUpdateSchemaPaths

  Object containing the updated schema paths

### Static Private _updateSchemaAll

- _updateSchemaAll(opts: IConfigUpdateSchemaHelperOptions): IConfigUpdateSchemaPaths

- - Defined in @zowe/imperative/src/config/src/ConfigSchema.ts:208

  HELPER function for recursively updating schema files This operation is divided in 3 steps:

  1. Traverse UP the directory structure while updating the corresponding schema files
  2. Update both (User and Non-User) Global configuration's schema files
  3. Traverse DOWN the directory structure based on the depth specified

  #### Parameters

  - ##### opts: IConfigUpdateSchemaHelperOptions

    The various properties needed to accomplish a recursive UpdateSchema operation

  #### Returns IConfigUpdateSchemaPaths

  Object containing the updated schema paths

### Static Private _updateSchemaGlobal

- _updateSchemaGlobal(opts: IConfigUpdateSchemaHelperOptions): IConfigUpdateSchemaPaths

- - Defined in @zowe/imperative/src/config/src/ConfigSchema.ts:185

  HELPER function for updating global schema files This operation is divided in 2 steps:

  1. Activate the global layer
  2. Call the Active helper

  #### Parameters

  - ##### opts: IConfigUpdateSchemaHelperOptions

    The various properties needed to accomplish a recursive UpdateSchema operation

  #### Returns IConfigUpdateSchemaPaths

  Object containing the updated schema paths

### Static buildSchema

- buildSchema(profiles: IProfileTypeConfiguration[]): IConfigSchema

- - Defined in @zowe/imperative/src/config/src/ConfigSchema.ts:274

  Dynamically builds the config schema for this CLI.

  #### Parameters

  - ##### profiles: IProfileTypeConfiguration[]

    The profiles supported by this CLI

  #### Returns IConfigSchema

  JSON schema for all supported profile types

### Static findPropertyType

- findPropertyType(path: string, config: IConfig, schema?: IConfigSchema): string | undefined

- - Defined in @zowe/imperative/src/config/src/ConfigSchema.ts:432

  Find the type of a property based on schema info.

  #### Parameters

  - ##### path: string

    Path to JSON property in config JSON

  - ##### config: IConfig

    Team config properties

  - ##### Optional schema: IConfigSchema

    Config schema definition. Defaults to profile schemas defined in Imperative config.

  #### Returns string | undefined

### Static Private generateSchema

- generateSchema(schema: IProfileSchema): any

- - Defined in @zowe/imperative/src/config/src/ConfigSchema.ts:62

  Transform an Imperative profile schema to a JSON schema. Removes any non-JSON-schema properties and translates anything useful.

  #### Parameters

  - ##### schema: IProfileSchema

    The Imperative profile schema

  #### Returns any

  JSON schema for profile properties

### Static loadSchema

- loadSchema(schema: IConfigSchema): IProfileTypeConfiguration[]

- - Defined in @zowe/imperative/src/config/src/ConfigSchema.ts:367

  Loads Imperative profile schema objects from a schema JSON file.

  #### Parameters

  - ##### schema: IConfigSchema

    The schema JSON for config

  #### Returns IProfileTypeConfiguration[]

### Static parseSchema

- parseSchema(schema: any): IProfileSchema

- - Defined in @zowe/imperative/src/config/src/ConfigSchema.ts:109

  Transform a JSON schema to an Imperative profile schema.

  internal

  #### Parameters

  - ##### schema: any

    The JSON schema for profile properties

  #### Returns IProfileSchema

  Imperative profile schema

### Static updateSchema

- updateSchema(options?: IConfigUpdateSchemaOptions): IConfigUpdateSchemaPaths

- - Defined in @zowe/imperative/src/config/src/ConfigSchema.ts:388

  Updates Imperative Config Schema objects from a schema JSON file.

  #### Parameters

  - ##### Optional options: IConfigUpdateSchemaOptions

    The options object

  #### Returns IConfigUpdateSchemaPaths

  List of updated paths with the new/loaded or given schema

## Object literals

### Static Private Readonly explainSchemaSummary

explainSchemaSummary: object

- Defined in @zowe/imperative/src/config/src/ConfigSchema.ts:44

Pretty explanation of the schema objects

readonly
memberof

  ConfigSchema

### $schema

$schema: string = "URL"

- Defined in @zowe/imperative/src/config/src/ConfigSchema.ts:45

### $version

$version: string = "Version"

- Defined in @zowe/imperative/src/config/src/ConfigSchema.ts:46

### explainedParentKey

explainedParentKey: string = "Schema"

- Defined in @zowe/imperative/src/config/src/ConfigSchema.ts:52

### ignoredKeys

ignoredKeys: null = null

- Defined in @zowe/imperative/src/config/src/ConfigSchema.ts:53

### properties

properties: object

- Defined in @zowe/imperative/src/config/src/ConfigSchema.ts:47

### defaults

defaults: string = "Default Definitions"

- Defined in @zowe/imperative/src/config/src/ConfigSchema.ts:48

### explainedParentKey

explainedParentKey: string = "Properties"

- Defined in @zowe/imperative/src/config/src/ConfigSchema.ts:49

### ignoredKeys

ignoredKeys: null = null

- Defined in @zowe/imperative/src/config/src/ConfigSchema.ts:50

Generated using TypeDoc