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
This is likely an off-by-one error.
Suppose a schema sets maxProperties: 3 for a certain object. In the yaml file using this schema, completion works for the first and second property of this object, but no completion suggestions are shown if one wants to add a third property.
Expected Behavior
The language server should suggest completions also in this case, since maxProperties sets an inclusive bound on the number of properties.
Current Behavior
No completions are shown. This is especially frustrating if maxProperties: 1, since there is no way to see the available properties of an object at all in this case.
Steps to Reproduce
Use the following example schema. Create someObject and add properties. You won't get completions for the third one.
$schema: http://json-schema.org/draft-07/schematitle: Test maxPropertiesdescription: Test schema for completion of properties if maxProperties is settype: objectproperties:
someObject:
type: objectproperties:
prop1:
type: stringprop2:
type: stringprop3:
type: stringprop4:
type: stringmaxProperties: 3
Environment
Windows
Mac
Linux
other (please specify)
The text was updated successfully, but these errors were encountered:
Describe the bug
This is likely an off-by-one error.
Suppose a schema sets
maxProperties: 3
for a certain object. In the yaml file using this schema, completion works for the first and second property of this object, but no completion suggestions are shown if one wants to add a third property.Expected Behavior
The language server should suggest completions also in this case, since
maxProperties
sets an inclusive bound on the number of properties.Current Behavior
No completions are shown. This is especially frustrating if
maxProperties: 1
, since there is no way to see the available properties of an object at all in this case.Steps to Reproduce
Use the following example schema. Create
someObject
and add properties. You won't get completions for the third one.Environment
The text was updated successfully, but these errors were encountered: