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

add metadata fields for floor_seq, connection_type, tags #885

Merged
merged 10 commits into from
May 24, 2024

Conversation

noursaidi
Copy link
Collaborator

No description provided.

@noursaidi noursaidi requested a review from grafnu May 9, 2024 15:54
"tags": {
"description": "Descriptor for the point",
"type": "string",
"examples": ["lighting", "lighting,building"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Array of strings seems better than a singular CSV string? Also consider a (restricted) regex for this (e.g. only [a-z] for actual tag names)... ? I generally fret about fields like this because they end up getting conscripted to do nefarious things. Also, what's the future proofing here? singular string tags are nice but also very limiting, and typically the NEXT thing that people want to do is key=value pairs, so the question comes down to "should we just start with key=value pairs and skip over tags completely" -- rather than support two structures in the future.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after our quick chat I understand "why not k=v", but then the question remains about "why a CSV rather than a list/array"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed into a list of alphanumeric string values

@@ -42,6 +42,16 @@
"description": "Mapping for the point to an internal resource (e.g. BACnet object reference)",
"type": "string",
"examples": ["AI3", "400070"]
},
"translation": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

erm, not comfortable with this ATM since there's already the concept of translations in the gateway config schema and other places, so I'd want to make sure this is coherent with the overall structure of things.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed translation into mapping and an object type, with one property name.

@noursaidi noursaidi requested a review from grafnu May 14, 2024 20:09
"type": "array",
"uniqueItems": true,
"items": {
"pattern": "^[A-Za-z0-9]+$"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include _? Just to consider... git tags at least allow underscore.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't we think about excluding A-Z for now?

@noursaidi noursaidi merged commit b9c7d57 into faucetsdn:master May 24, 2024
0 of 2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants