Open Arch0rr opened 2 years ago
hi @Arch0rr
The wildcard targetting can be used in combination with the option excludeForOperations
, which means you target a wide range of operations but prevent excluding a number of them.
Not sure about how many operations you have, but another approach could be to build an array of openApiOperationIds
.
I'm a bit puzzled about how your OAS is organized to use "GET::*/Columns". Could you share some more context that would allow us to understand your use case better?
Hey @thim81 I guess my desire is to make this as streamlined and automatic as possible without needing to maintain lists or specific ids unless necessary. It shouldn't be too hard to implement the lists on my end though - just include a step before using portman to generate the portman-config file from the generated swagger file.
The */Columns
use case is for doing dynamic queries between the front-end of a website and the backend server. For example Users/Columns
would return the full list of the model properties (Name, Email, Permissions, etc), which columns are groupable, sortable, and visible, for the front-end table view. Then, using the Users/Query
the frontend can send a 'SelectColumns', 'Conditions', 'Order', 'GroupBy', passing in a subset of the full list and using reflection, will use the passed query to the database.
eg
{
SelectColumns["Name", "Email"], // Finds the model properties with the same names and SELECTs from the database
Conditions[{"Name", 0, "Steve"}] // WHERE Name = 'Steve'
OrderBy [{"Name", 0}] // "Name" is assumed to be sortable
}
So what I'd like to do is for each tag that has a /Columns
and a /Query
to use the returned /Columns
results and generate a reasonable query.
By the way, it looks like I have a total of 1268 operations total, over 105 tags, so that's why I'm trying to not have to do explicit routes unless necessary.
Hope that helps!
Hello there, thank you for creating a great library 😀
My problem is that I'm trying to order some GETs above others. Like so:
But it ignores the first GET, as if it doesn't exist. Using wildcards this way seems to work when specifying
openApiOperation
in other sections, however. The*/Columns
response is a GET that's in quite a few folders and is to provide information to fill variables for a POST.At the moment I'm using a Pre-request script to do the GET before the specific POST.