Skip to content

Commit

Permalink
fix: rename recovery models and generate SDKs
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Aug 27, 2020
1 parent fb28173 commit d764435
Show file tree
Hide file tree
Showing 5 changed files with 157 additions and 5 deletions.
26 changes: 25 additions & 1 deletion .schema/api.swagger.json
Expand Up @@ -2069,14 +2069,38 @@
"type": "object",
"properties": {
"config": {
"$ref": "#/definitions/loginFlowMethodConfig"
"$ref": "#/definitions/recoveryFlowMethodConfig"
},
"method": {
"description": "Method contains the request credentials type.",
"type": "string"
}
}
},
"recoveryFlowMethodConfig": {
"type": "object",
"required": [
"action",
"method",
"fields"
],
"properties": {
"action": {
"description": "Action should be used as the form action URL `\u003cform action=\"{{ .Action }}\" method=\"post\"\u003e`.",
"type": "string"
},
"fields": {
"$ref": "#/definitions/formFields"
},
"messages": {
"$ref": "#/definitions/Messages"
},
"method": {
"description": "Method is the form method (e.g. POST)",
"type": "string"
}
}
},
"recoveryLink": {
"type": "object",
"required": [
Expand Down
2 changes: 1 addition & 1 deletion internal/httpclient/models/recovery_flow_method.go

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

128 changes: 128 additions & 0 deletions internal/httpclient/models/recovery_flow_method_config.go

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

2 changes: 1 addition & 1 deletion internal/testhelpers/selfservice_recovery.go
Expand Up @@ -71,7 +71,7 @@ func GetRecoveryRequest(t *testing.T, client *http.Client, ts *httptest.Server)

func RecoverySubmitForm(
t *testing.T,
f *models.FlowMethodConfig,
f *models.RecoveryFlowMethodConfig,
hc *http.Client,
values url.Values,
) (string, *common.GetSelfServiceRecoveryFlowOK) {
Expand Down
4 changes: 2 additions & 2 deletions selfservice/flow/recovery/flow_method.go
Expand Up @@ -66,15 +66,15 @@ type FlowMethodConfigurator interface {
form.MessageAdder
}

// swagger:model loginFlowMethodConfig
// swagger:model recoveryFlowMethodConfig
type FlowMethodConfig struct {
// swagger:ignore
FlowMethodConfigurator

FlowMethodConfigMock
}

// swagger:model loginFlowMethodConfigPayload
// swagger:model recoveryFlowMethodConfigPayload
type FlowMethodConfigMock struct {
*form.HTMLForm
}
Expand Down

0 comments on commit d764435

Please sign in to comment.