diff --git a/internal/httpclient/models/json_error.go b/internal/httpclient/models/json_error.go new file mode 100644 index 00000000000..9819ea3551e --- /dev/null +++ b/internal/httpclient/models/json_error.go @@ -0,0 +1,54 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// JSONError Generic Error Response +// +// Error responses are sent when an error (e.g. unauthorized, bad request, ...) occurred. +// +// swagger:model jsonError +type JSONError struct { + + // Name is the error name. + Error string `json:"error,omitempty"` + + // Debug contains debug information. This is usually not available and has to be enabled. + ErrorDebug string `json:"error_debug,omitempty"` + + // Description contains further information on the nature of the error. + ErrorDescription string `json:"error_description,omitempty"` + + // Code represents the error status code (404, 403, 401, ...). + StatusCode int64 `json:"status_code,omitempty"` +} + +// Validate validates this json error +func (m *JSONError) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *JSONError) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *JSONError) UnmarshalBinary(b []byte) error { + var res JSONError + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/internal/httpclient/models/plugin_config_interface.go b/internal/httpclient/models/plugin_config_interface.go index 43b13c30c2e..ccf8fc422dc 100644 --- a/internal/httpclient/models/plugin_config_interface.go +++ b/internal/httpclient/models/plugin_config_interface.go @@ -19,9 +19,6 @@ import ( // swagger:model PluginConfigInterface type PluginConfigInterface struct { - // Protocol to use for clients connecting to the plugin. - ProtocolScheme string `json:"ProtocolScheme,omitempty"` - // socket // Required: true Socket *string `json:"Socket"` diff --git a/oauth2/oauth2_auth_code_test.go b/oauth2/oauth2_auth_code_test.go index 36d4eecece8..480415102e4 100644 --- a/oauth2/oauth2_auth_code_test.go +++ b/oauth2/oauth2_auth_code_test.go @@ -339,7 +339,7 @@ func TestAuthCodeWithDefaultStrategy(t *testing.T) { WithLoginChallenge(r.URL.Query().Get("login_challenge")). WithBody(&models.AcceptLoginRequest{Subject: pointerx.String(""), Remember: true})) require.Error(t, err) // expects 400 - assert.Contains(t, err.(*admin.AcceptLoginRequestBadRequest).Payload.Reason, "Field 'subject' must not be empty", "%+v", *err.(*admin.AcceptLoginRequestBadRequest).Payload) + assert.Contains(t, err.(*admin.AcceptLoginRequestBadRequest).Payload.ErrorDescription, "Field 'subject' must not be empty", "%+v", *err.(*admin.AcceptLoginRequestBadRequest).Payload) }, testhelpers.HTTPServerNoExpectedCallHandler(t)) _, conf := newOAuth2Client(t, testhelpers.NewCallbackURL(t, "callback", testhelpers.HTTPServerNotImplementedHandler)) diff --git a/spec/api.json b/spec/api.json index 2b42fa6b982..9f6e283c75e 100755 --- a/spec/api.json +++ b/spec/api.json @@ -2154,10 +2154,6 @@ "Types" ], "properties": { - "ProtocolScheme": { - "description": "Protocol to use for clients connecting to the plugin.", - "type": "string" - }, "Socket": { "description": "socket", "type": "string"