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

docs: sensortype is actually optional for manually configured senseboxes but docs state it's not #861

Open
hf-kklein opened this issue Dec 20, 2023 · 0 comments

Comments

@hf-kklein
Copy link
Contributor

hf-kklein commented Dec 20, 2023

Expected Behavior

Docs should state the actual data to be expected from the API.

Current Behavior

Docs say, that sensortype is not optional:
https://docs.opensensemap.org/#api-Boxes-getBox
grafik

But users can create (manually configured) senseboxes with empty sensortype via the OpenSenseMap UI.
grafik

When retrieving those sensors via the API, they wont not have the sensorType key

Possible Solution

  • Mark the sensortype as optional, even if there is only 1 sensor in the DB with empty sensortype
  • or set a default value like null or "undefined" or empty string

Steps to Reproduce (for bugs)

  • Manually configure a sensebox via the UI
  • Add a sensor to the box, leave its type empty
  • Query the area where the box is located

Context

Tried to download all senseboxes in an area.
The unmarshalling failed because of this 1 broken sensor.

@hf-kklein hf-kklein changed the title docs: sensortype is actually optional but docs state it's not docs: sensortype is actually optional but docs state it's not Dec 20, 2023
@hf-kklein hf-kklein changed the title docs: sensortype is actually optional but docs state it's not docs: sensortype is actually optional for manually configured senseboxes but docs state it's not Dec 20, 2023
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

No branches or pull requests

1 participant