1212from flask_smorest .pagination import PaginationParameters
1313
1414from .sql_models import (
15- BaseURISchema ,
1615 DatasetSchema
1716)
1817
2928 ValidationError ,
3029)
3130from dtool_lookup_server .schemas import (
32- UriSchema ,
31+ URISchema ,
3332 RegisterDatasetSchema ,
3433 SearchDatasetSchema ,
3534 SummarySchema ,
@@ -119,7 +118,7 @@ def search_datasets(
119118
120119@bp .route ("/register" , methods = ["POST" ])
121120@bp .arguments (RegisterDatasetSchema (partial = ("created_at" ,)))
122- @bp .response (201 , UriSchema )
121+ @bp .response (201 , URISchema )
123122@jwt_required ()
124123def register (dataset : RegisterDatasetSchema ):
125124 """Register a dataset. The user needs to have register permissions on the base_uri."""
@@ -144,9 +143,9 @@ def register(dataset: RegisterDatasetSchema):
144143# - may_search
145144
146145@bp .route ("/manifest" , methods = ["POST" ])
147- @bp .arguments (UriSchema )
146+ @bp .arguments (URISchema )
148147@jwt_required ()
149- def manifest (query : UriSchema ):
148+ def manifest (query : URISchema ):
150149 """Request the dataset manifest."""
151150 username = get_jwt_identity ()
152151 if not dtool_lookup_server .utils_auth .user_exists (username ):
@@ -170,9 +169,9 @@ def manifest(query: UriSchema):
170169
171170
172171@bp .route ("/readme" , methods = ["POST" ])
173- @bp .arguments (UriSchema )
172+ @bp .arguments (URISchema )
174173@jwt_required ()
175- def readme (query : UriSchema ):
174+ def readme (query : URISchema ):
176175 """Request the dataset readme."""
177176 username = get_jwt_identity ()
178177 if not dtool_lookup_server .utils_auth .user_exists (username ):
@@ -196,10 +195,9 @@ def readme(query: UriSchema):
196195
197196
198197@bp .route ("/annotations" , methods = ["POST" ])
199- @bp .arguments (UriSchema )
200- @bp .response (200 , Dict )
198+ @bp .arguments (URISchema )
201199@jwt_required ()
202- def annotations (query : UriSchema ):
200+ def annotations (query : URISchema ):
203201 """Request the dataset annotations."""
204202 username = get_jwt_identity ()
205203 if not dtool_lookup_server .utils_auth .user_exists (username ):
0 commit comments