|
| 1 | +import { |
| 2 | + ApidomCompletionItem, |
| 3 | + CompletionFormat, |
| 4 | + CompletionType, |
| 5 | +} from '../../../../apidom-language-types'; |
| 6 | + |
| 7 | +const channelCompleteJson: ApidomCompletionItem[] = [ |
| 8 | + { |
| 9 | + label: '$ref', |
| 10 | + insertText: '\\$ref', |
| 11 | + kind: 14, |
| 12 | + format: CompletionFormat.QUOTED, |
| 13 | + type: CompletionType.PROPERTY, |
| 14 | + insertTextFormat: 2, |
| 15 | + documentation: { |
| 16 | + kind: 'markdown', |
| 17 | + value: |
| 18 | + "Allows for an external definition of this channel item.\n\n ---- \n\nThe referenced structure **MUST** be in the format of a [Channel Item Object](https://www.asyncapi.com/docs/specifications/v2.2.0#channelItemObject). \n\n ---- \n\nIf there are conflicts between the referenced definition and this Channel Item's definition, the behavior is _undefined_.", |
| 19 | + }, |
| 20 | + }, |
| 21 | + { |
| 22 | + label: 'description', |
| 23 | + insertText: 'description', |
| 24 | + kind: 14, |
| 25 | + format: CompletionFormat.QUOTED, |
| 26 | + type: CompletionType.PROPERTY, |
| 27 | + insertTextFormat: 2, |
| 28 | + documentation: { |
| 29 | + kind: 'markdown', |
| 30 | + value: |
| 31 | + 'An optional description of this channel item. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation.', |
| 32 | + }, |
| 33 | + }, |
| 34 | + { |
| 35 | + label: 'servers', |
| 36 | + insertText: 'servers', |
| 37 | + kind: 14, |
| 38 | + format: CompletionFormat.ARRAY, |
| 39 | + type: CompletionType.PROPERTY, |
| 40 | + insertTextFormat: 2, |
| 41 | + documentation: { |
| 42 | + kind: 'markdown', |
| 43 | + value: |
| 44 | + 'The servers on which this channel is available, specified as an optional unordered list of names (string keys) of [Server Objects](https://www.asyncapi.com/docs/specifications/v2.2.0#serverObject) defined in the [Servers Object](https://www.asyncapi.com/docs/specifications/v2.2.0#serversObject) (a map). If `servers` is absent or empty then this channel must be available on all servers defined in the [Servers Object](https://www.asyncapi.com/docs/specifications/v2.2.0#serversObject).', |
| 45 | + }, |
| 46 | + }, |
| 47 | + { |
| 48 | + label: 'subscribe', |
| 49 | + insertText: 'subscribe', |
| 50 | + kind: 14, |
| 51 | + format: CompletionFormat.OBJECT, |
| 52 | + type: CompletionType.PROPERTY, |
| 53 | + insertTextFormat: 2, |
| 54 | + documentation: { |
| 55 | + kind: 'markdown', |
| 56 | + value: |
| 57 | + '[Operation Object](https://www.asyncapi.com/docs/specifications/v2.2.0#operationObject)\n\n ---- \n\nA definition of the SUBSCRIBE operation, which defines the messages produced by the application and sent to the channel.', |
| 58 | + }, |
| 59 | + }, |
| 60 | + { |
| 61 | + label: 'parameters', |
| 62 | + insertText: 'parameters', |
| 63 | + kind: 14, |
| 64 | + format: CompletionFormat.OBJECT, |
| 65 | + type: CompletionType.PROPERTY, |
| 66 | + insertTextFormat: 2, |
| 67 | + documentation: { |
| 68 | + kind: 'markdown', |
| 69 | + value: |
| 70 | + '[Parameters Object](https://www.asyncapi.com/docs/specifications/v2.2.0#parametersObject)\n\n ---- \n\nA map of the parameters included in the channel name. It **SHOULD** be present only when using channels with expressions (as defined by [RFC 6570 section 2.2](https://tools.ietf.org/html/rfc6570#section-2.2)).', |
| 71 | + }, |
| 72 | + }, |
| 73 | + { |
| 74 | + label: 'bindings', |
| 75 | + insertText: 'bindings', |
| 76 | + kind: 14, |
| 77 | + format: CompletionFormat.OBJECT, |
| 78 | + type: CompletionType.PROPERTY, |
| 79 | + insertTextFormat: 2, |
| 80 | + documentation: { |
| 81 | + kind: 'markdown', |
| 82 | + value: |
| 83 | + '[Channel Bindings Object](https://www.asyncapi.com/docs/specifications/v2.2.0#channelBindingsObject) | [Reference Object](https://www.asyncapi.com/docs/specifications/v2.2.0#referenceObject)\n\n ---- \n\nA map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the channel.\n\n ---- \n\nThis object can be extended with [Specification Extensions](https://www.asyncapi.com/docs/specifications/v2.2.0#specificationExtensions).', |
| 84 | + }, |
| 85 | + }, |
| 86 | + { |
| 87 | + target: 'servers', |
| 88 | + label: 'servers', |
| 89 | + insertText: '?', |
| 90 | + arrayMember: true, |
| 91 | + kind: 12, |
| 92 | + format: CompletionFormat.UNQUOTED, |
| 93 | + type: CompletionType.VALUE, |
| 94 | + function: 'apicompleteChannelServers', |
| 95 | + insertTextFormat: 2, |
| 96 | + }, |
| 97 | + { |
| 98 | + target: 'bindings', |
| 99 | + label: 'amqp', |
| 100 | + insertText: 'amqp', |
| 101 | + kind: 12, |
| 102 | + format: CompletionFormat.OBJECT, |
| 103 | + type: CompletionType.PROPERTY, |
| 104 | + insertTextFormat: 2, |
| 105 | + }, |
| 106 | + { |
| 107 | + target: 'bindings', |
| 108 | + label: 'amqps', |
| 109 | + insertText: 'amqps', |
| 110 | + kind: 12, |
| 111 | + format: CompletionFormat.OBJECT, |
| 112 | + type: CompletionType.PROPERTY, |
| 113 | + insertTextFormat: 2, |
| 114 | + }, |
| 115 | + { |
| 116 | + target: 'bindings', |
| 117 | + label: 'http', |
| 118 | + insertText: 'http', |
| 119 | + kind: 12, |
| 120 | + format: CompletionFormat.OBJECT, |
| 121 | + type: CompletionType.PROPERTY, |
| 122 | + insertTextFormat: 2, |
| 123 | + }, |
| 124 | + { |
| 125 | + target: 'bindings', |
| 126 | + label: 'https', |
| 127 | + insertText: 'https', |
| 128 | + kind: 12, |
| 129 | + format: CompletionFormat.OBJECT, |
| 130 | + type: CompletionType.PROPERTY, |
| 131 | + insertTextFormat: 2, |
| 132 | + }, |
| 133 | + { |
| 134 | + target: 'bindings', |
| 135 | + label: 'ibmmq', |
| 136 | + insertText: 'ibmmq', |
| 137 | + kind: 12, |
| 138 | + format: CompletionFormat.OBJECT, |
| 139 | + type: CompletionType.PROPERTY, |
| 140 | + insertTextFormat: 2, |
| 141 | + }, |
| 142 | + { |
| 143 | + target: 'bindings', |
| 144 | + label: 'jms', |
| 145 | + insertText: 'jms', |
| 146 | + kind: 12, |
| 147 | + format: CompletionFormat.OBJECT, |
| 148 | + type: CompletionType.PROPERTY, |
| 149 | + insertTextFormat: 2, |
| 150 | + }, |
| 151 | + { |
| 152 | + target: 'bindings', |
| 153 | + label: 'kafka', |
| 154 | + insertText: 'kafka', |
| 155 | + kind: 12, |
| 156 | + format: CompletionFormat.OBJECT, |
| 157 | + type: CompletionType.PROPERTY, |
| 158 | + insertTextFormat: 2, |
| 159 | + }, |
| 160 | + { |
| 161 | + target: 'bindings', |
| 162 | + label: 'kafka-secure', |
| 163 | + insertText: 'kafka-secure', |
| 164 | + kind: 12, |
| 165 | + format: CompletionFormat.OBJECT, |
| 166 | + type: CompletionType.PROPERTY, |
| 167 | + insertTextFormat: 2, |
| 168 | + }, |
| 169 | + { |
| 170 | + target: 'bindings', |
| 171 | + label: 'anypointmq', |
| 172 | + insertText: 'anypointmq', |
| 173 | + kind: 12, |
| 174 | + format: CompletionFormat.OBJECT, |
| 175 | + type: CompletionType.PROPERTY, |
| 176 | + insertTextFormat: 2, |
| 177 | + }, |
| 178 | + { |
| 179 | + target: 'bindings', |
| 180 | + label: 'mqtt', |
| 181 | + insertText: 'mqtt', |
| 182 | + kind: 12, |
| 183 | + format: CompletionFormat.OBJECT, |
| 184 | + type: CompletionType.PROPERTY, |
| 185 | + insertTextFormat: 2, |
| 186 | + }, |
| 187 | + { |
| 188 | + target: 'bindings', |
| 189 | + label: 'secure-mqtt', |
| 190 | + insertText: 'secure-mqtt', |
| 191 | + kind: 12, |
| 192 | + format: CompletionFormat.OBJECT, |
| 193 | + type: CompletionType.PROPERTY, |
| 194 | + insertTextFormat: 2, |
| 195 | + }, |
| 196 | + { |
| 197 | + target: 'bindings', |
| 198 | + label: 'stomp', |
| 199 | + insertText: 'stomp', |
| 200 | + kind: 12, |
| 201 | + format: CompletionFormat.OBJECT, |
| 202 | + type: CompletionType.PROPERTY, |
| 203 | + insertTextFormat: 2, |
| 204 | + }, |
| 205 | + { |
| 206 | + target: 'bindings', |
| 207 | + label: 'stomps', |
| 208 | + insertText: 'stomps', |
| 209 | + kind: 12, |
| 210 | + format: CompletionFormat.OBJECT, |
| 211 | + type: CompletionType.PROPERTY, |
| 212 | + insertTextFormat: 2, |
| 213 | + }, |
| 214 | + { |
| 215 | + target: 'bindings', |
| 216 | + label: 'ws', |
| 217 | + insertText: 'ws', |
| 218 | + kind: 12, |
| 219 | + format: CompletionFormat.OBJECT, |
| 220 | + type: CompletionType.PROPERTY, |
| 221 | + insertTextFormat: 2, |
| 222 | + }, |
| 223 | + { |
| 224 | + target: 'bindings', |
| 225 | + label: 'wss', |
| 226 | + insertText: 'wss', |
| 227 | + kind: 12, |
| 228 | + format: CompletionFormat.OBJECT, |
| 229 | + type: CompletionType.PROPERTY, |
| 230 | + insertTextFormat: 2, |
| 231 | + }, |
| 232 | + { |
| 233 | + target: 'bindings', |
| 234 | + label: 'mercure', |
| 235 | + insertText: 'mercure', |
| 236 | + kind: 12, |
| 237 | + format: CompletionFormat.OBJECT, |
| 238 | + type: CompletionType.PROPERTY, |
| 239 | + insertTextFormat: 2, |
| 240 | + }, |
| 241 | +]; |
| 242 | + |
| 243 | +export default channelCompleteJson; |
0 commit comments