Skip to content
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

[jsonConfig]: Invalid jsonConfig warning when defining both complex and simple properties of type "cron". #446

Open
1 task done
MiSchroe opened this issue Oct 11, 2024 · 0 comments
Assignees
Labels
schema 📖 JSON schema problems and updates

Comments

@MiSchroe
Copy link

No existing issues.

  • There is no existing issue for my request.

Problem location

ioBroker Log

Warning message

2024-10-11 17:36:32.229  - �[33mwarn�[39m: admin.0 (544) klf200 has an invalid jsonConfig: [{"instancePath":"/items/optionstab/items/automaticRebootCronTime","schemaPath":"#/definitions/cronProps/oneOf","keyword":"oneOf","params":{"passingSchemas":[0,1]},"message":"must match exactly one schema in oneOf"},{"instancePath":"/items/optionstab","schemaPath":"#/properties/items/patternProperties/%5E.%2B/allOf/9/if","keyword":"if","params":{"failingKeyword":"then"},"message":"must match \"then\" schema"},{"instancePath":"","schemaPath":"#/if","keyword":"if","params":{"failingKeyword":"then"},"message":"must match \"then\" schema"}]

Source link

https://github.com/MiSchroe/ioBroker.klf200/blob/01cddb4d92894e000f545a8492cbb33840fbc18d/admin/jsonConfig.json#L36-L37

Additional information

The property is working as expected but the schema validation fails.

"oneOf": [
{
"required": ["complex"]
},
{
"required": ["simple"]
}
]

Using anyOf instead of oneOf should fix this issue (though I don't have the time to test it, currently).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
schema 📖 JSON schema problems and updates
Projects
None yet
Development

No branches or pull requests

2 participants