Skip to content

values2(n) does not fit to keys2(n), but a successful response is obtained #265

@apibugsreporting

Description

@apibugsreporting

Bug Description

According to the Ohsome documentation, when using the values (or values2) parameter, the number of elements contained in it must fit the number of elements contained in keys (or keys2). In the following request, parameter values2 was used, but not keys2. Still, the request obtained a successful response. Is this the expected behavior?

General Information

Please include the following general information about the issue and list any additional steps needed to reproduce the bug.

  • Version of the ohsome API [e.g. 1.5.0]
    • 1.6.1
  • Which API instance was requested [e.g. remote instance at https://api.ohsome.org/v1, local instance with an h2 file or connected to the cluster, etc.]
    • Remote instance at https://api.ohsome.org/v1
  • Affected endpoint(s) [e.g. /contributions/count]
    • /elements/area/ratio
  • URL of your request (and request body if applicable)
    • https://api.ohsome.org/v1/elements/area/ratio?types2=point%2Cpolygon%2Cother&format=json&showMetadata=no&filter2=surface%21%3D*%20and%20not%20geometry%3Apoint%20or%20not%20length%3A%28%20..%20100%29&time=2010-04-08&timeout=34&values2=cycleway&bcircles=Xw%3A8.749%2C49.416668%2C6%7Cmx%3A8.7237%2C49.4221%2C9%7CNLhjJ%3A8.71854%2C49.4375%2C2
  • Used HTTP method [GET or POST]
    • Both
  • Utilized tool/library for the request [e.g. cURL, Postman, ohsome-py, etc.]

Expected Behaviour

The API should return a 400 status code, since the request is invalid.

Further Information

Additional Information

A test report revealing this issue is available at the following URL (it might take some time to load):

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions