From 75f2fa56b9ab17c59b6030079e66b2fecee39ec9 Mon Sep 17 00:00:00 2001 From: vincentsarago Date: Thu, 10 Oct 2024 18:41:53 +0200 Subject: [PATCH] add numberMatch and numberReturned in api.collections.Collections model --- CHANGELOG.md | 5 +++++ stac_pydantic/api/collections.py | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d89a9f..d9d8947 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ + +## Unreleased + +- Add optional `numberMatched` and `numberReturned` to `api.collections.Collections` model to match the OGC Common part2 specification + ## 3.1.2 (2024-08-20) - Add more **MimeTypes** (geojsonseq, pbf, mvt, ndjson, openapi_yaml, pdf, csv, parquet) diff --git a/stac_pydantic/api/collections.py b/stac_pydantic/api/collections.py index 57d4f99..f8f535e 100644 --- a/stac_pydantic/api/collections.py +++ b/stac_pydantic/api/collections.py @@ -1,4 +1,4 @@ -from typing import List +from typing import List, Optional from pydantic import model_validator @@ -16,6 +16,8 @@ class Collections(StacBaseModel): links: Links collections: List[Collection] + numberMatched: Optional[int] = None + numberReturned: Optional[int] = None @model_validator(mode="after") def required_links(self) -> "Collections":