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

ruby-grape / grape-swagger / 1710
99%
master: 100%

Build:
Build:
LAST BUILD BRANCH: v1.3.1
DEFAULT BRANCH: master
Ran 28 Aug 2019 12:56PM UTC
Jobs 16
Files 22
Run time 8min
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
1710

Pull #756

travis-ci

web-flow
Fix reference creation when two types are provided

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`.
Pull Request #756: Fix reference creation when two types are provided

3 of 3 new or added lines in 1 file covered. (100.0%)

890 of 896 relevant lines covered (99.33%)

4890.51 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1710.1 (2.4.6, MODEL_PARSER=grape-swagger-entity) 28 Aug 2019 12:58PM UTC 0
98.14
Travis Job 1710.1
2 1710.2 (2.5.5, MODEL_PARSER=grape-swagger-entity) 28 Aug 2019 12:59PM UTC 0
98.14
Travis Job 1710.2
3 1710.3 (2.6.3, MODEL_PARSER=grape-swagger-entity) 28 Aug 2019 12:59PM UTC 0
98.03
Travis Job 1710.3
4 1710.4 (2.4.6, MODEL_PARSER=grape-swagger-representable) 28 Aug 2019 12:56PM UTC 0
98.14
Travis Job 1710.4
5 1710.5 (2.5.5, MODEL_PARSER=grape-swagger-representable) 28 Aug 2019 12:59PM UTC 0
98.14
Travis Job 1710.5
6 1710.6 (2.6.3, MODEL_PARSER=grape-swagger-representable) 28 Aug 2019 12:59PM UTC 0
98.03
Travis Job 1710.6
7 1710.7 (2.4.6, GRAPE_VERSION=1.0.3) 28 Aug 2019 01:03PM UTC 0
99.12
Travis Job 1710.7
8 1710.8 (2.5.5, GRAPE_VERSION=1.0.3) 28 Aug 2019 01:00PM UTC 0
99.12
Travis Job 1710.8
9 1710.9 (2.6.3, GRAPE_VERSION=1.0.3) 28 Aug 2019 01:00PM UTC 0
99.02
Travis Job 1710.9
10 1710.10 (2.4.6, GRAPE_VERSION=1.2.4) 28 Aug 2019 01:03PM UTC 0
99.12
Travis Job 1710.10
11 1710.11 (2.5.5, GRAPE_VERSION=1.2.4) 28 Aug 2019 01:00PM UTC 0
99.12
Travis Job 1710.11
12 1710.12 (2.6.3, GRAPE_VERSION=1.2.4) 28 Aug 2019 01:03PM UTC 0
99.02
Travis Job 1710.12
13 1710.13 (2.4.6, GRAPE_VERSION=HEAD) 28 Aug 2019 01:02PM UTC 0
99.12
Travis Job 1710.13
14 1710.14 (2.5.5, GRAPE_VERSION=HEAD) 28 Aug 2019 01:02PM UTC 0
99.12
Travis Job 1710.14
15 1710.15 (2.6.3, GRAPE_VERSION=HEAD) 28 Aug 2019 01:03PM UTC 0
99.02
Travis Job 1710.15
17 1710.17 (ruby-head) 28 Aug 2019 01:04PM UTC 0
99.02
Travis Job 1710.17
Source Files on build 1710
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1710
  • Pull Request #756
  • PR Base - master (#1709)
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