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

opentrials / api / 252 / 1
93%
master: 92%

Build:
Build:
LAST BUILD BRANCH: v1.1.1
DEFAULT BRANCH: master
Ran 24 May 2016 08:34AM UTC
Files 21
Run time 1s
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

24 May 2016 08:32AM UTC coverage: 93.13%. First build
252.1

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

Source Files on job 252.1
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 252
  • Travis Job 252.1
  • 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