Download openapi-generator-cli.jar , and assuming you have downloaded it in Downloads folder. Once the download is complete, from your project terminal run the following command.
It will show some verbose message printing in computer screen that will take few seconds to complete. Then, go inside the api-client folder and run pub get and build_runner.
Bash:
java -jar ~/Downloads/openapi-generator-cli-7.8.0.jar generate \
-i specs/swagger.yaml \
-g dart-dio \
-o api-client/
Bash:
cd api-client
flutter pub get
flutter pub run build_runner build