You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`data_spec_name`| Enum | Required | Name of the data spec required. Supported values are: '[MDS](https://github.com/openmobilityfoundation/mobility-data-specification/tree/ms-requirements)', '[GBFS](https://github.com/NABSA/gbfs/tree/v2.2)'. Others like GOFS, GTFS, TOMP-API, etc can be tested by agencies and officially standardized here in the future -- leave your feedback on [this issue](https://github.com/openmobilityfoundation/mobility-data-specification/issues/682). |
580
-
|`version`| Text | Required | Version number of the data spec required. E.g. '1.2.0' |
581
-
|`required_apis`|Enum| Conditionally Required | Name of the [Requirement API](#requirement-apis) that need to be served by providers. For MDS, one of: provider, agency. For GBFS, this field is omitted since GBFS starts at the `endpoint` level. E.g. 'agency'|
582
-
|`available_apis`|Enum| Conditionally Required | Name of the [Requirement API](#requirement-apis) that are being served by agencies. For MDS, one of: policy, geography, jurisdiction, metrics. Not applicable to GBFS. |
577
+
| Name | Type | Required / Optional | Description |
|`data_spec_name`| Enum | Required | Name of the data spec required. Supported values are: '[MDS](https://github.com/openmobilityfoundation/mobility-data-specification/tree/ms-requirements)', '[GBFS](https://github.com/NABSA/gbfs/tree/v2.2)'. Others like GOFS, GTFS, TOMP-API, etc can be tested by agencies and officially standardized here in the future -- leave your feedback on [this issue](https://github.com/openmobilityfoundation/mobility-data-specification/issues/682). |
580
+
|`version`| Text | Required | Version number of the data spec required. E.g. '1.2.0' |
581
+
|`required_apis`|Array| Conditionally Required | Name of the [Requirement APIs](#requirement-apis) that need to be served by providers. At least one API is required. APIs not listed will not be available to the agency.|
582
+
|`available_apis`|Array| Conditionally Required | Name of the [Requirement APIs](#requirement-apis) that are being served by agencies. Not applicable to GBFS. APIs not listed will not be available to the provider. |
583
583
584
584
[Top][toc]
585
585
586
586
#### Requirement APIs
587
587
588
-
For each data specification, you can specify which APIsare required from providers and available from your agency.
588
+
For each data specification, you can specify which APIs, endpoints, and fields are required from providers, and which are available from your agency.
589
589
590
590
An agency may require providers to serve optional APIs, endpoints, and fields that are needed for your agency's program. This is a `required_apis` array within the [Requirement Data Specs](#requirement-data-specs) section in the [Requirement](#requirement) data feed.
591
591
592
-
You may also show which APIs, endpoints, and fields your agency is serving to providers and the public. This is an `available_apis` array within the [Requirement Data Specs](#requirement-data-specs) section in the [Requirement](#requirement) data feed.
592
+
**Note: any APIs, endpoints, or fields that are _required_ by a data specification are not to be listed, and are still required. Only optional items are enumerated here. You may however list `disallowed_fields` to exclude required fields. Optional APIs or endpoints should _NOT_ be returned unless specified.**
593
593
594
-
**Note: any APIs, endpoints, or fields that are required by a data specification are not to be listed, and are still required. Only optional items are enumerated here.**
594
+
You may also show which APIs, endpoints, and fields your agency is serving to providers and the public. This is an `available_apis` array within the [Requirement Data Specs](#requirement-data-specs) section in the [Requirement](#requirement) data feed.
595
595
596
596
```jsonc
597
597
// ...
@@ -636,29 +636,29 @@ You may also show which APIs, endpoints, and fields your agency is serving to pr
|`api_name`|Enum| Required | Name of the applicable MDS API: provider, agency, policy, geography, jurisdiction, metrics. At least one is required. E.g. 'agency' |
640
-
|`endpoint_name`| Text | Required | Name of required endpoint. At least one is required. E.g. "trips"|
639
+
|`api_name`|Text| Required | Name of the applicable API required. At least one API is required. APIs not listed will not be available to the agency. E.g. for MDS: 'provider', or 'agency'. For GBFS, this field is omitted since GBFS starts at the `endpoint` level.|
640
+
|`endpoint_name`| Text | Required | Name of the required endpoint under the API. At least one endpoint is required. E.g. for MDS 'provider': 'trips'|
641
641
642
642
**Provider Endpoints** - Specific to the `required_apis` array
|`required_endpoints`| Array | Required | Array of optional endpoints required by the agency. At least one is required. |
646
+
|`required_endpoints`| Array | Required | Array of optional endpoints required by the agency. At least one is required. Endpoints not listed will not be available to the agency. |
647
647
|`required_fields`| Array | Optional | Array of optional field names required by the agency. Can be omitted if no optional fields are required. Use dot notation for nested fields. See **special notes** below. |
648
648
|`disallowed_fields`| Array | Optional | Array of optional field names who's values are to be returned by the agency as `null`, even if required in MDS. Use dot notation for nested fields. See **special notes** below. |
649
649
650
650
**Agency Endpoints** - Specific to the `available_apis` array
|`available_endpoints`| Array | Required | Array of endpoints provided by the agency. At least one is required. |
654
+
|`available_endpoints`| Array | Required | Array of endpoints provided by the agency. At least one is required. Endpoints not listed will not be available to the provider. |
655
655
|`url`| URL | Optional | Location of API endpoint url. Required if the API is unauthenticated and public, optional if endpoint is authenticated and private. E.g. "https://mds.cityname.gov/geographies/geography/1.1.0"|
656
656
|`available_fields`| Array | Optional | Array of optional field names provided by the agency. Can be omitted if none are required. Use dot notation for nested fields. See **special notes** below. |
657
657
658
658
**Special notes about `required_fields` and `disallowed_fields`.**
659
659
660
-
- All fields marked 'Required' in MDS are still included by default and should not be enumerated in `required_fields`. They are not affected by the Requirements endpoint.
661
-
- Fields in MDS marked 'Required if available' are still returned if available, and are not affected by the Requirements endpoint.
660
+
- All fields marked 'Required' in MDS are still included by default and should not be enumerated in `required_fields`. They are not affected by the Requirements endpoint, unless explicitly listed in `disallowed_fields`.
661
+
- Fields in MDS marked 'Required if available' are still returned if available, and are not affected by the Requirements endpoint, unless explicitly listed in `disallowed_fields`.
662
662
- If a 'Required' or 'Required if available' or 'Optional' field in MDS is listed in `disallowed_fields`, those fields should not be returned by the provider in the endpoint. The field **names** must be returned to keep proper file structure, but the values must be `null`.
663
663
- To reference fields that are lower in a heirarchy, use [dot separated notation](https://docs.oracle.com/en/database/oracle/oracle-database/18/adjsn/simple-dot-notation-access-to-json-data.html#GUID-7249417B-A337-4854-8040-192D5CEFD576), where a dot between field names represents one nested level deeper into the data structure. E.g. 'gps.heading' or 'features.properties.rules.vehicle_type_id'.
664
664
- To require [Greography Driven Events](/general-information.md#geography-driven-events), simply include the `event_geographies` field for either the Agency or Provider API `api_name`. Per how GDEs work, `event_location` will then not be returned, and the `changed_geographies` vehicle state `event_type` will be used.
0 commit comments