diff --git a/identity/handler.go b/identity/handler.go index 800edfa47572..8de630ca85ef 100644 --- a/identity/handler.go +++ b/identity/handler.go @@ -901,7 +901,7 @@ type deleteIdentityCredentials struct { // oryAccessToken: // // Responses: -// 200: identity +// 204: emptyResponse // 404: errorGeneric // default: errorGeneric func (h *Handler) deleteIdentityCredentials(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { diff --git a/internal/client-go/api_identity.go b/internal/client-go/api_identity.go index 2f2e1f2edd34..52a30f8e99b6 100644 --- a/internal/client-go/api_identity.go +++ b/internal/client-go/api_identity.go @@ -121,9 +121,8 @@ type IdentityApi interface { /* * DeleteIdentityCredentialsExecute executes the request - * @return Identity */ - DeleteIdentityCredentialsExecute(r IdentityApiApiDeleteIdentityCredentialsRequest) (*Identity, *http.Response, error) + DeleteIdentityCredentialsExecute(r IdentityApiApiDeleteIdentityCredentialsRequest) (*http.Response, error) /* * DeleteIdentitySessions Delete & Invalidate an Identity's Sessions @@ -1059,7 +1058,7 @@ type IdentityApiApiDeleteIdentityCredentialsRequest struct { type_ string } -func (r IdentityApiApiDeleteIdentityCredentialsRequest) Execute() (*Identity, *http.Response, error) { +func (r IdentityApiApiDeleteIdentityCredentialsRequest) Execute() (*http.Response, error) { return r.ApiService.DeleteIdentityCredentialsExecute(r) } @@ -1084,21 +1083,19 @@ func (a *IdentityApiService) DeleteIdentityCredentials(ctx context.Context, id s /* * Execute executes the request - * @return Identity */ -func (a *IdentityApiService) DeleteIdentityCredentialsExecute(r IdentityApiApiDeleteIdentityCredentialsRequest) (*Identity, *http.Response, error) { +func (a *IdentityApiService) DeleteIdentityCredentialsExecute(r IdentityApiApiDeleteIdentityCredentialsRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue *Identity ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityApiService.DeleteIdentityCredentials") if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/admin/identities/{id}/credentials/{type}" @@ -1142,19 +1139,19 @@ func (a *IdentityApiService) DeleteIdentityCredentialsExecute(r IdentityApiApiDe } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, nil, err + return nil, err } localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarHTTPResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -1167,31 +1164,22 @@ func (a *IdentityApiService) DeleteIdentityCredentialsExecute(r IdentityApiApiDe err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarHTTPResponse, newErr } var v ErrorGeneric err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil + return localVarHTTPResponse, nil } type IdentityApiApiDeleteIdentitySessionsRequest struct { diff --git a/internal/httpclient/api_identity.go b/internal/httpclient/api_identity.go index 2f2e1f2edd34..52a30f8e99b6 100644 --- a/internal/httpclient/api_identity.go +++ b/internal/httpclient/api_identity.go @@ -121,9 +121,8 @@ type IdentityApi interface { /* * DeleteIdentityCredentialsExecute executes the request - * @return Identity */ - DeleteIdentityCredentialsExecute(r IdentityApiApiDeleteIdentityCredentialsRequest) (*Identity, *http.Response, error) + DeleteIdentityCredentialsExecute(r IdentityApiApiDeleteIdentityCredentialsRequest) (*http.Response, error) /* * DeleteIdentitySessions Delete & Invalidate an Identity's Sessions @@ -1059,7 +1058,7 @@ type IdentityApiApiDeleteIdentityCredentialsRequest struct { type_ string } -func (r IdentityApiApiDeleteIdentityCredentialsRequest) Execute() (*Identity, *http.Response, error) { +func (r IdentityApiApiDeleteIdentityCredentialsRequest) Execute() (*http.Response, error) { return r.ApiService.DeleteIdentityCredentialsExecute(r) } @@ -1084,21 +1083,19 @@ func (a *IdentityApiService) DeleteIdentityCredentials(ctx context.Context, id s /* * Execute executes the request - * @return Identity */ -func (a *IdentityApiService) DeleteIdentityCredentialsExecute(r IdentityApiApiDeleteIdentityCredentialsRequest) (*Identity, *http.Response, error) { +func (a *IdentityApiService) DeleteIdentityCredentialsExecute(r IdentityApiApiDeleteIdentityCredentialsRequest) (*http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue *Identity ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityApiService.DeleteIdentityCredentials") if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } localVarPath := localBasePath + "/admin/identities/{id}/credentials/{type}" @@ -1142,19 +1139,19 @@ func (a *IdentityApiService) DeleteIdentityCredentialsExecute(r IdentityApiApiDe } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, nil, err + return nil, err } localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarHTTPResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -1167,31 +1164,22 @@ func (a *IdentityApiService) DeleteIdentityCredentialsExecute(r IdentityApiApiDe err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarHTTPResponse, newErr } var v ErrorGeneric err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil + return localVarHTTPResponse, nil } type IdentityApiApiDeleteIdentitySessionsRequest struct { diff --git a/spec/api.json b/spec/api.json index 967d1f231670..90334abaa976 100755 --- a/spec/api.json +++ b/spec/api.json @@ -3781,15 +3781,8 @@ } ], "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/identity" - } - } - }, - "description": "identity" + "204": { + "$ref": "#/components/responses/emptyResponse" }, "404": { "content": { diff --git a/spec/swagger.json b/spec/swagger.json index 71869107b0eb..c8467e49c068 100755 --- a/spec/swagger.json +++ b/spec/swagger.json @@ -636,11 +636,8 @@ } ], "responses": { - "200": { - "description": "identity", - "schema": { - "$ref": "#/definitions/identity" - } + "204": { + "$ref": "#/responses/emptyResponse" }, "404": { "description": "errorGeneric",