|
| 1 | +import { |
| 2 | + ApidomCompletionItem, |
| 3 | + CompletionFormat, |
| 4 | + CompletionType, |
| 5 | +} from '../../../apidom-language-types'; |
| 6 | + |
| 7 | +const completion: ApidomCompletionItem[] = [ |
| 8 | + { |
| 9 | + label: 'type', |
| 10 | + insertText: 'type', |
| 11 | + kind: 14, |
| 12 | + format: CompletionFormat.QUOTED, |
| 13 | + type: CompletionType.PROPERTY, |
| 14 | + insertTextFormat: 2, |
| 15 | + documentation: { |
| 16 | + kind: 'markdown', |
| 17 | + value: |
| 18 | + '**REQUIRED**. The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"oauth2"`, `"openIdConnect"`.', |
| 19 | + }, |
| 20 | + targetSpecs: [ |
| 21 | + { namespace: 'openapi', version: '3.0.0' }, |
| 22 | + { namespace: 'openapi', version: '3.0.1' }, |
| 23 | + { namespace: 'openapi', version: '3.0.2' }, |
| 24 | + { namespace: 'openapi', version: '3.0.3' }, |
| 25 | + ], |
| 26 | + }, |
| 27 | + { |
| 28 | + label: 'description', |
| 29 | + insertText: 'description', |
| 30 | + kind: 14, |
| 31 | + format: CompletionFormat.QUOTED, |
| 32 | + type: CompletionType.PROPERTY, |
| 33 | + insertTextFormat: 2, |
| 34 | + documentation: { |
| 35 | + kind: 'markdown', |
| 36 | + value: |
| 37 | + 'A description for security scheme. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation.', |
| 38 | + }, |
| 39 | + }, |
| 40 | + { |
| 41 | + label: 'name', |
| 42 | + insertText: 'name', |
| 43 | + kind: 14, |
| 44 | + format: CompletionFormat.QUOTED, |
| 45 | + type: CompletionType.PROPERTY, |
| 46 | + insertTextFormat: 2, |
| 47 | + documentation: { |
| 48 | + kind: 'markdown', |
| 49 | + value: |
| 50 | + '**REQUIRED**. Applies to `apiKey`. **REQUIRED**. The name of the header, query or cookie parameter to be used.', |
| 51 | + }, |
| 52 | + }, |
| 53 | + { |
| 54 | + label: 'in', |
| 55 | + insertText: 'in', |
| 56 | + kind: 14, |
| 57 | + format: CompletionFormat.QUOTED, |
| 58 | + type: CompletionType.PROPERTY, |
| 59 | + insertTextFormat: 2, |
| 60 | + documentation: { |
| 61 | + kind: 'markdown', |
| 62 | + value: |
| 63 | + '**REQUIRED**. Applies to `apiKey`. **REQUIRED**. The location of the API key. Valid values are `"query"`, `"header"` or `"cookie"`.', |
| 64 | + }, |
| 65 | + }, |
| 66 | + { |
| 67 | + label: 'scheme', |
| 68 | + insertText: 'scheme', |
| 69 | + kind: 14, |
| 70 | + format: CompletionFormat.QUOTED, |
| 71 | + type: CompletionType.PROPERTY, |
| 72 | + insertTextFormat: 2, |
| 73 | + documentation: { |
| 74 | + kind: 'markdown', |
| 75 | + value: |
| 76 | + '**REQUIRED**. Applies to `http`. **REQUIRED**. The name of the HTTP Authorization scheme to be used in the [Authorization header as defined in RFC7235](https://tools.ietf.org/html/rfc7235#section-5.1). The values used SHOULD be registered in the [IANA Authentication Scheme registry](https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml).', |
| 77 | + }, |
| 78 | + }, |
| 79 | + { |
| 80 | + label: 'bearerFormat', |
| 81 | + insertText: 'bearerFormat', |
| 82 | + kind: 14, |
| 83 | + format: CompletionFormat.QUOTED, |
| 84 | + type: CompletionType.PROPERTY, |
| 85 | + insertTextFormat: 2, |
| 86 | + documentation: { |
| 87 | + kind: 'markdown', |
| 88 | + value: |
| 89 | + 'Applies to `http` (`"bearer"`). A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes.', |
| 90 | + }, |
| 91 | + }, |
| 92 | + { |
| 93 | + label: 'flows', |
| 94 | + insertText: 'flows', |
| 95 | + kind: 14, |
| 96 | + format: CompletionFormat.OBJECT, |
| 97 | + type: CompletionType.PROPERTY, |
| 98 | + insertTextFormat: 2, |
| 99 | + documentation: { |
| 100 | + kind: 'markdown', |
| 101 | + value: |
| 102 | + '#### [OAuth Flows Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#oauthFlowsObject)\\n\\nApplies to `oauth2`. **REQUIRED**. An object containing configuration information for the flow types supported.', |
| 103 | + }, |
| 104 | + targetSpecs: [ |
| 105 | + { namespace: 'openapi', version: '3.0.0' }, |
| 106 | + { namespace: 'openapi', version: '3.0.1' }, |
| 107 | + { namespace: 'openapi', version: '3.0.2' }, |
| 108 | + { namespace: 'openapi', version: '3.0.3' }, |
| 109 | + ], |
| 110 | + }, |
| 111 | + { |
| 112 | + label: 'openIdConnectUrl', |
| 113 | + insertText: 'openIdConnectUrl', |
| 114 | + kind: 14, |
| 115 | + format: CompletionFormat.QUOTED, |
| 116 | + type: CompletionType.PROPERTY, |
| 117 | + insertTextFormat: 2, |
| 118 | + documentation: { |
| 119 | + kind: 'markdown', |
| 120 | + value: |
| 121 | + '**REQUIRED**. Applies to `openIdConnect`. **REQUIRED**. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL.', |
| 122 | + }, |
| 123 | + targetSpecs: [ |
| 124 | + { namespace: 'openapi', version: '3.0.0' }, |
| 125 | + { namespace: 'openapi', version: '3.0.1' }, |
| 126 | + { namespace: 'openapi', version: '3.0.2' }, |
| 127 | + { namespace: 'openapi', version: '3.0.3' }, |
| 128 | + ], |
| 129 | + }, |
| 130 | + { |
| 131 | + label: 'openIdConnectUrl', |
| 132 | + insertText: 'openIdConnectUrl', |
| 133 | + kind: 14, |
| 134 | + format: CompletionFormat.QUOTED, |
| 135 | + type: CompletionType.PROPERTY, |
| 136 | + insertTextFormat: 2, |
| 137 | + documentation: { |
| 138 | + kind: 'markdown', |
| 139 | + value: |
| 140 | + '**REQUIRED**. Applies to `openIdConnect`. **REQUIRED**. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL. The OpenID Connect standard requires the use of TLS.', |
| 141 | + }, |
| 142 | + targetSpecs: [{ namespace: 'openapi', version: '3.1.0' }], |
| 143 | + }, |
| 144 | + { |
| 145 | + target: 'type', |
| 146 | + label: 'apiKey', |
| 147 | + insertText: 'apiKey', |
| 148 | + kind: 12, |
| 149 | + format: CompletionFormat.QUOTED, |
| 150 | + type: CompletionType.VALUE, |
| 151 | + insertTextFormat: 2, |
| 152 | + }, |
| 153 | + { |
| 154 | + target: 'type', |
| 155 | + label: 'http', |
| 156 | + insertText: 'http', |
| 157 | + kind: 12, |
| 158 | + format: CompletionFormat.QUOTED, |
| 159 | + type: CompletionType.VALUE, |
| 160 | + insertTextFormat: 2, |
| 161 | + }, |
| 162 | + { |
| 163 | + target: 'type', |
| 164 | + label: 'oauth2', |
| 165 | + insertText: 'oauth2', |
| 166 | + kind: 12, |
| 167 | + format: CompletionFormat.QUOTED, |
| 168 | + type: CompletionType.VALUE, |
| 169 | + insertTextFormat: 2, |
| 170 | + }, |
| 171 | + { |
| 172 | + target: 'type', |
| 173 | + label: 'openIdConnect', |
| 174 | + insertText: 'openIdConnect', |
| 175 | + kind: 12, |
| 176 | + format: CompletionFormat.QUOTED, |
| 177 | + type: CompletionType.VALUE, |
| 178 | + insertTextFormat: 2, |
| 179 | + }, |
| 180 | + { |
| 181 | + target: 'in', |
| 182 | + label: 'query', |
| 183 | + insertText: 'query', |
| 184 | + kind: 12, |
| 185 | + format: CompletionFormat.QUOTED, |
| 186 | + type: CompletionType.VALUE, |
| 187 | + insertTextFormat: 2, |
| 188 | + }, |
| 189 | + { |
| 190 | + target: 'in', |
| 191 | + label: 'header', |
| 192 | + insertText: 'header', |
| 193 | + kind: 12, |
| 194 | + format: CompletionFormat.QUOTED, |
| 195 | + type: CompletionType.VALUE, |
| 196 | + insertTextFormat: 2, |
| 197 | + }, |
| 198 | + { |
| 199 | + target: 'in', |
| 200 | + label: 'cookie', |
| 201 | + insertText: 'cookie', |
| 202 | + kind: 12, |
| 203 | + format: CompletionFormat.QUOTED, |
| 204 | + type: CompletionType.VALUE, |
| 205 | + insertTextFormat: 2, |
| 206 | + }, |
| 207 | +]; |
| 208 | + |
| 209 | +export default completion; |
0 commit comments