Skip to content

Commit

Permalink
Merge pull request #465 from geoadmin/feat-PB-987-adapt-conformance-e…
Browse files Browse the repository at this point in the history
…ndpoint

PB-987: Add item-search to conformance endpoint
  • Loading branch information
benschs authored Nov 11, 2024
2 parents 5976c9f + 20a7ac9 commit 1e61662
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ test-conformance:
--root-url http://localhost:$(HTTP_PORT)/api/stac/v1/ \
--conformance core \
--conformance collections \
--conformance features \
--geometry '{"type": "Polygon", "coordinates": [[[0, 0], [90, 0], [90, 90], [0, 90], [0, 0]]]}' \
--collection $(collection)

###################
Expand Down
26 changes: 26 additions & 0 deletions app/stac_api/migrations/0054_update_conformance_endpoint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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.save()


def reverse_landing_page_version(apps, schema_editor):
# Remove the landing page v0.9
LandingPage = apps.get_model("stac_api", "LandingPage")
lp = LandingPage.objects.get(version='v1')
lp.conformsTo.remove('https://api.stacspec.org/v1.0.0/ogcapi-features')
lp.save()


class Migration(migrations.Migration):
dependencies = [
("stac_api", "0053_alter_asset_media_type_and_more"),
]

operations = [migrations.RunPython(add_landing_page_version, reverse_landing_page_version)]

0 comments on commit 1e61662

Please sign in to comment.