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

Require CloudEvents Source be a URI #414

Merged
merged 2 commits into from
Apr 26, 2018
Merged

Require CloudEvents Source be a URI #414

merged 2 commits into from
Apr 26, 2018

Conversation

alexdebrie
Copy link
Contributor

What did you implement:

Changed the validation requirement on the Source field of the Event struct to require a URI, rather than a URL. This is according to the CloudEvents spec.

How did you implement it:

Changed validation on Source from validate:"url,required" to validate:"uri,required".

I also changed the test that checks that a valid CloudEvent is not transformed into a CloudEvent. I changed the test case's source to be a URI rather than a URL so that we would catch this in the future.

How can we verify it:

Emit an event in CloudEvents format that uses a URI (not URL) in the source property. Make sure that it wasn't transformed into a CloudEvent.

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 01:55
@codecov
Copy link

codecov bot commented Apr 26, 2018

Codecov Report

Merging #414 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #414   +/-   ##
=======================================
  Coverage   63.85%   63.85%           
=======================================
  Files          29       29           
  Lines        1649     1649           
=======================================
  Hits         1053     1053           
  Misses        553      553           
  Partials       43       43
Impacted Files Coverage Δ
event/event.go 69.35% <ø> (ø) ⬆️

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 e3b1318...2e7980d. Read the comment docs.

@mthenw mthenw merged commit 529cc4a into master Apr 26, 2018
@mthenw mthenw deleted the CloudEventsSource branch April 26, 2018 07:05
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