-
Notifications
You must be signed in to change notification settings - Fork 5.6k
/
API.v1alpha1.schema.json
79 lines (79 loc) · 2.42 KB
/
API.v1alpha1.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "ApiV1alpha1",
"description": "An API describes an interface that can be exposed by a component. The API can be defined in different formats, like OpenAPI, AsyncAPI, GraphQL, gRPC, or other formats.",
"examples": [
{
"apiVersion": "backstage.io/v1alpha1",
"kind": "API",
"metadata": {
"name": "artist-api",
"description": "Retrieve artist details",
"labels": {
"product_name": "Random value Generator"
},
"annotations": {
"docs": "https://github.com/..../tree/develop/doc"
}
},
"spec": {
"type": "openapi",
"lifecycle": "production",
"owner": "artist-relations-team",
"system": "artist-engagement-portal",
"definition": "openapi: \"3.0.0\"\ninfo:..."
}
}
],
"allOf": [
{
"$ref": "Entity"
},
{
"type": "object",
"required": ["spec"],
"properties": {
"apiVersion": {
"enum": ["backstage.io/v1alpha1", "backstage.io/v1beta1"]
},
"kind": {
"enum": ["API"]
},
"spec": {
"type": "object",
"required": ["type", "lifecycle", "owner", "definition"],
"properties": {
"type": {
"type": "string",
"description": "The type of the API definition.",
"examples": ["openapi", "asyncapi", "graphql", "grpc", "trpc"],
"minLength": 1
},
"lifecycle": {
"type": "string",
"description": "The lifecycle state of the API.",
"examples": ["experimental", "production", "deprecated"],
"minLength": 1
},
"owner": {
"type": "string",
"description": "An entity reference to the owner of the API.",
"examples": ["artist-relations-team", "user:john.johnson"],
"minLength": 1
},
"system": {
"type": "string",
"description": "An entity reference to the system that the API belongs to.",
"minLength": 1
},
"definition": {
"type": "string",
"description": "The definition of the API, based on the format defined by the type.",
"minLength": 1
}
}
}
}
}
]
}