Closed mjgiarlo closed 2 years ago
We decided not to move forward with camels-to-snakes translation because the translation, we learned, leaks out of cocina-models to at least DSC and DSA and possibly many other locations. And given that concern and the timing of our work to replace Fedora and persist Cocina JSON directly, we are ending this work.
This is on hold until the week of April 18th, after other Cocina changes have gone out.
Why was this change made? 🤔
This commit allows models to keep JavaScript naming conventions in JSland (using camelCase for JSON-based Cocina data structures, e.g., in OpenAPI specifications) and Ruby naming conventions in Rubyland (using snake_case for Ruby bindings, e.g., hashes and method calls).
Fixes #335
Includes:
self.new
method into models even if they are not validatable to allow us to coerce attributes to underscore form (for Rubyland joy) at runtimeHow was this change tested? 🤨
CI