Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

custom validator severity #150

Closed
Reload0213 opened this issue Sep 29, 2022 · 3 comments
Closed

custom validator severity #150

Reload0213 opened this issue Sep 29, 2022 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Reload0213
Copy link

I'd like to ask you one more question. The example you
example provided in the last question made it possible to use a custom validator.

However No matter what value is delivered as a key value of severity to the validation of the currently customized guidance message, it is output like the yellow "warning" format. As before, I want to pass values ​​like "info", "warning", "error" etc to isolate fatal errors and make them noticeably reddish.

I wonder if I should deliver a value other than "info", "warning", and "error" to the severity key of the customized inspector or not.

@josdejong josdejong added the enhancement New feature or request label Oct 3, 2022
@josdejong
Copy link
Owner

That is a good suggestion indeed, it would be nice to be able to specify the severity coming out of the validator.

Right now, the data models already have a severity field defined, but the UI doesn't utilize this information:

export enum ValidationSeverity {
info = 'info',
warning = 'warning',
error = 'error'
}
export interface ValidationError {
path: JSONPath
message: string
severity: ValidationSeverity
}

So we should reflect the severity in the rendered validation error table and the inline warning icons (both in text and tree mode).

Help implementing this would be welcome!

@josdejong josdejong added the help wanted Extra attention is needed label Oct 3, 2022
@Reload0213
Copy link
Author

If the ui reflects this point, it will be of great help in using the inspection.

Thank you for listening to me.

@josdejong
Copy link
Owner

Moving this idea to the Discussions > Ideas section since we are not actively working on it. Help implementing this would be welcome.

Repository owner locked and limited conversation to collaborators Dec 13, 2023
@josdejong josdejong converted this issue into discussion #369 Dec 13, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants