Skip to content

Malformed request with missing prefixes #8

@Mvwivs

Description

@Mvwivs

If client is missing some prefixes needed by schema, malformed response is build, which results in Bad request.

For example ArtifactShapeSchema requires rm and dcterms prefixes and result looks like this:

PREFIX jsld: <http://agentlab.ru/jsld_test#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX sh: <http://www.w3.org/ns/shacl#>
SELECT ?eIri0 ?targetClass0 ?title0 ?description0 ?inCreationMenu0 ?defaultIndividNs0 ?defaultFormat0 ?iconReference0 WHERE {
  ?eIri0 rdf:type sh:NodeShape;
    sh:targetClass ?targetClass0.
  OPTIONAL { ?eIri0 <undefinedtitle> ?title0. }
  OPTIONAL { ?eIri0 <undefineddescription> ?description0. }
  OPTIONAL { ?eIri0 <undefinedinCreationMenu> ?inCreationMenu0. }
  OPTIONAL { ?eIri0 <undefineddefaultIndividNs> ?defaultIndividNs0. }
  OPTIONAL { ?eIri0 <undefineddefaultFormat> ?defaultFormat0. }
  OPTIONAL { ?eIri0 <undefinediconReference> ?iconReference0. }
  FILTER(?targetClass0 = jsld:Person)
}

Client probably should receive error earlier, when provider was constructing request

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions