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: lastMeasurementAt is actually optional but docs state it's not #862

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

Comments

@hf-kklein
Copy link
Contributor

Expected Behavior

The docs should represent the data to be expected from the API.

Current Behavior

There are boxes which have no measurements.
E.g. boxId: 5c68119ca100840019d8d3c8
https://api.opensensemap.org/boxes/5c68119ca100840019d8d3c8

Those boxes have no lastMeasurementAt.
The docs say, this property is not optional:
https://docs.opensensemap.org/#api-Boxes-getBox

grafik

But it is optional. Not all boxes have the property set

Possible Solution

  • Mark as optional in the docs
  • set default value server side (e.g. null)

Steps to Reproduce (for bugs)

Try to bind https://api.opensensemap.org/boxes/5c68119ca100840019d8d3c8 to a model which has lastMeasurementAt as not nullable required field.

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