Skip to content

#/tilda~0field, #/slash~1field, #/percent%25field don't work in reference #5

Closed
@stevehu

Description

@stevehu

This test case failed, and I know other libraries handle this well. Need time to investigate but not my high priority as I don't write schema like this.

    {
        "description": "escaped pointer ref",
        "schema": {
            "tilda~field": {"type": "integer"},
            "slash/field": {"type": "integer"},
            "percent%field": {"type": "integer"},
            "properties": {
                "tilda": {"$ref": "#/tilda~0field"},
                "slash": {"$ref": "#/slash~1field"},
                "percent": {"$ref": "#/percent%25field"}
            }
        },
        "tests": [
            {
                "description": "slash invalid",
                "data": {"slash": "aoeu"},
                "valid": false
            },
            {
                "description": "tilda invalid",
                "data": {"tilda": "aoeu"},
                "valid": false
            },
            {
                "description": "percent invalid",
                "data": {"percent": "aoeu"},
                "valid": false
            },
            {
                "description": "slash valid",
                "data": {"slash": 123},
                "valid": true
            },
            {
                "description": "tilda valid",
                "data": {"tilda": 123},
                "valid": true
            },
            {
                "description": "percent valid",
                "data": {"percent": 123},
                "valid": true
            }
        ]
    },

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions