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

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

Build:
Build:
LAST BUILD BRANCH: v1.3.1
DEFAULT BRANCH: master
Ran 28 Aug 2019 02:46PM UTC
Jobs 16
Files 22
Run time 4min
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
1711

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 1711.1 (2.4.6, MODEL_PARSER=grape-swagger-entity) 28 Aug 2019 02:46PM UTC 0
98.14
Travis Job 1711.1
2 1711.2 (2.5.5, MODEL_PARSER=grape-swagger-entity) 28 Aug 2019 02:47PM UTC 0
98.14
Travis Job 1711.2
3 1711.3 (2.6.3, MODEL_PARSER=grape-swagger-entity) 28 Aug 2019 02:47PM UTC 0
98.03
Travis Job 1711.3
4 1711.4 (2.4.6, MODEL_PARSER=grape-swagger-representable) 28 Aug 2019 02:46PM UTC 0
98.14
Travis Job 1711.4
5 1711.5 (2.5.5, MODEL_PARSER=grape-swagger-representable) 28 Aug 2019 02:47PM UTC 0
98.14
Travis Job 1711.5
6 1711.6 (2.6.3, MODEL_PARSER=grape-swagger-representable) 28 Aug 2019 02:47PM UTC 0
98.03
Travis Job 1711.6
7 1711.7 (2.4.6, GRAPE_VERSION=1.0.3) 28 Aug 2019 02:47PM UTC 0
99.12
Travis Job 1711.7
8 1711.8 (2.5.5, GRAPE_VERSION=1.0.3) 28 Aug 2019 02:48PM UTC 0
99.12
Travis Job 1711.8
9 1711.9 (2.6.3, GRAPE_VERSION=1.0.3) 28 Aug 2019 02:48PM UTC 0
99.02
Travis Job 1711.9
10 1711.10 (2.4.6, GRAPE_VERSION=1.2.4) 28 Aug 2019 02:48PM UTC 0
99.12
Travis Job 1711.10
11 1711.11 (2.5.5, GRAPE_VERSION=1.2.4) 28 Aug 2019 02:49PM UTC 0
99.12
Travis Job 1711.11
12 1711.12 (2.6.3, GRAPE_VERSION=1.2.4) 28 Aug 2019 02:49PM UTC 0
99.02
Travis Job 1711.12
13 1711.13 (2.4.6, GRAPE_VERSION=HEAD) 28 Aug 2019 02:50PM UTC 0
99.12
Travis Job 1711.13
14 1711.14 (2.5.5, GRAPE_VERSION=HEAD) 28 Aug 2019 02:50PM UTC 0
99.12
Travis Job 1711.14
15 1711.15 (2.6.3, GRAPE_VERSION=HEAD) 28 Aug 2019 02:50PM UTC 0
99.02
Travis Job 1711.15
17 1711.17 (ruby-head) 28 Aug 2019 02:50PM UTC 0
99.02
Travis Job 1711.17
Source Files on build 1711
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1711
  • 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