You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it('array completion - should not suggest const',async()=>{languageService.addSchema(SCHEMA_ID,{type: 'object',properties: {test: {type: 'array',items: {type: 'object',properties: {constProp: {type: 'string',const: 'const1',},},},},},});constcontent='test:\n - constProp:\n ';constresult=awaitparseSetup(content,content.length);expect(result.items.length).to.be.equal(0);});
problem is probably here in yamlCompletion.ts
check for array is missing
// it will treated as a property key since `:` has been appendedif(nodeParent&&isSeq(nodeParent)&&schema.schema.type!=='object'){this.addSchemaValueCompletions(schema.schema,separatorAfter,collector,{});}
Expected Behavior
should not suggest const value inside the array
But if it's not an array, just an object, completion works ok.
Current Behavior
Steps to Reproduce
Environment
Mac
The text was updated successfully, but these errors were encountered:
Describe the bug
array object completion - should not suggest const
schema:
yaml:
this test fails
problem is probably here in yamlCompletion.ts
check for array is missing
Expected Behavior
should not suggest const value inside the array
But if it's not an array, just an object, completion works ok.
Current Behavior
Steps to Reproduce
Environment
Mac
The text was updated successfully, but these errors were encountered: