Closed aqw closed 8 months ago
Perhaps of use: https://docs.python-cerberus.org/en/stable/usage.html
YAML and JSON are close enough that we can piggy-back on the (much larger) JSON ecosystem. https://docs.python-cerberus.org/en/stable/schemas.html#serialization
From the #7 about designing onyo fsck:
As soon as the template system is designed/implemented, onyo fsck needs a functionality to verify the correctness of templates, when:
To keep this issue up to date: In #92 I ignored all the things above!
The current behaviour is this:
onyo new --template laptop shelf
creates a new asset in the folder "shelf", it opens the current dialog from onyo new and asks for fields (including reserved characters), which are specified in the template file .onyo/templates/laptop
(which is YAML). The flag expects the name of a file in that folder.
I think this can be closed now. Templates are specified by the user explicitly for a long time now, and I see no compelling reason to change that.