• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

opentrials / api / 252
93%
master: 92%

Build:
Build:
LAST BUILD BRANCH: v1.1.1
DEFAULT BRANCH: master
Ran 24 May 2016 08:34AM UTC
Jobs 1
Files 21
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
252

push

travis-ci

vitorbaptista
[#111] Simplify our API's responses

Now that many fields from pivot tables were removed, we can simplify our API's
responses. Mainly, relationships between Trials and other entities (for
example, Person) were changed from:

```javascript
{
  // trial's attributes ...
  persons: [
    {
      attributes: {
         id: 'foo',
         name: 'Joanne Smith',
      },
      role: 'principal_investigator',
    }
  ],
}
```

To:

```javascript
{
  // trial's attributes ...
  persons: [
    {
      id: 'foo',
      name: 'Joanne Smith',
      role: 'principal_investigator',
    }
  ],
}
```

This flattens a bit our API response, which makes it more readable in my
opinion. The issue is that attribute names in the model can clash with names in
the pivot tables. We could use, for example, underscores to identify model from
pivot table's attributes (`_role` instead of `role`), but I don't think that'll
be needed.

opentrials/opentrials#111

244 of 262 relevant lines covered (93.13%)

28.05 hits per line

Jobs
ID Job ID Ran Files Coverage
1 252.1 24 May 2016 08:34AM UTC 0
93.13
Travis Job 252.1
Source Files on build 252
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #252
  • ae4fdbab on github
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc