Upgrading the generator to v7.1.0 brings in required field validation, which will enable the SDK to determine the schema of an object in an API response based on the presence or absence of required fields. In addition, v7.1.0 has enum validation built in, so we no longer need a custom template to implement that.
In order to generate valid code I had to remove some new defaultValue code from api.mustache, since that template code does not correctly handle array properties.
Upgrading the generator to v7.1.0 brings in required field validation, which will enable the SDK to determine the schema of an object in an API response based on the presence or absence of required fields. In addition, v7.1.0 has enum validation built in, so we no longer need a custom template to implement that.
In order to generate valid code I had to remove some new
defaultValue
code fromapi.mustache
, since that template code does not correctly handle array properties.