-
Notifications
You must be signed in to change notification settings - Fork 100
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
fbab3ca
commit 87ea9c4
Showing
7 changed files
with
66 additions
and
28 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
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ class Admin(Document): | |
password: str | ||
|
||
class Config: | ||
schema_extra = { | ||
json_schema_extra = { | ||
"example": { | ||
"fullname": "Abdulazeez Abdulazeez Adeshina", | ||
"email": "[email protected]", | ||
|
@@ -23,7 +23,7 @@ class Settings: | |
|
||
class AdminSignIn(HTTPBasicCredentials): | ||
class Config: | ||
schema_extra = { | ||
json_schema_extra = { | ||
"example": {"username": "[email protected]", "password": "3xt3m#"} | ||
} | ||
|
||
|
@@ -33,7 +33,7 @@ class AdminData(BaseModel): | |
email: EmailStr | ||
|
||
class Config: | ||
schema_extra = { | ||
json_schema_extra = { | ||
"example": { | ||
"fullname": "Abdulazeez Abdulazeez Adeshina", | ||
"email": "[email protected]", | ||
|
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ class Student(Document): | |
gpa: float | ||
|
||
class Config: | ||
schema_extra = { | ||
json_schema_extra = { | ||
"example": { | ||
"fullname": "Abdulazeez Abdulazeez Adeshina", | ||
"email": "[email protected]", | ||
|
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,14 +1,35 @@ | ||
motor #3.1.1 | ||
PyJWT | ||
bcrypt # 4.0.1 | ||
uvicorn # 0.21.1 | ||
pymongo # 4.3.3 | ||
fastapi # 0.95.0 | ||
pydantic[email,dotenv] #1.10.7 | ||
passlib # 1.7.4 | ||
|
||
beanie # 1.18.0 | ||
pytest # 7.3.1 | ||
httpx # 0.24.0 | ||
mongomock_motor # 0.0.19 | ||
pytest-mock # 3.10.0 | ||
annotated-types==0.5.0 | ||
anyio==3.7.1 | ||
bcrypt==4.0.1 | ||
beanie==1.22.6 | ||
certifi==2023.7.22 | ||
click==8.1.7 | ||
dnspython==2.4.2 | ||
email-validator==2.0.0.post2 | ||
exceptiongroup==1.1.3 | ||
fastapi==0.103.2 | ||
h11==0.14.0 | ||
httpcore==0.18.0 | ||
httpx==0.25.0 | ||
idna==3.4 | ||
iniconfig==2.0.0 | ||
lazy-model==0.2.0 | ||
mongomock==4.1.2 | ||
mongomock-motor==0.0.21 | ||
motor==3.3.1 | ||
packaging==23.2 | ||
passlib==1.7.4 | ||
pluggy==1.3.0 | ||
pydantic==2.4.2 | ||
pydantic_core==2.10.1 | ||
PyJWT==2.8.0 | ||
pymongo==4.5.0 | ||
pytest==7.4.2 | ||
pytest-mock==3.11.1 | ||
sentinels==1.0.0 | ||
sniffio==1.3.0 | ||
starlette==0.27.0 | ||
toml==0.10.2 | ||
tomli==2.0.1 | ||
typing_extensions==4.8.0 | ||
uvicorn==0.23.2 |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from pydantic import BaseModel | ||
from fastapi.security import HTTPBasicCredentials | ||
from pydantic import EmailStr | ||
|
||
class AdminSignIn(HTTPBasicCredentials): | ||
class Config: | ||
schema_extra = { | ||
"example": {"username": "[email protected]", "password": "3xt3m#"} | ||
} | ||
|
||
|
||
class AdminData(BaseModel): | ||
fullname: str | ||
email: EmailStr | ||
|
||
class Config: | ||
schema_extra = { | ||
"example": { | ||
"fullname": "Abdulazeez Abdulazeez Adeshina", | ||
"email": "[email protected]", | ||
} | ||
} |