-
Couldn't load subscription status.
- Fork 91
Expand descriptions of GeoJSON. #1152
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
Conversation
|
We would suggest to reduce the scope of this PR to only documentation changes (including the examples derived from #1050 and additional fixes). With regards to code changes, if we have understand correctly, you are just removing old commented codes in the geoproperties autocasting part, but not implementing autocast as in line with PR #1020 (paying special attention to this comment from @fgalan #1020 (comment)). Even though with JEXL you can perform practically all the changes needed for any casting, having a library with certain common changes can be helpful for the users, especially those who have no knowledge of JEXL, as well as simplifying the devices provisioning. In sum: reduce this PR only to documentation changes and continue the code work in #1020 (or a fresh new PR if that one is to old) towards a JEXL-independent and full-type (i.e. not only geoproperties) autocast feature. |
This reverts commit 88f3937.
|
Fixed c5e3779 - this is now purely a documentation PR. |
doc/expressionLanguage.md
Outdated
| | :------------------------------------------- | :--------------- | | ||
| | `" a "|trim` | `a` | | ||
| | `name|length` | `8` | | ||
| | `name|indexOf("e")` | `1` | | ||
| | `name|substring(0,name|indexOf("e")+1)` | `"De"` | | ||
|
|
||
| The following are some expressions not supported by the legacy expression language: | ||
| The following are some examples of **JEXL** expressions not supported by the **legacy** expression language: | ||
|
|
||
| | Expression | Expected outcome | | ||
| | :-------------------------------------------------- | :---------------------------------- | | ||
| | `value == 6? true : false` | `true` | | ||
| | <code>value == 6 && name|indexOf("e")>0</code> | `true` | | ||
| | `array[1]+1` | `3` | | ||
| | `object.name` | `"John"` | | ||
| | `{type:"Point",coordinates: [value,value]}` | `{type:"Point",coordinates: [6,6]}` | | ||
| | Expression | Expected outcome | Format | | ||
| | :------------------------------------------ | :---------------------------------- | ------- | | ||
| | `value == 6? true : false` | `true` | Boolean | | ||
| | `value == 6 && name|indexOf("e")>0` | `true` | Integer | | ||
| | `array[1]+1` | `3` | Number | | ||
| | `object.name` | `"John"` | String | | ||
| | `{type:"Point",coordinates: [value,value]}` | `{type:"Point",coordinates: [6,6]}` | Object | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Problem rendering the simbol | placed into a code block, inside a table. Almost this part need to be reverted using : <code> ... </code> and | for vertical bar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 54b1a53 - it looks like GitHub's Markdown parser is less sophisticated than MkDocs/ReadTheDocs
Co-authored-by: mapedraza <[email protected]>
Co-authored-by: mapedraza <[email protected]>
Co-authored-by: mapedraza <[email protected]>
Co-authored-by: mapedraza <[email protected]>
Co-authored-by: mapedraza <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| - [Trusts concept](https://docs.openstack.org/keystone/stein/user/trusts) | ||
| - [Trusts API](https://docs.openstack.org/keystone/stein/api_curl_examples.html#post-v3-os-trust-trusts) | ||
|
|
||
| ### NGSI-LD `GeoProperty` support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the ToC at the beginning of the file I see:
[GeoJSON support NGSI-LD only](#geojson-support-ngsi-ld-only)
So it seems section title and corresponding entry in ToC are not aligned...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed ef3dd11
doc/expressionLanguage.md
Outdated
| | `${@pressure * 20}` | `1040` | Integer | | ||
| | `${trim(@pressure)}` | `52` | Integer | | ||
| | `${@consumption * 20}` | `8.8` | Float | | ||
| | `${trim(@consumption)}` | `0.44` | Integer | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.44 is not an Integer...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed ef3dd11
doc/expressionLanguage.md
Outdated
| | `${@pressure * 20}` | `1040` | Integer | | ||
| | `${@active * 20}` | `null` | None | | ||
| | `${trim(@active)` | `null` | None | | ||
| | `${trim(@consumption)}` | `0.44` | Integer | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed ef3dd11
doc/expressionLanguage.md
Outdated
| | Expression | Expected outcome | Format | | ||
| | :------------------------------------------ | :---------------------------------- | ------- | | ||
| | `value == 6? true : false` | `true` | Boolean | | ||
| | <code>value == 6 && name|indexOf("e")>0</code> | `true` | Integer | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Integer also in true case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed ef3dd11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Updates the documentation to explicitly include GeoJSON examples. This means that examples for the following options are now available:
Related #1150 , supersedes #1020