I don’t know exactly what you’re asking, but the Typed DTOs themselves are generated from the remote ServiceStack instance not a client generation tool. So it’s only using the configuration of the remote instance which needs to be available when generating the ServiceStack Reference DTOs.
If the server APIs are deployed on multiple instances, the same DTOs / code can be reused by simply changing the
baseUrl for which server the client should send the client requests should be sent to:
var baseUrl = ...;
var client = new JsonServiceClient(baseUrl);
If you instead want the same app to call multiple different ServiceStack APIs you can specify which file name the dtos should be generated in, e.g:
x csharp https://app1.example.org app1
x csharp https://app2.example.org app2
x csharp https://app3.example.org app3
This will generate each DTOs in different files, e.g.
app1.dtos.cs all of which can be updated with a single command using the x dotnet tool:
Alternatively you can update the DTOs from a specific app by specifying its filename, e.g:
x csharp app1.dtos.cs
Each generated DTOs can be further individually customized with the DTO Customization Options, e.g. if you want them to generated under a specific C# namespace you can use:
Which will be used after updating the ServiceStack reference.
The only other customization is available by applying them on the server, see the C# Server Configuration docs for an example.