-
Notifications
You must be signed in to change notification settings - Fork 91
/
x-sdk-operations.json
116 lines (116 loc) · 3.36 KB
/
x-sdk-operations.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "IBM SDK Operations Extension",
"description": "sdk operations extension schema",
"type": "object",
"properties": {
"paths": {
"$ref": "#/definitions/Paths"
}
},
"definitions": {
"Paths": {
"type": "object",
"patternProperties": {
".*": {
"$ref": "#/definitions/PathItem"
}
}
},
"PathItem": {
"type": "object",
"patternProperties": {
"^(get|put|post|delete|options|head|patch|trace)$": {
"$ref": "#/definitions/Operation"
}
}
},
"Operation": {
"type": "object",
"properties": {
"x-sdk-operations": {
"$ref": "#/definitions/SdkOperations"
}
}
},
"SdkOperations": {
"type": "object",
"properties": {
"request-examples": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/x-sdk-request-examples-array"
}
}
},
"additionalProperties": false
},
"x-sdk-request-examples-array": {
"type": "array",
"items": {
"$ref": "#/definitions/x-sdk-request-example"
}
},
"x-sdk-request-example": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name or title of the example. In documentation it should appear as a header above the example."
},
"contentType": {
"type": "array",
"items": {
"type": "string",
"description": "The media type of the response in this example."
}
},
"example": {
"type": "array",
"description": "An array of code or text elements that make up the example",
"items": {
"$ref": "#/definitions/x-sdk-request-example-element"
}
},
"response": {},
"description": {
"type": "string"
}
},
"required": [
"name",
"example"
],
"additionalProperties": false
},
"x-sdk-request-example-element": {
"type": "object",
"description": "An element of the request example.",
"properties": {
"name": {
"type": "string",
"description": "The name or title of the example element. In documentation it should appear as a header above the example element."
},
"type": {
"type": "string",
"description": "The element type indicates the type of content in the element. `text` elements contain a textual description or explanation, possibly using markdown for rich text elements. `code` elements contain code appropriate for the language of the request example. `code` elements will be presented in a `<pre><code>` block in documentation and should contain no markup or escapes other than escapes for quote and backslash (required for JSON).",
"enum": [
"text",
"code"
]
},
"source": {
"type": "array",
"items": {
"type": "string"
},
"description": "Content of the example element as an array of strings. The content is formed by simple concatenation of the array elements."
}
},
"required": [
"type",
"source"
]
}
}
}