1// Schema lifecycle: experimental | stable | deprecated
2@status("stable")
3
4package gemara
5
6// MappingReference represents a reference to an external document with full metadata.
7#MappingReference: {
8 // id allows this entry to be referenced by other elements
9 id: string
10
11 // title describes the purpose of this mapping reference at a glance
12 title: string
13
14 // version is the version identifier of the artifact being mapped to
15 version: string
16
17 // description is prose regarding the artifact's purpose or content
18 description?: string
19
20 // url is the path where the artifact may be retrieved; preferrably responds with Gemara-compatible YAML/JSON
21 url?: =~"^(https?|file)://[^\\s]+$"
22}
23
24#ArtifactMapping: {
25 // ReferenceId should reference the corresponding MappingReference id from metadata
26 "reference-id": string @go(ReferenceId)
27
28 // remarks is prose regarding the mapped artifact or the mapping relationship
29 remarks?: string
30}
31
32// MultiEntryMapping represents a mapping to an external reference with one or more entries.
33#MultiEntryMapping: {
34 #ArtifactMapping
35
36 // entries is a list of mapping entries
37 entries: [#ArtifactMapping, ...#ArtifactMapping] @go(Entries)
38}
39
40// EntryMapping represents how a specific entry (control/requirement/procedure) maps to a MappingReference.
41#EntryMapping: {
42 // reference-id is the id for a MappingReference entry in the artifact's metadata
43 "reference-id"?: string @go(ReferenceId)
44
45 // entry-id is the identifier being mapped to in the referenced artifact
46 "entry-id": string @go(EntryId)
47
48 // remarks is prose describing the mapping relationship
49 remarks?: string
50}