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

Commit 1c4126f

Browse files
committed
Merge commit '3d8e618cc1419d42805048e0dd69a6efa19d1a2b' into mp/feat-subclass-router-issue-73
2 parents 6fa822b + 3d8e618 commit 1c4126f

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ description = "Spatio Temporal Asset Tasking with FastAPI"
66
authors = ["Christian Wygoda <[email protected]>"]
77
license = "MIT"
88
readme = "README.md"
9+
packages = [{include = "stapi_fastapi", from="src"}]
910

1011
[tool.poetry.dependencies]
1112
python = "3.12.*"

src/stapi_fastapi/models/opportunity.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from geojson_pydantic.geometries import Geometry
55
from pydantic import BaseModel, ConfigDict
66

7+
from stapi_fastapi.models.shared import Link
78
from stapi_fastapi.types.datetime_interval import DatetimeInterval
89
from stapi_fastapi.types.filter import CQL2Filter
910

@@ -29,6 +30,7 @@ class OpportunityRequest(BaseModel):
2930
# Each product implements its own opportunity model
3031
class Opportunity(Feature[K, P], Generic[K, P]):
3132
type: Literal["Feature"] = "Feature"
33+
links: list[Link] = []
3234

3335
class OpportunityCollection(FeatureCollection[Opportunity[K, P]], Generic[K, P]):
3436
type: Literal["FeatureCollection"] = "FeatureCollection"

src/stapi_fastapi/models/shared.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Optional
1+
from typing import Any, Optional, Union
22

33
from pydantic import AnyUrl, BaseModel, ConfigDict
44

@@ -9,6 +9,8 @@ class Link(BaseModel):
99
type: Optional[str] = None
1010
title: Optional[str] = None
1111
method: Optional[str] = None
12+
headers: Optional[dict[str, Union[str, list[str]]]] = None
13+
body: Any = None
1214

1315
model_config = ConfigDict(extra="allow")
1416

0 commit comments

Comments
 (0)