feat: expose license_tags to feed and license endpoints#1619
feat: expose license_tags to feed and license endpoints#1619davidgamez merged 7 commits intomainfrom
Conversation
Co-authored-by: davidgamez <1192523+davidgamez@users.noreply.github.com>
Co-authored-by: davidgamez <1192523+davidgamez@users.noreply.github.com>
|
*Lighthouse ran on https://mobility-feeds-dev--pr-1619-cx6c8410.web.app/ * (Desktop)
*Lighthouse ran on https://mobility-feeds-dev--pr-1619-cx6c8410.web.app/feeds * (Desktop)
*Lighthouse ran on https://mobility-feeds-dev--pr-1619-cx6c8410.web.app/feeds/gtfs/mdb-2126 * (Desktop)
*Lighthouse ran on https://mobility-feeds-dev--pr-1619-cx6c8410.web.app/feeds/gtfs_rt/mdb-2585 * (Desktop)
*Lighthouse ran on https://mobility-feeds-dev--pr-1619-cx6c8410.web.app/gbfs/gbfs-flamingo_porirua * (Desktop)
|
|
Preview Firebase Hosting URL: https://mobility-feeds-dev--pr-1619-cx6c8410.web.app |
| description: Get GBFS feeds from the Mobility Database. | ||
| tags: | ||
| - "feeds" | ||
| - "beta" |
There was a problem hiding this comment.
Removed beta endpoint tags as they are not beta anymore.
|
Example request is DEV: Response: {
"id": "tdg-80032",
"data_type": "gtfs_rt",
"created_at": "2026-01-12T14:42:35.943189Z",
"external_ids": [
{
"external_id": "80032",
"source": "tdg"
}
],
"provider": "Angers Loire Métropole",
"feed_contact_email": null,
"source_info": {
"producer_url": "https://www.data.gouv.fr/api/1/datasets/r/3349a69a-bc9a-4de4-a2c2-9f9d32e4923c",
"authentication_type": 0,
"authentication_info_url": null,
"api_key_parameter_name": null,
"license_url": "https://opendatacommons.org/licenses/odbl/1.0/",
"license_id": "ODbL-1.0",
"license_is_spdx": true,
"license_notes": null,
"license_tags": [
"domain:data",
"family:ODC",
"license:open-data-commons",
"notes:attribution-required",
"notes:share-alike",
"spdx:fsf-free"
]
},
"redirects": [],
"status": "deprecated",
"official": true,
"official_updated_at": "2026-01-12T14:42:36.675550",
"feed_name": "Réseau urbain Irigo",
"note": null,
"related_links": []
}, |
| * "license:open-data-commons" | ||
| * ] | ||
| */ | ||
| license_tags?: string[]; |
There was a problem hiding this comment.
[out of scope for this PR] are we dropping the web app folder from this repo now that we have the beautiful SSR repo?
There was a problem hiding this comment.
This will be done with the JS here soon! We are currently monitoring the SSR deployment. cc: @Alessandro100
cka-y
left a comment
There was a problem hiding this comment.
LGTM! Bravo to Copilot and Claude 🥳
I helped too 🤣 ... |
License taxonomy tags (e.g.
"family:ODC","license:open-data-commons") exist in the DB but were not surfaced via the API. This addslicense_tagsto all feed endpoints (undersource_info) and to license endpoints.API Schema (
docs/DatabaseCatalogAPI.yaml)license_tags: string[]toSourceInfoschema → propagates to all feed endpointslicense_tags: string[]toLicenseBaseschema → propagates toLicenseWithRulesandLicensesendpointsPython Implementation
license_base_impl.py: Extractslicense_tagsfromlicense_orm.tags(thelicense_license_tagsmany-to-many ORM relationship)basic_feed_impl.py: Extractslicense_tagsfromfeed.license.tags, passes toSourceInfoExample response shape:
{ "source_info": { "license_id": "ODbL-1.0", "license_tags": ["family:ODC", "license:open-data-commons"] } }{ "id": "ODbL-1.0", "license_tags": ["family:ODC", "license:open-data-commons"], "license_rules": [...] }Generated Code (regenerated, not committed)
api/src/feeds_gen/— regenerated from updated YAMLweb-app/src/app/services/feeds/types.ts— regenerated viaopenapi-typescript@6.7.6Test Infrastructure
populate_db_test_data.py: Added support forlicense_tag_groups,license_tags, andlicense_license_tagssections in test data JSONfamily:ODC,license:open-data-commons), and associations tolicense-1license_tagsin responsesOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.