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

ruby-grape / grape-swagger / 1716 / 5
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 05 Sep 2019 01:16PM UTC
Files 22
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

05 Sep 2019 01:14PM UTC coverage: 98.138%. First build
2.5.5, MODEL_PARSER=grape-swagger-representable

push

travis-ci

LeFnord
Fix reference creation when two types are provided (#756)

Previously the type from param definition would be used to documentation
even if we try to override it in the `documentation` hash.
It caused Swagger UI to render, for example, "Unknown Type: Color"
instead of using the provided entity.

It terms of code, before this change we would return something like this:
{ color: { type: 'Color' }
instead of:
{ color: { '$ref' => 'ColorEntity' }
if Color is not inherited from Grape::Entity

Having different types can be useful when two different classes
are used for parsing and presenting an attribute.
E.g. the input format for Base64 File can be represented as a Hash (content,
content_type and filename), whereas the type after parsing can be
ActionDispatch::Http::UploadedFile.

In the current situation the solution to this problem is to put coercion
methods to the same entity and specify `type` only for the param without
using `documentation`.

896 of 913 relevant lines covered (98.14%)

312.59 hits per line

Source Files on job 1716.5 (2.5.5, MODEL_PARSER=grape-swagger-representable)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1677
  • Travis Job 1716.5
  • 204ced46 on github
  • Next Job for 2.5.5, MODEL_PARSER=grape-swagger-representable on master (#1718.5)
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