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

feat: do not collate sunset paths #351

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RaduPetreTarean
Copy link
Contributor

This PR introduces a feature to filter out API paths marked as sunset eligible in the Vervet tool's collation process. It ensures that paths with the x-snyk-sunset-eligible attribute, dated earlier than the current date, are excluded from the final collated specifications.

@RaduPetreTarean RaduPetreTarean requested a review from a team as a code owner July 11, 2024 10:18
@@ -126,6 +144,11 @@ func (c *Collator) Collate() (map[vervet.Version]openapi3.T, error) {
collatorMergeError.WithLabelValues(version.String()).Inc()
return nil, err
}
for path, pathItem := range spec.Paths {
if isPathSunsetEligible(pathItem) {
delete(spec.Paths, path)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this change does need a feature flag/pivot date check

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