@@ -359,9 +359,19 @@ export function convertToAnyModel(
359359 if ( ! Array . isArray ( jsonSchemaModel . type ) || ! isAnyType ) {
360360 return undefined ;
361361 }
362+ let originalInput = jsonSchemaModel . originalInput ;
363+ if ( typeof jsonSchemaModel . originalInput !== 'object' ) {
364+ originalInput = {
365+ value : jsonSchemaModel . originalInput ,
366+ ...( jsonSchemaModel . originalInput ?. description !== undefined && {
367+ description : jsonSchemaModel . originalInput . description
368+ } )
369+ } ;
370+ }
371+
362372 return new AnyModel (
363373 name ,
364- jsonSchemaModel . originalInput ,
374+ originalInput ,
365375 getMetaModelOptions ( jsonSchemaModel , options )
366376 ) ;
367377}
@@ -519,9 +529,17 @@ export function convertToDictionaryModel(
519529 getOriginalInputFromAdditionalAndPatterns ( jsonSchemaModel ) ;
520530 const keyModel = new StringModel ( name , originalInput , { } ) ;
521531 const valueModel = convertAdditionalAndPatterns ( context ) ;
532+
533+ const input = {
534+ originalInput,
535+ ...( jsonSchemaModel . originalInput ?. description !== undefined && {
536+ description : jsonSchemaModel . originalInput . description
537+ } )
538+ } ;
539+
522540 return new DictionaryModel (
523541 name ,
524- originalInput ,
542+ input ,
525543 getMetaModelOptions ( jsonSchemaModel , options ) ,
526544 keyModel ,
527545 valueModel ,
@@ -610,6 +628,7 @@ export function convertToObjectModel(
610628 ) ;
611629 metaModel . properties [ String ( propertyName ) ] = propertyModel ;
612630 }
631+ // console.log(metaModel);
613632 return metaModel ;
614633}
615634
0 commit comments