Mention ability to define several sitemaps in a file#2714
Conversation
01be7b8 to
354c709
Compare
✅ Thanks for your pull request to the openHAB documentation! The result can be previewed at the URL below (this comment and the preview will be updated if you add more commits).Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Thanks for your pull request to the openHAB documentation! The result can be previewed at the URL below (this comment and the preview will be updated if you add more commits).Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Mention the new .sitemaps extension. Remove the old constraint between sitemaop name and sitemap file name. Signed-off-by: Laurent Garnier <lg.hc@free.fr>
354c709 to
71342f1
Compare
|
|
||
| Sitemaps are text files with the `.sitemap` extension, and are stored in the `$OPENHAB_CONF/sitemaps` directory. | ||
| Sitemaps are text files with the `.sitemap` or `.sitemaps` extension, and are stored in the `$OPENHAB_CONF/sitemaps` directory. | ||
| They can contain one or several sitemap definitions. |
There was a problem hiding this comment.
I think this sentence They can contain one or several sitemap definitions. is not necessary. .items files can also contain zero or more items, and this flexibility is nowhere stated.
There was a problem hiding this comment.
Strictly speaking the sentence is also not correct. In openHAB 5.1.4 when I create an empty .sitemap file the system logs DSL model 'a.sitemap' is either empty or cannot be parsed correctly! With openHAB 5.2.0 build 5369 there is no such warning, so apparetly the .sitemap files can also contain zero or more sitemap definitions.
There was a problem hiding this comment.
It used to be one and exactly one. We changed it to allow any number of sitemaps. Like you can have an empty .items file, you can now also have an empty .sitemap(s) file. It doesn’t make much sense but it is possible.
I think it is good to be explicit for sitemaps that it can be multiple. It was always 1 single one since OH 1.0, so being explicit about it to make the point is worth it.
There was a problem hiding this comment.
I will adjust the sentence as it is true that it can now contain 0 sitemap.
Similar to .items and .things and .rules files.
There was a problem hiding this comment.
The text was underspecified. Like it was not mentioned that .persistence files must contain strategy{} even if contains no definitions. And likewise for DSL Rules it was not stated, that global variables cannot use previously defined global variables. DSL Scripts have not documented, that from Xbase “Collection literals” could not be used in openHAB, but now there is no point to writing explicitly, that collection literals can be used.
These restrictions were not documented, so it is strange to write now down, that the restrictions do not exist. I just see no need to spell explicitly that a restriction does not exist, if the assumption is, that the restriction (arbitrary number of sitemap defintions in a file) does not exist.
Users, which have one sitemap definition per file, do not have to change anything, or to worry.
There was a problem hiding this comment.
Irrespective of this change, the release notes for 5.2. could state, that .sitemap files can contain zero or more sitemap definitions.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
As these are not release notes, the word “now” should not be used. I have been told that the documentation of openHAB is not supposed to describe how thing were in older versions, just describe the current version : #2573 (comment) . Moreover at #2567 for the "Provider preset” I wrote “The preset is available since openHAB 5.0.”. That last sentence was removed. My understanding is that the openHAB-documentation refers only to the current⇔upcoming version, and it does not make statements about outdated, previous versions. That said, there is no point to emphasize here, that in the past one sitemap could be included per In addition, users read this sitemap.md file once, when they create a sitemap. Users are not supposed to reread the file to find out, that things have changed. This is to be included in the Release Notes, if it is considered as important enough the fact that a single sitemap file can from 5.2. on contain many sitemaps. |
|
Instead of |
Mention the new .sitemaps extension.
Remove the old constraint between sitemaop name and sitemap file name.