vermut / intellij-ansible

YAML/Ansible support with Jinja2 tags / IntelliJ IDEA
https://plugins.jetbrains.com/plugin/7792
Other
205 stars 29 forks source link

Ansible Schema validation: Incompatible types. Required: array. Actual: object #104

Closed MacFlurry closed 4 years ago

MacFlurry commented 4 years ago

Hello,

In a playbook, the handlers section throws a warning: see screenshot

what the plugin sees: handlers:

array

name:

Schema validation: Incompatible types. Required: array. Actual: object.

shell:

Schema validation: Incompatible types. Required: array. Actual: object.

etc. yet in the tasks: name is well recognized as string

I ran it through a YAML validator and there are no errors. The playbook runs well.

Is it possible to fix this?

Best regards

vermut commented 4 years ago

It is very strange. I don't validate any schemas in this plugin. I think this is caused by something else. Maybe you have another plugin that does something with Yaml?

MacFlurry commented 4 years ago

Yeah, you’re right. Another plugin did something. I removed it. thank you for taking on your time ! 👍🏽

Best regards

Pepan commented 3 years ago

@vermut I have same problem - what plugin was the reason ?

Pepan commented 3 years ago

hmmm I just disabled all plugins, restarted IDE but problem is still here ...

joesm commented 3 years ago

I just worked my way through this issue and figured out that the IDE was downloading "schemas" automatically and validating my YML files against them depending on what I had named my file. This can be controlled/disabled under Languages & Frameworks -> Schemas and DTDs -> Remote JSON Schemas.