Bug Report Checklist
Description
when the basepath for a generated api client is changed, that change get's ignored. cause is a check for
but the variable is initialized to 0
openapi-generator version
4.3.0 , yes. regression from 4.2.3
Related issues/PRs
probably introduced from #4998
Suggest a fix
workaround is to either set the serverIndex to null explicitly, or add a single server configuration.