|
| 1 | +import { |
| 2 | + ApidomCompletionItem, |
| 3 | + CompletionFormat, |
| 4 | + CompletionType, |
| 5 | +} from '../../../apidom-language-types'; |
| 6 | + |
| 7 | +const completion: 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: 'A reference to a Header', |
| 18 | + }, |
| 19 | + }, |
| 20 | + { |
| 21 | + label: 'description', |
| 22 | + insertText: 'description', |
| 23 | + kind: 14, |
| 24 | + format: CompletionFormat.QUOTED, |
| 25 | + type: CompletionType.PROPERTY, |
| 26 | + insertTextFormat: 2, |
| 27 | + documentation: { |
| 28 | + kind: 'markdown', |
| 29 | + value: |
| 30 | + 'A brief description of the header. This could contain examples of use. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation.', |
| 31 | + }, |
| 32 | + }, |
| 33 | + { |
| 34 | + label: 'required', |
| 35 | + insertText: 'required', |
| 36 | + kind: 14, |
| 37 | + format: CompletionFormat.UNQUOTED, |
| 38 | + type: CompletionType.PROPERTY, |
| 39 | + insertTextFormat: 2, |
| 40 | + documentation: { |
| 41 | + kind: 'markdown', |
| 42 | + value: |
| 43 | + 'Determines whether this header is mandatory. This property MAY be included and its default value is `false`.', |
| 44 | + }, |
| 45 | + }, |
| 46 | + { |
| 47 | + label: 'deprecated', |
| 48 | + insertText: 'deprecated', |
| 49 | + kind: 14, |
| 50 | + format: CompletionFormat.UNQUOTED, |
| 51 | + type: CompletionType.PROPERTY, |
| 52 | + insertTextFormat: 2, |
| 53 | + documentation: { |
| 54 | + kind: 'markdown', |
| 55 | + value: |
| 56 | + 'Specifies that a header is deprecated and SHOULD be transitioned out of usage. Default value is `false`.', |
| 57 | + }, |
| 58 | + }, |
| 59 | + { |
| 60 | + label: 'allowEmptyValue', |
| 61 | + insertText: 'allowEmptyValue', |
| 62 | + kind: 14, |
| 63 | + format: CompletionFormat.UNQUOTED, |
| 64 | + type: CompletionType.PROPERTY, |
| 65 | + insertTextFormat: 2, |
| 66 | + documentation: { |
| 67 | + kind: 'markdown', |
| 68 | + value: |
| 69 | + "Doesn't apply for headers. Default value is `false`. Use of this property is NOT RECOMMENDED, as it is likely to be removed in a later revision.", |
| 70 | + }, |
| 71 | + }, |
| 72 | + { |
| 73 | + label: 'style', |
| 74 | + insertText: 'style', |
| 75 | + kind: 14, |
| 76 | + format: CompletionFormat.QUOTED, |
| 77 | + type: CompletionType.PROPERTY, |
| 78 | + insertTextFormat: 2, |
| 79 | + documentation: { |
| 80 | + kind: 'markdown', |
| 81 | + value: 'Describes how the header value will be serialized. Default value: `simple`.', |
| 82 | + }, |
| 83 | + }, |
| 84 | + { |
| 85 | + label: 'explode', |
| 86 | + insertText: 'explode', |
| 87 | + kind: 14, |
| 88 | + format: CompletionFormat.UNQUOTED, |
| 89 | + type: CompletionType.PROPERTY, |
| 90 | + insertTextFormat: 2, |
| 91 | + documentation: { |
| 92 | + kind: 'markdown', |
| 93 | + value: |
| 94 | + 'When this is true, header values of type array or object generate separate headers for each value of the array or key-value pair of the map. The default value is `false`.', |
| 95 | + }, |
| 96 | + }, |
| 97 | + { |
| 98 | + label: 'allowReserved', |
| 99 | + insertText: 'allowReserved', |
| 100 | + kind: 14, |
| 101 | + format: CompletionFormat.UNQUOTED, |
| 102 | + type: CompletionType.PROPERTY, |
| 103 | + insertTextFormat: 2, |
| 104 | + documentation: { |
| 105 | + kind: 'markdown', |
| 106 | + value: |
| 107 | + "Determines whether the header value SHOULD allow reserved characters, as defined by [RFC3986](https://tools.ietf.org/html/rfc3986#section-2.2) `:/?#[]@!$&'()*+,;=` to be included without percent - encoding. This property has no effect and the default value is `false`.", |
| 108 | + }, |
| 109 | + }, |
| 110 | + { |
| 111 | + label: 'schema', |
| 112 | + insertText: 'schema', |
| 113 | + kind: 14, |
| 114 | + format: CompletionFormat.OBJECT, |
| 115 | + type: CompletionType.PROPERTY, |
| 116 | + insertTextFormat: 2, |
| 117 | + documentation: { |
| 118 | + kind: 'markdown', |
| 119 | + value: |
| 120 | + '[Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#schemaObject) | [Reference Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#referenceObject)\n\\\n\\\nThe schema defining the type used for the header.', |
| 121 | + }, |
| 122 | + targetSpecs: [ |
| 123 | + { namespace: 'openapi', version: '3.0.0' }, |
| 124 | + { namespace: 'openapi', version: '3.0.1' }, |
| 125 | + { namespace: 'openapi', version: '3.0.2' }, |
| 126 | + { namespace: 'openapi', version: '3.0.3' }, |
| 127 | + ], |
| 128 | + }, |
| 129 | + { |
| 130 | + label: 'schema', |
| 131 | + insertText: 'schema', |
| 132 | + kind: 14, |
| 133 | + format: CompletionFormat.OBJECT, |
| 134 | + type: CompletionType.PROPERTY, |
| 135 | + insertTextFormat: 2, |
| 136 | + documentation: { |
| 137 | + kind: 'markdown', |
| 138 | + value: |
| 139 | + '[Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schemaObject)\n\\\n\\\nThe schema defining the type used for the header.', |
| 140 | + }, |
| 141 | + targetSpecs: [{ namespace: 'openapi', version: '3.1.0' }], |
| 142 | + }, |
| 143 | + { |
| 144 | + label: 'example', |
| 145 | + insertText: 'example', |
| 146 | + kind: 14, |
| 147 | + format: CompletionFormat.UNDEFINED, |
| 148 | + type: CompletionType.PROPERTY, |
| 149 | + insertTextFormat: 2, |
| 150 | + documentation: { |
| 151 | + kind: 'markdown', |
| 152 | + value: |
| 153 | + "Example of the header's potential value. The example SHOULD match the specified schema and encoding properties if present. The `example` field is mutually exclusive of the `examples` field. Furthermore, if referencing a `schema` that contains an example, the `example` value SHALL *override* the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary.", |
| 154 | + }, |
| 155 | + }, |
| 156 | + { |
| 157 | + label: 'examples', |
| 158 | + insertText: 'examples', |
| 159 | + kind: 14, |
| 160 | + format: CompletionFormat.OBJECT, |
| 161 | + type: CompletionType.PROPERTY, |
| 162 | + insertTextFormat: 2, |
| 163 | + documentation: { |
| 164 | + kind: 'markdown', |
| 165 | + value: |
| 166 | + "Map[`string`, [Example Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#exampleObject) | [Reference Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#referenceObject)]\n\\\n\\\nExamples of the header's potential value. Each example SHOULD contain a value in the correct format as specified in the header encoding. The `examples` field is mutually exclusive of the `example` field. Furthermore, if referencing a `schema` that contains an example, the `examples` value SHALL *override* the example provided by the schema.", |
| 167 | + }, |
| 168 | + targetSpecs: [ |
| 169 | + { namespace: 'openapi', version: '3.0.0' }, |
| 170 | + { namespace: 'openapi', version: '3.0.1' }, |
| 171 | + { namespace: 'openapi', version: '3.0.2' }, |
| 172 | + { namespace: 'openapi', version: '3.0.3' }, |
| 173 | + ], |
| 174 | + }, |
| 175 | + { |
| 176 | + label: 'examples', |
| 177 | + insertText: 'examples', |
| 178 | + kind: 14, |
| 179 | + format: CompletionFormat.OBJECT, |
| 180 | + type: CompletionType.PROPERTY, |
| 181 | + insertTextFormat: 2, |
| 182 | + documentation: { |
| 183 | + kind: 'markdown', |
| 184 | + value: |
| 185 | + "Map[`string`, [Example Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#exampleObject) | [Reference Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#referenceObject)]\n\\\n\\\nExamples of the header's potential value. Each example SHOULD contain a value in the correct format as specified in the header encoding. The `examples` field is mutually exclusive of the `example` field. Furthermore, if referencing a `schema` that contains an example, the `examples` value SHALL *override* the example provided by the schema.", |
| 186 | + }, |
| 187 | + targetSpecs: [{ namespace: 'openapi', version: '3.1.0' }], |
| 188 | + }, |
| 189 | + { |
| 190 | + label: 'content', |
| 191 | + insertText: 'content', |
| 192 | + kind: 14, |
| 193 | + format: CompletionFormat.OBJECT, |
| 194 | + type: CompletionType.PROPERTY, |
| 195 | + insertTextFormat: 2, |
| 196 | + documentation: { |
| 197 | + kind: 'markdown', |
| 198 | + value: |
| 199 | + 'Map[string, [Media Type Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#mediaTypeObject)]\n\\\n\\\nA map containing the representations for the header. The key is the media type and the value describes it. The map MUST only contain one entry.', |
| 200 | + }, |
| 201 | + targetSpecs: [ |
| 202 | + { namespace: 'openapi', version: '3.0.0' }, |
| 203 | + { namespace: 'openapi', version: '3.0.1' }, |
| 204 | + { namespace: 'openapi', version: '3.0.2' }, |
| 205 | + { namespace: 'openapi', version: '3.0.3' }, |
| 206 | + ], |
| 207 | + }, |
| 208 | + { |
| 209 | + label: 'content', |
| 210 | + insertText: 'content', |
| 211 | + kind: 14, |
| 212 | + format: CompletionFormat.OBJECT, |
| 213 | + type: CompletionType.PROPERTY, |
| 214 | + insertTextFormat: 2, |
| 215 | + documentation: { |
| 216 | + kind: 'markdown', |
| 217 | + value: |
| 218 | + 'Map[string, [Media Type Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#mediaTypeObject)]\n\\\n\\\nA map containing the representations for the header. The key is the media type and the value describes it. The map MUST only contain one entry.', |
| 219 | + }, |
| 220 | + targetSpecs: [{ namespace: 'openapi', version: '3.1.0' }], |
| 221 | + }, |
| 222 | +]; |
| 223 | + |
| 224 | +export default completion; |
0 commit comments