How to generate Retrofit client library from wp rest api using swagger
Citing from here, yes it is part of the existing codegen module of swagger:
The latest Java API client supports different HTTP client including Retrofit. To use Retrofit, please create a config.json file as follows:
{ "library": "retrofit" }
and pass config.json via -c in the command line
You can run java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar config-help -l java for more information on customizing the Java API client.