Custom operation filters
See original GitHub issueIs your feature request related to a problem? Please describe. We have little library for api versioning that generates custom RequestCondition depending on special annotation. So we can write controllers like this:
@RestController
public class Controller {
@Versioner(till = 0)
@GetMapping("/test")
public String old() {
return "old";
}
@Versioner(from = 1)
@GetMapping("/test")
public Integer other() {
return 123;
}
}
Then GET /v0/test
returns "old"
and GET /v1/test
returns 123
Now we need openapi to produce 2 groups: group v0
with GET /test
endpoint that produces String
and group v1
with GET /test
endpoint that produces Integer
Describe the solution you’d like
Something like addCustomFilter
in GroupedOpenApi.Builder
where I can use handlerMethod.getMethodAnnotation(Versioner.class)
to determine, if this method should be displayed in this group
Describe alternatives you’ve considered
- I have tried to filter paths in
OpenApiCustomiser
, but when it is called, there is already only one endpoint because the others have been overwritten here due to identicaloperationPath
(/test
)
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
DevExtreme - JavaScript Filter Builder Custom Operations
Configures custom filter operations. ... Specifies a function that returns a filter expression for this custom operation.
Read more >Using custom filters to filter events - BMC Documentation
To perform operations on custom filters · From the Events action menu, select View Saved Filters . The list of saved custom filters...
Read more >Creating a custom filter control | Dynamics 365 for Finance ...
Filtering forms in Dynamics 365 for Finance and Operations is implemented in a ... In this recipe, we will learn how to add...
Read more >Custom Filters - WCF - Microsoft Learn
Custom filters allow you to define matching logic that cannot be accomplished using the system-provided message filters.
Read more >Creating a custom filter control - Dynamics 365 for ... - O'Reilly
Creating a custom filter control Filtering forms in Dynamics 365 for Finance and Operations is implemented in a variety of ways.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@romash1408 Did you find a solution for this?
I have been trying for 2 days now to make springdoc filter out the right controllers for the specific (version) groups but havent succeeded yet. It always seem to have merged methods from multiple versioned controllers into the same operations before I can get to them with OpenApiCustomizer because they have the same path and signature.
@Hidden
annotation don’t let me filter operation only in certain groups. I need to select operations for group depending on my custom annotation.