[openstreetmap/openstreetmap-website] The Ruby API ignores getting a specific version of an object in a Multi Fetch request (Issue #5183)

Roman Deev notifications at github.com
Wed Sep 11 07:31:33 UTC 2024


### URL

_No response_

### How to reproduce the issue?

`http://localhost:8008/api/0.6/nodes.json?nodes=5113v2` CGImap returns a specific version
```json
{
  "version": "0.6",
  "generator": "openstreetmap-cgimap 2.0.1 (16 d2f7ab0286d9)",
  "copyright": "OpenStreetMap and contributors",
  "attribution": "http://www.openstreetmap.org/copyright",
  "license": "http://opendatacommons.org/licenses/odbl/1-0/",
  "elements": [
    {
      "type": "node",
      "id": 5113,
      "lat": 59.9573376,
      "lon": 30.3069732,
      "timestamp": "2024-09-07T16:17:24Z",
      "version": 2,
      "changeset": 73,
      "user": "LOL",
      "uid": 2
    }
  ]
}
```

`http://localhost:3000/api/0.6/nodes.json?nodes=5113v2` Returns the latest version of the object

```json
{
  "version": "0.6",
  "generator": "OpenStreetMap server",
  "copyright": "OpenStreetMap and contributors",
  "attribution": "http://www.openstreetmap.org/copyright",
  "license": "http://opendatacommons.org/licenses/odbl/1-0/",
  "elements": [
    {
      "type": "node",
      "id": 5113,
      "lat": 59.9573376,
      "lon": 30.3069732,
      "timestamp": "2024-09-11T07:21:31Z",
      "version": 3,
      "changeset": 74,
      "user": "admin",
      "uid": 1,
      "tags": {
        "name": "test"
      }
    }
  ]
}
```

Moreover, the Ruby API allows any characters after the object id, and only takes into account the first digits of the nodes array ?nodes=

### Screenshot(s) or anything else?

_No response_

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5183
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/5183 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240911/e028183b/attachment-0001.htm>


More information about the rails-dev mailing list