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

Change list modules and search modules API calls to return unique modules rather than each module version. #105

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

Conversation

xRokco
Copy link

@xRokco xRokco commented May 5, 2022

Rather than returning a list of module versions this changes the API to return a list of unique modules.

It uses the MongoDB aggregate functionality to create a unique namespace + name grouping and returns the first module found for each unique grouping.

This better matches what I believe is the intended behaviour of the API calls based on the Terraform registry API docs and when compared with how the public Terraform registry acts.

This only changes the behaviour for MongoDB backed versions of Citizen.

A fix for #94

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