So I have ASP.NET Core webservice which uses MediatR to pass request from controllers to appropriate handlers. So in turn I have nested classes:
public class SomeCommand
{
public class Request : IRequest<Response> {}
public class Response {}
public class Handler : IRequestHandler<Request, Response> {}
}
So, in turn, Request and Response are my DTOs.
Now I am trying to generate client package with NSwag, which ignores external classes (SomeCommand) and produces DTOs with names Request, Request1, etc., same for Response.
I use NSwag.MSBuild package to automatically generate code when building the API.
Ideally, I would like to get generated names as SomeCommand_Request or SomeCommandRequest.
I tried "AllowReferencesWithProperties": true in nswag.json configuration file, but it did not work.
Other than that, I could not find anything.