Skip to content

Commit

Permalink
Remove lastName required parameter from the OpenAPI user schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua-Douglas committed Apr 1, 2024
1 parent 74f861e commit 4a1ac90
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion api/openapi_server/controllers/auth_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def sign_up(body: dict, role: UserRole):
role=role,
firstName=body['firstName'],
middleName=body.get('middleName', ''),
lastName=body['lastName']
lastName=body.get('lastName', '')
)
except Exception as error:
raise AuthError({"message": str(error)}, 400)
Expand Down
1 change: 0 additions & 1 deletion api/openapi_server/openapi/schemas/_index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ UserSchema:
required:
- email
- firstName
- lastName
UserSignupSchema:
type: object
allOf:
Expand Down
5 changes: 0 additions & 5 deletions api/tests/test_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ def test_signup_with_missing_fields(client, endpoint):
'email': '[email protected]',
'password': 'Fakepass%^&7!asdf'
},
{
'email': '[email protected]',
'password': 'Fakepass%^&7!asdf',
'firstName': 'Josh'
},
{
'email': '[email protected]',
'password': 'Fakepass%^&7!asdf',
Expand Down

0 comments on commit 4a1ac90

Please sign in to comment.