-
Notifications
You must be signed in to change notification settings - Fork 382
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
Path grouping via a RegEx pattern #215
Comments
Hello, wow, the API docs web site of Globalcollect S2S API is awesome :) See http://swagger2markup.github.io/spring-swagger2markup-demo/1.1.0/ and |
Hi, The problem is that swagger tags require people to modify their API spec. I don't think globalcollect wants to pay someone to go through their entire spec and add tags to all paths. (Trust me, it's a large file) This would also allow for easy adjustment of headers to test different configurations too. |
Do they have a Swagger Spec? Would you like to create a PR and contribute? |
I'll have a look around the source code and try to cook something up :) |
👍 Thx |
@RobWin I've started working on this some more, could you have a look to see if I missed any methods required to make this work? master...cascer1:feature/regex-path-grouping Also, are there any unit tests for sorting? If so, I couldn't find them. |
@cascer1 There are two unit tests for sorting. and |
The commits look good so far. Thx |
* Begin working on #215 * Begin looking for methods that need to be modified for #215 * Begin working on #215 * Begin looking for methods that need to be modified for #215 * Work on implementing regex sorting * Add regex ordering translations and unit test * Improve Regex grouping * Make regex sorting test more like a real-world example * Remove unused imports
I believe this was closed by #217 |
* Begin working on #215 * Begin looking for methods that need to be modified for #215 * Begin working on #215 * Begin looking for methods that need to be modified for #215 * Work on implementing regex sorting * Add regex ordering translations and unit test * Improve Regex grouping * Make regex sorting test more like a real-world example * Remove unused imports * Improve code style consistency * Improve code style consistency * Remove empty statement * Resolve some Codacy issues * Remove empty constructors * Remove unused fields * Merge nested IF statements * Improve method scopes * Remove unused classes * Remove unused imports * Remove fixed TODO comment * Fix codacy issues * Fix codacy issues (reverted from commit 43f27e7) * Improve code style consistency * Resolve some Codacy issues * Remove empty constructors * Remove unused fields * Merge nested IF statements * Improve method scopes * Remove unused classes * Remove unused imports * Remove fixed TODO comment * Fix codacy issues
Hi!
I'm testing this tool using a large API spec (the Globalcollect S2S API, to be specific), and having just one list of endpoints isn't very useful.
Instead, it would be awesome if I could define (for example) a RegEx pattern for headers, which is then used for grouping paths.
For example: The Globalcollect API has endpoints in categories like payments, payouts and products:
In another tool I'm developing, I added the ability to match endpoints to a RegEx, and assign them to a category if they match, the categories are generated based on the first capture groups in the patterns. Using the example above, I then match them with RegEx
\/{merchantId}\/(\w+)$
This results in the categories payments, payouts and products being created. All paths are then put inside these categories. This results in the following structure (All paths have a description so they can get a pretty name):
A similar functionality in this tool would be awesome!
The text was updated successfully, but these errors were encountered: