Closed
Description
When an operation has a single parameter of type com.querydsl.core.types.Predicate
annotated with @QuerydslPredicate
, the generated schema does not expose the expected input query param.
Let's say we have the following operation:
@RequestMapping(method = RequestMethod.GET, value = "/operation")
@ResponseBody
public String operation(@QuerydslPredicate(root = MyUser.class) Predicate predicate) {
return "hi";
}
we get something like
"/auth/operation":
{"get":{
"operationId":"operation",
"responses":{"200":{"content":{"*/*":{"schema":{"type":"string"}}}}}
}}
With a additional parameter:
@RequestMapping(method = RequestMethod.GET, value = "/operation")
@ResponseBody
public String operation(@QuerydslPredicate(root = MyUser.class) Predicate predicate, String param) {
return "hi";
}
we get something like
"/auth/operation":
{"get":{
"operationId":"operation",
"parameters":[
{"name":"param","in":"query","required":true,"schema":{"type":"string"}},
{"name":"firstName","in":"query","schema":{"type":"string"}}
],
"responses":{"200":{"content":{"*/*":{"schema":{"type":"string"}}}}}
}}
where firstName is a field of MyUser POJO.
The QuerydslPredicateOperationCustomizer class only customize the operation if parameters are found.
However parameters of type Predicate are ignored
Metadata
Metadata
Assignees
Labels
No labels