Skip to content

Test for resolving references when there're other properties on schema #85

Closed
@zaggino

Description

@zaggino

I'm missing a test here: https://github.com/json-schema/JSON-Schema-Test-Suite/blob/develop/tests/draft4/ref.json

var schemaA = {
    "id": "long-string",
    "type": "string",
    "maxLength": 4096
}
var schemaB = {
    "id": "person-object",
    "type": "object",
    "properties": {
        "name": {
            "$ref": "long-string",
            "maxLength": 10
        }
    }
}

does the result need to respect "maxLength": 10 or not?
does the result need to respect both maxLength's? (lets say if it was not maxLength but format which would make more sense) - should the validator copy but not override properties where $ref is, or should it be match all of properties and also all properties on reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions