From 6ad0486223d6bf3505f2202f517950a7737414f5 Mon Sep 17 00:00:00 2001 From: Lukas Joss Date: Wed, 9 Oct 2024 14:48:33 +0200 Subject: [PATCH] PB-987: Add item-search and features to conformance endpoint --- Makefile | 3 +++ .../0051_update_conformance_endpoint.py | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 app/stac_api/migrations/0051_update_conformance_endpoint.py diff --git a/Makefile b/Makefile index cba6a515..4d4a7359 100644 --- a/Makefile +++ b/Makefile @@ -212,6 +212,9 @@ test-conformance: --root-url http://localhost:$(HTTP_PORT)/api/stac/v1/ \ --conformance core \ --conformance collections \ + --conformance features \ + --conformance item-search \ + --geometry '{"type": "Polygon", "coordinates": [[[0, 0], [90, 0], [90, 90], [0, 90], [0, 0]]]}' \ --collection $(collection) ################### diff --git a/app/stac_api/migrations/0051_update_conformance_endpoint.py b/app/stac_api/migrations/0051_update_conformance_endpoint.py new file mode 100644 index 00000000..c9da6018 --- /dev/null +++ b/app/stac_api/migrations/0051_update_conformance_endpoint.py @@ -0,0 +1,19 @@ +# Generated by Django 5.0.8 on 2024-10-09 11:45 + +from django.db import migrations + + +def add_landing_page_version(apps, schema_editor): + LandingPage = apps.get_model("stac_api", "LandingPage") + lp = LandingPage.objects.get(version='v1') + lp.conformsTo.insert(2, 'https://api.stacspec.org/v1.0.0/ogcapi-features') + lp.conformsTo.insert(2, 'https://api.stacspec.org/v1.0.0/item-search') + lp.save() + + +class Migration(migrations.Migration): + dependencies = [ + ("stac_api", "0050_collectionassetupload_and_more"), + ] + + operations = [migrations.RunPython(add_landing_page_version)]