Skip to content

Commit 052d928

Browse files
authored
Add "subject" and "time" to the set of validated CloudEvent fields (#66)
1 parent 30021fe commit 052d928

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

events/validators.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,21 @@ func validateCloudEvent(name string, gotBytes, wantBytes []byte) *ValidationInfo
230230
gotValue: got.Source(),
231231
wantValue: want.Source(),
232232
},
233+
{
234+
name: "subject",
235+
gotValue: got.Subject(),
236+
wantValue: want.Subject(),
237+
},
233238
{
234239
name: "type",
235240
gotValue: got.Type(),
236241
wantValue: want.Type(),
237242
},
243+
{
244+
name: "time",
245+
gotValue: got.Time(),
246+
wantValue: want.Time(),
247+
},
238248
{
239249
name: "datacontenttype",
240250
gotValue: got.DataContentType(),

0 commit comments

Comments
 (0)