### File

`packages/eui-dynamic-forms-ui/src/lib/shared/services/dyn-json-schema-form-generator.service.ts`

### Index

###### Properties
baseConfig constants simpleTypes
###### Methods
createDynFormMetaData getSubDynFormMetaDataBySchema

### Constructor

`constructor()`

### Methods

createDynFormMetaData
`createDynFormMetaData(jsonSchemaObject: JsonSchemaObject, entry: string)`
Parameters :
Name | Type | Optional
jsonSchemaObject | `JsonSchemaObject` | No
entry | `string` | No
Returns : `UxDynFormModelArray`

getSubDynFormMetaDataBySchema
`getSubDynFormMetaDataBySchema(jsonSchemaObject: JsonSchemaObject, schema: JsonSchema, key: string)`
Parameters :
Name | Type | Optional
jsonSchemaObject | `JsonSchemaObject` | No
schema | `JsonSchema` | No
key | `string` | No
Returns : `UxDynFormModel`

### Properties

baseConfig
Type : `object`
Default value : `{ 'array': { id: '_uxRawArrayContainer', type: FieldTypes.formArray, inputFn: (schema: JsonSchema): RawArrayContainerComponentInputs => { return { label: schema.title }; }, }, 'boolean': { id: '_uxCheckbox', type: FieldTypes.formControl, inputFn: (schema: JsonSchema): CheckboxComponentInputs => { return { label: schema.title }; }, }, 'integer': { id: '_uxNumberInput', type: FieldTypes.formControl, inputFn: (schema: JsonSchema): NumberInputComponentInputs => { // todo number component should have integer option return { label: schema.title, }; }, }, 'string': { id: '_uxTextInput', type: FieldTypes.formControl, inputFn: (schema: JsonSchema): TextInputComponentInputs => { return { label: schema.title, placeHolder: schema.description ? schema.description : 'type:string', }; }, }, 'null': { id: '_uxTextInput', type: FieldTypes.formControl, inputFn: (schema: JsonSchema): TextInputComponentInputs => { return { label: schema.title, placeHolder: schema.description ? schema.description : 'type:string', }; }, }, 'number': { id: '_uxNumberInput', type: FieldTypes.formControl, inputFn: (schema: JsonSchema): NumberInputComponentInputs => { return { label: schema.title, }; }, }, 'object': { id: '_uxFieldSetContainer', type: FieldTypes.formGroup, inputFn: (schema: JsonSchema): FieldsetContainerComponentInputs => { return { label: schema.title, }; }, }, 'any': { id: '_uxAnyTypeInput', type: FieldTypes.formControl, inputFn: (schema: JsonSchema): AnyTypeInputComponentInputs => { return { label: schema.title, placeHolder: 'type:any', }; }, }, 'enum': { id: '_uxRadioButton', type: FieldTypes.formControl, inputFn: (schema: JsonSchema): RadioButtonComponentInputs => { return { label: schema.title, default: schema.default, options: schema.enum.map((val) => { return { label: val.toString(), val: val }; }), }; }, }, 'undefined': { id: '_uxTextInput', type: FieldTypes.formControl, inputFn: (schema: JsonSchema): TextInputComponentInputs => { return { label: schema.title, placeHolder: 'type:string', }; }, }, 'multi_type': { id: '_uxMultipleSubTypeContainer', type: FieldTypes.container, inputFn: (schemaArray: SchemaArray, key: string): MultipleSubTypeContainerComponentInputs => { // todo different types should be identified with switch case let typeOfcombination; const items = schemaArray.map((schema: JsonSchema, index: number) => { schema.title = key; return { name: schema.type ? schema.type.toString() : (schema[this.constants.refStr] ? this.getRefName(schema[this.constants.refStr]) : index.toString()), metaData: this.getMetaDataByGeneratorFn(schema), }; }); return { metaDataArr: [...items], // typeOfCombination: 'anyOf', }; }, }, 'recursive_object': { id: '_uxRecursiveTypeContainer', type: FieldTypes.container, inputFn: (schema: JsonSchema): RecursiveTypeContainerComponentInputs => { const recSchema = schema.properties.uxDynRecursiveModel; return { jsonSchemaObject: this.jsonSchemaObject, subSchema: recSchema, key: schema.title, }; }, }, }`

constants
Type : `object`
Default value : `{ defPath: '#/definitions/', refStr: '$ref', allOfStr: 'allOf', anyOfStr: 'anyOf', oneOfStr: 'oneOf', }`

simpleTypes
Type : `[]`
Default value : `['array', 'boolean', 'integer', 'null', 'number', 'object', 'string', 'any', 'undefined']`

# result-matching ""

# No results matching ""