Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions packages/apidom-ls/src/config/openapi/server/completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@ const completion: ApidomCompletionItem[] = [
{ namespace: 'openapi', version: '3.0.3' },
],
},
{
label: 'variables',
insertText: 'variables',
kind: 14,
format: CompletionFormat.OBJECT,
type: CompletionType.PROPERTY,
insertTextFormat: 2,
documentation: {
kind: 'markdown',
value:
"Map[`string`, [Server Variable Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#serverVariableObject)]\n\\\n\\\nA map between a variable name and its value. The value is used for substitution in the server's URL template.",
},
targetSpecs: [{ namespace: 'openapi', version: '3.1.0' }],
},
];

export default completion;
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { LinterMeta } from '../../../../apidom-language-types';
const variablesValuesTypeLint: LinterMeta = {
code: ApilintCodes.OPENAPI3_O_SERVER_FIELD_VARIABLES_VALUES_TYPE,
source: 'apilint',
message: '"varialbes" members must be Server Variable Object',
message: '"variables" members must be Server Variable Object',
severity: 1,
linterFunction: 'apilintChildrenOfElementsOrClasses',
linterParams: [['serverVariable']],
Expand Down