File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,8 @@ cloudevent01
62
62
.source (" urn:event:from:myapi/resourse/123" );
63
63
64
64
/*
65
- * Backward compatibility by injecting methods from spec implementation to Cloudevent
65
+ * Backward compatibility to spec 0.1 by injecting methods from spec implementation
66
+ * to Cloudevent
66
67
*/
67
68
cloudevent01
68
69
.eventTypeVersion (" 1.0" );
@@ -88,12 +89,16 @@ cloudevent02
88
89
``` js
89
90
var Cloudevent = require (" cloudevents-sdk" );
90
91
91
- var cloudevent = new Cloudevent ()
92
- .type (" com.github.pull.create" )
93
- .source (" urn:event:from:myapi/resourse/123" );
92
+ /*
93
+ * Creates an instance with default spec and format
94
+ */
95
+ var cloudevent =
96
+ new Cloudevent ()
97
+ .type (" com.github.pull.create" )
98
+ .source (" urn:event:from:myapi/resourse/123" );
94
99
95
100
/*
96
- * Format the payload and return it.
101
+ * Format the payload and return it
97
102
*/
98
103
var formatted = cloudevent .format ();
99
104
You can’t perform that action at this time.
0 commit comments