ynab / ynab-sdk-ruby

YNAB API Client for Ruby
https://api.ynab.com
Apache License 2.0
65 stars 12 forks source link

Gracefully handle invalid transaction flag values from server #82

Closed bradymholt closed 2 weeks ago

bradymholt commented 1 month ago

The OpenAPI Generator, by default, throws an error if enum type data is received from the server that is not defined in the spec. In theory, the spec should always match what the server returns but in some cases there are unexpected values (new enum values not introduced in client, old enum values no longer in use, etc., bugs).

To work around this, we'll gracefully handle unsupported values by converting them to nil in the client, rather than throwing an error.

Fixes #81

github-actions[bot] commented 2 weeks ago

The changes in this PR were just released in 3.6.0 🎉.