Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle +json Content-Type in accordance with RFC6839 #416

Merged
merged 2 commits into from
Apr 27, 2018
Merged

Conversation

alexdebrie
Copy link
Contributor

What did you implement:

Handles *+json Content-Types in accordance with RFC6839. This is important for CloudEvents interop, which may be sent in application/cloudevents+json format.

Todos:

  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

@alexdebrie alexdebrie requested a review from mthenw April 26, 2018 19:21
@codecov
Copy link

codecov bot commented Apr 26, 2018

Codecov Report

Merging #416 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #416      +/-   ##
=========================================
+ Coverage   63.85%   63.9%   +0.04%     
=========================================
  Files          29      29              
  Lines        1649    1651       +2     
=========================================
+ Hits         1053    1055       +2     
  Misses        553     553              
  Partials       43      43
Impacted Files Coverage Δ
event/event.go 70.31% <100%> (+0.95%) ⬆️

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 5bf5be8...9a42b98. Read the comment docs.

@@ -92,6 +92,26 @@ var newTests = []struct {
Data: "test",
},
},
{
// valid CloudEvent with application/cloudevents+json Content-Type
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexdebrie should we accept CloudEvents with application/json content type?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mthenw Yea, I think we should. Not strictly according to CloudEvents spec, but 'be liberal in what you accept'.

@mthenw mthenw merged commit 744f4e0 into master Apr 27, 2018
@mthenw mthenw deleted the JsonHandling branch April 27, 2018 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants