Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UserApi Development Initialized #189

Closed
wants to merge 2 commits into from
Closed

UserApi Development Initialized #189

wants to merge 2 commits into from

Conversation

ajammil
Copy link

@ajammil ajammil commented Mar 28, 2019

I did the first endpoint, but I need the feedback.
Also in the Mock test for the UserApi, I disabled the assertSent function as it gave me errors. Could you tell me what I did wrong?
Thank you in advance.

This PR is targeting issue #183 .

I did the first endpoint, but I need the feedback.
Also in the Mock test for the UserApi, I disabled the assertSent function as it gave me errors. Could you tell me what I did wrong?
Thank you in advance.
@cdancy cdancy self-assigned this Mar 28, 2019
@cdancy cdancy added this to the v2.5.2 milestone Mar 28, 2019
@Nullable @QueryParam("permission.1.projectId") String projProjectId,
@Nullable @QueryParam("permission.2") String repoRole,
@Nullable @QueryParam("permission.2.projectKey") String repoProjectKey,
@Nullable @QueryParam("permission.3.projectId") String repoPrrojectId,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we could have N number of these which is going to make this a bit unruly and also limit folks if we only specify 3. We'll probably have to create an optional Binder which will take in a list of of these "permission objects" which we will then have to inject the values as query-params. Take a look HERE and poke around the code base to see how we do this type of thing elsewhere. Let me know if you have any questions. Looks good so far.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry I misunderstood the documentation I thought permission was for global 1 was for project permissions and 2 for repo etc.. I didn't recognize they were the same thing but different filters.

I looked into what you told me, isn't that a way to bind some data to the payload? which is as much as I know should not be used with GET requests as their body is not processed? Please correct me if I misunderstood anything.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore the class name ... you can alter the request in general and append new query params/etc. Take a look at the below code where we do something like this:

https://github.com/cdancy/jenkins-rest/blob/master/src/main/java/com/cdancy/jenkins/rest/filters/ScrubNullFolderParam.java

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am sorry I have to postpone it to the next Friday, as am having my midterm exams this week and I got a lot of studying to do.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajammil of course and take your time.

@ajammil ajammil closed this by deleting the head repository Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants