[json] improve property suggestions with oneOf
See original GitHub issue- VSCode Version: Version 1.20.0-insider
- OS Version: 10.13.3
Steps to Reproduce:
- Use this JSON schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"oneOf": [
{
"title": "Wrapper",
"type": "object",
"required": [
"asset"
],
"properties": {
"asset": {
"type": "object"
}
}
},
{
"title": "No Wrapper",
"type": "object",
"properties": {
"id": {
"type": "string"
}
}
}
]
}
- Start writing JSON using this schema and type:
{
""
}
- Only id is suggested as an option, I expect both asset and id to be suggestions
NOTE: if i make “id” also required I get the correct suggestions.
Does this issue occur when all extensions are disabled?: Yes/No Yes
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:15
Top Results From Across the Web
How to prevent additions properties when using oneOf in ...
I want to restrict the validation to not allow addition properties. In the JSON example, the properties "noAllowedInt" and "notAllowedObject" ...
Read more >How to properly use oneOf and anyOf in Rest Schema?
1 Answer 1 · We need to set the (default/initial) type of the data.items to null instead of object . (and yes, the...
Read more >Implementations - JSON Schema
Dashjoin JSON Schema editor - Graphical online JSON Schema editor for draft-06 (minus oneOf, anyOf, allOf, not). The generated schema can be tested...
Read more >JSON Schema Serializer and Deserializer
Configure the JSON Schema serializer to use your oneOf for serialization, and not the event type, by configuring the following properties in your...
Read more >JSON Schema in RDF - W3C
JSON schema defines the $id and $ref keywords to increase reusability but also to define schemas in a recursive fashion. This feature is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
any more progress here?
I have the same problem.
Steps to Reproduce:
Does this issue occur when all extensions are disabled?: Yes
thnx.