To fix it, we should make MatchResult store schemas in a set to avoid equal objects from being present in the resolve result. But this for some reason breaks ancient anyOf validation. The related code seems really hard to debug, so the merging test is currently disabled. The corresponding change is reverted in the previous commit.
GitOrigin-RevId: 08e7fd02cb6556044c3a80863bd29fa1d770155f
Inherited works as follows:
- it wraps parent and child JsonSchemaObjects
- it delegates composed schema access to child object (oneOf, anyOf, allOf, not, if-else)
- it combines other properties and prefers children's one if the property is present in both objects
This helps solve dynamicAnchor and dynamicRef problem where an anchor declared in a base schema could be overridden in the dependent one. References to the anchor must resolve to the overridden anchor location -> we have to keep track of both declarations via inheritance mechanics.
GitOrigin-RevId: f26f14735ff937326cd559ae05288d369477e1a6
- if-then-else tests for smart and basic completion with different resolve logic
- dynamic anchors with overridden values
- unevaluated properties
- prefix items
- dependent schemas
- various new validations tests
- yaml and json coverage
GitOrigin-RevId: 63ec3d8176ef368a8c80ebcd3687fb3732412df3
The IncorrectOperationException was just a red herring. It's a symptom caused by
the invalidity of the YAML produced by the quick fix when automatically adding
multiple properties.
Basically, when adding several properties in a hash mapping (or "flow mapping"
in the spec terms - the ones with braces that look like JSON objects), the
separator between the properties was an EOL, but it's supposed to be an actual
comma. This led to a broken syntax after the first property insertion.
This was fixed by properly supporting commas for hash mappings.
GitOrigin-RevId: 84056029147a74c397493cc62a1baa58b5616125
- Use virtual file as a key in schema storage map
- Prefer KFMap instead of lazy properties
- Fix various minor code-style problems
GitOrigin-RevId: 20825456c5b98f654e3957eb9783badb21a6d433
These tests are temporary and should be removed along with the old JsonSchemaObject implementation. Their goal is to ensure that both implementations of the schema object and schema merger are producing exactly the same output during schema reading and in-schema resolve
GitOrigin-RevId: bb91ba2e3ff440bae4e8591363852590a78068fc
Primarily used by the Amper yaml files, this functionality provided great value but using incorrect approach at the same time. Previously stored inside a JsonSchemaObject, instances of NestedCompletionsRoot are now provided during json schema-based completion via the corresponding extension point. Caching of nested completion roots is now a responsibility of implementors. SchemaObject instances are no more mutated by this API, extension interface itself is simplified too and does not depend on a particular schema object instance - instead it assumes that the provided completions tree is always constructed for the very inspected file root
GitOrigin-RevId: e8ab13ab6af569f50525f37a1291d670595a7fe6
- The new schema parsing mechanism requires schema files to be valid -> accidentally invalid schemas in test data were fixed
- Explicit warning message text was added in some old-fashioned tests to make debugging experience easier
GitOrigin-RevId: 05d45d770d768a7aa70c554294434a731e9228ba
The current alphabetic ordering was annoying to use, and it didn't actually assert anything the user could see anyways.
GitOrigin-RevId: e5e95c5877e85a6f3fe05cd1ec26094734ef9dde
It makes what you read in the tests closer to what the user experiences. Additionally, it also asserts the rendered behavior.
GitOrigin-RevId: e15be753a157945c988246db7bd3bd4473ce970c
- Made intention preview available
- Merged subsequent read actions
- Made isAvailable work very fast
- Tried to set the same id to all commands to achieve single redo for the entire request, but that didn't work out yet
GitOrigin-RevId: 54f4a3458bb05d1a03729483a95b269fbf2875e0
Consider support of examples field as well, since they are both valid in the latest schema version
GitOrigin-RevId: cd65bc3c3bd19334fbf6ea42e545a8a349e9f236
To avoid having an entire file highlighted, we explicitly narrow the erroneous text range to the first child's one -> UX does not suffer much
GitOrigin-RevId: ef6b849fa1e57d26166415924f583ff6d4269c09