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

feature: exclude tags #120

Merged
merged 2 commits into from Apr 29, 2024
Merged

Conversation

kaanduraa
Copy link
Contributor

Hi everyone I added a new parameter to exclude tags. Currently we can exclude the endpoints but we can't exclude tags. Example: https://api.exchangeratesapi.net/docs

@marclave marclave self-requested a review April 29, 2024 21:29
Copy link
Collaborator

@marclave marclave left a comment

Choose a reason for hiding this comment

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

awesome work! @kaanduraa , one small type change then we can get this merged ✨

src/index.ts Outdated
@@ -136,6 +138,7 @@ export const swagger =
openapi: '3.0.3',
...{
...documentation,
tags: (documentation?.tags as {name: string; description: string}[])?.filter((tag) => !excludeTags?.includes(tag?.name)),
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can safely use the OpenAPI type and make the filter

tags: (documentation.tags?.filter((tag) => !excludeTags?.includes(tag?.name)))

Copy link
Collaborator

@marclave marclave left a comment

Choose a reason for hiding this comment

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

@marclave marclave merged commit ff6e88e into elysiajs:main Apr 29, 2024
1 check passed
@kaanduraa kaanduraa deleted the feature/excluded-tags branch April 29, 2024 21:43
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.

None yet

2 participants