Spillgebees.NeTEx.Generator
0.0.5
dotnet tool install --global Spillgebees.NeTEx.Generator --version 0.0.5
dotnet new tool-manifest
dotnet tool install --local Spillgebees.NeTEx.Generator --version 0.0.5
#tool dotnet:?package=Spillgebees.NeTEx.Generator&version=0.0.5
nuke :add-package Spillgebees.NeTEx.Generator --version 0.0.5
Spillgebees.NeTEx.Generator
CLI tool for generating C# model classes from NeTEx (Network Timetable Exchange) XSD schemas.
Downloads schemas from the official NeTEx-CEN/NeTEx repository and generates modern C# code ready to use with XmlSerializer. Downloaded schemas are cached locally so repeated runs don't hit GitHub.
Getting started
Install the tool globally:
dotnet tool install -g Spillgebees.NeTEx.Generator
Generate models for a specific NeTEx version tag:
netex-generate generate --version v1.3.1 --output ./Generated --namespace MyApp.NeTEx
This downloads the NeTEx schemas and generates C# classes with the following sub-namespaces:
MyApp.NeTEx.NeTEx-- NeTEx types (stop places, lines, journeys, fares, etc.)MyApp.NeTEx.SIRI-- SIRI types (real-time information)MyApp.NeTEx.GML-- GML types (geographic markup)
Schema caching
Schemas are cached locally after the first download. Version tags and commit SHAs are immutable, so they are cached permanently. Branch refs are always re-downloaded.
The cache is stored in local app data under netex-schemas/:
- Linux:
~/.local/share/netex-schemas/ - macOS:
~/Library/Application Support/netex-schemas/ - Windows:
%LOCALAPPDATA%\netex-schemas\
CLI reference
netex-generate generate [options]
Options:
-v, --version <version> NeTEx-CEN/NeTEx version tag (default: v1.3.1)
--ref <ref> Git ref (branch or commit SHA), mutually exclusive with --version
-o, --output <output> Output directory for generated C# files (default: ./Generated)
-n, --namespace <namespace> Root C# namespace (default: NeTEx.Models)
--clean Delete output directory before generating
--verbose Enable verbose logging
netex-generate list-versions List available NeTEx-CEN/NeTEx version tags
Pre-generated models
If you don't need custom generation, use the pre-generated model packages instead:
License
EUPL-1.2. The NeTEx schemas are licensed under GPL-3.0 by CEN.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|