Skip to content

Anchors naming of 2020 still following 2019 rules #690

@suprith-hub

Description

@suprith-hub

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions