-
Notifications
You must be signed in to change notification settings - Fork 223
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
Incorrect type. Expected "string" #96
Comments
Can be related to #93 |
It has nothing to do with the latest update. It has to do ansible files being added to schemastore. This extension pulls from schema store to automatically configure specific well used files. Please file an issue over there and then it will be updated. |
Hmmm that makes sense! I'll check with them... Thanks! |
I've created the following pull request to fix my issue: SchemaStore/schemastore#480 @carlbuchmann I can confirm that in your case the wrong type is specified in the schemas. |
it looks like the schema files are auto-generated from ansible documentation, so I think it's best to go and fix the source on the ansible repo... it will break again when 2.6 is released! |
Ok so I can confirm that the vscode-yaml plugin has nothing to do with this bug. We've modified the schemas published in the schema store (SchemaStore/schemastore#480) as quick fix but both ansible documentation (ansible/ansible#42033) and the ansible-schema-generator code (shaded-enmity/ansible-schema-generator#1) must be modified. |
Sorry for the trouble, to avoid further misplacement of issues like this, what do you guys think about adding a top level key to the schema, something like:
So that when the schema fails to validate, the extension can peek at the "contact" key and display a personalized message:
|
@cmendible did the quick fix work for you? |
Hi @carlbuchmann, it did! I don't have ansible installed (I use cloud shell) so it's not detected from local installation... The extension is using the latest ansible schema from: http://json.schemastore.org/ansible-stable-2.5 |
@carlbuchmann There's no way to detect Ansible version at the host, as the schema application logic uses simple path matching. The correct way to approach this IMHO would be to allow the user to select which version of schema to use (if there are more) via the UI and defaulting to the latest. Similar to how I can choose Python2 or Python3. |
BTW. I finally realized what is going on in here with the bool/string thing - modules from |
I'm going to close this because it seems like a schema thing. |
Enable to set bracketSpacing option to false
When writing ansible playbook, I get many reported problems where keys contain boolean values or integers... This seems that have started since the last update 4-5 days ago...
example:
Reproduced on both my windows and Linux development workstations with the latest version of vscode: 1.24.1
The text was updated successfully, but these errors were encountered: