diff --git a/CHANGELOG.md b/CHANGELOG.md index 61f927f..3e829bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# 5.3.6 (2026-01-13) + +## Changes + +- Redirect `/` to `/docs` + + # 5.3.5 (2025-12-18) ## Bugfixes diff --git a/dump_things_service/__about__.py b/dump_things_service/__about__.py index 72cf967..bc9d0f4 100644 --- a/dump_things_service/__about__.py +++ b/dump_things_service/__about__.py @@ -1 +1 @@ -__version__ = '5.3.5' +__version__ = '5.3.6' diff --git a/dump_things_service/main.py b/dump_things_service/main.py index 8fafc02..0cd93e6 100644 --- a/dump_things_service/main.py +++ b/dump_things_service/main.py @@ -35,6 +35,7 @@ from pydantic import ( from starlette.responses import ( JSONResponse, PlainTextResponse, + RedirectResponse, ) from dump_things_service import ( @@ -398,6 +399,11 @@ def validate_record( return JSONResponse(True) +@app.get('/', response_class=RedirectResponse) +async def root() -> RedirectResponse: + return RedirectResponse('/docs') + + @app.get( '/server', tags=['Server info'], diff --git a/dump_things_service/tests/test_roundtrip_flatsocial.py b/dump_things_service/tests/test_roundtrip_flatsocial.py index b77818e..46239cd 100644 --- a/dump_things_service/tests/test_roundtrip_flatsocial.py +++ b/dump_things_service/tests/test_roundtrip_flatsocial.py @@ -22,7 +22,7 @@ ttl_record = """@prefix dlflatsocial: ; dlthings:annotation_value "test_user_1" ] . """ @@ -35,36 +35,40 @@ dlflatsocial:test_john_ttl a dlflatsocial:Person ; dlsocialmx:given_name "Johnöüß" . """ -ttl_output_record_a = """@prefix dlflatsocial: . +ttl_output_record_a = """@prefix dlflat: . +@prefix dlflatsocial: . @prefix dlsocialmx: . @prefix dlthings: . @prefix obo: . -dlflatsocial:test_john_ttl a dlflatsocial:Person ; +dlflatsocial:another_john_ttl a dlflatsocial:Person ; dlsocialmx:given_name "Johnöüß" ; - dlthings:annotations [ a dlthings:Annotation ; + dlthings:annotations [ a dlflat:FlatAnnotation ; dlthings:annotation_tag ; dlthings:annotation_value "1970-01-01T00:00:00" ], - [ a dlthings:Annotation ; + [ a dlflat:FlatAnnotation ; dlthings:annotation_tag obo:NCIT_C54269 ; dlthings:annotation_value "test_user_1" ] . """ -ttl_output_record_b = """@prefix dlflatsocial: . + +ttl_output_record_b = """@prefix dlflat: . +@prefix dlflatsocial: . @prefix dlsocialmx: . @prefix dlthings: . @prefix obo: . -dlflatsocial:test_john_ttl a dlflatsocial:Person ; +dlflatsocial:another_john_ttl a dlflatsocial:Person ; dlsocialmx:given_name "Johnöüß" ; - dlthings:annotations [ a dlthings:Annotation ; + dlthings:annotations [ a dlflat:FlatAnnotation ; dlthings:annotation_tag obo:NCIT_C54269 ; dlthings:annotation_value "test_user_1" ], - [ a dlthings:Annotation ; + [ a dlflat:FlatAnnotation ; dlthings:annotation_tag ; dlthings:annotation_value "1970-01-01T00:00:00" ] . """ + new_json_pid = 'dlflatsocial:another_john_ttl'