Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a few bugs with top level schema definitions #74

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

acao
Copy link
Owner

@acao acao commented Nov 13, 2023

Copy link

changeset-bot bot commented Nov 13, 2023

⚠️ No Changeset found

Latest commit: 22c47a6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

netlify bot commented Nov 13, 2023

Deploy Preview for codemirror-json-schema ready!

Name Link
🔨 Latest commit 22c47a6
🔍 Latest deploy log https://app.netlify.com/sites/codemirror-json-schema/deploys/656d1da996a4240008a7126e
😎 Deploy Preview https://deploy-preview-74--codemirror-json-schema.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@acao acao force-pushed the completion-complex-type-bugs branch from 143547b to 22c47a6 Compare December 4, 2023 00:30
@@ -291,6 +292,57 @@ describe("jsonCompletion", () => {
},
]);
});
it("should autocomplete for array of objects with filter", async () => {
await expectCompletion('{ "arrayOfObjects": [ { "f|" } ] }', [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this works for me locally

]);
});
it("should autocomplete for a schema with top level $ref", async () => {
await expectCompletion(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

working on this one ⏱️

{ schema: testSchema3 }
);
});
it("should autocomplete for a schema with top level complex type", async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

working on this one ⏱️

@acao
Copy link
Owner Author

acao commented May 29, 2024

@imolorhe from what i can tell it is because our getPointer method skips the object root itself

@imolorhe
Copy link
Collaborator

@acao I was able to get it working without touching getPointer. Just touching the completion logic, and all tests are passing!

@imolorhe
Copy link
Collaborator

Since I'm on it, want to tackle a few other test cases before creating a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants