Experimental FileSystemProvider for API objects#257
Draft
ghys wants to merge 1 commit into
Draft
Conversation
This is a proof-of-concept of an implementation of openhab#248 providing a file system able to abstract items and rules (only for now) in YAML files. The items & things "files" can be opened from the Items Explorer resp. Things Explorer in a new "Open in YAML" context menu entry. It also showcases how the YAML extension can be supplied schemas with this API: https://github.com/redhat-developer/vscode-yaml/wiki/Extension-API The schema for the thing YAML is dynamic and queries the thing type API to retrieve the config parameter descriptions. Only simple read operations for items & things have been implemented as a PoC but listing "directories", writing "files" (deserializing the YAML and updating objects with the REST API), and other operations like renaming (changing the UID) can also be envisioned. This would make VS Code a good alternative code-based UI to edit objects in an instance (with additional comfort vs. the main UI for heavy editing, like tabs etc.) while retaining the benefits of the JSON DB. Signed-off-by: Yannick Schaus <github@schaus.net>
Member
Author
Contributor
|
Did you make a global npm update? |
Member
Author
|
For the server-side JS, I believe my version of npm has transformed the server side package-lock.json from version 1 to version 2. However, I seem not to have added dependencies so it could easily be kept as is. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.







This is a proof-of-concept of an implementation of #248
providing a file system able to abstract items and rules
(only for now) in YAML files.
The items & things "files" can be opened from the Items
Explorer resp. Things Explorer in a new "Open in YAML"
context menu entry.
It also showcases how the YAML extension can be supplied
schemas with this API:
https://github.com/redhat-developer/vscode-yaml/wiki/Extension-API
The schema for the thing YAML is dynamic and queries the
thing type API to retrieve the config parameter descriptions.
Only simple read operations for items & things have been
implemented as a PoC but listing "directories", writing "files"
(deserializing the YAML and updating objects with the REST API),
and other operations like renaming (changing the UID) can also
be envisioned.
This would make VS Code a good alternative code-based UI to edit
objects in an instance (with additional comfort vs. the main UI
for heavy editing, like tabs etc.) while retaining the benefits
of the JSON DB.
Signed-off-by: Yannick Schaus github@schaus.net