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

caicloud / nirvana / 595
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:07AM UTC
Jobs 2
Files 69
Run time 50s
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
595

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%)

72.2 hits per line

Jobs
ID Job ID Ran Files Coverage
1 595.1 09 Apr 2018 11:08AM UTC 0
59.59
Travis Job 595.1
2 595.2 09 Apr 2018 11:07AM UTC 0
59.59
Travis Job 595.2
Source Files on build 595
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #595
  • 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