Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 29 additions & 5 deletions .github/workflows/contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ jobs:
runs-on: ubuntu-latest
outputs:
enabled: ${{ steps.check.outputs.enabled }}
postman_ref: ${{ steps.locked.outputs.postman_ref }}
stack_ref: ${{ steps.locked.outputs.stack_ref }}
core_api_ref: ${{ steps.locked.outputs.core_api_ref }}
fleetops_ref: ${{ steps.locked.outputs.fleetops_ref }}
steps:
- id: check
env:
Expand All @@ -33,6 +37,24 @@ jobs:
echo "enabled=false" >> "$GITHUB_OUTPUT"
echo "::warning::POSTMAN_API_KEY is not set; skipping the API contract run."
fi
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# These refs used to be copied into this file by hand, which meant a
# contract sync could update contracts/contract-lock.json and leave CI
# booting the previous collection against the previous stack. Read them
# from the lock instead, so there is one place to change.
- id: locked
run: |
set -euo pipefail
read_lock() {
jq -er "$1" contracts/contract-lock.json \
|| { echo "::error::contract-lock.json is missing $1"; exit 1; }
}
{
echo "postman_ref=$(read_lock '.sources.postman.commit')"
echo "stack_ref=$(read_lock '.sources.fleetbase_stack.commit')"
echo "core_api_ref=$(read_lock '.sources.fleetbase_stack.core_api_submodule')"
echo "fleetops_ref=$(read_lock '.sources.fleetbase_stack.fleetops_submodule')"
} >> "$GITHUB_OUTPUT"

contract:
name: Official Postman and SDK contract
Expand All @@ -43,9 +65,11 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 55
env:
FLEETBASE_STACK_REF: d810cee000d42713942a2343264eb706b0b3a59a
FLEETBASE_STACK_REF: ${{ needs.gate.outputs.stack_ref }}
FLEETBASE_API_IMAGE: fleetbase/fleetbase-api:latest
POSTMAN_REF: 9a7d4d898b4e74d735d93c78d67d4d5013c1a28b
POSTMAN_REF: ${{ needs.gate.outputs.postman_ref }}
CORE_API_REF: ${{ needs.gate.outputs.core_api_ref }}
FLEETOPS_REF: ${{ needs.gate.outputs.fleetops_ref }}
SOURCE_TOKEN: ${{ secrets._GITHUB_AUTH_TOKEN || github.token }}
POSTMAN_API_KEY: ${{ secrets.POSTMAN_API_KEY }}
steps:
Expand All @@ -56,13 +80,13 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: fleetbase/fleetbase
ref: d810cee000d42713942a2343264eb706b0b3a59a
ref: ${{ env.FLEETBASE_STACK_REF }}
submodules: recursive
token: ${{ env.SOURCE_TOKEN }}
- name: Prove locked package refs
run: |
test "$(git -C packages/core-api rev-parse HEAD)" = "b7691c06ffdfe8f8874352e746aa8e523d5e3531"
test "$(git -C packages/fleetops rev-parse HEAD)" = "a9131daeb1a23ed4b0046dd2d7b632fb100bfba0"
test "$(git -C packages/core-api rev-parse HEAD)" = "$CORE_API_REF"
test "$(git -C packages/fleetops rev-parse HEAD)" = "$FLEETOPS_REF"
- name: Pin transitive actions in the locked Fleetbase composite
run: |
sed -i 's#actions/checkout@v4#actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1#g' .github/actions/postman-contract/action.yml
Expand Down
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [1.2.0] - 2026-09-06

### Added

- Fleet membership methods for the endpoints Fleet-Ops added in the public Fleet resource expansion: `assignDriverToFleet`, `assignVehicleToFleet`, `removeDriverFromFleet`, and `removeVehicleFromFleet`.

### Changed

- Synced the locked contract to Postman `9b59bef`, which grows the collection from 220 to 241 requests.
- Contract requests that exercise a scenario on an existing endpoint now resolve to that endpoint's method instead of generating one of their own. A request such as `Create an Order with Empty Relationships` documents `createOrder`, and `Expand a Vehicle` documents `retrieveVehicle` with its `with` parameter, rather than adding a method that only a contract test would ever call.

### Fixed

- Repeated query parameters are no longer collapsed to their last value when the contract manifest is generated, so `?with[]=vendor&with[]=driver` keeps both values.
- A request that inlines its query string in `url` no longer records that query twice.

## [1.1.2] - 2026-09-03

### Changed
Expand Down Expand Up @@ -72,7 +88,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Latest baseline whose public API is explicitly preserved by 1.1.0.


[Unreleased]: https://github.com/fleetbase/fleetbase-php/compare/1.1.2...HEAD
[Unreleased]: https://github.com/fleetbase/fleetbase-php/compare/1.2.0...HEAD
[1.2.0]: https://github.com/fleetbase/fleetbase-php/compare/1.1.2...1.2.0
[1.1.2]: https://github.com/fleetbase/fleetbase-php/compare/1.1.1...1.1.2
[1.1.1]: https://github.com/fleetbase/fleetbase-php/compare/1.1.0...1.1.1
[1.1.0]: https://github.com/fleetbase/fleetbase-php/compare/1.0.3...1.1.0
Expand Down
12 changes: 6 additions & 6 deletions contracts/contract-lock.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schema_version": 1,
"generated_at": "2026-09-03",
"generated_at": "2026-09-06",
"sdk_baselines": {
"required_compatibility": {
"version": "1.0.2",
Expand All @@ -17,19 +17,19 @@
"fleetbase_stack": {
"repository": "https://github.com/fleetbase/fleetbase",
"ref": "origin/main",
"commit": "d810cee000d42713942a2343264eb706b0b3a59a",
"commit": "699ceffef9c3a503d30fcc064da486469fd7ca4b",
"core_api_submodule": "b7691c06ffdfe8f8874352e746aa8e523d5e3531",
"fleetops_submodule": "a9131daeb1a23ed4b0046dd2d7b632fb100bfba0"
"fleetops_submodule": "e3b8cf9833e9d0fb245f5d339a970e3ef0e36985"
},
"postman": {
"repository": "https://github.com/fleetbase/postman",
"ref": "origin/main",
"commit": "9a7d4d898b4e74d735d93c78d67d4d5013c1a28b",
"commit": "9b59befdc1b4623ba40bf5661bd5e88f1dac673e",
"scope": [
"Fleetbase API",
"Fleetbase Core API"
],
"expected_requests": 220,
"expected_requests": 241,
"expected_groups": 36
},
"core_api": {
Expand All @@ -40,7 +40,7 @@
"fleetops": {
"repository": "https://github.com/fleetbase/fleetops",
"ref": "origin/main",
"commit": "a9131daeb1a23ed4b0046dd2d7b632fb100bfba0"
"commit": "e3b8cf9833e9d0fb245f5d339a970e3ef0e36985"
}
}
}
Loading
Loading