You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add support for numberMatched in Orders response (#123)
## What I'm changing
- RootRouter Callable `get_orders` now requires an additional value in
the result tuple that is a count of the total number of orders
that will be returned from pagination. When this returns `Some(int)`,
the value is used for the `numberMatched` field in
FeatureCollection returned from the /orders endpoint. If this feature is
not desired, providing a function that returns
`Nothing` will exclude the `numberMatched` field in the response.
- Removed dependency on `pyrfc3339` library, since only one function
from it was used in tests and that function has
been removed in newer versions of the library.
- pydantic >= 2.12 is now required.
- bump stapi-pydantic to 0.1.0, bump stapi-fastapi to 0.8.0
## How I did it
- Changed the signature on get_orders instead of adding another callable
like get_orders_count. This makes it a bit cleaner. The 3-tuple returned
by get_orders should be changed to a class if any more values are added.
## Checklist
- [X] Tests pass: `uv run pytest`
- [X] Checks pass: `uv run pre-commit run --all-files`
- [X] CHANGELOG is updated (if necessary)
---------
Co-authored-by: Phil Varner <phil.varner@orbitalsidekick.com>
Copy file name to clipboardExpand all lines: stapi-fastapi/CHANGELOG.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
4
4
5
5
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
7
+
## [0.8.0] - 2025-12-03
8
+
9
+
### Added
10
+
11
+
- RootRouter Callable `get_orders` now requires an additional value in the result tuple that is a count of the total number of orders
12
+
that will be returned from pagination. When this returns `Some(int)`, the value is used for the `numberMatched` field in
13
+
FeatureCollection returned from the /orders endpoint. If this feature is not desired, providing a function that returns
14
+
`Nothing` will exclude the `numberMatched` field in the response.
15
+
16
+
### Removed
17
+
18
+
- removed dependency on `pyrfc3339` library, since only one function from it was used in tests and that function has
19
+
been removed in newer versions of the library.
20
+
7
21
## [0.7.1] - 2025-04-25
8
22
9
23
### Fixed
@@ -126,6 +140,7 @@ Initial release
126
140
- Add links `opportunities` and `create-order` to Product
127
141
- Add link `create-order` to OpportunityCollection
Copy file name to clipboardExpand all lines: stapi-pydantic/CHANGELOG.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,11 @@ All notable changes to this project will be documented in this file.
6
6
7
7
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
8
9
-
## [Unreleased]
9
+
## [0.1.0] - 2025-07-17
10
+
11
+
### Changed
12
+
13
+
- pydantic >= 2.12 is now required.
10
14
11
15
### Added
12
16
@@ -46,6 +50,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
0 commit comments