codemirror-json-schema / JSONCompletion
- addBooleanValueCompletion
- addDefaultValueCompletions
- addEnumValueCompletions
- addNullValueCompletion
- addSchemaValueCompletions
- applySnippetCompletion
- collectTypes
- doComplete
- doCompleteForSchema
- extendedRegExp
- getAppliedValue
- getInsertTextForGuessedValue
- getInsertTextForPlainText
- getInsertTextForProperty
- getInsertTextForPropertyName
- getInsertTextForString
- getInsertTextForValue
- getPropertyCompletions
- getSchemas
- getValueCompletions
- getValueFromLabel
• new JSONCompletion(opts
)
Name | Type |
---|---|
opts |
JSONCompletionOptions |
▸ Private
addBooleanValueCompletion(value
, collector
): void
Name | Type |
---|---|
value |
boolean |
collector |
CompletionCollector |
void
▸ Private
addDefaultValueCompletions(schema
, collector
, arrayDepth?
): void
Name | Type | Default value |
---|---|---|
schema |
JSONSchema7 |
undefined |
collector |
CompletionCollector |
undefined |
arrayDepth |
number |
0 |
void
▸ Private
addEnumValueCompletions(schema
, collector
): void
Name | Type |
---|---|
schema |
JSONSchema7 |
collector |
CompletionCollector |
void
▸ Private
addNullValueCompletion(collector
): void
Name | Type |
---|---|
collector |
CompletionCollector |
void
▸ Private
addSchemaValueCompletions(schema
, types
, collector
): void
Name | Type |
---|---|
schema |
JSONSchema7Definition |
types |
Object |
collector |
CompletionCollector |
void
▸ Private
applySnippetCompletion(completion
): Completion
Name | Type |
---|---|
completion |
Completion |
Completion
▸ Private
collectTypes(schema
, types
): void
Name | Type |
---|---|
schema |
JSONSchema7 |
types |
Object |
void
▸ doComplete(ctx
): never
[] | CompletionResult
Name | Type |
---|---|
ctx |
CompletionContext |
never
[] | CompletionResult
▸ Private
doCompleteForSchema(ctx
, rootSchema
): CompletionResult
Name | Type |
---|---|
ctx |
CompletionContext |
rootSchema |
JSONSchema7 |
CompletionResult
▸ Private
extendedRegExp(pattern
): undefined
| RegExp
Name | Type |
---|---|
pattern |
string |
undefined
| RegExp
▸ Private
getAppliedValue(value
): Object
Name | Type |
---|---|
value |
any |
Object
Name | Type |
---|---|
apply |
string |
label |
string |
▸ Private
getInsertTextForGuessedValue(value
, separatorAfter?
): string
Name | Type | Default value |
---|---|---|
value |
any |
undefined |
separatorAfter |
string |
"" |
string
▸ Private
getInsertTextForPlainText(text
): string
Name | Type |
---|---|
text |
string |
string
▸ Private
getInsertTextForProperty(key
, addValue
, rawWord
, rootSchema
, propertySchema?
): string
Name | Type |
---|---|
key |
string |
addValue |
boolean |
rawWord |
string |
rootSchema |
JSONSchema7 |
propertySchema? |
JSONSchema7Definition |
string
▸ Private
getInsertTextForPropertyName(key
, rawWord
): string
Name | Type |
---|---|
key |
string |
rawWord |
string |
string
▸ Private
getInsertTextForString(value
, prf?
): string
Name | Type | Default value |
---|---|---|
value |
string |
undefined |
prf |
string |
"#" |
string
▸ Private
getInsertTextForValue(value
, separatorAfter
): string
Name | Type |
---|---|
value |
any |
separatorAfter |
string |
string
▸ Private
getPropertyCompletions(rootSchema
, ctx
, node
, collector
, addValue
, rawWord
): void
Name | Type |
---|---|
rootSchema |
JSONSchema7 |
ctx |
CompletionContext |
node |
SyntaxNode |
collector |
CompletionCollector |
addValue |
boolean |
rawWord |
string |
void
▸ Private
getSchemas(rootSchema
, ctx
): JSONSchema7Definition
[]
Name | Type |
---|---|
rootSchema |
JSONSchema7 |
ctx |
CompletionContext |
JSONSchema7Definition
[]
▸ Private
getValueCompletions(rootSchema
, ctx
, types
, collector
): undefined
| { valuePrefix
: string
}
Name | Type |
---|---|
rootSchema |
JSONSchema7 |
ctx |
CompletionContext |
types |
Object |
collector |
CompletionCollector |
undefined
| { valuePrefix
: string
}
▸ Private
getValueFromLabel(value
): string
Name | Type |
---|---|
value |
any |
string
• Private
laxSchema: null
| JSONSchema7
= null
Inlined (expanded) top-level $ref if present. Does not contain any required properties and allows any additional properties everywhere.
• Private
mode: JSONMode
= MODES.JSON
• Private
opts: JSONCompletionOptions
• Private
originalSchema: null
| JSONSchema7
= null
• Private
parser: DocumentParser
• Private
schema: null
| JSONSchema7
= null
Inlined (expanded) top-level $ref if present.