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 enum type in mappings #764

Open
rbino opened this issue Mar 23, 2023 · 0 comments
Open

Add enum type in mappings #764

rbino opened this issue Mar 23, 2023 · 0 comments
Milestone

Comments

@rbino
Copy link
Collaborator

rbino commented Mar 23, 2023

It would be nice to have a datatype that guarantees that the device/server can only send a value picked from a finite set of valid values, discarding invalid ones. This could potentially be backed by an integer type in the BSON format, making the on-wire payload compact (expanding it to a string on the device/server side).

Currently we use string types for this and we document the possible values in the description, but this leaves everything up to the application (and doesn't prevent invalid values to pass through Astarte and be saved to the database).

@Annopaolo Annopaolo added this to the v1.4 milestone Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants