Publish the PHP SDK 1.4.1 inspection examples - #102
Merged
Merged
Conversation
The API reference contradicted itself on Submit an Inspection: the
description and parameters documented `answers`, because the Postman
submodule was bumped to the renamed collection, while the PHP sample
still sent `'custom_field_values' => []` beside a flat `item_results`
block — the shape a reader would copy was the one the endpoint no
longer documents.
The catalog now comes from the published 1.4.1 tag, which tracks the
rename: a submission answers with `answers`, each entry naming its
`field`. Only the submit entry changed; the other 269 are identical.
Synced with the documented procedure rather than by hand, so the next
regeneration reproduces it:
node scripts/sync-php-sdk-examples.mjs --source <sdk>/contracts/php-sdk-examples.json
pnpm test:sdk-emitters
pnpm generate:api-docs
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The API reference currently contradicts itself on Submit an Inspection. The description and parameters document
answers— the Postman submodule was bumped to the renamed collection in #101 — while the PHP sample still sends'custom_field_values' => []beside a flatitem_resultsblock. The shape a reader copies out of the page is the one the endpoint no longer documents.This syncs the catalog to the published PHP SDK 1.4.1 (
6ca0c253), which tracks the rename: a submission answers withanswers, each entry naming itsfield.What changed
Two files.
scripts/php-sdk-examples.generated.json— thegenerated_from.refbump (d6a7cc5→822b867) and thecall/codeof one entry,fleetbase-api-inspections-submit-an-inspection. The other 269 entries are byte-identical; I diffed them entry by entry before syncing. Plus thescripts/README.mdprovenance line, which still named the 1.4.0 tag.The rendered change is not visible in this diff —
content/docs/api/is gitignored and regenerated at build time, so review sees only a JSON blob and a README line. For reference, oncontent/docs/api/fleetbase/inspections.mdxthe sync takes'answers'from 6 occurrences to 12 andcustom_field_valuesfrom 8 to 2. The two that remain are deliberate prose, not samples: the endpoint description notingcustom_field_valuesis the previous name and still accepted, and the matching note in the parameter table. No PHP sample sends the old key —'custom_field_values' =>appears zero times.How it was produced
The documented procedure from
scripts/README.md, not by hand, so the next regeneration reproduces it:The source was extracted from the published
1.4.1tag rather than a working branch, and verified byte-identical to the SDK'scontracts/php-sdk-examples.jsonat that tag.Checks
sync-php-sdk-examples.mjs— PHP SDK catalog verified: 270/270 current Postman requests have examples.pnpm test:sdk-emitters— 11/11 pass.pnpm generate:api-docs— clean, all pages emitted.Upstream
The rename shipped across fleetbase/postman#62 and #63 (merged), and the SDK side in fleetbase-php 1.4.1. The server implementation is fleetbase/fleetops#319, still open — worth knowing, since these snippets document an API whose server change has not merged yet. The older spellings remain accepted on submit, so the samples are correct against both.