Skip to content

Commit 24eddfb

Browse files
committed
Revert "autogen(openapi): regenerate swagger spec and internal client"
This reverts commit 4159b93.
1 parent 4f841da commit 24eddfb

File tree

23 files changed

+206
-206
lines changed

23 files changed

+206
-206
lines changed

cmd/cleanup/sql.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ Copyright © 2019 NAME HERE <EMAIL ADDRESS>
33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.
55
You may obtain a copy of the License at
6-
7-
http://www.apache.org/licenses/LICENSE-2.0
8-
6+
http://www.apache.org/licenses/LICENSE-2.0
97
Unless required by applicable law or agreed to in writing, software
108
distributed under the License is distributed on an "AS IS" BASIS,
119
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

cmd/migrate/sql.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
66
You may obtain a copy of the License at
77
8-
http://www.apache.org/licenses/LICENSE-2.0
8+
http://www.apache.org/licenses/LICENSE-2.0
99
1010
Unless required by applicable law or agreed to in writing, software
1111
distributed under the License is distributed on an "AS IS" BASIS,

examples/go/selfservice/error/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
// If you use Open Source this would be:
1010
//
11-
// var client = pkg.NewSDKForSelfHosted("http://127.0.0.1:4433")
11+
//var client = pkg.NewSDKForSelfHosted("http://127.0.0.1:4433")
1212
var client = pkg.NewSDK("playground")
1313

1414
func getError() *ory.SelfServiceError {

examples/go/selfservice/login/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
// If you use Open Source this would be:
1212
//
13-
// var client = pkg.NewSDKForSelfHosted("http://127.0.0.1:4433")
13+
//var client = pkg.NewSDKForSelfHosted("http://127.0.0.1:4433")
1414
var client = pkg.NewSDK("playground")
1515

1616
func performLogin() *ory.SuccessfulSelfServiceLoginWithoutBrowser {

examples/go/selfservice/logout/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
// If you use Open Source this would be:
1212
//
13-
// var client = pkg.NewSDKForSelfHosted("http://127.0.0.1:4433")
13+
//var client = pkg.NewSDKForSelfHosted("http://127.0.0.1:4433")
1414
var client = pkg.NewSDK("playground")
1515

1616
func performLogout() {

examples/go/selfservice/recovery/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
// If you use Open Source this would be:
1212
//
13-
// var client = pkg.NewSDKForSelfHosted("http://127.0.0.1:4433")
13+
//var client = pkg.NewSDKForSelfHosted("http://127.0.0.1:4433")
1414
var client = pkg.NewSDK("playground")
1515

1616
func performRecovery(email string) *ory.SelfServiceRecoveryFlow {

examples/go/selfservice/registration/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
// If you use Open Source this would be:
1212
//
13-
// var client = pkg.NewSDKForSelfHosted("http://127.0.0.1:4433")
13+
//var client = pkg.NewSDKForSelfHosted("http://127.0.0.1:4433")
1414
var client = pkg.NewSDK("playground")
1515

1616
func initRegistration() *ory.SuccessfulSelfServiceRegistrationWithoutBrowser {

examples/go/selfservice/settings/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
// If you use Open Source this would be:
1212
//
13-
// var client = pkg.NewSDKForSelfHosted("http://127.0.0.1:4433")
13+
//var client = pkg.NewSDKForSelfHosted("http://127.0.0.1:4433")
1414
var client = pkg.NewSDK("playground")
1515

1616
var ctx = context.Background()

examples/go/selfservice/verification/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
// If you use Open Source this would be:
1212
//
13-
// var client = pkg.NewSDKForSelfHosted("http://127.0.0.1:4433")
13+
//var client = pkg.NewSDKForSelfHosted("http://127.0.0.1:4433")
1414
var client = pkg.NewSDK("playground")
1515

1616
func performVerification(email string) *ory.SelfServiceVerificationFlow {

examples/go/session/tosession/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
// If you use Open Source this would be:
1010
//
11-
// var client = pkg.NewSDKForSelfHosted("http://127.0.0.1:4433")
11+
//var client = pkg.NewSDKForSelfHosted("http://127.0.0.1:4433")
1212
var client = pkg.NewSDK("playground")
1313

1414
func toSession() *ory.Session {

internal/httpclient/api_v0alpha2.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

selfservice/flow/login/handler.go

+29-29
Original file line numberDiff line numberDiff line change
@@ -410,17 +410,17 @@ type getSelfServiceLoginFlow struct {
410410
//
411411
// More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
412412
//
413-
// Produces:
414-
// - application/json
413+
// Produces:
414+
// - application/json
415415
//
416-
// Schemes: http, https
416+
// Schemes: http, https
417417
//
418-
// Responses:
419-
// 200: selfServiceLoginFlow
420-
// 403: jsonError
421-
// 404: jsonError
422-
// 410: jsonError
423-
// 500: jsonError
418+
// Responses:
419+
// 200: selfServiceLoginFlow
420+
// 403: jsonError
421+
// 404: jsonError
422+
// 410: jsonError
423+
// 500: jsonError
424424
func (h *Handler) fetchFlow(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
425425
ar, err := h.d.LoginFlowPersister().GetLoginFlow(r.Context(), x.ParseUUID(r.URL.Query().Get("id")))
426426
if err != nil {
@@ -520,33 +520,33 @@ type submitSelfServiceLoginFlowBody struct{}
520520
// If this endpoint is called with `Accept: application/json` in the header, the response contains the flow without a redirect. In the
521521
// case of an error, the `error.id` of the JSON response body can be one of:
522522
//
523-
// - `session_already_available`: The user is already signed in.
524-
// - `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
525-
// - `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!
526-
// - `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL.
527-
// Most likely used in Social Sign In flows.
523+
// - `session_already_available`: The user is already signed in.
524+
// - `security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.
525+
// - `security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!
526+
// - `browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL.
527+
// Most likely used in Social Sign In flows.
528528
//
529529
// More information can be found at [Ory Kratos User Login](https://www.ory.sh/docs/kratos/self-service/flows/user-login) and [User Registration Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration).
530530
//
531-
// Schemes: http, https
531+
// Schemes: http, https
532532
//
533-
// Consumes:
534-
// - application/json
535-
// - application/x-www-form-urlencoded
533+
// Consumes:
534+
// - application/json
535+
// - application/x-www-form-urlencoded
536536
//
537-
// Produces:
538-
// - application/json
537+
// Produces:
538+
// - application/json
539539
//
540-
// Header:
541-
// - Set-Cookie
540+
// Header:
541+
// - Set-Cookie
542542
//
543-
// Responses:
544-
// 200: successfulSelfServiceLoginWithoutBrowser
545-
// 303: emptyResponse
546-
// 400: selfServiceLoginFlow
547-
// 410: jsonError
548-
// 422: selfServiceBrowserLocationChangeRequiredError
549-
// 500: jsonError
543+
// Responses:
544+
// 200: successfulSelfServiceLoginWithoutBrowser
545+
// 303: emptyResponse
546+
// 400: selfServiceLoginFlow
547+
// 410: jsonError
548+
// 422: selfServiceBrowserLocationChangeRequiredError
549+
// 500: jsonError
550550
func (h *Handler) submitFlow(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
551551
rid, err := flow.GetFlowID(r)
552552
if err != nil {

selfservice/flow/logout/handler.go

+23-23
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,15 @@ type createSelfServiceLogoutFlowUrlForBrowsers struct {
106106
//
107107
// When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies.
108108
//
109-
// Produces:
110-
// - application/json
109+
// Produces:
110+
// - application/json
111111
//
112-
// Schemes: http, https
112+
// Schemes: http, https
113113
//
114-
// Responses:
115-
// 200: selfServiceLogoutUrl
116-
// 401: jsonError
117-
// 500: jsonError
114+
// Responses:
115+
// 200: selfServiceLogoutUrl
116+
// 401: jsonError
117+
// 500: jsonError
118118
func (h *Handler) createSelfServiceLogoutUrlForBrowsers(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
119119
sess, err := h.d.SessionManager().FetchFromRequest(r.Context(), r)
120120
if err != nil {
@@ -161,18 +161,18 @@ type submitSelfServiceLogoutFlowWithoutBrowserBody struct {
161161
// This endpoint does not remove any HTTP
162162
// Cookies - use the Browser-Based Self-Service Logout Flow instead.
163163
//
164-
// Consumes:
165-
// - application/json
164+
// Consumes:
165+
// - application/json
166166
//
167-
// Produces:
168-
// - application/json
167+
// Produces:
168+
// - application/json
169169
//
170-
// Schemes: http, https
170+
// Schemes: http, https
171171
//
172-
// Responses:
173-
// 204: emptyResponse
174-
// 400: jsonError
175-
// 500: jsonError
172+
// Responses:
173+
// 204: emptyResponse
174+
// 400: jsonError
175+
// 500: jsonError
176176
func (h *Handler) submitSelfServiceLogoutFlowWithoutBrowser(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
177177
var p submitSelfServiceLogoutFlowWithoutBrowserBody
178178
if err := h.dx.Decode(r, &p,
@@ -230,15 +230,15 @@ type submitSelfServiceLogoutFlow struct {
230230
//
231231
// More information can be found at [Ory Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout).
232232
//
233-
// Produces:
234-
// - application/json
233+
// Produces:
234+
// - application/json
235235
//
236-
// Schemes: http, https
236+
// Schemes: http, https
237237
//
238-
// Responses:
239-
// 303: emptyResponse
240-
// 204: emptyResponse
241-
// 500: jsonError
238+
// Responses:
239+
// 303: emptyResponse
240+
// 204: emptyResponse
241+
// 500: jsonError
242242
func (h *Handler) submitLogout(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
243243
expected := r.URL.Query().Get("token")
244244
if len(expected) == 0 {

selfservice/flow/recovery/handler.go

+42-41
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,15 @@ func (h *Handler) RegisterAdminRoutes(admin *x.RouterAdmin) {
107107
//
108108
// This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).
109109
//
110+
//
110111
// More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
111112
//
112-
// Schemes: http, https
113+
// Schemes: http, https
113114
//
114-
// Responses:
115-
// 200: selfServiceRecoveryFlow
116-
// 500: jsonError
117-
// 400: jsonError
115+
// Responses:
116+
// 200: selfServiceRecoveryFlow
117+
// 500: jsonError
118+
// 400: jsonError
118119
func (h *Handler) initAPIFlow(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
119120
if !h.d.Config().SelfServiceFlowRecoveryEnabled(r.Context()) {
120121
h.d.SelfServiceErrorManager().Forward(r.Context(), w, r, errors.WithStack(herodot.ErrBadRequest.WithReasonf("Recovery is not allowed because it was disabled.")))
@@ -159,13 +160,13 @@ type initializeSelfServiceRecoveryFlowWithoutBrowser struct {
159160
//
160161
// More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
161162
//
162-
// Schemes: http, https
163+
// Schemes: http, https
163164
//
164-
// Responses:
165-
// 200: selfServiceRecoveryFlow
166-
// 303: emptyResponse
167-
// 400: jsonError
168-
// 500: jsonError
165+
// Responses:
166+
// 200: selfServiceRecoveryFlow
167+
// 303: emptyResponse
168+
// 400: jsonError
169+
// 500: jsonError
169170
func (h *Handler) initBrowserFlow(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
170171
if !h.d.Config().SelfServiceFlowRecoveryEnabled(r.Context()) {
171172
h.d.SelfServiceErrorManager().Forward(r.Context(), w, r, errors.WithStack(herodot.ErrBadRequest.WithReasonf("Recovery is not allowed because it was disabled.")))
@@ -232,16 +233,16 @@ type getSelfServiceRecoveryFlow struct {
232233
//
233234
// More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
234235
//
235-
// Produces:
236-
// - application/json
236+
// Produces:
237+
// - application/json
237238
//
238-
// Schemes: http, https
239+
// Schemes: http, https
239240
//
240-
// Responses:
241-
// 200: selfServiceRecoveryFlow
242-
// 404: jsonError
243-
// 410: jsonError
244-
// 500: jsonError
241+
// Responses:
242+
// 200: selfServiceRecoveryFlow
243+
// 404: jsonError
244+
// 410: jsonError
245+
// 500: jsonError
245246
func (h *Handler) fetch(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
246247
if !h.d.Config().SelfServiceFlowRecoveryEnabled(r.Context()) {
247248
h.d.SelfServiceErrorManager().Forward(r.Context(), w, r, errors.WithStack(herodot.ErrBadRequest.WithReasonf("Recovery is not allowed because it was disabled.")))
@@ -329,35 +330,35 @@ type submitSelfServiceRecoveryFlowBody struct{}
329330
// Use this endpoint to complete a recovery flow. This endpoint
330331
// behaves differently for API and browser flows and has several states:
331332
//
332-
// - `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent
333-
// and works with API- and Browser-initiated flows.
334-
// - For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid.
333+
// - `choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent
334+
// and works with API- and Browser-initiated flows.
335+
// - For API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid.
335336
// and a HTTP 303 See Other redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired).
336-
// - For Browser clients without HTTP Header `Accept` or with `Accept: text/*` it returns a HTTP 303 See Other redirect to the Recovery UI URL with the Recovery Flow ID appended.
337-
// - `sent_email` is the success state after `choose_method` for the `link` method and allows the user to request another recovery email. It
338-
// works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state.
339-
// - `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow ("sending a recovery link")
340-
// does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL
341-
// (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with
342-
// a new Recovery Flow ID which contains an error message that the recovery link was invalid.
337+
// - For Browser clients without HTTP Header `Accept` or with `Accept: text/*` it returns a HTTP 303 See Other redirect to the Recovery UI URL with the Recovery Flow ID appended.
338+
// - `sent_email` is the success state after `choose_method` for the `link` method and allows the user to request another recovery email. It
339+
// works for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state.
340+
// - `passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow ("sending a recovery link")
341+
// does not have any API capabilities. The server responds with a HTTP 303 See Other redirect either to the Settings UI URL
342+
// (if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with
343+
// a new Recovery Flow ID which contains an error message that the recovery link was invalid.
343344
//
344345
// More information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery).
345346
//
346-
// Consumes:
347-
// - application/json
348-
// - application/x-www-form-urlencoded
347+
// Consumes:
348+
// - application/json
349+
// - application/x-www-form-urlencoded
349350
//
350-
// Produces:
351-
// - application/json
351+
// Produces:
352+
// - application/json
352353
//
353-
// Schemes: http, https
354+
// Schemes: http, https
354355
//
355-
// Responses:
356-
// 200: selfServiceRecoveryFlow
357-
// 303: emptyResponse
358-
// 400: selfServiceRecoveryFlow
359-
// 410: jsonError
360-
// 500: jsonError
356+
// Responses:
357+
// 200: selfServiceRecoveryFlow
358+
// 303: emptyResponse
359+
// 400: selfServiceRecoveryFlow
360+
// 410: jsonError
361+
// 500: jsonError
361362
func (h *Handler) submitFlow(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
362363
rid, err := flow.GetFlowID(r)
363364
if err != nil {

0 commit comments

Comments
 (0)