codeforamerica/ohana-api — pull request #176 by monfresh (2014-06-27 14:26:45+00:00)
Title: Remove grape dependency

This PR moves the API out of the Grape framework and into Rails controllers with Active Model Serializers.

Notable changes:

- The API now returns attributes whose values are nil or empty
- Search now returns a much smaller response since most clients won't need every table in the DB, which is what it used to return.
- After creating a new location, the response now only sends back the id, name, and slug in the JSON, along with a `Location` HTTP header with the URL to the new location. That should be all an admin client would need.
- Added support for API subdomains, to allow you to host your API at http://api.domain.org instead of http://domain.org/api
- Added support for developer subdomains, to allow you to host your developer portal at http://developer.domain.org
- Added ENV vars to configure subdomains and/or paths for the API and developer portal
- Added ENV vars to configure pagination settings (DEFAULT_PER_PAGE and MAX_PER_PAGE)
- Removed Swagger documentation because it was tied to the API implementation and not portable to Rails controllers. I'm thinking a static site with Markdown files would be the way to go.
- Validation errors now return 422 instead of 400