[BUG][Javascript] Constructors don't handle required fields with default values well
Created by: tray2100
Description
Currently the generator creates constructors where required fields are set to the parameters in the constructor. This is fine except when the parameters are null and there is a default value specified in the spec.
openapi-generator version
4.3.1
Suggest a fix
This can be fixed by just having the constructor assign either the incoming value or the default value if the incoming value is undefined. I'll submit a PR for this.