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

data.json validation fails if null is provided for a relationship #36

Open
abstratt opened this issue Feb 20, 2017 · 0 comments
Open

data.json validation fails if null is provided for a relationship #36

abstratt opened this issue Feb 20, 2017 · 0 comments
Labels

Comments

@abstratt
Copy link
Owner

data.json validation fails if null is provided for a relationship:

Deploy failed: ERROR: null expected to be an object or reference - data.json : 1

    private void validateReferenceOrInstance(String currentNamespace, JsonNode jsonNode, TypeRef typeRef) {
        if (jsonNode.isTextual()) {
            validateReference(typeRef, currentNamespace, jsonNode);
        } else if (jsonNode.isObject()) {
            Entity referredEntity = schema.getEntity(typeRef.getEntityNamespace(), typeRef.getTypeName());
            validateInstance(referredEntity, jsonNode);
        } else {
            collector.addError(jsonNode + " expected to be an object or reference");
            return;
        }
    }
@abstratt abstratt added the bug label Feb 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant