docs(api): make the reference examples internally consistent - #249
Merged
Conversation
Each of these contradicted itself on the rendered page: - ServiceMap fleet: the response showed a single `active` host for a request filtering on `degraded`/`stale`, while `coverage` claimed two returned and counted one of each. Now two hosts that match both the filter and the counts. - Preset-severity: the rule returned by `create` carried a priority the `list` example contradicted, and the history example's "empty" snapshot was timestamped after a rule that already existed. Rebuilt as one timeline — two creates and a disable, three snapshots, each holding the state the call that wrote it was about to change. - History `total` now equals the number of items returned, in both the preset-severity and error-ingestion examples. - Resource info: the order id encoded a date a year after the `created_at` of the resource it provisioned, and the billing window was not the 30-day span anchored at `created_at` that the field descriptions promise. - Example addresses now use the RFC 5737 documentation range, which the rest of the corpus already uses, instead of private-range ones. Examples feed no code generation — only the request-side ones reach the CLI, and none of those change here — so the generated SDK and CLI are unaffected.
docs(api): make the reference examples internally consistent
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.
Fixes six examples that contradicted themselves on the rendered page: a filtered ServiceMap
fleetresponse returning a host that fails the filter while itscoveragecounts say otherwise; a preset-severity rule whosecreatepriority disagreed with thelistit appears in; history examples whosetotaldid not match the items beside it and whose "snapshot taken before the change" already carried the change; a resourceorder_iddated a year after the resource it provisioned, with a billing window not anchored where the field descriptions say. Example addresses move to the RFC 5737 documentation range this corpus already uses elsewhere.No downstream release needed — examples feed no code generation, and regenerating the SDK against this spec produces zero generated-code changes while its spec-example round-trip test still passes.