Skip to content

Commit 6d00527

Browse files
authored
feat(collector): require subject in cloudevents.spec.json (#2503)
1 parent a500ecd commit 6d00527

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

cloudevents.spec.json

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,7 @@
4141
"description": "Content type of the data value. Must adhere to RFC 2046 format.",
4242
"$ref": "#/definitions/datacontenttypedef",
4343
"examples": [
44-
"text/xml",
45-
"application/json",
46-
"image/png",
47-
"multipart/form-data"
44+
"application/json"
4845
]
4946
},
5047
"dataschema": {
@@ -67,10 +64,7 @@
6764
},
6865
"data": {
6966
"description": "The event payload.",
70-
"$ref": "#/definitions/datadef",
71-
"examples": [
72-
"<much wow=\"xml\"/>"
73-
]
67+
"$ref": "#/definitions/datadef"
7468
},
7569
"data_base64": {
7670
"description": "Base64 encoded event payload. Must adhere to RFC4648.",
@@ -80,7 +74,7 @@
8074
]
8175
}
8276
},
83-
"required": ["id", "source", "specversion", "type"],
77+
"required": ["id", "source", "specversion", "type", "subject"],
8478
"definitions": {
8579
"iddef": {
8680
"type": "string",
@@ -118,7 +112,8 @@
118112
"minLength": 1
119113
},
120114
"datadef": {
121-
"type": ["object", "string", "number", "array", "boolean", "null"]
115+
"type": ["object", "null"],
116+
"additionalProperties": true
122117
},
123118
"data_base64def": {
124119
"type": ["string", "null"],

0 commit comments

Comments
 (0)