JSON property value code completition

Answered

Hi.

I write JSON schema for my JSON object and use "JSON Schema version 7" mapping.
For example schema code:

{
"type": "object",
"properties": {
"source": {
"type": "string"
},
"target": {
"type": "string"
},
"distance": {
"type": "number"
}
},
"required": ["source", "target", "distance"]
}


When write "required" section for properties, IDEA suggest code completition for array items.

Can I get the same behavior for other JSON or it works only for this case?

For examle:

{
"users": {
"user1": {
"name" : "Alex"
},
"user2": {
"name": "John"
}
},
"manager": "user1"
}

When I write value for "manager" property IDEA suggest a choice between "user1" and "user2".

0

Please sign in to leave a comment.