code-corps / deprecated-code-corps-rails-api

Rails API for Code Corps.
https://codecorps.org
MIT License
25 stars 15 forks source link

Find better way of documenting coalesced ids #485

Closed joshsmith closed 8 years ago

joshsmith commented 8 years ago

Per @begedin's comments:

This is the last thing that bugs me in the documentation at the moment. JSON API (and ember-data) coalesce ids by applying the following hash to the query string:

{
  filter: {
    id: "1,2,3,etc"
  }
}

This then ends up serialized in a get request as ?filter[id]=1,2,3. Thing is, it looks like API Blueprint doesn't support that. Giving a hash as a parameter fails completely, as does an object. Providing filter[id] as a single parameter, as done here, sort of works, but still not really, since it doesn't apply it to the test request we can do on the documentation page. I'm not sure if there's a better way to do this, so I'm open for suggestions.