-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Array indentation in autocomplete is broken after upgrade to 0.13 #376
Comments
Do you have any particular schema and yaml that can reproduce the issue? I've just tried on VSCode with:
and {
"$schema": "http://json-schema.org/draft-04/schema#",
"name": "Package",
"type": "object",
"properties": {
"sample": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"email",
"homepage",
"role"
],
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"homepage": {
"type": "string"
},
"role": {
"type": "string"
}
}
}
}
}
} and haven't been able to reproduce yet |
Yes for first level array it is working fine but for nested arrays it is not working in the new version. For example we have this yaml.
Schema
|
Strange, I've just tested it on VSCode and everything is working as expected. Is this for monaco-yaml? If so I'll have to go in and test why it's behaving differently then VSCode |
No Monaco-yaml didn't upgrade to latest language server yet. This is a custom yaml language worker within the company I am working with. It is the same implementation in Monaco-yaml, but with language server 0.13. The one in monaco-yaml is 0.11.0. |
@JPinkney when I downgraded to 0.11 the issue is fixed. So I believe it is the recursive nested array. |
@JPinkney here is a screenshot of the items returned from the completion service. |
Hm, @yazaabed I test(on current master) your schema and completion works for me: |
@evidolob thank you for your response. What we can do to fix it? Should I go back to the previous version? It will take time to go back because we removed most of the things. And new things like calculate links. |
@yazaabed I provide PR to fix this ASAP, we plan to release |
Just FYI, I was able to reproduce this issue with : {
"type": "object",
"properties": {
"components": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"settings": {
"type": "object",
"required": ["data"],
"properties": {
"data": {
"type": "object",
"required": ["arrayItems"],
"properties": {
"arrayItems": {
"type": "array",
"items": {
"type": "object",
"required": [
"id"
],
"properties": {
"show": {
"type": "boolean",
"default": true
},
"id": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
}
}
|
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
Yeah it can wait, we will not release before next week. Thank you for your update. |
@evidolob I can help testing it locally with my schema. I will branch out from your branch and check. |
@evidolob Yes! It is working fine. Thank you 👍 |
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
Hallo everyone! I hope you are having a good time!
We have upgraded our implementation on top of yaml-language-server to latest version. And after successfully finish all needed things, we noticed that the array required fields autocomplete is broken. After debugging we found out that it is because of a small change in the completion service here and the code was changed to this
Can you please give us a way to fix this issue? Or is it a bug from your side?
Thank you and Best regards!
The text was updated successfully, but these errors were encountered: