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

lint should allow any value as input #182

Open
Stadly opened this issue May 6, 2024 · 0 comments
Open

lint should allow any value as input #182

Stadly opened this issue May 6, 2024 · 0 comments

Comments

@Stadly
Copy link

Stadly commented May 6, 2024

The lint funciton expects a variable of type Schema as input. As I understand it, if the input is already a Schema it is already a valid JSON Schema, and hence does not need any linting. I think the lint function should take an any or unknown as input. This way the function can be used to check wheter or not an arbitrary value is a valid JSON Schema and hence can be cast to Schema.

The way it is now, in order to check whether a value is a valid JSON Schema, I have to first cast it to Schema. It is better to this cast after running lint, when I know that it is safe.

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

No branches or pull requests

1 participant