Skip to content

Publish the PHP SDK 1.4.1 inspection examples - #102

Merged
roncodes merged 1 commit into
mainfrom
work/php-sdk-1.4.1-examples
Sep 14, 2026
Merged

roncodes merged 1 commit into
mainfrom
work/php-sdk-1.4.1-examples

Conversation

@roncodes

@roncodes roncodes commented Sep 14, 2026

Copy link
Copy Markdown
Member

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 flat item_results block. 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 with answers, each entry naming its field.

What changed

Two files. scripts/php-sdk-examples.generated.json — the generated_from.ref bump (d6a7cc5822b867) and the call/code of one entry, fleetbase-api-inspections-submit-an-inspection. The other 269 entries are byte-identical; I diffed them entry by entry before syncing. Plus the scripts/README.md provenance line, which still named the 1.4.0 tag.

The rendered change is not visible in this diffcontent/docs/api/ is gitignored and regenerated at build time, so review sees only a JSON blob and a README line. For reference, on content/docs/api/fleetbase/inspections.mdx the sync takes 'answers' from 6 occurrences to 12 and custom_field_values from 8 to 2. The two that remain are deliberate prose, not samples: the endpoint description noting custom_field_values is 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:

node scripts/sync-php-sdk-examples.mjs --source <sdk>/contracts/php-sdk-examples.json
pnpm test:sdk-emitters
pnpm generate:api-docs

The source was extracted from the published 1.4.1 tag rather than a working branch, and verified byte-identical to the SDK's contracts/php-sdk-examples.json at that tag.

Checks

  • sync-php-sdk-examples.mjsPHP 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.

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
@vercel

vercel Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
fleetbase-io Ready Ready Preview Sep 14, 2026 10:02am UTC

Request Review

@roncodes
roncodes merged commit 578e3b7 into main Sep 14, 2026
3 checks passed
@roncodes
roncodes deleted the work/php-sdk-1.4.1-examples branch September 14, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant