openmobilityfoundation / mds-openapi

OpenAPI description for MDS data feeds, managed by the Open Mobility Foundation.
https://openmobilityfnd.stoplight.io/docs/mds-openapi
Other
10 stars 3 forks source link

Agency GET endpoints return MDS version in responses #28

Closed thekaveman closed 1 year ago

thekaveman commented 1 year ago

Agency GET endpoints return their data payload, and optionally the JSON API pagination fields, e.g. for Vehicles:

{
    "vehicles": [ ... ],
    "links": {
        "first": "https://...",
        "last": "https://...",
        "prev": "https://...",
        "next": "https://..."
    }
}

Should the MDS version be included in this response? Like it is for Provider, Policy, Jurisdiction responses?

{
    "version": "2.0.0",
    "vehicles": [ ... ],
    "links": {
        "first": "https://...",
        "last": "https://...",
        "prev": "https://...",
        "next": "https://..."
    }
}
schnuerle commented 1 year ago

Yes it should for consistency across the spec. I'll update the draft and let you know when done if you handle the schema.

schnuerle commented 1 year ago

Updated with this commit. Please review then we can close this issue.

thekaveman commented 1 year ago

Those are the only spots that show/mention the payload structure so I think this is fine.

Just noting that /stops/{stop_id} also defines a GET under Agency (but the docs are lighter); I'll add version there too.

thekaveman commented 1 year ago

Transferring to OpenAPI repo since the work is done in MDS repo.

schnuerle commented 1 year ago

I made an update on this page too:

https://github.com/openmobilityfoundation/mobility-data-specification/pull/837/commits/1516c82b7ef37e64c48c2c5a2514ee9f972298fa