diff --git a/default_api.go b/default_api.go index 2c574f1..7126d26 100644 --- a/default_api.go +++ b/default_api.go @@ -1264,7 +1264,8 @@ func (a *DefaultApiService) CreateUser(localVarOptionals map[string]interface{}) return NewAPIResponseWithError(localVarHTTPResponse, bodyBytes, reportError("Status: %v, Body: %s", localVarHTTPResponse.Status, bodyBytes)) } - return NewBitbucketAPIResponse(localVarHTTPResponse) + // No body parsing (a successful 204 response has no content) + return NewAPIResponse(localVarHTTPResponse), nil } /* DefaultApiService diff --git a/default_api_test.go b/default_api_test.go index c1c2d49..95a9da4 100644 --- a/default_api_test.go +++ b/default_api_test.go @@ -1003,6 +1003,7 @@ func TestDefaultApiService_CreateUser(t *testing.T) { wantErr, integrationTest bool }{ {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/admin/users: context canceled"}, true, false}, + {"GoodUser", fields{client: generateConfigFake()}, args{localVarOptionals: map[string]interface{}{"name": "username"}}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/admin/users?name=username: context canceled"}, true, false}, } for _, tt := range tests { if tt.integrationTest != runIntegrationTests {