Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
backstage
GitHub Repository: backstage/backstage
Path: blob/master/docs/service_specification.schema.json
12518 views
1
{
2
"$schema": "http://json-schema.org/draft-07/schema",
3
"$id": "backstage.io/v1alpha1",
4
"type": "object",
5
"title": "A JSON Schema for Backstage catalog entities.",
6
"description": "Each descriptor file has a number of entities. This schema matches each of those.",
7
"examples": [
8
{
9
"apiVersion": "backstage.io/v1alpha1",
10
"kind": "Component",
11
"metadata": {
12
"name": "LoremService",
13
"description": "Creates Lorems like a pro.",
14
"labels": {
15
"product_name": "Random value Generator"
16
},
17
"annnotations": {
18
"docs": "https://github.com/..../tree/develop/doc"
19
},
20
"teams": [
21
{
22
"name": "Team super great",
23
"email": "[email protected]"
24
}
25
]
26
},
27
"spec": {
28
"type": "service",
29
"lifecycle": "production",
30
"owner": "[email protected]"
31
}
32
}
33
],
34
"required": ["apiVersion", "kind", "metadata"],
35
"additionalProperties": false,
36
"properties": {
37
"apiVersion": {
38
"type": "string",
39
"description": "Version of the specification format for a particular file is written against.",
40
"enum": ["backstage.io/v1alpha1", "backstage.io/v1beta1"]
41
},
42
"kind": {
43
"type": "string",
44
"description": "High level entity type being described, from the Backstage system model.",
45
"enum": ["Component"]
46
},
47
"metadata": {
48
"$ref": "#/definitions/metadata"
49
},
50
"spec": {
51
"$ref": "#/definitions/spec"
52
}
53
},
54
"definitions": {
55
"metadata": {
56
"type": "object",
57
"description": "Metadata about the entity, i.e. things that aren't directly part of the entity specification itself.",
58
"required": ["name"],
59
"additionalProperties": true,
60
"properties": {
61
"name": {
62
"type": "string",
63
"pattern": "^[a-z0-9A-Z_.-]{1,63}$",
64
"description": "The name of the entity. This name is both meant for human eyes to recognize the entity, and for machines and other components to reference the entity"
65
},
66
"description": {
67
"type": "string",
68
"description": "A human readable description of the entity, to be shown in Backstage. Should be kept short and informative."
69
},
70
"namespace": {
71
"type": "string",
72
"description": "The name of a namespace that the entity belongs to."
73
},
74
"labels": {
75
"type": "object",
76
"description": "Labels are optional key/value pairs of that are attached to the entity, and their use is identical to kubernetes object labels.",
77
"additionalProperties": true,
78
"patternProperties": {
79
"^([a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\\.[a-zA-Z]{2,}/)?[a-z0-9A-Z_\\-\\.]{1,63}$": {
80
"type": "string",
81
"pattern": "^[a-z0-9A-Z_.-]{1,63}$"
82
}
83
}
84
},
85
"annnotations": {
86
"type": "object",
87
"description": "Arbitrary non-identifying metadata attached to the entity, identical in use to kubernetes object annotations.",
88
"additionalProperties": true,
89
"patternProperties": {
90
"^([a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\\.[a-zA-Z]{2,}/)?[a-z0-9A-Z_\\-\\.]{1,63}$": {
91
"type": "string",
92
"pattern": "^[a-z0-9A-Z_.-]{1,63}$"
93
}
94
}
95
}
96
}
97
},
98
"spec": {
99
"type": "object",
100
"description": "Actual specification data that describes the entity. TODO: shape depend on `kind`",
101
"required": ["type", "lifecycle", "owner"],
102
"additionalProperties": true,
103
"properties": {
104
"type": {
105
"type": "string",
106
"description": "The type of component.",
107
"examples": ["service"]
108
},
109
"lifecycle": {
110
"type": "string",
111
"description": "The lifecycle step that this component is in.",
112
"examples": ["production"]
113
},
114
"owner": {
115
"type": "string",
116
"description": "The owner of the component.",
117
"examples": ["[email protected]"]
118
}
119
}
120
}
121
}
122
}
123
124