This is a little tool to generate different data models from the CargoWise replication API responses. Its really so that you dont have to manually write the definition each time. This can also be used with my Replication API Toolset for making data models.
It is packaged on the NuGet Package Manager as a dotnet tool, so you can install it by writing dotnet tool install CargoWiseReplicationAPITableGenerator into a terminal.
You can then use the tool by writing cwreplicationapitablegen in a terminal.
There are two generators right now, one for C# and one for TSQL. You use them as follows:
cwreplicationapitablegen csharp -i input.json -n some_namespace -o ./
cwreplicationapitablegen tsql -i input.json -s dbo -o ./The input.json file must be the direct result from querying a replication APIs https://.../Services/api/replication/change-detail endpoint!
The output file will be called whatever the input files table name is.
