Skip to content

SearchModules tool support for provider, namespace, and verified parameters #91

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

KiPIDesTAN
Copy link

This pull request enhances the functionality of the searchModules feature by adding support for new query parameters (provider, namespace, and verified) and updating the corresponding test cases to validate these changes. The most important changes include modifications to the searchModules function, updates to the SearchModules handler, and the addition of new test cases.

This change is in alignment with the List Modules and Search Modules Terraform Registry API and fixes issue #90 .

Enhancements to searchModules functionality:

  • pkg/hashicorp/tfregistry/utils.go: Updated the searchModules function to accept and process new parameters (provider, namespace, and verified). These parameters are appended to the query string when constructing the API request.

  • pkg/hashicorp/tfregistry/handlers.go: Updated the SearchModules handler to include the new parameters (provider, namespace, and verified) in the request arguments. Default values and type checks for these parameters were also added.

Test case additions:

  • e2e/payloads.go: Added multiple test cases to validate the searchModules functionality with various combinations of the new parameters (provider, namespace, and verified). These include scenarios with empty queries, specific providers, namespaces, and verified flags.

…egistry API

Added the ability to filter by provider and verified when listing all modules.
Added the ability to filter by provider, namespace, and verified when searching modules
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