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

caicloud / nirvana
60%
master: 46%

Build:
Build:
LAST BUILD BRANCH: dependabot/go_modules/github.com/prometheus/client_golang-1.11.1
DEFAULT BRANCH: master
Repo Added 10 Nov 2017 02:34PM UTC
Files 49
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

LAST BUILD ON BRANCH v0.1.0-alpha.2
branch: v0.1.0-alpha.2
CHANGE BRANCH
x
Reset
  • v0.1.0-alpha.2
  • Jimexist-patch-1
  • add-landscape-badge
  • add-linter
  • fix-builder
  • master
  • plugins
  • pr/115
  • release-0.1
  • release-0.2
  • release-0.3
  • release-1.0
  • revert-342-handler
  • revert-358-cherry-pick-342-to-release-0.2
  • v0.1.0
  • v0.1.0-alpha.0
  • v0.1.0-alpha.1
  • v0.1.0-beta.0
  • v0.2.0
  • v0.2.0-alpha.0
  • v0.2.0-alpha.1
  • v0.2.0-alpha.2
  • v0.2.1
  • v0.2.10
  • v0.2.2
  • v0.2.3
  • v0.2.4
  • v0.2.5
  • v0.2.6
  • v0.2.7
  • v0.2.8
  • v0.2.9
  • v0.3.0-alpha.1
  • v1.0.0-alpha.0

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

Relevant lines Covered
Build:
Build:
5382 RELEVANT LINES 3207 COVERED LINES
72.2 HITS PER LINE
Source Files on v0.1.0-alpha.2
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
595 v0.1.0-alpha.2 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... push 09 Apr 2018 11:07AM UTC caicloud-bot travis-ci pending completion  
See All Builds (1049)
  • Repo 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

© 2025 Coveralls, Inc