When generating a client based on Swagger metadata, is it possible to specify or configure things somehow that the output should use some other client library?
So if it was a C# client for example, to automatically replace the HttpClient or RestSharp client (I don't recall what it is now as I have not used it in a while) with some custom library?
Yes it is possible,
The codegen uses templates and configuation java classes to generate code in different languages. If you're willing to modify these templates and classes this would be a quite simple modification.
You can find the opensource repository here Swagger-Codegen
The template files for each language can be found here:
Java config classes:
List of template variables:
https://github.com/swagger-api/swagger-codegen/wiki/Mustache-Template-Variables
Template are written in mustache: https://mustache.github.io/mustache.5.html
Interesting read if you want to start from scratch: