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

RESTWS-817: ConceptResource to GET concepts of a given class #583

Closed
wants to merge 6 commits into from
Closed

RESTWS-817: ConceptResource to GET concepts of a given class #583

wants to merge 6 commits into from

Conversation

josephbate
Copy link

Description of what I changed

  1. added the name parameter to the optional parameters
  2. added a method to check whether the concept class parameter is not null to invoke conceptservice.getConceptsByClass method
  3. Addeda test to the ConceptSearchHandler1_9test.java to test the changes made

Issue I worked on

see https://issues.openmrs.org/browse/RESTWS-817

Checklist: I completed these to help reviewers :)

  • My IDE is configured to follow the code style of this project.

    No? Unsure? -> configure your IDE, format the code and add the changes with git add . && git commit --amend

  • I have added tests to cover my changes. (If you refactored
    existing code that was well tested you do not have to add tests)

    No? -> write tests and add them to this commit git add . && git commit --amend

  • I ran mvn clean package right before creating this pull request and
    added all formatting changes to my commit.

    No? -> execute above command

  • All new and existing tests passed.

    No? -> figure out why and add the fix to your commit. It is your responsibility to make sure your code works.

  • My pull request is based on the latest changes of the master branch.

    No? Unsure? -> execute command git pull --rebase upstream master

@josephbate
Copy link
Author

i have redone this issue for a more cleaner review and merge
please review this pullrequest
cc. @mozzy11 @r-nathan @ibacher @dkayiwa

@josephbate
Copy link
Author

josephbate commented Oct 11, 2023

Hello @dkayiwa i have added the test case for both /openmrs/ws/rest/v1/concept?name=ASP&class=8d490dfc-c2cc-11de-8d13-0010c6dffd0f and /openmrs/ws/rest/v1/concept?class=8d490dfc-c2cc-11de-8d13-0010c6dffd0f

but according to the tests there only two concept with the same name same uuid i dont know how but to prove this i added System.out.println(results); to print then out

@josephbate
Copy link
Author

josephbate commented Oct 17, 2023

i realease if we add || conceptClass != null to the if clause will not detect errors or validate the existance of the conceptclass which in turn cause leakage
so am trying to work around the previous implementation so as to it allows both fully specified concept name entries and not fully specified

any suggestion on this issue is welcomed

@josephbate josephbate closed this by deleting the head repository Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants