-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(api): Add endpoint to allow user to resend confirmation email #543
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,11 +16,13 @@ paths: | |
/host: | ||
$ref: "./paths/host.yaml" | ||
/auth/signup/host: | ||
$ref: "./paths/auth/authSignupHost.yaml" | ||
$ref: "./paths/auth/authSignUpHost.yaml" | ||
/auth/signup/coordinator: | ||
$ref: "./paths/auth/authSignupCoordinator.yaml" | ||
$ref: "./paths/auth/authSignUpCoordinator.yaml" | ||
/auth/signin: | ||
$ref: "./paths/auth/authSignin.yaml" | ||
/auth/resend_confirmation_code: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this suppose to be snake or camel case There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @ju1es! Thank you for taking a look. This is a good and important question. Regarding API endpoint (OpenAPI paths):I checked again. I see there are both ways being used in this file (e.g.
Do you, @erikguntner, @Joshua-Douglas know if there is a preference on the front end side regarding the API endpoint naming convention? Regarding OpenAPI operationId:I tend to use snake case to follow PEP8 function and variable name convention because it's implemented in Python and the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @paulespinosa Yeah I was using snake case since that's what I saw in the Flask and connexion docs, but I defer to you all with more Python experience for what you wanna do moving forward. Camel case is the standard in Javascript land and always appreciated when getting data back from a db, but the endpoints don't necessarily need to be written in it. Hyphens look fairly clean tho There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so many options! thanks for looking into it so thoroughly @paulespinosa +1 hyphens for me as well. i don't have a strong preference except that we adhere to one convention for consistency. |
||
$ref: "./paths/auth/authResendConfirmationCode.yaml" | ||
/auth/confirm: | ||
$ref: "./paths/auth/authConfirm.yaml" | ||
/auth/signout: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
post: | ||
description: Resends the registration confirmation code to the specified user (identified by email). | ||
operationId: resend_confirmation_code | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
email: | ||
type: string | ||
required: | ||
responses: | ||
'200': | ||
description: successful operation | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../openapi.yaml#/components/schemas/ApiResponse' | ||
'400': | ||
description: The email parameter was not sent or the user with the given email was not found. | ||
'429': | ||
description: Too many requests to resend the registration confirmation code were made to this user. | ||
tags: | ||
- auth | ||
x-openapi-router-controller: openapi_server.controllers.auth_controller | ||
security: | ||
paulespinosa marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- jwt: ["secret"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the more specific breakdown of possible errors. Might be worth doing this with the other routes