You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicstaticstringProjectIdOrPath(thisobjectobj){switch(obj){casenull:thrownew ArgumentException("ID or Path cannot be null");caseint id:return id.ToString();casestring path:return path.UrlEncode();case Project project:{intid= project.Id;if(id>0){return id.ToString();}stringpath= project.PathWithNamespace?.Trim();if(!string.IsNullOrEmpty(path)){return path.UrlEncode();}break;}}thrownew ArgumentException($"Cannot determine project ID or Path from provided {obj.GetType().Name} instance. "+"Must be int, string, Project instance");}
reason being id is path parameter and not a body parameter. Same reason for all these query parameter PRs 😄
Would be great to switch all int id, int projectId, int groupId and int userId out with object id so we can allow users to pass string without worrying about URL encoding or finding the damn project id.
The text was updated successfully, but these errors were encountered:
jetersen
changed the title
fixup request classes and use id/path as a object
fixup request classes and use id/path as a object on method being called
Sep 20, 2019
I'd like to fix up the request classes to move id / path out of the request object and onto the parameter as type
object id
So this pattern
GitLabApiClient/src/GitLabApiClient/ProjectsClient.cs
Lines 129 to 133 in 2f5c1bc
is replaced with
reason being
id
is path parameter and not a body parameter. Same reason for all these query parameter PRs 😄Would be great to switch all
int id
,int projectId
,int groupId
andint userId
out withobject id
so we can allow users to pass string without worrying about URL encoding or finding the damn project id.This should help solve #18 and #33
The text was updated successfully, but these errors were encountered: