atomicjolt / lms_api

Ruby wrapper for the Canvas API
MIT License
6 stars 2 forks source link

Fixes Enum generation for `ruby-grapqhl` and filters Canvas deprecation warning #32

Closed seanrcollings closed 3 years ago

seanrcollings commented 3 years ago

Canvas placed a deprecation warning for a field in Edit Assignment. This propagates to the JSON that we consume to generate the gems and causes a syntax error. This adds a method to filter out repeat parameters from the list. Currently, it looks like Canvas only has done this for that field, but this should handle future ones too.

Additionally, it also fixes an issue with Ruby GraphQL 1.12. At some point, it changed the way that it handle Enum types which causes the gem to fail. To fix this, we move the enums within their containing class instead of withing the module so it's always the local version.