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(core): add mode include/exclude to input filters option #1690

Merged
merged 2 commits into from
Nov 9, 2024

Conversation

jbcam
Copy link
Contributor

@jbcam jbcam commented Nov 6, 2024

Status

READY

Description

Fix #1676

Extend the filters input option by introducing a mode optional parameter to specify if filtering should include or exclude tags or schemas.

Related PRs

List related PRs against other branches:

branch PR
yesyesufcurs:issues/739 link

Todos

  • Tests
  • Documentation
  • Changelog Entry (unreleased)

Steps to Test or Reproduce

Add a tag that should be filtered out to orval.config:

output: {
	mode: :"exclude"
    tags: ["pets"]
},

Only endpoints that do not contain the tag "pets" will be generated.

@melloware
Copy link
Collaborator

Running the build now. This looks like a good change.

@jbcam jbcam marked this pull request as ready for review November 6, 2024 13:34
Copy link
Member

@soartec-lab soartec-lab left a comment

Choose a reason for hiding this comment

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

@jbcam

Thanks for the good reinforcement!

I have just one request. we have tests yaml as a regression test in the tests directory so could you please add a new test case like petstore-filter-exclude-mode to here?

https://github.com/orval-labs/orval/blob/master/tests/configs/default.config.ts#L9-L18

@jbcam
Copy link
Contributor Author

jbcam commented Nov 8, 2024

@jbcam

Thanks for the good reinforcement!

I have just one request. we have tests yaml as a regression test in the tests directory so could you please add a new test case like petstore-filter-exclude-mode to here?

master/tests/configs/default.config.ts#L9-L18

@soartec-lab no problem! should be ok now (and rebased)

soartec-lab
soartec-lab previously approved these changes Nov 8, 2024
Copy link
Member

@soartec-lab soartec-lab left a comment

Choose a reason for hiding this comment

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

Thanks!

@melloware melloware added the enhancement New feature or request label Nov 8, 2024
@melloware melloware added this to the 7.2.1 milestone Nov 8, 2024
@soartec-lab soartec-lab self-requested a review November 8, 2024 14:25
Copy link
Member

@soartec-lab soartec-lab left a comment

Choose a reason for hiding this comment

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

@jbcam
The test failed, could you please check it?

Copy link
Member

@soartec-lab soartec-lab left a comment

Choose a reason for hiding this comment

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

All good! Thanks!

@soartec-lab soartec-lab merged commit 119c4d9 into orval-labs:master Nov 9, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend input filter option to exclude endpoints
3 participants