diff --git a/falcon/client/user_management/combined_user_roles_v1_parameters.go b/falcon/client/user_management/combined_user_roles_v1_parameters.go index b8498d33..56c49c4e 100644 --- a/falcon/client/user_management/combined_user_roles_v1_parameters.go +++ b/falcon/client/user_management/combined_user_roles_v1_parameters.go @@ -76,7 +76,7 @@ type CombinedUserRolesV1Params struct { /* Filter. - The filter expression that should be used to limit the results + Filter using a query in Falcon Query Language (FQL). Supported filters: role_id, role_name */ Filter *string diff --git a/falcon/client/user_management/combined_user_roles_v1_responses.go b/falcon/client/user_management/combined_user_roles_v1_responses.go index 0a8c4d71..87321f93 100644 --- a/falcon/client/user_management/combined_user_roles_v1_responses.go +++ b/falcon/client/user_management/combined_user_roles_v1_responses.go @@ -56,14 +56,7 @@ func (o *CombinedUserRolesV1Reader) ReadResponse(response runtime.ClientResponse } return nil, result default: - result := NewCombinedUserRolesV1Default(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -606,75 +599,3 @@ func (o *CombinedUserRolesV1InternalServerError) readResponse(response runtime.C return nil } - -// NewCombinedUserRolesV1Default creates a CombinedUserRolesV1Default with default headers values -func NewCombinedUserRolesV1Default(code int) *CombinedUserRolesV1Default { - return &CombinedUserRolesV1Default{ - _statusCode: code, - } -} - -/* -CombinedUserRolesV1Default describes a response with status code -1, with default header values. - -OK -*/ -type CombinedUserRolesV1Default struct { - _statusCode int - - Payload *models.DomainMsaUserGrantsResponse -} - -// Code gets the status code for the combined user roles v1 default response -func (o *CombinedUserRolesV1Default) Code() int { - return o._statusCode -} - -// IsSuccess returns true when this combined user roles v1 default response has a 2xx status code -func (o *CombinedUserRolesV1Default) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this combined user roles v1 default response has a 3xx status code -func (o *CombinedUserRolesV1Default) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this combined user roles v1 default response has a 4xx status code -func (o *CombinedUserRolesV1Default) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this combined user roles v1 default response has a 5xx status code -func (o *CombinedUserRolesV1Default) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this combined user roles v1 default response a status code equal to that given -func (o *CombinedUserRolesV1Default) IsCode(code int) bool { - return o._statusCode == code -} - -func (o *CombinedUserRolesV1Default) Error() string { - return fmt.Sprintf("[GET /user-management/combined/user-roles/v1][%d] combinedUserRolesV1 default %+v", o._statusCode, o.Payload) -} - -func (o *CombinedUserRolesV1Default) String() string { - return fmt.Sprintf("[GET /user-management/combined/user-roles/v1][%d] combinedUserRolesV1 default %+v", o._statusCode, o.Payload) -} - -func (o *CombinedUserRolesV1Default) GetPayload() *models.DomainMsaUserGrantsResponse { - return o.Payload -} - -func (o *CombinedUserRolesV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.DomainMsaUserGrantsResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/falcon/client/user_management/query_user_v1_parameters.go b/falcon/client/user_management/query_user_v1_parameters.go index cdac5ca1..610cfbdf 100644 --- a/falcon/client/user_management/query_user_v1_parameters.go +++ b/falcon/client/user_management/query_user_v1_parameters.go @@ -64,7 +64,7 @@ type QueryUserV1Params struct { /* Filter. - The filter expression that should be used to limit the results + Filter using a query in Falcon Query Language (FQL). Supported filters: assigned_cids, cid, first_name, last_name, name, uid */ Filter *string diff --git a/falcon/client/user_management/query_user_v1_responses.go b/falcon/client/user_management/query_user_v1_responses.go index e154f06e..220e8aa2 100644 --- a/falcon/client/user_management/query_user_v1_responses.go +++ b/falcon/client/user_management/query_user_v1_responses.go @@ -56,14 +56,7 @@ func (o *QueryUserV1Reader) ReadResponse(response runtime.ClientResponse, consum } return nil, result default: - result := NewQueryUserV1Default(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } @@ -606,75 +599,3 @@ func (o *QueryUserV1InternalServerError) readResponse(response runtime.ClientRes return nil } - -// NewQueryUserV1Default creates a QueryUserV1Default with default headers values -func NewQueryUserV1Default(code int) *QueryUserV1Default { - return &QueryUserV1Default{ - _statusCode: code, - } -} - -/* -QueryUserV1Default describes a response with status code -1, with default header values. - -OK -*/ -type QueryUserV1Default struct { - _statusCode int - - Payload *models.MsaQueryResponse -} - -// Code gets the status code for the query user v1 default response -func (o *QueryUserV1Default) Code() int { - return o._statusCode -} - -// IsSuccess returns true when this query user v1 default response has a 2xx status code -func (o *QueryUserV1Default) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this query user v1 default response has a 3xx status code -func (o *QueryUserV1Default) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this query user v1 default response has a 4xx status code -func (o *QueryUserV1Default) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this query user v1 default response has a 5xx status code -func (o *QueryUserV1Default) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this query user v1 default response a status code equal to that given -func (o *QueryUserV1Default) IsCode(code int) bool { - return o._statusCode == code -} - -func (o *QueryUserV1Default) Error() string { - return fmt.Sprintf("[GET /user-management/queries/users/v1][%d] queryUserV1 default %+v", o._statusCode, o.Payload) -} - -func (o *QueryUserV1Default) String() string { - return fmt.Sprintf("[GET /user-management/queries/users/v1][%d] queryUserV1 default %+v", o._statusCode, o.Payload) -} - -func (o *QueryUserV1Default) GetPayload() *models.MsaQueryResponse { - return o.Payload -} - -func (o *QueryUserV1Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.MsaQueryResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/falcon/client/user_management/user_management_client.go b/falcon/client/user_management/user_management_client.go index d5ae0eff..bc800a0b 100644 --- a/falcon/client/user_management/user_management_client.go +++ b/falcon/client/user_management/user_management_client.go @@ -518,8 +518,9 @@ func (a *Client) CombinedUserRolesV1(params *CombinedUserRolesV1Params, opts ... return success, nil } // unexpected success response - unexpectedSuccess := result.(*CombinedUserRolesV1Default) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for combinedUserRolesV1: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /* @@ -704,8 +705,9 @@ func (a *Client) QueryUserV1(params *QueryUserV1Params, opts ...ClientOption) (* return success, nil } // unexpected success response - unexpectedSuccess := result.(*QueryUserV1Default) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for queryUserV1: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) } /*