Skip to content
Snippets Groups Projects
Verified Commit 9e0bf249 authored by Erwan Rouchet's avatar Erwan Rouchet
Browse files

Add OpenAPI docs for email verification endpoint

parent 1d153f1a
No related branches found
No related tags found
1 merge request!754Add OpenAPI docs for email verification endpoint
......@@ -186,6 +186,35 @@ class UserEmailLogin(CreateAPIView):
class UserEmailVerification(APIView):
"""
Verify a user's email address
"""
openapi_overrides = {
'operationId': 'VerifyEmail',
'tags': ['users'],
'parameters': [
{
'name': 'email',
'in': 'query',
'description': 'E-mail to verify',
'required': True,
'schema': {
'type': 'string',
'format': 'email',
},
},
{
'name': 'token',
'in': 'query',
'description': 'Verification token',
'required': True,
'schema': {
'type': 'string',
},
},
],
}
def get(self, *args, **kwargs):
if not all(arg in self.request.GET for arg in ('email', 'token')):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment