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
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"scripts": {
"postman:lint": "./scripts/lint-collections.sh",
"postman:run": "./scripts/run-collection.sh",
"postman:run:fleetbase": "./scripts/run-collection.sh postman/collections/Fleetbase API",
"postman:run:core": "./scripts/run-collection.sh postman/collections/Fleetbase Core API",
"postman:run:storefront": "./scripts/run-collection.sh postman/collections/Fleetbase Storefront API",
"postman:run:ledger": "./scripts/run-collection.sh postman/collections/Fleetbase Ledger API",
"postman:run:integrated-vendor": "./scripts/run-collection.sh postman/collections/Fleetbase Integrated Vendor Flow"
"postman:run:fleetbase": "./scripts/run-collection.sh 'postman/collections/Fleetbase API'",
"postman:run:core": "./scripts/run-collection.sh 'postman/collections/Fleetbase Core API'",
"postman:run:storefront": "./scripts/run-collection.sh 'postman/collections/Fleetbase Storefront API'",
"postman:run:ledger": "./scripts/run-collection.sh 'postman/collections/Fleetbase Ledger API'",
"postman:run:integrated-vendor": "./scripts/run-collection.sh 'postman/collections/Fleetbase Integrated Vendor Flow'"
},
"keywords": [
"fleetbase",
Expand Down
11 changes: 5 additions & 6 deletions scripts/lint-collections.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ set -eu
node ./scripts/validate-collections.js

if command -v postman >/dev/null 2>&1; then
yaml_files="$(find ./postman/collections -name '*.yaml' -print)"
if [ -n "$yaml_files" ]; then
for yaml_file in $yaml_files; do
postman collection lint "$yaml_file" --fail-severity error
done
fi
for collection in ./postman/collections/*/; do
[ -d "$collection" ] || continue
echo "Linting $(basename "$collection")..."
postman collection lint "$collection" --fail-severity error
done
else
echo "Postman CLI not found; skipped v3 YAML schema lint."
fi
Loading