File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -108,15 +108,17 @@ export function truncateActorReadme(readme: string, limit = ACTOR_README_MAX_LEN
108108 */
109109export function inferArrayItemType ( property : SchemaProperties ) : string | null {
110110 return property . items ?. type
111- || ( property . prefill && typeof property . prefill [ 0 ] )
112- || ( property . default && typeof property . default [ 0 ] )
111+ || ( property . prefill ?. length > 0 && typeof property . prefill [ 0 ] )
112+ || ( property . default ?. length > 0 && typeof property . default [ 0 ] )
113113 || ( property . editor && getEditorItemType ( property . editor ) )
114114 || null ;
115115
116116 function getEditorItemType ( editor : string ) : string | null {
117117 const editorTypeMap : Record < string , string > = {
118118 requestListSources : 'object' ,
119119 stringList : 'string' ,
120+ json : 'object' ,
121+ globs : 'object' ,
120122 } ;
121123 return editorTypeMap [ editor ] || null ;
122124 }
@@ -134,6 +136,7 @@ export function addEnumsToDescriptionsWithExamples(properties: { [key: string]:
134136 const value = property . prefill ?? property . default ;
135137 if ( value && ! ( Array . isArray ( value ) && value . length === 0 ) ) {
136138 property . examples = Array . isArray ( value ) ? value : [ value ] ;
139+ property . description = `${ property . description } \nExample values: ${ JSON . stringify ( value ) } ` ;
137140 }
138141 }
139142 return properties ;
You can’t perform that action at this time.
0 commit comments