diff options
author | Munyoki Kilyungi | 2023-10-24 16:27:35 +0300 |
---|---|---|
committer | BonfaceKilz | 2023-10-27 13:45:32 +0300 |
commit | 1db5eb7f415bbeaea4c5d161fa885791c4a71eba (patch) | |
tree | 7484259f133b80c6cd3cd2140fdc5b2b92b31a0e /gn3/api | |
parent | 5e6cd1933a97eb8a5903c3617d03885e91b2124a (diff) | |
download | genenetwork3-1db5eb7f415bbeaea4c5d161fa885791c4a71eba.tar.gz |
Remove un-necessary prefixes when searching publications.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn3/api')
-rw-r--r-- | gn3/api/metadata.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gn3/api/metadata.py b/gn3/api/metadata.py index 91e0b24..00dea0a 100644 --- a/gn3/api/metadata.py +++ b/gn3/api/metadata.py @@ -298,7 +298,7 @@ CONSTRUCT { @metadata.route("/publications/<name>", methods=["GET"]) def publications(name): - """Fetch a publication's metadata given it's ACCESSION_ID""" + """Fetch a publication's metadata given it's NAME""" try: if "unpublished" in name: name = f"gn:unpublished{name}" @@ -319,9 +319,13 @@ CONSTRUCT { return jsonld.compact( json.loads(sparql.queryAndConvert().serialize(format="json-ld")), { - "@context": PREFIXES | { + "@context": { "type": "@type", "id": "@id", + "dct": "http://purl.org/dc/terms/", + "fabio": "http://purl.org/spar/fabio/", + "prism": "http://prismstandard.org/namespaces/basic/2.0/", + "xsd": "http://www.w3.org/2001/XMLSchema#", "title": "dct:title", "journal": "fabio:Journal", "volume": "prism:volume", |