After a lot of browsing, I finally found the answer here - https://github.com/swagger-api/swagger-codegen/issues/5309#issuecomment-1572836790.