diff --git a/cads_catalogue_api_service/models/schema_org.py b/cads_catalogue_api_service/models/schema_org.py index 53eff50..83766fa 100644 --- a/cads_catalogue_api_service/models/schema_org.py +++ b/cads_catalogue_api_service/models/schema_org.py @@ -66,4 +66,4 @@ class Dataset(pydantic.BaseModel): spatialCoverage: Place datePublished: str | None dateModified: str | None - thumbnailUrl: str | None = None + image: str | None = None diff --git a/cads_catalogue_api_service/schema_org.py b/cads_catalogue_api_service/schema_org.py index 059f56b..8f82165 100644 --- a/cads_catalogue_api_service/schema_org.py +++ b/cads_catalogue_api_service/schema_org.py @@ -132,7 +132,5 @@ def schema_org_json_ld( ), datePublished=collection.get("published", None), dateModified=collection.get("updated", None), - thumbnailUrl=collection.get("assets", {}) - .get("thumbnail", {}) - .get("href", None), + image=collection.get("assets", {}).get("thumbnail", {}).get("href", None), ) diff --git a/schemas/schema_org.json b/schemas/schema_org.json index c02b2a9..818a9ee 100644 --- a/schemas/schema_org.json +++ b/schemas/schema_org.json @@ -85,7 +85,7 @@ "dateModified": { "type": ["string","null"] }, - "thumbnailUrl": { + "image": { "type": ["string","null"] } }, @@ -105,8 +105,7 @@ "distribution", "temporalCoverage", "spatialCoverage", - "dateModified", - "thumbnailUrl" + "dateModified" ] } } diff --git a/tests/test_40_schema_org.py b/tests/test_40_schema_org.py index 998e511..5bfeb1b 100644 --- a/tests/test_40_schema_org.py +++ b/tests/test_40_schema_org.py @@ -147,5 +147,5 @@ def test_schema_org_jsonId(monkeypatch) -> None: }, "dateModified": "2023-06-22T00:00:00Z", "datePublished": "2020-05-19T00:00:00Z", - "thumbnailUrl": "https://s3.cds.org.int/swift/v1/AUTH_3e237111c3a144df8e0e0980577062b4/cds2-dev-catalogue/resources/era5-something/overview_36fc7b601512e3619bc5ba70ae0488b911d9d74e203400f9a321f5745768f6a5.png", + "image": "https://s3.cds.org.int/swift/v1/AUTH_3e237111c3a144df8e0e0980577062b4/cds2-dev-catalogue/resources/era5-something/overview_36fc7b601512e3619bc5ba70ae0488b911d9d74e203400f9a321f5745768f6a5.png", }