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

fix: ckan client api #100

Closed
wants to merge 1 commit into from
Closed

fix: ckan client api #100

wants to merge 1 commit into from

Conversation

admy7
Copy link
Contributor

@admy7 admy7 commented Aug 27, 2024

🚀 Pull Request Checklist

  • Title:

    • [ ] A brief, descriptive title for the changes.
  • Description:

    • [ ] Provide a clear and concise description of your pull request, including the purpose of the changes and the approach you've taken.
  • Context:

    • [ ] Why are these changes necessary? What problem do they solve? Link any related issues.
  • Changes:

    • [ ] List the major changes you've made, ideally organized by commit or feature.
  • Testing:

    • [ ] Describe how the changes have been tested. Include any relevant details about the testing environment and the test cases.
  • Screenshots (if applicable):

    • [ ] If your changes are visual, include screenshots to help explain your changes.
  • Additional Information:

    • [ ] Add any other information that might be useful for reviewers, such as considerations, discussions, or dependencies.
  • Checklist:

    • [ ] I have checked that my code adheres to the project's style guidelines and that my code is well-commented.
    • [ ] I have performed self-review of my own code and corrected any misspellings.
    • [ ] I have made corresponding changes to the documentation (if applicable).
    • [ ] My changes generate no new warnings or errors.
    • [ ] I have added tests that prove my fix is effective or that my feature works.
    • [ ] New and existing unit tests pass locally with my changes.

Summary by Sourcery

Fix the CKAN client API by removing the 'returnFields' parameter from method calls to resolve issues with its handling.

Bug Fixes:

  • Fix the CKAN client API by removing the 'returnFields' parameter from various method calls to prevent errors related to its usage.

Copy link

sourcery-ai bot commented Aug 27, 2024

Reviewer's Guide by Sourcery

This pull request modifies the CKAN client API to remove the 'returnFields' parameter and adjust how null values are handled in various API calls. The changes are implemented across multiple Java classes and the OpenAPI specification.

File-Level Changes

Change Details Files
Removed 'returnFields' parameter from API calls and method signatures
  • Removed 'returnFields' parameter from CkanDatasetsRepository.search() method
  • Removed 'returnFields' parameter from DatasetsRepository interface
  • Removed 'returnFields' parameter from SearchDatasetsQuery.execute() method
  • Removed 'returnFields' field from DatasetSearchQuery schema in OpenAPI specification
src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/persistence/CkanDatasetsRepository.java
src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/ports/DatasetsRepository.java
src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/application/usecases/SearchDatasetsQuery.java
src/main/openapi/discovery.yaml
Modified API calls to use null instead of empty strings or default values
  • Changed empty string parameters to null in CkanFacetsBuilder
  • Changed empty string parameters to null in CkanDatasetsRepository
  • Changed empty string parameters to null in CkanDatasetIdsCollector
src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/persistence/CkanFacetsBuilder.java
src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/persistence/CkanDatasetsRepository.java
src/main/java/io/github/genomicdatainfrastructure/discovery/datasets/infrastructure/ckan/persistence/CkanDatasetIdsCollector.java

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @admy7 - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Please provide more context about why these changes were necessary and how they affect the API's functionality, especially regarding the removal of the returnFields parameter.
  • Can you describe how these changes have been tested, particularly the replacement of empty strings with null values in API calls?
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@admy7 admy7 closed this Aug 27, 2024
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.

1 participant