Skip to content

Point .NET API reference links at dotnet.ios / dotnet.android - #448

Merged
moritzhartmeier merged 2 commits into
mainfrom
fix/dotnet-api-links
Sep 28, 2026
Merged

moritzhartmeier merged 2 commits into
mainfrom
fix/dotnet-api-links

Conversation

@moritzhartmeier

@moritzhartmeier moritzhartmeier commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

The bug

The API reference publishes .NET under dotnet.ios and dotnet.android, but 34
links use a net segment instead. Every one of them 404s on the live site
today:

404  /data-capture-sdk/net/ios/label-capture/api/label-definition.html
404  /data-capture-sdk/net/android/label-capture/api/serial-number-barcode.html

net is the docs-side path for .NET — /sdks/net/ios/... — so the two
conventions are easy to confuse. The API reference does not use it:
/data-capture-sdk/net/ returns 404, while all thirteen other framework
segments resolve.

Where they are

docs/sdks/net/ios/label-capture/advanced.md 1
docs/sdks/net/android/label-capture/advanced.md 1
src/data/features.json 32

Why nothing caught it

onBrokenLinks: "throw" only validates internal links; these are absolute
external URLs, so the build has never looked at them.

The features.json ones are further out of reach still: FeatureList renders
client-side, so those links never appear in the built HTML at all — the static
page carries Loading features... and the data ships in a JS bundle. No
build-time checker or crawler has ever seen them.

Verified before changing anything

  • All 28 distinct URLs return 404 as written and 200 with the
    corrected segment.
  • The Doxygen anchors resolve in the pages they name — checked, because page
    existence alone would not have been enough.
  • yarn verify:frameworks still passes; it reads features.json too.
  • Word-level diff confirms the only thing that changed on any line is the
    framework segment.

Note for #447

That PR rewrites the same apiUrl values in features.json to version-agnostic
paths, so it will need a rebase once this lands. This one is the smaller, more
urgent half — it fixes live 404s and carries no behaviour change.

Found while auditing which framework segments resolve, during the docs-deploy
cleanup.

One unrelated edit, to get past the gate

Docs Quality Gate failed on the first push — not on anything this PR changed.
It checks changed files, not changed lines, so touching these two .md files
at lines 318/341 put their whole contents under Vale, and both carry a
pre-existing Google.OptionalPlurals error at line 25: "overlay(s)".

Reworded to "overlays", which reads correctly in the and/or construction it sits
in. Nothing else in either file trips the rule, and the gate passes locally with
the Google style pack synced.

The API reference publishes .NET under dotnet.ios and dotnet.android, but 34
links across the docs and features.json used a `net` segment instead. All of
them 404 on the live site today:

  https://docs.scandit.com/data-capture-sdk/net/ios/label-capture/api/...
  https://docs.scandit.com/data-capture-sdk/net/android/label-capture/api/...

`net` is the docs-side path for .NET (/sdks/net/ios/...), so the two conventions
are easy to confuse; the API reference does not use it, and
/data-capture-sdk/net/ returns 404 while every other framework segment resolves.

Nothing catches this. The build's onBrokenLinks only checks internal links, and
these are absolute external URLs. The features.json ones are worse off still:
FeatureList renders client-side, so those links never appear in the built HTML
for any checker to see.

Verified before changing anything: all 28 distinct URLs return 404 as written
and 200 with the corrected segment, and the Doxygen anchors resolve in the
pages they name. `yarn verify:frameworks` still passes -- it reads features.json
too.

Found while auditing which framework segments resolve, during the
docs-deploy cleanup.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-28 17:15 UTC

The gate checks changed FILES, not changed lines, so touching these two files
at line 318/341 put their whole contents under Vale — and both carry a
pre-existing Google.OptionalPlurals error at line 25, "overlay(s)".

Reworded to "overlays", which reads correctly for the and/or construction it
sits in. Nothing else in either file trips the rule.

Unrelated to the .NET link fix, but the gate cannot pass without it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@moritzhartmeier
moritzhartmeier merged commit 68d0936 into main Sep 28, 2026
5 checks passed
@moritzhartmeier
moritzhartmeier deleted the fix/dotnet-api-links branch September 28, 2026 17:15
moritzhartmeier added a commit that referenced this pull request Sep 28, 2026
…s on

features.json records the SDK version each feature arrived in, and one shared
file serves every docs version -- so a frozen version lists features that did
not exist in it. 86 framework entries are newer than 7.6.

That was harmless while their links pointed at the unversioned API reference,
which always documents the newest release. Resolving links against the reader's
own line turns every one of them into a 404: /7.6/data-capture-sdk/ has no page
for a class added in 8.2. The fix would have introduced the breakage it exists
to prevent.

Availability is now version-aware at all three sites: the feature filter, the
isAvailable flag, and the per-framework chip list.

The comparison is numeric PER COMPONENT, which matters more than it looks:
"6.5" is earlier than "6.28", and both a string comparison ("6.5" > "6.28") and
a float one (6.5 > 6.28) get that backwards. 6.28 is a real docs version, so it
is not hypothetical. `current` shows everything, and an unparseable version on
either side shows the feature rather than hiding it, so a data-entry slip
degrades to the previous behaviour rather than silently emptying a table.

Also rebased onto main for #448: features.json is regenerated from main with
the host-stripping re-applied, so the dotnet.ios / dotnet.android corrections
are preserved rather than hand-merged (32 values checked).

Verified: the comparison across both frozen versions and `current` including
the 6.5/6.28 case, tsc clean, build passes, verify:frameworks passes.

Reported by @eugenia-scandit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
moritzhartmeier added a commit that referenced this pull request Oct 7, 2026
…s on

features.json records the SDK version each feature arrived in, and one shared
file serves every docs version -- so a frozen version lists features that did
not exist in it. 86 framework entries are newer than 7.6.

That was harmless while their links pointed at the unversioned API reference,
which always documents the newest release. Resolving links against the reader's
own line turns every one of them into a 404: /7.6/data-capture-sdk/ has no page
for a class added in 8.2. The fix would have introduced the breakage it exists
to prevent.

Availability is now version-aware at all three sites: the feature filter, the
isAvailable flag, and the per-framework chip list.

The comparison is numeric PER COMPONENT, which matters more than it looks:
"6.5" is earlier than "6.28", and both a string comparison ("6.5" > "6.28") and
a float one (6.5 > 6.28) get that backwards. 6.28 is a real docs version, so it
is not hypothetical. `current` shows everything, and an unparseable version on
either side shows the feature rather than hiding it, so a data-entry slip
degrades to the previous behaviour rather than silently emptying a table.

Also rebased onto main for #448: features.json is regenerated from main with
the host-stripping re-applied, so the dotnet.ios / dotnet.android corrections
are preserved rather than hand-merged (32 values checked).

Verified: the comparison across both frozen versions and `current` including
the 6.5/6.28 case, tsc clean, build passes, verify:frameworks passes.

Reported by @eugenia-scandit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
moritzhartmeier added a commit that referenced this pull request Oct 20, 2026
…#447)

* fix(features): resolve API-reference links against the reader's docs version

features.json stored 143 absolute apiUrl values pointing at the UNVERSIONED API
reference, and FeatureList rendered them as-is. One shared data file serves
every docs version, so there is no single correct prefix to bake into it.

Nothing is broken today: the component is used on 10 pages, all in docs/, and
for the current version the unversioned tree is the right target -- the same
convention its Markdown uses. The problem is the next freeze. `docs:version`
copies docs/ verbatim, so the snapshot gets all 10 pages with <FeatureList/>
intact while still importing the SHARED features.json. The frozen version then
renders whatever the unversioned tree documents, which after the following minor
publishes is the newer release. That is the bug #445 fixes for Markdown, in a
place a substitution over versioned_docs/ cannot reach.

features.json now stores the path WITHIN the API reference
("ios/label-capture/api/serial-number-barcode.html#..."), and a new
apiReferenceUrl() applies the version at render time: the unversioned tree for
`current`, <major.minor>/data-capture-sdk/ for a frozen version. FeatureList
reads the active version through useActiveDocContext(), the pattern
FrameworkSelectorMobile already uses.

withCurrentDocsPath() did not cover this and still does not: it prefixes
relative /sdks/<framework> paths for unreleased frameworks only, and returns an
absolute URL untouched.

Verified: apiReferenceUrl() across current / frozen / already-absolute inputs,
tsc clean, a full build passes, and `yarn verify:frameworks` still passes --
that gate reads features.json, so the shape change had to keep it happy.

NOT verified, stated plainly: how a FROZEN page renders, because no frozen
version uses the component today, and FeatureList is client-rendered -- the
static HTML carries "Loading features..." and the data ships in the JS bundle,
so a build cannot observe those links either way. The frozen path rests on
useActiveDocContext() reporting the version name, which the existing selector
component already depends on.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(features): hide features newer than the docs version the reader is on

features.json records the SDK version each feature arrived in, and one shared
file serves every docs version -- so a frozen version lists features that did
not exist in it. 86 framework entries are newer than 7.6.

That was harmless while their links pointed at the unversioned API reference,
which always documents the newest release. Resolving links against the reader's
own line turns every one of them into a 404: /7.6/data-capture-sdk/ has no page
for a class added in 8.2. The fix would have introduced the breakage it exists
to prevent.

Availability is now version-aware at all three sites: the feature filter, the
isAvailable flag, and the per-framework chip list.

The comparison is numeric PER COMPONENT, which matters more than it looks:
"6.5" is earlier than "6.28", and both a string comparison ("6.5" > "6.28") and
a float one (6.5 > 6.28) get that backwards. 6.28 is a real docs version, so it
is not hypothetical. `current` shows everything, and an unparseable version on
either side shows the feature rather than hiding it, so a data-entry slip
degrades to the previous behaviour rather than silently emptying a table.

Also rebased onto main for #448: features.json is regenerated from main with
the host-stripping re-applied, so the dotnet.ios / dotnet.android corrections
are preserved rather than hand-merged (32 values checked).

Verified: the comparison across both frozen versions and `current` including
the 6.5/6.28 case, tsc clean, build passes, verify:frameworks passes.

Reported by @eugenia-scandit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.

2 participants