Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.

Commit c78f069

Browse files
philvarnerPhil Varner
andauthored
add product_id field to Opportunity and Order Properties (#103)
* add product_id field to Opportunity and Order Properties * add product_id field to Opportunity and Order Properties --------- Co-authored-by: Phil Varner <[email protected]>
1 parent cd6fcd2 commit c78f069

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased]
8+
## [v0.1.0] - TBD
9+
10+
Initial release
911

1012
### Added
1113

1214
- Conformance endpoint `/conformance` and root body `conformsTo` attribute.
15+
- Field `product_id` to Opportunity and Order Properties
1316
- Endpoint /product/{productId}/order-parameters.
1417
- Links in Product entity to order-parameters and constraints endpoints for that product.
1518
- Add links `opportunities` and `create-order` to Product
@@ -35,9 +38,6 @@ none
3538

3639
none
3740

38-
## [v0.1.0] - 2024-10-23
39-
40-
Initial release
4141

4242
[unreleased]: https://github.com/stapi-spec/stapi-fastapi/compare/v0.1.0...main
4343
[v0.1.0]: https://github.com/stapi-spec/stapi-fastapi/tree/v0.1.0

src/stapi_fastapi/models/opportunity.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
# Copied and modified from https://github.com/stac-utils/stac-pydantic/blob/main/stac_pydantic/item.py#L11
1313
class OpportunityPropertiesBase(BaseModel):
14+
product_id: str
1415
datetime: DatetimeInterval
1516
model_config = ConfigDict(extra="allow")
1617

src/stapi_fastapi/models/order.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010

1111
class OrderProperties(BaseModel):
12+
product_id: str
1213
datetime: DatetimeInterval
1314
model_config = ConfigDict(extra="allow")
1415

tests/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ def mock_test_spotlight_opportunities() -> list[Opportunity]:
147147
coordinates=Position2D(longitude=0.0, latitude=0.0),
148148
),
149149
properties=TestSpotlightProperties(
150+
product_id="xyz123",
150151
datetime=(start, end),
151152
off_nadir=20,
152153
),

0 commit comments

Comments
 (0)