Posted on: Written by: K-Sato
⚠️ This article was posted over a year go. The information might be outdated. ⚠️

Table of Contents

Installation

Add the gem to your Gemfile and run bundle install.

gem "olive_branch"

Add the following line to your config/application.rb

config.middleware.use OliveBranch::Middleware

Usage

Include a Key-Inflection header with values of camel, dash, snake or pascal in your JSON API requests on the frontend.

 headers: {
   'Key-Inflection': 'camel',
 }

Resources

About the author

I am a web-developer based somewhere on earth. I primarily code in TypeScript, Go and Ruby at work. React, RoR and Gin are my go-to Frameworks.