Skip to content

Commit

Permalink
Never make a header with value: null
Browse files Browse the repository at this point in the history
Empty string is valid, null is invalid.
  • Loading branch information
Phil Sturgeon committed Dec 6, 2017
1 parent 833f96c commit 13576bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/serializers/postman/v2.0/Serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ methods.createHeaderFromParameter = (param) => {
return { key, value: schema.enum[0] }
}

return { key, value: null }
return { key, value: '' }
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/serializers/postman/v2.0/__tests__/Serializer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ describe('serializers/swagger/v2.0/Serializer.js', () => {
]
const expected = [
null,
{ key: 123, value: null },
{ key: 123, value: '' },
{ key: 234, value: 'abc' },
{ key: 345, value: 'def' }
]
Expand Down

0 comments on commit 13576bb

Please sign in to comment.