Generates an Enforce Script (Arma Reforger / Enfusion) REST API client — DTO structs, per-response callback classes, and endpoint methods on a singleton client class — from an OpenAPI spec.
Releases are published to ELifeRPG's GitHub Packages NuGet feed. Unlike
npm or Docker, GitHub Packages requires authentication for NuGet even on
public repos, so add the feed as an authenticated source once (a PAT
with the read:packages scope is enough):
dotnet nuget add source --username <github-username> --password <github-pat> \
--store-password-in-clear-text --name eliferpg-github \
"https://nuget.pkg.github.com/ELifeRPG/index.json"
dotnet tool install -g EnfusionCodegen.Cli
dotnet pack src/EnfusionCodegen.Cli/EnfusionCodegen.Cli.csproj --configuration Release --output ./out
dotnet tool install -g EnfusionCodegen.Cli --add-source ./out
enfusion-codegen generate ./openapi.json --output ./out --prefix ELIFE_
--prefixnames the client singleton, callback classes, and the base callback/status-enum (e.g.ELIFE_Api,ELIFE_CharacterDtoCallback,ELIFE_BaseRestCallback). DTO/model class names are never prefixed.Api/{prefix}Api_Base.cis only scaffolded if it doesn't already exist — it's meant to hold hand-written config/bootstrap logic and is never overwritten by later runs.- Everything else under
Api/,Api/Callbacks/, andApi/Structs/is fully regenerated on every run.
- No
allOf/oneOf/anyOfschema composition or polymorphism support. - No
multipart/form-datarequest bodies. - No generated auth/header code —
RestContext.SetHeaders's expected string format is undocumented and unverified; aBuildHeaders()extension point is scaffolded instead. PATCHoperations are skipped (the engine has noPATCHverb).- Bodiless
POST/PUT/DELETEcalls pass an empty string literal as thedataargument (e.g.GetElifeApi().POST(cbx, "path", "")) on the assumption thatRestContext's real signatures always take three arguments with no default — unverified against Workbench. - Only
$refs within the same spec document are resolved; multi-file specs with external (cross-file)$refs are not supported.