Skip to content

Commit

Permalink
Update pydantic v1 to v2.
Browse files Browse the repository at this point in the history
  • Loading branch information
antarcticrainforest committed Mar 15, 2024
1 parent 25edf97 commit 01872ea
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/databrowser/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from fastapi import FastAPI, HTTPException, Query, Request
from fastapi.responses import JSONResponse, StreamingResponse
from pydantic import BaseModel, Required
from pydantic import BaseModel

from ._version import __version__
from .config import ServerConfig, defaults
Expand Down Expand Up @@ -131,7 +131,7 @@ async def intake_catalogue(
multi_version: Annotated[bool, SolrConfig.params["multi_version"]] = False,
translate: Annotated[bool, SolrConfig.params["translate"]] = True,
max_results: Annotated[int, SolrConfig.params["max_results"]] = -1,
request: Request = Required,
request: Request = Ellipsis,
) -> StreamingResponse:
"""Create an intake catalogue from a freva search."""
solr_search = await SolrSearch.validate_parameters(
Expand Down Expand Up @@ -167,7 +167,7 @@ async def metadata_search(
facets: Annotated[
Union[List[str], None], SolrConfig.params["facets"]
] = None,
request: Request = Required,
request: Request = Ellipsis,
) -> JSONResponse:
"""Get the search facets."""
solr_search = await SolrSearch.validate_parameters(
Expand Down Expand Up @@ -199,7 +199,7 @@ async def extended_search(
facets: Annotated[
Union[List[str], None], SolrConfig.params["facets"]
] = None,
request: Request = Required,
request: Request = Ellipsis,
) -> JSONResponse:
"""Get the search facets."""
solr_search = await SolrSearch.validate_parameters(
Expand All @@ -225,7 +225,7 @@ async def data_search(
start: Annotated[int, SolrConfig.params["start"]] = 0,
multi_version: Annotated[bool, SolrConfig.params["multi_version"]] = False,
translate: Annotated[bool, SolrConfig.params["translate"]] = True,
request: Request = Required,
request: Request = Ellipsis,
) -> StreamingResponse:
"""Search for datasets."""
solr_search = await SolrSearch.validate_parameters(
Expand Down

0 comments on commit 01872ea

Please sign in to comment.