Skip to content

Commit

Permalink
fix: string to enum for updateVerificationFlowWithLinkMethod Method (#…
Browse files Browse the repository at this point in the history
…3279)

Closes #2943
  • Loading branch information
sunakan authored May 25, 2023
1 parent 1def410 commit 34ff1d2
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion selfservice/strategy/link/strategy_verification.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ type updateVerificationFlowWithLinkMethod struct {
// Allowed values are `link` and `code`
//
// required: true
Method string `json:"method"`
Method verification.VerificationStrategy `json:"method"`
}

func (s *Strategy) Verify(w http.ResponseWriter, r *http.Request, f *verification.Flow) (err error) {
Expand Down
9 changes: 7 additions & 2 deletions spec/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -2942,8 +2942,13 @@
"type": "string"
},
"method": {
"description": "Method is the method that should be used for this verification flow\n\nAllowed values are `link` and `code`",
"type": "string"
"description": "Method is the method that should be used for this verification flow\n\nAllowed values are `link` and `code`\nlink VerificationStrategyLink\ncode VerificationStrategyCode",
"enum": [
"link",
"code"
],
"type": "string",
"x-go-enum-desc": "link VerificationStrategyLink\ncode VerificationStrategyCode"
}
},
"required": [
Expand Down
9 changes: 7 additions & 2 deletions spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -5729,8 +5729,13 @@
"type": "string"
},
"method": {
"description": "Method is the method that should be used for this verification flow\n\nAllowed values are `link` and `code`",
"type": "string"
"description": "Method is the method that should be used for this verification flow\n\nAllowed values are `link` and `code`\nlink VerificationStrategyLink\ncode VerificationStrategyCode",
"type": "string",
"enum": [
"link",
"code"
],
"x-go-enum-desc": "link VerificationStrategyLink\ncode VerificationStrategyCode"
}
}
},
Expand Down

0 comments on commit 34ff1d2

Please sign in to comment.