@polytric/openws-sdkgen
v0.0.5
Published
OpenWS SDK generator CLI
Maintainers
Readme
OpenWS SDK Generator
@polytric/openws-sdkgen is the OpenWS SDK generator CLI. It takes an OpenWS spec JSON file and produces SDK source code for a target language/environment.
The generator is pipeline-driven:
- Parse CLI arguments
- Load the OpenWS spec
- Build an intermediate representation
- Execute a build plan for the selected language/environment
Install
pnpm add -g @polytric/openws-sdkgenUsage
openws-sdkgen \
--spec ./openws-spec.json \
--out ./generated \
--project MyCompany \
--service ChatService \
--hostRole server \
--language csharp \
--environment unityThe CLI exposes the following options:
--spec(string): Path to the OpenWS spec JSON file.--out(string): Output directory for generated code.--project(string): Project/namespace prefix for generated code.--service(string): Service name (default:MyService).--hostRole(string): Participant role name that represents the host side.--language(string): Target language (csharporjavascript).--environment(string|array): Target environment (unity,node,browser).
Current targets
The generator is wired for:
- C# (Unity) with
newtonsoftserialization templates.
Additional targets are configured through build plans in tooling/sdkgen/dotnet and can be expanded as needed.
License
Apache-2.0
