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

Schema jsonConfig.json - potentially missing definitions #24

Closed
mcm1957 opened this issue Jul 15, 2022 · 14 comments
Closed

Schema jsonConfig.json - potentially missing definitions #24

mcm1957 opened this issue Jul 15, 2022 · 14 comments

Comments

@mcm1957
Copy link

mcm1957 commented Jul 15, 2022

Moved from ioBroker/adapter-react#29 on request of GermanBluefox
I linked https://raw.githubusercontent.com/ioBroker/adapter-react-v5/master/schemas/jsonConfig.json to vsCode. vsCode reports the errors which seem to be caused by missing definitions in schema:

validatorNoSaveOnError
seems to be missing completly

validator, validatorErrorText, validatorNoSaveOnError
seems to be missing at table elements (item array of table). Validator is working, so the schema seems to be incorrect. As validatorErrorText does not seem to work the schema might be correct - in this case schema.md at admin is incorrect

default, hidden
seem to be missing at table elements (item array of table).

options
seems to be missing at table elements (item array of table) of type "select".

@mcm1957
Copy link
Author

mcm1957 commented Jul 15, 2022

cloned from ioBroker/adapter-react#29 (comment)

In table items, most (all?) type specific definitions seams to be missing.
E.g. for selectSendTo: command, data, jsonData, defaultFunc, noTranslation are missing.

noMultiEdit is missing completely.

maxLength for type text is missing.

The defaultFunc and onChange object syntax seams to be missing completely. This is used e.g. in linkeddevices here and here for example.

@GermanBluefox
Copy link
Contributor

What is not possible is to make table in table definitions.

@mcm1957
Copy link
Author

mcm1957 commented Aug 6, 2022

I still have the following schema mismatches / errors reported by vsCode:

The following tabel attributes are reported as invalid:
showSecondAddAt

The following attributes of table elements ("items" array) are reported as invalid:
attr
title
filter
sort
validatorErrorText
options
min
max


I'm not sure what your last remark refering table in table definitions refers to. I only have one table inside a tab ("tabs" array).

The complete json config raising errors at vsCode can be found here:
https://github.com/mcm1957/ioBroker.snmp/blob/dvp-2.1.x/admin/jsonConfig.json

@stale
Copy link

stale bot commented May 9, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. Please check if the issue is still relevant in the most current version of the adapter and tell us. Also check that all relevant details, logs and reproduction steps are included and update them if needed. Thank you for your contributions.
Dieses Problem wurde automatisch als veraltet markiert, da es in letzter Zeit keine Aktivitäten gab. Es wird geschlossen, wenn nicht innerhalb der nächsten 7 Tage weitere Aktivitäten stattfinden. Bitte überprüft, ob das Problem auch in der aktuellsten Version des Adapters noch relevant ist, und teilt uns dies mit. Überprüft auch, ob alle relevanten Details, Logs und Reproduktionsschritte enthalten sind bzw. aktualisiert diese. Vielen Dank für Eure Unterstützung.

@stale stale bot added the wontfix This will not be worked on label May 9, 2023
@mcm1957
Copy link
Author

mcm1957 commented May 9, 2023

This still an open issue

@stale stale bot removed the wontfix This will not be worked on label May 9, 2023
@foxriver76
Copy link
Collaborator

jsonEditor ist also missing

@mcm1957
Copy link
Author

mcm1957 commented Jul 11, 2023

New 'accordion' element is likely to be missing too

@foxriver76
Copy link
Collaborator

For the initial validatorErrorText is also not working for items, so maybe it is on purpose see ioBroker/ioBroker.admin#1911

@foxriver76
Copy link
Collaborator

As admin now validates the jsonConfig of every adapter against the schema, it is now crucial that the schema is up-to-date.

Additional it will make sense to validate it in tests ioBroker/testing#583

@mcm1957
Copy link
Author

mcm1957 commented Oct 24, 2023

@foxriver76
Did you test with jsonConfig-demo adapter?
It for sure does not cover all situations - but if some check fail, the schema should be checked.

Which admin version includes the check so that I could test too.
In addition where is the schema taken from - always online from head of master/main?

@foxriver76
Copy link
Collaborator

foxriver76 commented Oct 24, 2023

Schema always taken from https://github.com/ioBroker/adapter-react-v5/blob/main/schemas/jsonConfig.json

Admin 6.12.0 includes the check whenever an adapter config is opened via browser. However, it will only log the first upcoming error, to not be too noisy.

@MiSchroe
Copy link

"cron" type is missing completely in the schema though it works and is documented at https://github.com/ioBroker/ioBroker.admin/blob/22bd130648ff2754922a91bcdbfad7e9fc278fc3/src/src/components/JsonConfigComponent/SCHEMA.md?plain=1#L263.

@foxriver76
Copy link
Collaborator

cron has been added now, for the tables we have a separate issue at #183

@foxriver76
Copy link
Collaborator

Please create separate issues if more errors occur

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants