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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

excludeForOperations multiple wildcards doesn't seem to work #430

Open
Arch0rr opened this issue Nov 24, 2022 · 2 comments
Open

excludeForOperations multiple wildcards doesn't seem to work #430

Arch0rr opened this issue Nov 24, 2022 · 2 comments

Comments

@Arch0rr
Copy link

Arch0rr commented Nov 24, 2022

Sorry for creating so many issues! 馃槄
I'm wanting to select all base routes for each tag

POST::/api/<controller1>
POST::/api/<controller2>

While ignoring subroutes

POST::/api/<controller1>/List
POST::/api/<controller1>/Latest

Which I think I should be able to be retrieved by

- openApiOperation: POST::/*
  excludeForOperations:
  - POST::/api/*/*

But this doesn't seem to work. I'm able to use this wildcard string in the filtering file. (I know it's a different package, I just thought it'd be worth noting)

inverseMethods:
- post
operations:
- POST::/api/*/*

Thanks again! 馃檶

@thim81
Copy link
Collaborator

thim81 commented Dec 2, 2022

hi @Arch0rr

I'll investigate if excludeForOperations is supporting wildcards.
We had in mind that exclusions would be very precise.

As a work-around, you could list all the operations in the excludeForOperations, it will be a bit more maintenance but it will be very precise and you know exactly which operations will be excluded. If you would use wildcards, that might lead to unexpected exclusions.

@Arch0rr
Copy link
Author

Arch0rr commented Dec 3, 2022

hi @thim81
Sorry I can't test right now, but if I do recall correctly, I was able to do something like

- openApiOperation: POST::/*
  excludeForOperations:
  - POST::/api/Users/*

I believe this worked for the Users tag appropriately, but adding multiple wildcards wasn't working. Again, I can look into doing a well-defined list of exclusions/inclusions before passing the config into portman, which might be safer in the long run. 馃槂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants