proschi 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,512 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://gvart.github.io/proschi/schema/proschi-diagram.schema.json",
4
+ "title": "Proschi parse result",
5
+ "description": "Output of `proschi parse <file>`: the diagram a Proschi document describes, plus parser diagnostics.",
6
+ "type": "object",
7
+ "properties": {
8
+ "diagram": {
9
+ "$ref": "#/$defs/diagram"
10
+ },
11
+ "diagnostics": {
12
+ "type": "array",
13
+ "items": {
14
+ "$ref": "#/$defs/diagnostic"
15
+ }
16
+ }
17
+ },
18
+ "required": [
19
+ "diagram",
20
+ "diagnostics"
21
+ ],
22
+ "additionalProperties": false,
23
+ "$defs": {
24
+ "loc": {
25
+ "type": "object",
26
+ "description": "1-based source position.",
27
+ "properties": {
28
+ "line": {
29
+ "type": "integer",
30
+ "minimum": 1
31
+ },
32
+ "col": {
33
+ "type": "integer",
34
+ "minimum": 1
35
+ },
36
+ "length": {
37
+ "type": "integer",
38
+ "minimum": 0
39
+ }
40
+ },
41
+ "required": [
42
+ "line",
43
+ "col",
44
+ "length"
45
+ ],
46
+ "additionalProperties": false
47
+ },
48
+ "diagnostic": {
49
+ "type": "object",
50
+ "properties": {
51
+ "severity": {
52
+ "enum": [
53
+ "error",
54
+ "warning"
55
+ ]
56
+ },
57
+ "message": {
58
+ "type": "string"
59
+ },
60
+ "line": {
61
+ "type": "integer",
62
+ "minimum": 1
63
+ },
64
+ "col": {
65
+ "type": "integer",
66
+ "minimum": 1
67
+ },
68
+ "length": {
69
+ "type": "integer",
70
+ "minimum": 0
71
+ }
72
+ },
73
+ "required": [
74
+ "severity",
75
+ "message",
76
+ "line",
77
+ "col",
78
+ "length"
79
+ ],
80
+ "additionalProperties": false
81
+ },
82
+ "diagram": {
83
+ "type": "object",
84
+ "properties": {
85
+ "title": {
86
+ "type": "string"
87
+ },
88
+ "nodes": {
89
+ "type": "array",
90
+ "items": {
91
+ "$ref": "#/$defs/node"
92
+ }
93
+ },
94
+ "edges": {
95
+ "type": "array",
96
+ "items": {
97
+ "$ref": "#/$defs/edge"
98
+ }
99
+ },
100
+ "useCases": {
101
+ "type": "array",
102
+ "items": {
103
+ "$ref": "#/$defs/useCase"
104
+ }
105
+ }
106
+ },
107
+ "required": [
108
+ "nodes",
109
+ "edges",
110
+ "useCases"
111
+ ],
112
+ "additionalProperties": false
113
+ },
114
+ "node": {
115
+ "type": "object",
116
+ "properties": {
117
+ "id": {
118
+ "type": "string"
119
+ },
120
+ "kind": {
121
+ "enum": [
122
+ "component",
123
+ "group",
124
+ "text"
125
+ ]
126
+ },
127
+ "name": {
128
+ "type": "string"
129
+ },
130
+ "type": {
131
+ "enum": [
132
+ "shape",
133
+ "service",
134
+ "serverless",
135
+ "compute",
136
+ "container",
137
+ "storage",
138
+ "database",
139
+ "cache",
140
+ "queue",
141
+ "cdn",
142
+ "external",
143
+ "text",
144
+ "group"
145
+ ]
146
+ },
147
+ "techStack": {
148
+ "enum": [
149
+ "Rectangle",
150
+ "Circle",
151
+ "Diamond",
152
+ "Cylinder",
153
+ "Cloud",
154
+ "Actor",
155
+ "Note",
156
+ "REST API",
157
+ "GraphQL",
158
+ "gRPC",
159
+ "WebSocket",
160
+ "SOAP API",
161
+ "AWS Lambda",
162
+ "AWS API Gateway",
163
+ "AWS EC2",
164
+ "AWS ECS",
165
+ "AWS EKS",
166
+ "AWS Fargate",
167
+ "AWS S3",
168
+ "AWS EBS",
169
+ "AWS EFS",
170
+ "AWS RDS",
171
+ "AWS DynamoDB",
172
+ "AWS ElastiCache",
173
+ "AWS Aurora",
174
+ "AWS SQS",
175
+ "AWS SNS",
176
+ "AWS EventBridge",
177
+ "AWS Kinesis",
178
+ "AWS CloudFront",
179
+ "AWS Route53",
180
+ "AWS Load Balancer",
181
+ "GCP Cloud Functions",
182
+ "GCP Cloud Run",
183
+ "GCP App Engine",
184
+ "GCP Compute Engine",
185
+ "GCP GKE",
186
+ "GCP Cloud Storage",
187
+ "GCP Persistent Disk",
188
+ "GCP Cloud SQL",
189
+ "GCP Firestore",
190
+ "GCP Bigtable",
191
+ "GCP Spanner",
192
+ "GCP BigQuery",
193
+ "GCP Pub/Sub",
194
+ "GCP Cloud CDN",
195
+ "GCP Cloud DNS",
196
+ "GCP Load Balancing",
197
+ "Azure Functions",
198
+ "Azure Logic Apps",
199
+ "Azure API Management",
200
+ "Azure VM",
201
+ "Azure AKS",
202
+ "Azure Container Instances",
203
+ "Azure Blob Storage",
204
+ "Azure Files",
205
+ "Azure Disk Storage",
206
+ "Azure SQL",
207
+ "Azure Cosmos DB",
208
+ "Azure Database for PostgreSQL",
209
+ "Azure Database for MySQL",
210
+ "Azure Cache for Redis",
211
+ "Azure Service Bus",
212
+ "Azure Event Hubs",
213
+ "Azure Event Grid",
214
+ "Azure Queue Storage",
215
+ "Azure CDN",
216
+ "Azure DNS",
217
+ "Azure Front Door",
218
+ "PostgreSQL",
219
+ "MySQL",
220
+ "MongoDB",
221
+ "Redis",
222
+ "DynamoDB",
223
+ "Cassandra",
224
+ "CouchDB",
225
+ "Elasticsearch",
226
+ "Neo4j",
227
+ "InfluxDB",
228
+ "TimescaleDB",
229
+ "MariaDB",
230
+ "SQLite",
231
+ "Oracle",
232
+ "SQL Server",
233
+ "Memcached",
234
+ "Hazelcast",
235
+ "Aerospike",
236
+ "Kafka",
237
+ "RabbitMQ",
238
+ "SQS",
239
+ "Redis Queue",
240
+ "NATS",
241
+ "Apache Pulsar",
242
+ "ActiveMQ",
243
+ "ZeroMQ",
244
+ "Third Party API",
245
+ "Payment Gateway",
246
+ "Auth Service",
247
+ "Email Service",
248
+ "SMS Service",
249
+ "Analytics Service",
250
+ "Text Note",
251
+ "Sticky Note",
252
+ "Comment",
253
+ "Logical Group",
254
+ "Network Boundary",
255
+ "Security Zone",
256
+ "Service Group"
257
+ ]
258
+ },
259
+ "ownerTeam": {
260
+ "type": "string"
261
+ },
262
+ "description": {
263
+ "type": "string"
264
+ },
265
+ "parent": {
266
+ "type": "string",
267
+ "description": "Id of the enclosing group."
268
+ },
269
+ "position": {
270
+ "type": "object",
271
+ "description": "Explicit `pos x,y`.",
272
+ "properties": {
273
+ "x": {
274
+ "type": "number"
275
+ },
276
+ "y": {
277
+ "type": "number"
278
+ }
279
+ },
280
+ "required": [
281
+ "x",
282
+ "y"
283
+ ],
284
+ "additionalProperties": false
285
+ },
286
+ "implicit": {
287
+ "type": "boolean",
288
+ "description": "Created because a connection or step referenced an undeclared id."
289
+ },
290
+ "loc": {
291
+ "$ref": "#/$defs/loc"
292
+ }
293
+ },
294
+ "required": [
295
+ "id",
296
+ "kind",
297
+ "name",
298
+ "type",
299
+ "techStack",
300
+ "loc"
301
+ ],
302
+ "additionalProperties": false
303
+ },
304
+ "edge": {
305
+ "type": "object",
306
+ "properties": {
307
+ "id": {
308
+ "type": "string"
309
+ },
310
+ "source": {
311
+ "type": "string"
312
+ },
313
+ "target": {
314
+ "type": "string"
315
+ },
316
+ "label": {
317
+ "type": "string"
318
+ },
319
+ "loc": {
320
+ "$ref": "#/$defs/loc"
321
+ }
322
+ },
323
+ "required": [
324
+ "id",
325
+ "source",
326
+ "target",
327
+ "loc"
328
+ ],
329
+ "additionalProperties": false
330
+ },
331
+ "useCase": {
332
+ "type": "object",
333
+ "properties": {
334
+ "id": {
335
+ "type": "string"
336
+ },
337
+ "name": {
338
+ "type": "string"
339
+ },
340
+ "description": {
341
+ "type": "string"
342
+ },
343
+ "entryServiceId": {
344
+ "type": "string"
345
+ },
346
+ "endpoint": {
347
+ "type": "string",
348
+ "description": "`METHOD /path` of the first step, if it is an HTTP call."
349
+ },
350
+ "steps": {
351
+ "type": "array",
352
+ "items": {
353
+ "$ref": "#/$defs/step"
354
+ },
355
+ "description": "Steps of the first scenario."
356
+ },
357
+ "scenarios": {
358
+ "type": "array",
359
+ "items": {
360
+ "$ref": "#/$defs/scenario"
361
+ },
362
+ "minItems": 1
363
+ },
364
+ "loc": {
365
+ "$ref": "#/$defs/loc"
366
+ }
367
+ },
368
+ "required": [
369
+ "id",
370
+ "name",
371
+ "steps",
372
+ "scenarios",
373
+ "loc"
374
+ ],
375
+ "additionalProperties": false
376
+ },
377
+ "scenario": {
378
+ "type": "object",
379
+ "properties": {
380
+ "id": {
381
+ "type": "string"
382
+ },
383
+ "name": {
384
+ "type": "string"
385
+ },
386
+ "outcome": {
387
+ "enum": [
388
+ "success",
389
+ "error"
390
+ ]
391
+ },
392
+ "steps": {
393
+ "type": "array",
394
+ "items": {
395
+ "$ref": "#/$defs/step"
396
+ }
397
+ },
398
+ "loc": {
399
+ "$ref": "#/$defs/loc"
400
+ }
401
+ },
402
+ "required": [
403
+ "id",
404
+ "name",
405
+ "outcome",
406
+ "steps",
407
+ "loc"
408
+ ],
409
+ "additionalProperties": false
410
+ },
411
+ "step": {
412
+ "type": "object",
413
+ "properties": {
414
+ "id": {
415
+ "type": "string"
416
+ },
417
+ "stepOrder": {
418
+ "type": "integer"
419
+ },
420
+ "stepName": {
421
+ "type": "string"
422
+ },
423
+ "fromServiceId": {
424
+ "type": "string"
425
+ },
426
+ "toServiceId": {
427
+ "type": "string"
428
+ },
429
+ "protocol": {
430
+ "enum": [
431
+ "REST",
432
+ "GRPC",
433
+ "SOAP",
434
+ "GRAPHQL",
435
+ "MESSAGING",
436
+ "OTHER"
437
+ ]
438
+ },
439
+ "httpMethod": {
440
+ "type": "string"
441
+ },
442
+ "endpoint": {
443
+ "type": "string"
444
+ },
445
+ "requestFormat": {
446
+ "enum": [
447
+ "JSON",
448
+ "XML",
449
+ "FREE_TEXT"
450
+ ]
451
+ },
452
+ "requestBody": {
453
+ "type": "string"
454
+ },
455
+ "responseFormat": {
456
+ "enum": [
457
+ "JSON",
458
+ "XML",
459
+ "FREE_TEXT"
460
+ ]
461
+ },
462
+ "responseBody": {
463
+ "type": "string"
464
+ },
465
+ "statusCode": {
466
+ "type": "integer"
467
+ },
468
+ "description": {
469
+ "type": "string"
470
+ },
471
+ "executionType": {
472
+ "enum": [
473
+ "SYNC_REQUEST_RESPONSE",
474
+ "ASYNC_FIRE_AND_FORGET",
475
+ "ASYNC_REQUEST_RESPONSE"
476
+ ]
477
+ },
478
+ "parallelGroup": {
479
+ "type": "integer"
480
+ },
481
+ "isParallel": {
482
+ "type": "boolean"
483
+ },
484
+ "isConditional": {
485
+ "type": "boolean"
486
+ },
487
+ "conditionExpression": {
488
+ "type": "string"
489
+ },
490
+ "failed": {
491
+ "type": "boolean",
492
+ "description": "Written `a -x b`: the call never got an answer."
493
+ }
494
+ },
495
+ "required": [
496
+ "stepOrder",
497
+ "stepName",
498
+ "fromServiceId",
499
+ "toServiceId",
500
+ "protocol",
501
+ "httpMethod",
502
+ "endpoint",
503
+ "requestFormat",
504
+ "responseFormat",
505
+ "executionType",
506
+ "isParallel",
507
+ "isConditional"
508
+ ],
509
+ "additionalProperties": false
510
+ }
511
+ }
512
+ }