Skip to content

Commit e52902f

Browse files
committed
add schemas for service-to-service event examples
Signed-off-by: Lance Drane <[email protected]>
1 parent dd41396 commit e52902f

File tree

2 files changed

+298
-0
lines changed

2 files changed

+298
-0
lines changed
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
{
2+
"asyncapi": "2.6.0",
3+
"x-intersect-version": "0.8.1",
4+
"info": {
5+
"title": "example-organization.example-facility.example-system.example-subsystem.exposed-service",
6+
"description": "INTERSECT schema",
7+
"version": "0.0.0"
8+
},
9+
"defaultContentType": "application/json",
10+
"capabilities": {
11+
"ExposedService": {
12+
"channels": {},
13+
"description": "Exposed service capability."
14+
}
15+
},
16+
"events": {
17+
"exposed_service_event": {
18+
"type": "string"
19+
}
20+
},
21+
"status": {
22+
"type": "null"
23+
},
24+
"components": {
25+
"schemas": {},
26+
"messageTraits": {
27+
"commonHeaders": {
28+
"messageHeaders": {
29+
"$defs": {
30+
"IntersectDataHandler": {
31+
"description": "What data transfer type do you want to use for handling the request/response?\n\nDefault: MESSAGE",
32+
"enum": [
33+
0,
34+
1
35+
],
36+
"title": "IntersectDataHandler",
37+
"type": "integer"
38+
}
39+
},
40+
"description": "Matches the current header definition for INTERSECT messages.\n\nALL messages should contain this header.",
41+
"properties": {
42+
"source": {
43+
"description": "source of the message",
44+
"pattern": "([-a-z0-9]+\\.)*[-a-z0-9]",
45+
"title": "Source",
46+
"type": "string"
47+
},
48+
"destination": {
49+
"description": "destination of the message",
50+
"pattern": "([-a-z0-9]+\\.)*[-a-z0-9]",
51+
"title": "Destination",
52+
"type": "string"
53+
},
54+
"created_at": {
55+
"description": "the UTC timestamp of message creation",
56+
"format": "date-time",
57+
"title": "Created At",
58+
"type": "string"
59+
},
60+
"sdk_version": {
61+
"description": "SemVer string of SDK's version, used to check for compatibility",
62+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
63+
"title": "Sdk Version",
64+
"type": "string"
65+
},
66+
"data_handler": {
67+
"allOf": [
68+
{
69+
"$ref": "#/components/messageTraits/commonHeaders/userspaceHeaders/$defs/IntersectDataHandler"
70+
}
71+
],
72+
"default": 0,
73+
"description": "Code signifying where data is stored."
74+
},
75+
"has_error": {
76+
"default": false,
77+
"description": "If this value is True, the payload will contain the error message (a string)",
78+
"title": "Has Error",
79+
"type": "boolean"
80+
}
81+
},
82+
"required": [
83+
"source",
84+
"destination",
85+
"created_at",
86+
"sdk_version"
87+
],
88+
"title": "UserspaceMessageHeader",
89+
"type": "object"
90+
},
91+
"eventHeaders": {
92+
"$defs": {
93+
"IntersectDataHandler": {
94+
"description": "What data transfer type do you want to use for handling the request/response?\n\nDefault: MESSAGE",
95+
"enum": [
96+
0,
97+
1
98+
],
99+
"title": "IntersectDataHandler",
100+
"type": "integer"
101+
}
102+
},
103+
"description": "Matches the current header definition for INTERSECT messages.\n\nALL messages should contain this header.",
104+
"properties": {
105+
"source": {
106+
"description": "source of the message",
107+
"pattern": "([-a-z0-9]+\\.)*[-a-z0-9]",
108+
"title": "Source",
109+
"type": "string"
110+
},
111+
"created_at": {
112+
"description": "the UTC timestamp of message creation",
113+
"format": "date-time",
114+
"title": "Created At",
115+
"type": "string"
116+
},
117+
"sdk_version": {
118+
"description": "SemVer string of SDK's version, used to check for compatibility",
119+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
120+
"title": "Sdk Version",
121+
"type": "string"
122+
},
123+
"data_handler": {
124+
"allOf": [
125+
{
126+
"$ref": "#/components/messageTraits/commonHeaders/eventHeaders/$defs/IntersectDataHandler"
127+
}
128+
],
129+
"default": 0,
130+
"description": "Code signifying where data is stored."
131+
},
132+
"event_name": {
133+
"title": "Event Name",
134+
"type": "string"
135+
}
136+
},
137+
"required": [
138+
"source",
139+
"created_at",
140+
"sdk_version",
141+
"event_name"
142+
],
143+
"title": "EventMessageHeaders",
144+
"type": "object"
145+
}
146+
}
147+
}
148+
}
149+
}
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
{
2+
"asyncapi": "2.6.0",
3+
"x-intersect-version": "0.8.1",
4+
"info": {
5+
"title": "example-organization.example-facility.example-system.example-subsystem.internal-service",
6+
"description": "INTERSECT schema",
7+
"version": "0.0.0"
8+
},
9+
"defaultContentType": "application/json",
10+
"capabilities": {
11+
"InternalService": {
12+
"channels": {},
13+
"description": "Internal service capability."
14+
}
15+
},
16+
"events": {
17+
"internal_service_event": {
18+
"type": "string"
19+
}
20+
},
21+
"status": {
22+
"type": "null"
23+
},
24+
"components": {
25+
"schemas": {},
26+
"messageTraits": {
27+
"commonHeaders": {
28+
"messageHeaders": {
29+
"$defs": {
30+
"IntersectDataHandler": {
31+
"description": "What data transfer type do you want to use for handling the request/response?\n\nDefault: MESSAGE",
32+
"enum": [
33+
0,
34+
1
35+
],
36+
"title": "IntersectDataHandler",
37+
"type": "integer"
38+
}
39+
},
40+
"description": "Matches the current header definition for INTERSECT messages.\n\nALL messages should contain this header.",
41+
"properties": {
42+
"source": {
43+
"description": "source of the message",
44+
"pattern": "([-a-z0-9]+\\.)*[-a-z0-9]",
45+
"title": "Source",
46+
"type": "string"
47+
},
48+
"destination": {
49+
"description": "destination of the message",
50+
"pattern": "([-a-z0-9]+\\.)*[-a-z0-9]",
51+
"title": "Destination",
52+
"type": "string"
53+
},
54+
"created_at": {
55+
"description": "the UTC timestamp of message creation",
56+
"format": "date-time",
57+
"title": "Created At",
58+
"type": "string"
59+
},
60+
"sdk_version": {
61+
"description": "SemVer string of SDK's version, used to check for compatibility",
62+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
63+
"title": "Sdk Version",
64+
"type": "string"
65+
},
66+
"data_handler": {
67+
"allOf": [
68+
{
69+
"$ref": "#/components/messageTraits/commonHeaders/userspaceHeaders/$defs/IntersectDataHandler"
70+
}
71+
],
72+
"default": 0,
73+
"description": "Code signifying where data is stored."
74+
},
75+
"has_error": {
76+
"default": false,
77+
"description": "If this value is True, the payload will contain the error message (a string)",
78+
"title": "Has Error",
79+
"type": "boolean"
80+
}
81+
},
82+
"required": [
83+
"source",
84+
"destination",
85+
"created_at",
86+
"sdk_version"
87+
],
88+
"title": "UserspaceMessageHeader",
89+
"type": "object"
90+
},
91+
"eventHeaders": {
92+
"$defs": {
93+
"IntersectDataHandler": {
94+
"description": "What data transfer type do you want to use for handling the request/response?\n\nDefault: MESSAGE",
95+
"enum": [
96+
0,
97+
1
98+
],
99+
"title": "IntersectDataHandler",
100+
"type": "integer"
101+
}
102+
},
103+
"description": "Matches the current header definition for INTERSECT messages.\n\nALL messages should contain this header.",
104+
"properties": {
105+
"source": {
106+
"description": "source of the message",
107+
"pattern": "([-a-z0-9]+\\.)*[-a-z0-9]",
108+
"title": "Source",
109+
"type": "string"
110+
},
111+
"created_at": {
112+
"description": "the UTC timestamp of message creation",
113+
"format": "date-time",
114+
"title": "Created At",
115+
"type": "string"
116+
},
117+
"sdk_version": {
118+
"description": "SemVer string of SDK's version, used to check for compatibility",
119+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
120+
"title": "Sdk Version",
121+
"type": "string"
122+
},
123+
"data_handler": {
124+
"allOf": [
125+
{
126+
"$ref": "#/components/messageTraits/commonHeaders/eventHeaders/$defs/IntersectDataHandler"
127+
}
128+
],
129+
"default": 0,
130+
"description": "Code signifying where data is stored."
131+
},
132+
"event_name": {
133+
"title": "Event Name",
134+
"type": "string"
135+
}
136+
},
137+
"required": [
138+
"source",
139+
"created_at",
140+
"sdk_version",
141+
"event_name"
142+
],
143+
"title": "EventMessageHeaders",
144+
"type": "object"
145+
}
146+
}
147+
}
148+
}
149+
}

0 commit comments

Comments
 (0)