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: doNotSuggest for property and value completion #911

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

Conversation

p-spacek
Copy link
Contributor

What does this PR do?

exclude doNotSuggest schema from autocompletion
doNotSuggest was already there but implemented only for the simple object properties.
This PR uses doNotSuggest also for other scenarios: anyOf, values

"anyOf":[
  {
     "$ref": "schema1",
     "doNotSuggest": true
   },
  {
     "$ref": "schema2",
   }
]

What issues does this PR fix or reference?

related to the previous unfinished PR for the deprecated property:
#833

Is it tested? How?

adds unit tests

@p-spacek p-spacek force-pushed the fix/doNotSuggest-for-property-and-value-completion branch from 66ebd31 to bd11e21 Compare August 10, 2023 11:29
@p-spacek
Copy link
Contributor Author

p-spacek commented Sep 5, 2023

Hello @msivasubramaniaan, can I ask you for a review, please?

@gorkem
Copy link
Collaborator

gorkem commented Oct 7, 2023

We do inherit the doNotSuggest property from vscode json language service. As far as I can see on the JSON land it only applies to properties. Although I think this is an interesting usage of it.

@aeschli Is this something interesting for vscode json language service too?

@aeschli
Copy link
Contributor

aeschli commented Oct 9, 2023

Yes, if you want to make a PR against the json-language-service that would be great.
Note that doNotSuggest is internal and we don't want to advertise this. But if you can use it internally, why not.

@coveralls
Copy link

coveralls commented Nov 6, 2023

Coverage Status

coverage: 84.193% (+0.02%) from 84.174%
when pulling 769f53f on jigx-com:fix/doNotSuggest-for-property-and-value-completion
into 7203630 on redhat-developer:main.

@p-spacek
Copy link
Contributor Author

p-spacek commented Nov 6, 2023

Yes, if you want to make a PR against the json-language-service that would be great. Note that doNotSuggest is internal and we don't want to advertise this. But if you can use it internally, why not.

Hi, I created PR for this functionality microsoft/vscode-json-languageservice#213
but I found a not-related issue probably, see the linked PR.

@p-spacek p-spacek force-pushed the fix/doNotSuggest-for-property-and-value-completion branch from d7c2154 to 769f53f Compare May 29, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants