Do not run openapi generation twice on fail (#6987)