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

Include columns to the ErrorValidationResponse #272

Merged
merged 1 commit into from
Sep 12, 2024
Merged

Conversation

palagdan
Copy link
Collaborator

@palagdan palagdan commented Sep 12, 2024

Resolves #271

response looks like this:

{
    "@id": "_:b0",
    "@type": "ValidationConstraintError",
    "columns": [
        "person",
        "lastName",
        "firstName"
    ],
    "constraintFailureEvidences": [
        {
            "@id": "_:b1",
            "firstName": "Peter",
            "lastName": "Hnizdo",
            "person": "http://onto.fel.cvut.cz/ontologies/s-pipes/examples/constraint-validation/people/person-2"
        },
        {
            "@id": "_:b2",
            "firstName": "Pavel",
            "lastName": "Hnizdo",
            "person": "http://onto.fel.cvut.cz/ontologies/s-pipes/examples/constraint-validation/people/person-1"
        }
    ],
    "constraintQuery": "# More than one person matches input parameters\n        PREFIX foaf: <http://xmlns.com/foaf/0.1/>\n\n        SELECT ?person (?lastNameOuter as ?lastName) ?firstName\n        WHERE {\n          {\n            SELECT (count(distinct ?p) as ?pCount)\n            WHERE {\n               ?p a foaf:Person;\n                  foaf:firstName ?firstName;\n                  foaf:lastName ?lastName;\n              .\n            }\n          }\n\n          FILTER(?pCount > 1)\n\n          ?person a foaf:Person;\n             foaf:lastName ?lastNameOuter;\n             foaf:firstName ?firstName;\n          .\n      }",
    "message": "More than one person matches input parameters",
    "module": "http://onto.fel.cvut.cz/ontologies/s-pipes/constraint-validation/construct-matched-person",
    "@context": {
        "ValidationConstraintError": "http://onto.fel.cvut.cz/ontologies/s-pipes/ValidationConstraintError",
        "module": "http://onto.fel.cvut.cz/ontologies/s-pipes/module",
        "message": "http://onto.fel.cvut.cz/ontologies/s-pipes/message",
        "constraintFailureEvidences": {
            "@id": "http://onto.fel.cvut.cz/ontologies/s-pipes/constraintFailureEvidences",
            "@container": "@list"
        },
        "columns": {
            "@id": "http://onto.fel.cvut.cz/ontologies/s-pipes/columns",
            "@container": "@list"
        },
        "person": {
            "@id": "http://onto.fel.cvut.cz/ontologies/s-pipes/person",
            "@type": "@id"
        },
        "lastName": {
            "@id": "http://onto.fel.cvut.cz/ontologies/s-pipes/lastName"
        },
        "firstName": {
            "@id": "http://onto.fel.cvut.cz/ontologies/s-pipes/firstName"
        },
        "constraintQuery": "http://onto.fel.cvut.cz/ontologies/s-pipes/constraintQuery"
    }
}

@palagdan palagdan changed the title [#271] Include columns to the ErrorValidationResponse Include columns to the ErrorValidationResponse Sep 12, 2024
@blcham blcham merged commit c08f264 into main Sep 12, 2024
2 checks passed
@blcham blcham deleted the 271-columns-list branch September 12, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ErrorValidationResponse should return list of columns
2 participants