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

caicloud / nirvana / 595 / 1
60%
master: 46%

Build:
Build:
LAST BUILD BRANCH: dependabot/go_modules/github.com/prometheus/client_golang-1.11.1
DEFAULT BRANCH: master
Ran 09 Apr 2018 11:08AM UTC
Files 69
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

09 Apr 2018 07:19AM UTC coverage: 59.588%. First build
595.1

push

travis-ci

caicloud-bot
 feat(service): support ErrorProduces (#197)

Automatic merge from submit-queue.

 feat(service): support ErrorProduces

**What this PR does / why we need it**:

Add `ErrorProduces` into `Definition`. `ErrorProduces` is used to generate data for error. If this field is empty, it stands for this field equals to Produces. In some cases, succeessful data and error data should be generated in different ways.

e.g.
An API  returns a file (`Content-Type` is `application/java-archive`), but it may returns an error with `NotFound`. You can set `Definition` as:
```go
Produces: []string{"application/java-archive"},
ErrorProduces: []string{"application/json"},
```
If a file existing, the API returns a file with `Content-Type: application/java-archive`, and carries data by response body. If an error occurs, it returns an error json with `Content-Type: application/json`.

**Which issue(s) this PR fixes** *(optional, close the issue(s) when PR gets merged)*:

Fixes #169 

**Special notes for your reviewer**:

/cc @ddysher 

**Release note**:


```release-note
NONE
```

<!--  Thanks for sending a pull request! Here are some tips:

1. https://github.com/caicloud/engineering/blob/master/docs/review_conventions.md  <-- what is the review process looks like
2. https://github.com/caicloud/engineering/blob/master/docs/commit_conventions.md  <-- how to structure your git commit
3. https://github.com/caicloud/engineering/blob/master/docs/caicloud_bot.md        <-- how to work with caicloud bot

Other tips from Kubernetes cmomunity:

1. If this is your first time, read our contributor guidelines https://git.k8s.io/community/contributors/devel/pull-requests.md#the-pr-submit-process and developer guide https://git.k8s.io/community/contributors/devel/development.md#development-guide
2. If you want *faster* PR reviews, read how: https://git.k8s.io/community/contributors/devel/pull-requests.md#best-practices-for-faster-reviews
3. Follow the in... (continued)

3207 of 5382 relevant lines covered (59.59%)

36.09 hits per line

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