-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
24c9d07
commit 3e760de
Showing
4 changed files
with
19 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from contextlib import asynccontextmanager | ||
from urllib import response | ||
from fastapi import FastAPI, Response | ||
from fastapi import FastAPI, Response, APIRouter | ||
from fastapi.encoders import jsonable_encoder | ||
from fastapi.exceptions import RequestValidationError | ||
from fastapi.responses import JSONResponse | ||
|
@@ -30,7 +30,6 @@ | |
|
||
app = FastAPI() | ||
|
||
|
||
# Override response for input payload validation error | ||
@app.exception_handler(RequestValidationError) | ||
async def validation_exception_handler(request, exc): | ||
|
@@ -74,8 +73,8 @@ class DbType(str, Enum): | |
|
||
|
||
class BlastParams(BaseModel, extra='allow'): | ||
email: str | None = "[email protected]" | ||
title: str | None = "" | ||
email: str = "[email protected]" | ||
title: str = "" | ||
program: Program | ||
database: DbType | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters