openmobilityfoundation / mds-openapi Goto Github PK
View Code? Open in Web Editor NEWOpenAPI description for MDS data feeds, managed by the Open Mobility Foundation.
Home Page: https://openmobilityfnd.stoplight.io/docs/mds-openapi
License: Other
OpenAPI description for MDS data feeds, managed by the Open Mobility Foundation.
Home Page: https://openmobilityfnd.stoplight.io/docs/mds-openapi
License: Other
All Provider endpoints that accept parameters (either in the path or in query string) should define a 400 response code.
RE: openmobilityfoundation/mobility-data-specification#843 (comment)
car-share
delivery-robots
micromobility
passenger-services
Currently, vehicle_type
is described here and shared between all the modes.
My question is should it be one list of allowed values ββfor all modes? I assume allowed values should be separated per each mode.
Seems like it should be separated to each mode, like:
Could you please review this moment?
So is trip_type
one string or many strings in array ?
https://github.com/openmobilityfoundation/mobility-data-specification/blob/2.0.0/data-types.md#trips
https://github.com/openmobilityfoundation/mobility-data-specification/blob/2.0.0/modes/micromobility.md#trip-type
https://openmobilityfnd.stoplight.io/docs/mds-openapi/0f4cefcc4c183-trips
Spec description: https://github.com/openmobilityfoundation/mobility-data-specification/tree/release-2.0.0/metrics
/metrics
: GET/metrics
: POSTYYYY-MM-DDTHH:mm
or included offset (YYYY-MM-DDTHH:mm
). Dates and times may also be specified using a numeric Unix epoch/timestampmetrics
GET responsemetrics
POST parametersmetrics
POST responseSpec description: https://github.com/openmobilityfoundation/mobility-data-specification/tree/release-2.0.0/agency
/events
: POST
/reports
: POST
/stops
: GET/stops/{stop_id}
: GET/stops
: POST, PUT
/telemetry
: POST
/trips
: POST
/vehicles
: POST, PUT
/vehicles
: GET/vehicles/{device_id}
: GET/vehicles/status
: GET/vehicles/status/{device_id}
: GETI'm used to generate code using the swagger editor (https://editor.swagger.io/). Therefore the code should be in one file. Is it possible to obtain all the parts in one file?
Spec description: https://github.com/openmobilityfoundation/mobility-data-specification/tree/release-2.0.0/geography
/geographies
: GET/geographies.json
: GET/geographies/{geography_id}
: GETgeography
geography.geography_json
: GeoJSON FeatureCollection referencegeography_type
- this isn't actually an enum
, but a list of recommended strings (implemented as examples
)See comment below #34 (comment)
MDS defines the media type application/vnd.mds+json
for use in the (response) Content-type
header, and for the purposes of version negotiation whereby a client could request a particular version:
Accept application/vnd.mds+json;version=2.0
The OpenAPI endpoints thus far have used application/vnd.mds+json
as the Content-type
and not required it as an Accept header.
E.g. in the Provider API doc we have:
/vehicles:
get:
operationId: get-vehicles
description: Get a list of known vehicles, with properties that do not change often.
summary: Get near-realtime vehicle information.
In the Stoplight menu, this looks like (notice some items are cut off):
Instead reuse the endpoint name in the summary
field:
/vehicles:
get:
operationId: get-vehicles
description: Get a list of known vehicles, with properties that do not change often.
summary: /vehicles
This will reduce duplication within these OpenAPI docs and with the MDS docs, and it makes it much clearer in the Stoplight menu:
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://..."
}
}
Spec description: https://github.com/openmobilityfoundation/mobility-data-specification/tree/release-2.0.0/policy
/policies
: GET/policies.json
: GET/policies/{policy_id}
: GET/value
: GET (i.e. a sample Policy value URL endpoint)/requirements
: GETpolicy
rule
requirements
schema
metadata
programs
required_data_specs
required_apis
/ available_apis
Spec description: https://github.com/openmobilityfoundation/mobility-data-specification/tree/release-2.0.0/jurisdiction
/jurisdictions
: GET/jurisdictions.json
: GET/jurisdictions/{jurisdiction_id}
: GETjurisdiction
modes
enumSpec description: https://github.com/openmobilityfoundation/mobility-data-specification/tree/release-2.0.0/provider
/vehicles
/vehicles/{device_id}
/vehicles/status
/vehicles/status/{device_id}
/events/historical
/events/recent
/trips
/telemetry
/stops
/stops/{stop_id}
/reports
journey_attributes
car-share
: journey_idcar-share.trip
: reservation_idpassenger-services
: journey_idpassenger-services.trip
: shift_iddelivery-robots
: journey_idtrip_ids
micromobility.event.event_types
: trip_start, trip_end, trip_cancel, trip_enter_jurisdiction, or trip_leave_jurisdiction.passenger-services.event.event_types
: reservation_start, reservation_stop, trip_start, trip_pause, trip_resume, trip_end,trip_cancel, customer_cancellation, provider_cancellation, driver_cancellation, trip_enter_jurisdiction, trip_leave_jurisdictiondelivery-robots.event.event_types
: reservation_start, reservation_stop, trip_start, trip_pause, trip_resume, trip_end,trip_cancel, customer_cancellation, provider_cancellation, driver_cancellation, trip_enter_jurisdiction or trip_leave_jurisdictionevent_geographies
on EventFollow approach in cds-openapi
to connect Stoplight project to this GitHub repository via the @omf-service-account.
rule_type != user
, then rule_units
requiredrule_type
and rule_units
rate_recurrence = *_time_unit
, then rule_type = time
And disallow paging.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.