Skip to content

Missing maximum value (1) for current_fuel_percent #140

@hbruch

Description

@hbruch

GBFS spec defines current_fuel_percent as current percentage, expressed from 0 to 1.

However, the json schema only declares a minimum of 0, but not a maximum of 1.

In consequence, feed providers don't receive appropriate feedback, in case they report current_fuel_percent in the range from 0 to 100, as it is currently the case for e.g. this feed: the gbfs-validator reports free_bike_status.jsonas valid.

"current_fuel_percent": {
"description": "This value represents the current percentage, expressed from 0 to 1, of fuel or battery power remaining in the vehicle. Added in v2.3-RC.",
"type": "number",
"minimum": 0
},

As this new validation is only a change in the existing schemas, but not in the spec itself, I suggest to add it to the schemas of older versions as well.

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