Skip to content

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

@hf-kklein

Description

@hf-kklein

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions