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

Anchors naming of 2020 still following 2019 rules #690

Closed
1 task done
suprith-hub opened this issue Mar 17, 2024 · 5 comments · Fixed by #691
Closed
1 task done

Anchors naming of 2020 still following 2019 rules #690

suprith-hub opened this issue Mar 17, 2024 · 5 comments · Fixed by #691
Labels
bug Something isn't working pkg:schema

Comments

@suprith-hub
Copy link

Nuget Package

JsonSchema.Net

Package Version

6.0.4

Operating System

Windows

.Net Target (if relevant, please specify the version in the description)

.Net Framework

A clear and concise description of the bug.

The 2020 spec says anchor naming can start from "_" and not include ":", but _ isnt supported and : still works:

What did you expect?

I expect ":" not to work and "_" to work

Please add test code or steps to reproduce the behavior.

the website where I tested: https://json-everything.net/json-schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"if": {
"properties": {
"foo": {
"$anchor":"it:em",
"const": "then" }
},
"required": ["foo"]
},
"$ref":"#it:em"
}

use 2020 schema evaluation

Is there any other information you'd like to share regarding this bug?

No response

Code of Conduct & Contributor Guidelines

  • I agree to follow this project's Code of Conduct and Contribution Guidelines.
@suprith-hub suprith-hub added the bug Something isn't working label Mar 17, 2024
@gregsdennis
Copy link
Collaborator

gregsdennis commented Mar 17, 2024

Hey, thanks for reporting.

This is actually something that would be a great addition to the Test Suite.

Would you mind opening an issue there, please? I've created a PR 👇.

@suprith-hub
Copy link
Author

suprith-hub commented Mar 25, 2024

Great, let me add in the test-suite let me do it

@gregsdennis
Copy link
Collaborator

@Era-cell I had already gone that route, and it was decided that the Test Suite isn't set up for such tests, and they're just be meta-schema tests.

I've already added these locally. There's nothing left to do here.

@suprith-hub
Copy link
Author

@gregsdennis Yeah I read though the issues that day.. Is there a need to set up Test-suite for syntax validation too? or its already done?

@gregsdennis
Copy link
Collaborator

That's a long-standing issue in that repo and should be discussed there with the appropriate people, not in this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg:schema
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants