This repository was archived by the owner on Dec 9, 2024. It is now read-only.
Commit 529cc4a 1 parent e3b1318 commit 529cc4a Copy full SHA for 529cc4a
File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ type Event struct {
40
40
EventType Type `json:"eventType" validate:"required"`
41
41
EventTypeVersion string `json:"eventTypeVersion,omitempty"`
42
42
CloudEventsVersion string `json:"cloudEventsVersion" validate:"required"`
43
- Source string `json:"source" validate:"url ,required"`
43
+ Source string `json:"source" validate:"uri ,required"`
44
44
EventID string `json:"eventID" validate:"required"`
45
45
EventTime time.Time `json:"eventTime,omitempty"`
46
46
SchemaURL string `json:"schemaURL,omitempty"`
Original file line number Diff line number Diff line change @@ -79,15 +79,15 @@ var newTests = []struct {
79
79
[]byte (`{
80
80
"eventType": "user.created",
81
81
"cloudEventsVersion": "` + eventpkg .TransformationVersion + `",
82
- "source": "https://example.com/ ",
82
+ "source": "/mysource ",
83
83
"eventID": "6f6ada3b-0aa2-4b3c-989a-91ffc6405f11",
84
84
"contentType": "text/plain",
85
85
"data": "test"
86
86
}` ),
87
87
eventpkg.Event {
88
88
EventType : eventpkg .Type ("user.created" ),
89
89
CloudEventsVersion : eventpkg .TransformationVersion ,
90
- Source : "https://example.com/ " ,
90
+ Source : "/mysource " ,
91
91
ContentType : "text/plain" ,
92
92
Data : "test" ,
93
93
},
You can’t perform that action at this time.
0 commit comments