UnionInternationalCheminsdeFer / OSDM

Projects related to an open sales & distribution API for public transportation.
https://osdm.io
Apache License 2.0
57 stars 21 forks source link

Adding properties timezone and country to Place object #579

Closed MaximeAnsquer closed 1 month ago

MaximeAnsquer commented 3 months ago

Hello, I work at Rail Europe, and we would like to suggest adding two new fields to the Place object.


Field name timezone Field type string following the Tz_database format Example value Europe/Paris


Field name country Field type Object with two fields name and code Example value

{
  "code": "FR",
  "name": "France"
}

What do you think? I am not sure about the process I should follow to suggest changes. Should I open a pull request? Please let me to know how to proceed properly. Thanks in advance.

CGantert345 commented 3 months ago

We should discuss this on the friday meeting. Currently the country name and code are included indirectly using a ref to an address which then includes country name and code,

unfortunately the swager editor does not show the inheritance structure clearly.

CGantert345 commented 2 months ago

To be discussed as soon as Rail Europe attends the meeting.

jspetrak commented 1 month ago

TODO Place subtypes' ref should have type ref.

Example how StopPlace has country associated via ref

GET /places/urn:uic:stn:5454212

{
            "objectType": "StopPlace",
            "id": "urn:uic:stn:5454212",
            "alternativeIds": [
                "urn:x_bileto:stn:703bc6a3-1625-4d13-8cc6-5bb1cc44222d"
            ],
            "geoPosition": null,
            "_links": null,
            "ref": {
                "objectType": "AddressRef",
                "addressRef": "urn:x_bileto:example:1"
            },
            "name": "Liberec"
        }

GET /places/urn:x_bileto:example:1

        {
            "objectType": "Address",
            "id": "urn:x_bileto:example:1",
            "countryCode" : "CZ"
            "countryName": "Czechia"
        }