yarramate 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.
- package/LICENSE +21 -0
- package/README.md +174 -0
- package/dist/adapter-mapping.d.ts +40 -0
- package/dist/adapter-mapping.js +200 -0
- package/dist/adapters/graphify-cli.d.ts +3 -0
- package/dist/adapters/graphify-cli.js +127 -0
- package/dist/adapters/graphify-entry.d.ts +1 -0
- package/dist/adapters/graphify-entry.js +1 -0
- package/dist/adapters/graphify.d.ts +23 -0
- package/dist/adapters/graphify.js +47 -0
- package/dist/adapters/likec4-cli.d.ts +3 -0
- package/dist/adapters/likec4-cli.js +662 -0
- package/dist/adapters/likec4-export.d.ts +25 -0
- package/dist/adapters/likec4-export.js +204 -0
- package/dist/adapters/likec4-kind-mapping.d.ts +22 -0
- package/dist/adapters/likec4-kind-mapping.js +60 -0
- package/dist/adapters/likec4-prepare.d.ts +28 -0
- package/dist/adapters/likec4-prepare.js +154 -0
- package/dist/adapters/likec4-project.d.ts +58 -0
- package/dist/adapters/likec4-project.js +176 -0
- package/dist/adapters/likec4.d.ts +4 -0
- package/dist/adapters/likec4.js +4 -0
- package/dist/architecture-state.d.ts +22 -0
- package/dist/architecture-state.js +63 -0
- package/dist/check-command.d.ts +2 -0
- package/dist/check-command.js +232 -0
- package/dist/cli-support.d.ts +24 -0
- package/dist/cli-support.js +81 -0
- package/dist/cli.d.ts +4 -0
- package/dist/cli.js +575 -0
- package/dist/compiler.d.ts +66 -0
- package/dist/compiler.js +940 -0
- package/dist/core-contract.d.ts +43 -0
- package/dist/core-contract.js +162 -0
- package/dist/evidence.d.ts +58 -0
- package/dist/evidence.js +161 -0
- package/dist/graph.d.ts +2 -0
- package/dist/graph.js +37 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +9 -0
- package/dist/profile.d.ts +30 -0
- package/dist/profile.js +162 -0
- package/dist/projection.d.ts +42 -0
- package/dist/projection.js +183 -0
- package/dist/reconciliation.d.ts +26 -0
- package/dist/reconciliation.js +47 -0
- package/dist/source-document.d.ts +24 -0
- package/dist/source-document.js +80 -0
- package/dist/workspace.d.ts +29 -0
- package/dist/workspace.js +114 -0
- package/docs/CONSUMING-YARRAMATE.md +145 -0
- package/package.json +110 -0
- package/schema/yarramate-adapter-mapping.schema.json +59 -0
- package/schema/yarramate-check-result.schema.json +92 -0
- package/schema/yarramate-core-contract.schema.json +132 -0
- package/schema/yarramate-diagnostic-result.schema.json +64 -0
- package/schema/yarramate-document.schema.json +168 -0
- package/schema/yarramate-evidence-report.schema.json +73 -0
- package/schema/yarramate-evidence.schema.json +92 -0
- package/schema/yarramate-graph-v2.schema.json +170 -0
- package/schema/yarramate-likec4-check-result.schema.json +50 -0
- package/schema/yarramate-likec4-diagnostic-result.schema.json +69 -0
- package/schema/yarramate-likec4-generated-project-v2.schema.json +100 -0
- package/schema/yarramate-likec4-generated-project.schema.json +76 -0
- package/schema/yarramate-likec4-kind-mapping.schema.json +65 -0
- package/schema/yarramate-likec4-project.schema.json +160 -0
- package/schema/yarramate-profile.schema.json +113 -0
- package/schema/yarramate-projection-result.schema.json +177 -0
- package/schema/yarramate-projection.schema.json +126 -0
- package/schema/yarramate-reconciliation-report.schema.json +90 -0
- package/schema/yarramate-state-comparison.schema.json +61 -0
- package/schema/yarramate-workspace.schema.json +55 -0
- package/skills/yarramate-architecture/SKILL.md +135 -0
- package/skills/yarramate-architecture/agents/openai.yaml +4 -0
- package/skills/yarramate-architecture/references/journey-checklists.md +57 -0
- package/skills/yarramate-architecture/references/native-authoring.md +167 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://yarramate.org/schema/diagnostic-result/v1",
|
|
4
|
+
"title": "YarraMate diagnostic result",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["format", "diagnostics"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"format": {
|
|
10
|
+
"const": "yarramate/diagnostic-result/v1"
|
|
11
|
+
},
|
|
12
|
+
"diagnostics": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"minItems": 1,
|
|
15
|
+
"items": {
|
|
16
|
+
"$ref": "#/$defs/diagnostic"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"$defs": {
|
|
21
|
+
"diagnostic": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"additionalProperties": false,
|
|
24
|
+
"required": [
|
|
25
|
+
"severity",
|
|
26
|
+
"code",
|
|
27
|
+
"message",
|
|
28
|
+
"path",
|
|
29
|
+
"pointer",
|
|
30
|
+
"line",
|
|
31
|
+
"column"
|
|
32
|
+
],
|
|
33
|
+
"properties": {
|
|
34
|
+
"severity": {
|
|
35
|
+
"const": "error"
|
|
36
|
+
},
|
|
37
|
+
"code": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"pattern": "^YM[0-9]{3}$"
|
|
40
|
+
},
|
|
41
|
+
"message": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"minLength": 1
|
|
44
|
+
},
|
|
45
|
+
"path": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"minLength": 1
|
|
48
|
+
},
|
|
49
|
+
"pointer": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"pattern": "^/"
|
|
52
|
+
},
|
|
53
|
+
"line": {
|
|
54
|
+
"type": "integer",
|
|
55
|
+
"minimum": 1
|
|
56
|
+
},
|
|
57
|
+
"column": {
|
|
58
|
+
"type": "integer",
|
|
59
|
+
"minimum": 1
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://yarramate.org/schema/document/v1",
|
|
4
|
+
"title": "YarraMate native document",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["format", "id", "profile", "concepts", "relationships"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"format": {
|
|
10
|
+
"const": "yarramate/v1"
|
|
11
|
+
},
|
|
12
|
+
"id": {
|
|
13
|
+
"$ref": "#/$defs/id"
|
|
14
|
+
},
|
|
15
|
+
"profile": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"pattern": "^[a-z][a-z0-9-]*(?:/[a-z][a-z0-9-]*)+@[0-9]+\\.[0-9]+$"
|
|
18
|
+
},
|
|
19
|
+
"states": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": {
|
|
22
|
+
"$ref": "#/$defs/architectureState"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"concepts": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"items": {
|
|
28
|
+
"$ref": "#/$defs/concept"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"relationships": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": {
|
|
34
|
+
"$ref": "#/$defs/relationship"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"$defs": {
|
|
39
|
+
"id": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"
|
|
42
|
+
},
|
|
43
|
+
"nonEmptyText": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1
|
|
46
|
+
},
|
|
47
|
+
"reference": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*(?:#[a-z][a-z0-9]*(?:-[a-z0-9]+)*)?$"
|
|
50
|
+
},
|
|
51
|
+
"architectureState": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"additionalProperties": false,
|
|
54
|
+
"required": ["id", "kind", "name"],
|
|
55
|
+
"properties": {
|
|
56
|
+
"id": {
|
|
57
|
+
"$ref": "#/$defs/id"
|
|
58
|
+
},
|
|
59
|
+
"kind": {
|
|
60
|
+
"enum": ["baseline", "transition", "target"]
|
|
61
|
+
},
|
|
62
|
+
"name": {
|
|
63
|
+
"$ref": "#/$defs/nonEmptyText"
|
|
64
|
+
},
|
|
65
|
+
"description": {
|
|
66
|
+
"$ref": "#/$defs/nonEmptyText"
|
|
67
|
+
},
|
|
68
|
+
"after": {
|
|
69
|
+
"$ref": "#/$defs/reference"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"concept": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"additionalProperties": false,
|
|
76
|
+
"required": ["id", "kind", "name"],
|
|
77
|
+
"properties": {
|
|
78
|
+
"id": {
|
|
79
|
+
"$ref": "#/$defs/id"
|
|
80
|
+
},
|
|
81
|
+
"kind": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"minLength": 1
|
|
84
|
+
},
|
|
85
|
+
"name": {
|
|
86
|
+
"$ref": "#/$defs/nonEmptyText"
|
|
87
|
+
},
|
|
88
|
+
"description": {
|
|
89
|
+
"$ref": "#/$defs/nonEmptyText"
|
|
90
|
+
},
|
|
91
|
+
"status": {
|
|
92
|
+
"$ref": "#/$defs/lifecycleStatus"
|
|
93
|
+
},
|
|
94
|
+
"owner": {
|
|
95
|
+
"$ref": "#/$defs/reference"
|
|
96
|
+
},
|
|
97
|
+
"constraints": {
|
|
98
|
+
"type": "array",
|
|
99
|
+
"items": {
|
|
100
|
+
"$ref": "#/$defs/constraint"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"presentIn": {
|
|
104
|
+
"$ref": "#/$defs/stateReferences"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"constraint": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"additionalProperties": false,
|
|
111
|
+
"required": ["id", "ref"],
|
|
112
|
+
"properties": {
|
|
113
|
+
"id": {
|
|
114
|
+
"$ref": "#/$defs/id"
|
|
115
|
+
},
|
|
116
|
+
"ref": {
|
|
117
|
+
"$ref": "#/$defs/reference"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"relationship": {
|
|
122
|
+
"type": "object",
|
|
123
|
+
"additionalProperties": false,
|
|
124
|
+
"required": ["id", "kind", "from", "to"],
|
|
125
|
+
"properties": {
|
|
126
|
+
"id": {
|
|
127
|
+
"$ref": "#/$defs/id"
|
|
128
|
+
},
|
|
129
|
+
"kind": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"minLength": 1
|
|
132
|
+
},
|
|
133
|
+
"from": {
|
|
134
|
+
"$ref": "#/$defs/reference"
|
|
135
|
+
},
|
|
136
|
+
"to": {
|
|
137
|
+
"$ref": "#/$defs/reference"
|
|
138
|
+
},
|
|
139
|
+
"name": {
|
|
140
|
+
"$ref": "#/$defs/nonEmptyText"
|
|
141
|
+
},
|
|
142
|
+
"mode": {
|
|
143
|
+
"enum": ["read", "write", "read-write", "unspecified"]
|
|
144
|
+
},
|
|
145
|
+
"content": {
|
|
146
|
+
"$ref": "#/$defs/nonEmptyText"
|
|
147
|
+
},
|
|
148
|
+
"status": {
|
|
149
|
+
"$ref": "#/$defs/lifecycleStatus"
|
|
150
|
+
},
|
|
151
|
+
"presentIn": {
|
|
152
|
+
"$ref": "#/$defs/stateReferences"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"stateReferences": {
|
|
157
|
+
"type": "array",
|
|
158
|
+
"minItems": 1,
|
|
159
|
+
"uniqueItems": true,
|
|
160
|
+
"items": {
|
|
161
|
+
"$ref": "#/$defs/reference"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"lifecycleStatus": {
|
|
165
|
+
"enum": ["planned", "current", "retired"]
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://yarramate.org/schema/evidence-report/v1",
|
|
4
|
+
"title": "YarraMate evidence report",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["format", "evidence", "provider", "summary", "observations"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"format": { "const": "yarramate/evidence-report/v1" },
|
|
10
|
+
"evidence": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*@[0-9]+\\.[0-9]+$"
|
|
13
|
+
},
|
|
14
|
+
"provider": { "$ref": "#/$defs/id" },
|
|
15
|
+
"summary": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"required": ["confirmed", "contradicted", "unknown", "notObserved"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"confirmed": { "type": "integer", "minimum": 0 },
|
|
21
|
+
"contradicted": { "type": "integer", "minimum": 0 },
|
|
22
|
+
"unknown": { "type": "integer", "minimum": 0 },
|
|
23
|
+
"notObserved": { "type": "integer", "minimum": 0 }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"observations": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"items": { "$ref": "#/$defs/observation" }
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"$defs": {
|
|
32
|
+
"id": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"
|
|
35
|
+
},
|
|
36
|
+
"qualifiedIdentity": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*#[a-z][a-z0-9]*(?:-[a-z0-9]+)*(?:~[a-z][a-z0-9-]*)?$"
|
|
39
|
+
},
|
|
40
|
+
"evidenceLocator": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"additionalProperties": false,
|
|
43
|
+
"required": ["uri"],
|
|
44
|
+
"properties": {
|
|
45
|
+
"uri": { "type": "string", "minLength": 1 },
|
|
46
|
+
"message": { "type": "string", "minLength": 1 }
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"observation": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"required": ["result", "evidence"],
|
|
53
|
+
"properties": {
|
|
54
|
+
"subject": { "$ref": "#/$defs/qualifiedIdentity" },
|
|
55
|
+
"claim": { "$ref": "#/$defs/qualifiedIdentity" },
|
|
56
|
+
"result": {
|
|
57
|
+
"enum": ["confirmed", "contradicted", "unknown", "not-observed"]
|
|
58
|
+
},
|
|
59
|
+
"evidence": { "$ref": "#/$defs/evidenceLocator" }
|
|
60
|
+
},
|
|
61
|
+
"oneOf": [
|
|
62
|
+
{
|
|
63
|
+
"required": ["subject"],
|
|
64
|
+
"not": { "required": ["claim"] }
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"required": ["claim"],
|
|
68
|
+
"not": { "required": ["subject"] }
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://yarramate.org/schema/evidence/v1",
|
|
4
|
+
"title": "YarraMate evidence overlay",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["format", "id", "version", "provider", "observations"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"format": {
|
|
10
|
+
"const": "yarramate/evidence/v1"
|
|
11
|
+
},
|
|
12
|
+
"id": {
|
|
13
|
+
"$ref": "#/$defs/id"
|
|
14
|
+
},
|
|
15
|
+
"version": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"pattern": "^[0-9]+\\.[0-9]+$"
|
|
18
|
+
},
|
|
19
|
+
"provider": {
|
|
20
|
+
"$ref": "#/$defs/id"
|
|
21
|
+
},
|
|
22
|
+
"observations": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"items": {
|
|
25
|
+
"$ref": "#/$defs/observation"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"$defs": {
|
|
30
|
+
"id": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"
|
|
33
|
+
},
|
|
34
|
+
"qualifiedIdentity": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*#[a-z][a-z0-9]*(?:-[a-z0-9]+)*(?:~[a-z][a-z0-9-]*)?$"
|
|
37
|
+
},
|
|
38
|
+
"evidenceLocator": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"required": ["uri"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"uri": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1
|
|
46
|
+
},
|
|
47
|
+
"message": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"minLength": 1
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"observation": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"required": ["result", "evidence"],
|
|
57
|
+
"properties": {
|
|
58
|
+
"subject": {
|
|
59
|
+
"$ref": "#/$defs/qualifiedIdentity"
|
|
60
|
+
},
|
|
61
|
+
"claim": {
|
|
62
|
+
"$ref": "#/$defs/qualifiedIdentity"
|
|
63
|
+
},
|
|
64
|
+
"result": {
|
|
65
|
+
"enum": [
|
|
66
|
+
"confirmed",
|
|
67
|
+
"contradicted",
|
|
68
|
+
"unknown",
|
|
69
|
+
"not-observed"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"evidence": {
|
|
73
|
+
"$ref": "#/$defs/evidenceLocator"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"oneOf": [
|
|
77
|
+
{
|
|
78
|
+
"required": ["subject"],
|
|
79
|
+
"not": {
|
|
80
|
+
"required": ["claim"]
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"required": ["claim"],
|
|
85
|
+
"not": {
|
|
86
|
+
"required": ["subject"]
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://yarramate.org/schema/graph/v2",
|
|
4
|
+
"title": "YarraMate semantic graph v2",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["format", "profiles", "documents", "subjects", "claims"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"format": {
|
|
10
|
+
"const": "yarramate/graph/v2"
|
|
11
|
+
},
|
|
12
|
+
"profiles": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"uniqueItems": true,
|
|
15
|
+
"items": {
|
|
16
|
+
"$ref": "#/$defs/profileIdentity"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"documents": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"uniqueItems": true,
|
|
22
|
+
"items": {
|
|
23
|
+
"$ref": "#/$defs/document"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"subjects": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"uniqueItems": true,
|
|
29
|
+
"items": {
|
|
30
|
+
"$ref": "#/$defs/subject"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"claims": {
|
|
34
|
+
"type": "array",
|
|
35
|
+
"uniqueItems": true,
|
|
36
|
+
"items": {
|
|
37
|
+
"$ref": "#/$defs/claim"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"$defs": {
|
|
42
|
+
"localId": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"
|
|
45
|
+
},
|
|
46
|
+
"profileIdentity": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"pattern": "^[a-z][a-z0-9-]*(?:/[a-z][a-z0-9-]*)+@[0-9]+\\.[0-9]+$"
|
|
49
|
+
},
|
|
50
|
+
"subjectIdentity": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*#[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"
|
|
53
|
+
},
|
|
54
|
+
"claimIdentity": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*#[a-z][a-z0-9]*(?:-[a-z0-9]+)*(?:~[a-z][a-z0-9-]*)?$"
|
|
57
|
+
},
|
|
58
|
+
"document": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"additionalProperties": false,
|
|
61
|
+
"required": ["id", "source"],
|
|
62
|
+
"properties": {
|
|
63
|
+
"id": {
|
|
64
|
+
"$ref": "#/$defs/localId"
|
|
65
|
+
},
|
|
66
|
+
"source": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"minLength": 1
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"subject": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"additionalProperties": false,
|
|
75
|
+
"required": ["id", "type"],
|
|
76
|
+
"properties": {
|
|
77
|
+
"id": {
|
|
78
|
+
"$ref": "#/$defs/subjectIdentity"
|
|
79
|
+
},
|
|
80
|
+
"type": {
|
|
81
|
+
"enum": ["concept", "relationship"]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"claimObject": {
|
|
86
|
+
"oneOf": [
|
|
87
|
+
{
|
|
88
|
+
"type": "object",
|
|
89
|
+
"additionalProperties": false,
|
|
90
|
+
"required": ["ref"],
|
|
91
|
+
"properties": {
|
|
92
|
+
"ref": {
|
|
93
|
+
"$ref": "#/$defs/subjectIdentity"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"type": "object",
|
|
99
|
+
"additionalProperties": false,
|
|
100
|
+
"required": ["value"],
|
|
101
|
+
"properties": {
|
|
102
|
+
"value": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"minLength": 1
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"source": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"additionalProperties": false,
|
|
113
|
+
"required": ["document", "path", "pointer", "line", "column"],
|
|
114
|
+
"properties": {
|
|
115
|
+
"document": {
|
|
116
|
+
"$ref": "#/$defs/localId"
|
|
117
|
+
},
|
|
118
|
+
"path": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"minLength": 1
|
|
121
|
+
},
|
|
122
|
+
"pointer": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"pattern": "^/"
|
|
125
|
+
},
|
|
126
|
+
"line": {
|
|
127
|
+
"type": "integer",
|
|
128
|
+
"minimum": 1
|
|
129
|
+
},
|
|
130
|
+
"column": {
|
|
131
|
+
"type": "integer",
|
|
132
|
+
"minimum": 1
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"claim": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"additionalProperties": false,
|
|
139
|
+
"required": [
|
|
140
|
+
"id",
|
|
141
|
+
"subject",
|
|
142
|
+
"predicate",
|
|
143
|
+
"object",
|
|
144
|
+
"origin",
|
|
145
|
+
"source"
|
|
146
|
+
],
|
|
147
|
+
"properties": {
|
|
148
|
+
"id": {
|
|
149
|
+
"$ref": "#/$defs/claimIdentity"
|
|
150
|
+
},
|
|
151
|
+
"subject": {
|
|
152
|
+
"$ref": "#/$defs/subjectIdentity"
|
|
153
|
+
},
|
|
154
|
+
"predicate": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"pattern": "^\\S+$"
|
|
157
|
+
},
|
|
158
|
+
"object": {
|
|
159
|
+
"$ref": "#/$defs/claimObject"
|
|
160
|
+
},
|
|
161
|
+
"origin": {
|
|
162
|
+
"const": "declared"
|
|
163
|
+
},
|
|
164
|
+
"source": {
|
|
165
|
+
"$ref": "#/$defs/source"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://yarramate.org/schema/likec4-check-result/v1",
|
|
4
|
+
"title": "YarraMate LikeC4 check result",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["format", "ok", "diagnostics"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"format": {
|
|
10
|
+
"const": "yarramate/likec4-check-result/v1"
|
|
11
|
+
},
|
|
12
|
+
"ok": {
|
|
13
|
+
"type": "boolean"
|
|
14
|
+
},
|
|
15
|
+
"diagnostics": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"items": {
|
|
18
|
+
"$ref": "https://yarramate.dev/schema/yarramate-likec4-diagnostic-result.schema.json#/properties/diagnostics/items"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"allOf": [
|
|
23
|
+
{
|
|
24
|
+
"if": {
|
|
25
|
+
"properties": {
|
|
26
|
+
"ok": {
|
|
27
|
+
"const": true
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"required": ["ok"]
|
|
31
|
+
},
|
|
32
|
+
"then": {
|
|
33
|
+
"properties": {
|
|
34
|
+
"diagnostics": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"maxItems": 0
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"else": {
|
|
41
|
+
"properties": {
|
|
42
|
+
"diagnostics": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"minItems": 1
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://yarramate.dev/schema/yarramate-likec4-diagnostic-result.schema.json",
|
|
4
|
+
"title": "YarraMate LikeC4 diagnostic result",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["format", "diagnostics"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"format": {
|
|
10
|
+
"const": "yarramate/likec4-diagnostic-result/v1"
|
|
11
|
+
},
|
|
12
|
+
"diagnostics": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"minItems": 1,
|
|
15
|
+
"items": {
|
|
16
|
+
"oneOf": [
|
|
17
|
+
{
|
|
18
|
+
"$ref": "https://yarramate.org/schema/diagnostic-result/v1#/$defs/diagnostic"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": [
|
|
24
|
+
"severity",
|
|
25
|
+
"code",
|
|
26
|
+
"message",
|
|
27
|
+
"path",
|
|
28
|
+
"pointer",
|
|
29
|
+
"line",
|
|
30
|
+
"column"
|
|
31
|
+
],
|
|
32
|
+
"properties": {
|
|
33
|
+
"severity": {
|
|
34
|
+
"const": "error"
|
|
35
|
+
},
|
|
36
|
+
"code": {
|
|
37
|
+
"enum": ["YMLC101", "YMLC102", "YMLC103", "YMLC104", "YMLC105", "YMLC106"]
|
|
38
|
+
},
|
|
39
|
+
"message": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"minLength": 1
|
|
42
|
+
},
|
|
43
|
+
"subject": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1
|
|
46
|
+
},
|
|
47
|
+
"path": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"minLength": 1
|
|
50
|
+
},
|
|
51
|
+
"pointer": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"pattern": "^/"
|
|
54
|
+
},
|
|
55
|
+
"line": {
|
|
56
|
+
"type": "integer",
|
|
57
|
+
"minimum": 1
|
|
58
|
+
},
|
|
59
|
+
"column": {
|
|
60
|
+
"type": "integer",
|
|
61
|
+
"minimum": 1
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|