File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " codemirror-json-schema " : patch
3
+ ---
4
+
5
+ expand property schema when inserting text
Original file line number Diff line number Diff line change @@ -258,6 +258,11 @@ export class JSONCompletion {
258
258
addValue : boolean ,
259
259
propertySchema ?: JSONSchema7Definition
260
260
) {
261
+ // expand schema property if it is a reference
262
+ propertySchema = propertySchema
263
+ ? this . expandSchemaProperty ( propertySchema , this . schema )
264
+ : propertySchema ;
265
+
261
266
let resultText = `"${ key } "` ;
262
267
if ( ! addValue ) {
263
268
return resultText ;
@@ -334,6 +339,14 @@ export class JSONCompletion {
334
339
}
335
340
}
336
341
if ( ! value || nValueProposals > 1 ) {
342
+ debug . log (
343
+ "xxx" ,
344
+ "value" ,
345
+ value ,
346
+ "nValueProposals" ,
347
+ nValueProposals ,
348
+ propertySchema
349
+ ) ;
337
350
value = "#{}" ;
338
351
}
339
352
You can’t perform that action at this time.
0 commit comments