Repository navigation
Flag deprecated API methods in the generated reference - #5457
Conversation
Proto RPCs marked `option deprecated = true` rendered as ordinary methods in the generated API reference, so TabularDataByFilter showed up in the data client table above TabularDataByMQL with no warning. - update_sdk_methods.py: render an optional overrides/protos/<resource>.<Proto>.deprecated.md as a "Deprecated" alert on the method and as the summary-table description. - check_deprecated_protos.py: report every deprecated RPC, message, and field in viamrobotics/api and where the docs mention it; --strict fails when a documented deprecated RPC has no deprecation note. - Add notes for TabularDataByFilter, AddTagsToBinaryDataByFilter, RemoveTagsFromBinaryDataByFilter, TagsByFilter, BoundingBoxLabelsByFilter, and motion GetPose; regenerate data and motion reference. - Point the frame system page at the machine client's GetPose. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Deploy Preview for viam-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…ingBoxLabelsByFilter The notes said these methods had no replacement method, then recommended one. Lead with the replacement instead, which also fixes the summary-table description (the note's first sentence). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for this. The deprecation notes fix a real gap, and the sidecar plus table prefix is a good way to surface a deprecation early on the page. The audit was useful too. I have a few suggestions. 1. Drop It's 356 lines, with a hand-rolled proto parser and a hardcoded resource map that will drift from A grep run every month or so gives the same result with nothing to maintain: git clone --depth 1 https://github.com/viamrobotics/api /tmp/api
grep -rnE "^ option deprecated = true;" /tmp/api/protoThis lists deprecated RPCs only (14 today), which keeps the read short. Compare the hits against the Could you add the convention and the cadence to the "Generated SDK reference docs" section of 2. Source the removal claims.
3. Verify the replacement wording for The notes say to collect unique values from each 4. Persist the regeneration caveats. The notes in the PR description about including |
- Remove check_deprecated_protos.py. A periodic grep of viamrobotics/api, documented in CLAUDE.md, finds new deprecations without a parser to maintain. - Drop the unsourced "will be removed in a future release" claims. - TagsByFilter returns tags from both binary and tabular data (app domains/datamanagement/tags_by_filter.go), so the note now covers both: BinaryDataByFilter's metadata.capture_metadata.tags, and the readings table's tags field through TabularDataByMQL. BoundingBoxLabelsByFilter only reads binary annotations, so it names metadata.annotations.bboxes. - CLAUDE.md: document the .deprecated.md convention, how to list deprecated RPCs, and two ways a manual regeneration silently drops content. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Jeremy Rose (@jeremyrose-viam) thanks, all four are addressed in 1962649. 1. Audit script dropped. grep -rn -B2 "^ option deprecated = true;" /tmp/api/proto | grep " rpc "It returns the same 14 RPCs, and the broader 2. Removal claims dropped. No note says "will be removed" anymore. They say the method is deprecated and name the replacement. I also added a line to 3. Verified against the code, which corrected one note.
The field paths come from the 4. Regeneration caveats saved. They're in the same
Data reference regenerated cleanly, and |
|
🔎💬 Inkeep AI search and chat service is syncing content for source 'Viam Docs' |

Why
A customer team built on
TabularDataByFilterinstead ofTabularDataByMQL. The proto has markedTabularDataByFilterdeprecated since November 2024, but the generator never read that flag. So the data client reference showed it as an ordinary method, listed in the summary table above MQL with no warning. An audit found the same gap for five more deprecated RPCs.What changed
Generator support for deprecation notes (
update_sdk_methods.py)The protos don't say what replaces a deprecated method, so the replacement is named in a hand-written override,
static/include/<type>/apis/overrides/protos/<resource>.<Proto>.deprecated.md. When that file exists, the method gets a "Deprecated" caution alert above its description, and its summary-table row reads Deprecated. followed by the note's first sentence. I also moved the table's first-sentence extraction into a helper,override_first_sentence(), so the description and the note share it. Behavior for existing overrides is unchanged.How to find new deprecations (CLAUDE.md, "Generated SDK reference docs")
The convention for
.deprecated.mdnotes, a grep that lists deprecated RPCs inviamrobotics/api, and the regeneration caveats below. An earlier version of this PR included an audit script. It was dropped in review in favor of the grep.Deprecation notes added. Each replacement comes from the app server's deprecation comments and error messages in
viamrobotics/app, underdomains/datamanagement/:TabularDataByFilterTabularDataByMQL/TabularDataBySQL, orExportTabularDatato stream all data from one source.AddTagsToBinaryDataByFilterAddTagsToBinaryDataByIDs. The server already returns an unimplemented error for this method.RemoveTagsFromBinaryDataByFilterRemoveTagsFromBinaryDataByIDs. The server already returns an unimplemented error for this method.TagsByFiltertags_by_filter.go). Collect them fromBinaryDataByFilter(metadata.capture_metadata.tags) and from thereadingstable'stagsfield withTabularDataByMQL.BoundingBoxLabelsByFilterBinaryDataByFilterand collectlabelfrommetadata.annotations.bboxes.GetPoseGetPose. This moves the existing deprecation sentence out of the description and into the alert, so the table shows it too.Regenerated the data and motion reference pages. The diff contains only the deprecation additions. Documented in CLAUDE.md two ways a manual regeneration silently drops content: running an app resource without
app, and an unreachable SDK docs site. Fixed one line in the frame system page that pointed to motionGetPose.Audit results
No hand-written page recommends
TabularDataByFilter, so the reference page was the only place the docs steered readers to it. The other hits were false positives, which I checked one by one:GetStatushit is the generic service'sGetStatus, which isn't deprecatedbinary_idsandbinary_idmatch SDK parameters that now take ID stringssensor_namesandmime_typematch config attributes and camera parametersNot in this PR
motion_service.get_pose:claw-game.md,constrain-motion.mdandplan-motion-with-arm-gripper.md. These are code rewrites that should be tested on a machine.Checks
prettier 3.2.5, markdownlint, vale 3.12.0 (including CLAUDE.md and the changed
static/Markdown),scripts/frontmatter_rules.pyandmake build-prodall pass. I confirmed the alert renders on/reference/apis/data-client/.🤖 Generated with Claude Code