Skip to content

Commit bf3e755

Browse files
Merge pull request #179 from ottobolyos/chore/check-broken-links
ci: gate docs PRs on internal-link validity
2 parents 69f4f4e + a3e19b9 commit bf3e755

55 files changed

Lines changed: 2195 additions & 262 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs.yml

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ env:
3131
DOTNET_VERSION: '8.0.x'
3232

3333
jobs:
34-
build:
35-
name: Build VitePress site
34+
prepare-docs:
35+
name: Prepare generated docs
3636
runs-on: ubuntu-latest
3737
steps:
3838
- name: Checkout
@@ -68,6 +68,50 @@ jobs:
6868
- name: Verify reference pages match source (drift gate)
6969
run: bash docs/scripts/generate-reference.sh --check
7070

71+
# upload-artifact@v4 strips the longest common prefix from the path list
72+
# (here: 'docs/'), so the artifact root contains 'api/' + 'reference/'
73+
# rather than 'docs/api/' + 'docs/reference/'. The downstream
74+
# download-artifact steps in the build and check-links jobs restore the
75+
# 'docs/' prefix via 'path: docs'. This v4 behaviour differs from v3
76+
# (which preserved the upload paths verbatim), so the two ends must stay
77+
# in sync if either is touched.
78+
- name: Upload generated docs
79+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
80+
with:
81+
name: generated-docs
82+
path: |
83+
docs/api
84+
docs/reference
85+
if-no-files-found: error
86+
retention-days: 1
87+
88+
build:
89+
name: Build VitePress site
90+
needs: prepare-docs
91+
runs-on: ubuntu-latest
92+
steps:
93+
- name: Checkout
94+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
95+
with:
96+
fetch-depth: 0
97+
98+
- name: Setup Node.js
99+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
100+
with:
101+
node-version: ${{ env.NODE_VERSION }}
102+
cache: npm
103+
cache-dependency-path: docs/package-lock.json
104+
105+
- name: Install dependencies
106+
working-directory: docs
107+
run: npm ci
108+
109+
- name: Download generated docs
110+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
111+
with:
112+
name: generated-docs
113+
path: docs
114+
71115
# Only required on push-to-master (deploy path). Computes the correct
72116
# base-path for the Pages site and writes it where later steps see it.
73117
- name: Configure GitHub Pages
@@ -88,6 +132,37 @@ jobs:
88132
with:
89133
path: docs/.vitepress/dist
90134

135+
check-links:
136+
name: Check internal links
137+
needs: prepare-docs
138+
runs-on: ubuntu-latest
139+
steps:
140+
- name: Checkout
141+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
142+
with:
143+
fetch-depth: 0
144+
145+
- name: Setup Node.js
146+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
147+
with:
148+
node-version: ${{ env.NODE_VERSION }}
149+
cache: npm
150+
cache-dependency-path: docs/package-lock.json
151+
152+
- name: Install dependencies
153+
working-directory: docs
154+
run: npm ci
155+
156+
- name: Download generated docs
157+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
158+
with:
159+
name: generated-docs
160+
path: docs
161+
162+
- name: Check internal links
163+
working-directory: docs
164+
run: npm run check-links
165+
91166
deploy:
92167
name: Deploy to GitHub Pages
93168
needs: build

docs/.docfx/docfx.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,19 @@
1616
"libraries/MTConnect.NET-SysML/bin/Debug/net8.0/MTConnect.NET-SysML.dll",
1717
"libraries/MTConnect.NET-TLS/bin/Debug/net8.0/MTConnect.NET-TLS.dll",
1818
"libraries/MTConnect.NET-XML/bin/Debug/net8.0/MTConnect.NET-XML.dll",
19-
"libraries/MTConnect.NET/bin/Debug/net8.0/MTConnect.NET.dll"
19+
"libraries/MTConnect.NET/bin/Debug/net8.0/MTConnect.NET.dll",
20+
"agent/MTConnect.NET-Agent/bin/Debug/net8.0/MTConnect.NET-Agent.dll",
21+
"agent/MTConnect.NET-Applications-Agents/bin/Debug/net8.0/MTConnect.NET-Applications-Agents.dll",
22+
"agent/Modules/MTConnect.NET-AgentModule-HttpServer/bin/Debug/net8.0/MTConnect.NET-AgentModule-HttpServer.dll",
23+
"agent/Modules/MTConnect.NET-AgentModule-HttpAdapter/bin/Debug/net8.0/MTConnect.NET-AgentModule-HttpAdapter.dll",
24+
"agent/Modules/MTConnect.NET-AgentModule-MqttAdapter/bin/Debug/net8.0/MTConnect.NET-AgentModule-MqttAdapter.dll",
25+
"agent/Modules/MTConnect.NET-AgentModule-MqttBroker/bin/Debug/net8.0/MTConnect.NET-AgentModule-MqttBroker.dll",
26+
"agent/Modules/MTConnect.NET-AgentModule-MqttRelay/bin/Debug/net8.0/MTConnect.NET-AgentModule-MqttRelay.dll",
27+
"agent/Modules/MTConnect.NET-AgentModule-ShdrAdapter/bin/Debug/net8.0/MTConnect.NET-AgentModule-ShdrAdapter.dll",
28+
"adapter/MTConnect.NET-Adapter/bin/Debug/net8.0/MTConnect.NET-Adapter.dll",
29+
"adapter/MTConnect.NET-Applications-Adapter/bin/Debug/net8.0/MTConnect.NET-Applications-Adapter.dll",
30+
"adapter/Modules/MTConnect.NET-AdapterModule-MQTT/bin/Debug/net8.0/MTConnect.NET-AdapterModule-MQTT.dll",
31+
"adapter/Modules/MTConnect.NET-AdapterModule-SHDR/bin/Debug/net8.0/MTConnect.NET-AdapterModule-SHDR.dll"
2032
],
2133
"src": "../.."
2234
}

docs/.vitepress/config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ export default withMermaid(
9191
{ text: 'Agent configuration', link: '/configure/agent-config' },
9292
{ text: 'Adapter configuration', link: '/configure/adapter-config' },
9393
{ text: 'Module configuration', link: '/configure/module-config' },
94+
{ text: 'Run', link: '/configure/run' },
95+
{ text: 'Connect a consumer', link: '/configure/consumer' },
96+
{ text: 'Operate', link: '/configure/operate' },
9497
],
9598
},
9699
{

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Mermaid syntax is documented at <https://mermaid.js.org/intro/syntax-reference.h
5353

5454
## Authoring conventions
5555

56-
- Internal links use site-relative paths (`/configure/agent`, not `../configure/agent.md`).
56+
- Internal links use site-relative paths (`/configure/agent-config`, not `../configure/agent-config.md`).
5757
- Code samples include the target language fence (` ```csharp `, ` ```bash `, ` ```yaml `).
5858
- External links use the full URL.
5959
- The site is configured with `cleanUrls: true`; pages are linked without the `.md` suffix.

docs/cli/adapter.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,10 @@ To raise the console target to debug-level on a single run, use the `debug` comm
169169

170170
## See also
171171

172-
- [Configure & Use → Configure an adapter](/configure/adapter) — annotated end-to-end `adapter.config.yaml` walkthrough plus data-source bring-up.
172+
- [Configure & Use → Configure an adapter](/configure/adapter-config) — annotated end-to-end `adapter.config.yaml` walkthrough plus data-source bring-up.
173173
- [Configure & Use → Run](/configure/run) — local-dev, Windows-service, and systemd-unit deployment.
174174
- [Modules](/modules/) — per-module configuration schemas referenced by the `modules:` list.
175-
- [API reference → `MTConnect.Applications.MTConnectAdapterApplication`](/api/) — the C# class that backs the CLI.
176-
- [API reference → `MTConnect.Configurations.AdapterApplicationConfiguration`](/api/) — the configuration POCO the YAML deserializes into.
177-
- [API reference → `MTConnect.Adapters.MTConnectAdapter`](/api/) — the inner adapter type that orchestrates `WriteObservations` / `WriteAssets` / `WriteDevices`.
175+
- [API reference → `MTConnect.Applications.MTConnectAdapterApplication`](/api/MTConnect.Applications.MTConnectAdapterApplication) — the C# class that backs the CLI.
176+
- [API reference → `MTConnect.Configurations.AdapterApplicationConfiguration`](/api/MTConnect.Configurations.AdapterApplicationConfiguration) — the configuration POCO the YAML deserializes into.
177+
- [API reference → `MTConnect.Adapters.MTConnectAdapter`](/api/MTConnect.Adapters.MTConnectAdapter) — the inner adapter type that orchestrates `WriteObservations` / `WriteAssets` / `WriteDevices`.
178178
- [Agent CLI](./agent) — the sibling agent host that consumes the adapter's output.

docs/cli/agent.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ Multiple instances of the same module are allowed — each entry produces a dist
135135
136136
### Processor list shape
137137
138-
`processors` follows the same single-key-map-per-entry shape as `modules`. Each processor is a hook into the observation pipeline that runs between the adapter intake and the buffer write. The processor catalog lives under [API reference → MTConnect.Processors](/api/).
138+
`processors` follows the same single-key-map-per-entry shape as `modules`. Each processor is a hook into the observation pipeline that runs between the adapter intake and the buffer write. The processor catalog lives under [`MTConnect.Agents.MTConnectAgentProcessors`](/api/MTConnect.Agents.MTConnectAgentProcessors).
139139

140140
### Devices file
141141

142-
The `devices` key points at one `Devices.xml` file or at a directory containing several. The schema is the MTConnect Devices envelope; each device's `<Components>` and `<DataItems>` graph drives what the agent exposes on `/probe`. The agent re-reads the device file when `monitorConfigurationFiles: true` is set. See [Configure & Use → Configure an agent](/configure/agent) for an annotated `Devices.xml` example.
142+
The `devices` key points at one `Devices.xml` file or at a directory containing several. The schema is the MTConnect Devices envelope; each device's `<Components>` and `<DataItems>` graph drives what the agent exposes on `/probe`. The agent re-reads the device file when `monitorConfigurationFiles: true` is set. See [Configure & Use → Configure an agent](/configure/agent-config) for an annotated `Devices.xml` example.
143143

144144
## NLog configuration
145145

@@ -164,10 +164,10 @@ To raise the console target to `Debug` or `Trace` on a single run without editin
164164

165165
## See also
166166

167-
- [Configure & Use → Configure an agent](/configure/agent) — annotated end-to-end `agent.config.yaml` walkthrough.
167+
- [Configure & Use → Configure an agent](/configure/agent-config) — annotated end-to-end `agent.config.yaml` walkthrough.
168168
- [Configure & Use → Run](/configure/run) — local-dev, Docker, Windows-service, and systemd-unit deployment.
169169
- [Modules](/modules/) — per-module configuration schemas referenced by the `modules:` list.
170-
- [API reference → `MTConnect.Applications.MTConnectAgentApplication`](/api/) — the C# class that backs the CLI.
171-
- [API reference → `MTConnect.Configurations.AgentApplicationConfiguration`](/api/) — the configuration POCO the YAML deserializes into.
172-
- [API reference → `MTConnect.Configurations.AgentConfiguration`](/api/) — the base class that holds the buffer / version / validation knobs.
170+
- [API reference → `MTConnect.Applications.MTConnectAgentApplication`](/api/MTConnect.Applications.MTConnectAgentApplication) — the C# class that backs the CLI.
171+
- [API reference → `MTConnect.Configurations.AgentApplicationConfiguration`](/api/MTConnect.Configurations.AgentApplicationConfiguration) — the configuration POCO the YAML deserializes into.
172+
- [API reference → `MTConnect.Configurations.AgentConfiguration`](/api/MTConnect.Configurations.AgentConfiguration) — the base class that holds the buffer / version / validation knobs.
173173
- [Adapter CLI](./adapter) — the sibling adapter host, run separately from the agent.

docs/cli/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ A PowerShell sibling lives alongside each shell script (`tools/dotnet.ps1`, `too
2121

2222
## Cross-references
2323

24-
- [Configure & Use → Configure an agent](/configure/agent) — how to author the `agent.config.yaml` file the agent CLI reads.
25-
- [Configure & Use → Configure an adapter](/configure/adapter) — how to author the `adapter.config.yaml` file the adapter CLI reads.
24+
- [Configure & Use → Configure an agent](/configure/agent-config) — how to author the `agent.config.yaml` file the agent CLI reads.
25+
- [Configure & Use → Configure an adapter](/configure/adapter-config) — how to author the `adapter.config.yaml` file the adapter CLI reads.
2626
- [Configure & Use → Run](/configure/run) — how to invoke the agent / adapter in development, in Docker, or as a Windows service / systemd unit.
2727
- [Modules](/modules/) — the per-module configuration the agent CLI loads at startup.
2828
- [API reference](/api/) — the C# types that back each CLI (e.g. `MTConnectAgentApplication`, `MTConnectAdapterApplication`, `AgentApplicationConfiguration`, `AdapterApplicationConfiguration`).

docs/cli/sysml-import.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,8 @@ A regeneration is considered clean when (a) the test suite is green at every pre
9797

9898
- [Configure & Use → Run](/configure/run) — running the agent against the regenerated library to verify end-to-end behavior.
9999
- [Compliance](/compliance/) — the per-version compliance matrix that the regenerator advances.
100-
- [API reference → `MTConnect.SysML.MTConnectModel`](/api/) — the in-memory model the XMI parser produces and the renderers walk.
101-
- [API reference → `MTConnect.SysML.CSharp.CSharpTemplateRenderer`](/api/) — the C# renderer that produces `MTConnect.NET-Common`.
102-
- [API reference → `MTConnect.SysML.Xml.XmlTemplateRenderer`](/api/) — the XML renderer that produces `MTConnect.NET-XML`.
103-
- [API reference → `MTConnect.SysML.Json_cppagent.JsonCppAgentTemplateRenderer`](/api/) — the JSON v2 renderer that produces `MTConnect.NET-JSON-cppagent`.
100+
- [API reference → `MTConnect.SysML.MTConnectModel`](/api/MTConnect.SysML.MTConnectModel) — the in-memory model the XMI parser produces and the renderers walk.
101+
- [API reference → `MTConnect.SysML.ModelHelper`](/api/MTConnect.SysML.ModelHelper) — the helper surface the per-language renderers call into.
102+
- [API reference → `MTConnect.SysML` namespace](/api/MTConnect.SysML) — the SysML model + per-renderer entry points.
104103
- [`tools/test.sh`](./test-sh) — runs after a regeneration to verify the suite stays green.
105104
- [`tools/dotnet.sh`](./dotnet-sh) — wraps the `dotnet run` invocation if the regeneration is being done inside a containerized SDK.

docs/compliance/known-divergences.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The published v2.6 SysML XMI file (`MTConnectSysMLModel_V2.6.xml`) is byte-ident
3434

3535
For DataItems with `representation="DATA_SET"` or `representation="TABLE"`, the SysML XMI declares the `result` property's type as a single `DataSet` class shared between the two representations, while the XSD declares two distinct complex types (`DataSetType` and `TableType`) with non-overlapping element shapes.
3636

37-
**Library posture**: follows the XSD's two-class shape — `DataSetEntry` and `TableEntry` are distinct classes ([`MTConnect.Observations.DataSetEntry`](/api/MTConnect.Observations/DataSetEntry), [`MTConnect.Observations.TableEntry`](/api/MTConnect.Observations/TableEntry)). The on-the-wire output is XSD-validated; consumers parsing the XML never see ambiguity.
37+
**Library posture**: follows the XSD's two-class shape — `DataSetEntry` and `TableEntry` are distinct classes ([`MTConnect.Observations.DataSetEntry`](/api/MTConnect.Observations.DataSetEntry), [`MTConnect.Observations.TableEntry`](/api/MTConnect.Observations.TableEntry)). The on-the-wire output is XSD-validated; consumers parsing the XML never see ambiguity.
3838

3939
**Filed**: [Redmine #3893](https://projects.mtconnect.org/issues/3893) (SysML Model Related Issues).
4040

docs/compliance/per-version-matrix.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Spec versions supported
66

7-
The library tracks every published MTConnect spec version. The version constants live in [`MTConnect.MTConnectVersions`](/api/MTConnect/MTConnectVersions), and `MTConnectVersions.Max` advertises the latest one the library can serialize for.
7+
The library tracks every published MTConnect spec version. The version constants live in [`MTConnect.MTConnectVersions`](/api/MTConnect.MTConnectVersions), and `MTConnectVersions.Max` advertises the latest one the library can serialize for.
88

99
| MTConnect version | Released by MTConnect | Library constant | Streams XSD | Devices XSD | Assets XSD | Error XSD |
1010
|---|---|---|---|---|---|---|
@@ -32,7 +32,7 @@ Note: v1.9 was never released — the MTConnect Standard's version numbering jum
3232

3333
## Per-envelope semantics
3434

35-
Each cell in the matrix above means: the agent can be asked to emit the named envelope at the named spec version, and the output validates against the matching `MTConnect<Envelope>_<version>.xsd` schema published by the standard body. The version-aware serializers ([`Device.Process`](/api/MTConnect.Devices/Device#Process), [`DataItem.Process`](/api/MTConnect.Devices/DataItem#Process), [`Composition.Process`](/api/MTConnect.Devices/Composition#Process), and the per-envelope JSON / XML codecs) prune properties, DataItems, Components, and Assets whose `MinimumVersion` is above the target version, and prune any whose `MaximumVersion` is below it.
35+
Each cell in the matrix above means: the agent can be asked to emit the named envelope at the named spec version, and the output validates against the matching `MTConnect<Envelope>_<version>.xsd` schema published by the standard body. The version-aware serializers ([`Device.Process`](/api/MTConnect.Devices.Device), [`DataItem.Process`](/api/MTConnect.Devices.DataItem), [`Composition.Process`](/api/MTConnect.Devices.Composition), and the per-envelope JSON / XML codecs) prune properties, DataItems, Components, and Assets whose `MinimumVersion` is above the target version, and prune any whose `MaximumVersion` is below it.
3636

3737
## Type introduction inventory
3838

@@ -58,7 +58,7 @@ Every introduction is auditable through the generated `.g.cs` files under `libra
5858

5959
## Header fields per version
6060

61-
The `Header` element gains attributes over time. The library populates them based on the target version; the [`MTConnectAgentInformation`](/api/MTConnect.Agents/MTConnectAgentInformation) class is the source.
61+
The `Header` element gains attributes over time. The library populates them based on the target version; the [`MTConnectAgentInformation`](/api/MTConnect.Agents.MTConnectAgentInformation) class is the source.
6262

6363
| Attribute | Introduced at | Notes |
6464
|---|---|---|

0 commit comments

Comments
 (0)