SearchModules tool support for provider, namespace, and verified parameters #91
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request enhances the functionality of the
searchModules
feature by adding support for new query parameters (provider
,namespace
, andverified
) and updating the corresponding test cases to validate these changes. The most important changes include modifications to thesearchModules
function, updates to theSearchModules
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 thesearchModules
function to accept and process new parameters (provider
,namespace
, andverified
). These parameters are appended to the query string when constructing the API request.pkg/hashicorp/tfregistry/handlers.go
: Updated theSearchModules
handler to include the new parameters (provider
,namespace
, andverified
) 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 thesearchModules
functionality with various combinations of the new parameters (provider
,namespace
, andverified
). These include scenarios with empty queries, specific providers, namespaces, and verified flags.