-
Notifications
You must be signed in to change notification settings - Fork 33
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
Support for value format validation #229
Comments
No.
Indeed it should be nice, but I fear that it will not an easy task. The first thing to do is to study if we can use https://github.com/microsoft/vscode-json-languageservice to manage partial JSON validation, hover, completion, etc. |
Yep, I think we can start with the first suggestion and see how it goes. |
Hey, Feels like a bad design to me. but not sure whats a better fitting solution looks like. Also seems like the way to add diagnostics in an embeded document is a little hacky, from what i can tell, I'm supposed to clone the document, and replace all the characters in it with " " except for the embeded part. That way the diagnostics align on the original document. Not sure if you have any experience with this sort of stuff, but would love to know if you have an alternative solution. |
Thanks so muuch foe studying this super nice feature. I think we should follow the same idea than vscode html language server which consumes html and CSS vscode language service since html can embedds CSS. I think we should have languages modes (today we will have JSON mode): For instance for validation, you get all languages mode like html language server does https://github.com/microsoft/vscode/blob/11cea7dfb79b4bcbea2b99f3c955a7636ddeac58/extensions/html-language-features/server/src/htmlServer.ts#L280 and consumes doValidation like https://github.com/microsoft/vscode/blob/11cea7dfb79b4bcbea2b99f3c955a7636ddeac58/extensions/html-language-features/server/src/htmlServer.ts#L286 Here a sample with cssMode doValidation https://github.com/microsoft/vscode/blob/11cea7dfb79b4bcbea2b99f3c955a7636ddeac58/extensions/html-language-features/server/src/modes/cssMode.ts#L20 I suggest that you try to mimic the language mode used in vscode. See https://github.com/microsoft/vscode/blob/main/extensions/html-language-features/server/src/modes/cssMode.ts which support CSS features not only diagnostics but completion etc that we should support too for json |
Hi,
Does this extension currently support body validation?
If not, It could be nice to have json format validation (eg: if you forgot to remove a trailing
,
):Currently, the message is sent with bad format.
Also, might be nice to support custom json-schema validations.
Would love to hear what you think.
And thanks for the great extension :)
The text was updated successfully, but these errors were encountered: