motiv-labs / janus

An API Gateway written in Go
https://hellofresh.gitbooks.io/janus
MIT License
2.79k stars 317 forks source link

Get the empty list in the output when definitions list is empty #341

Closed vgarvardt closed 6 years ago

vgarvardt commented 6 years ago

What does this PR do?

Definitions list request returns null in teh output when the list is empty. This PR fixes the output to return empty array in the JSON output for better API consistency.

Based on https://github.com/hellofresh/janus/issues/335 investigation

codecov[bot] commented 6 years ago

Codecov Report

Merging #341 into master will decrease coverage by 0.04%. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #341      +/-   ##
==========================================
- Coverage   41.41%   41.36%   -0.05%     
==========================================
  Files          74       74              
  Lines        2523     2526       +3     
==========================================
  Hits         1045     1045              
- Misses       1415     1418       +3     
  Partials       63       63
Impacted Files Coverage Δ
pkg/web/api_handler.go 0% <0%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 47d2efa...73d3b2b. Read the comment docs.