swagger-core
swagger-core copied to clipboard
JAX-RS BeanParams issue with generic types
Not sure how to best word this.
It seems that the generic information on @BeanParam parameters is not being used to generate the swagger.json.
I have a class
public class MyBeanParam<T> {
@QueryParam
T value;
}
public enum MyEnum {
A, B, C,
;
}
public interace MyResource {
@GET
public Object getStuff(@BeanParam MyBeanParam<MyEnum> params);
}
I'm expecting something like
... "parameters": [ {
"name": "value",
"type":"string",
"enum":["A", "B", "C"]
}]
but getting
... "parameters": [ {
"name": "value",
"type":"string"
}]
without the enum information.
Changing io.swagger.jaxrs.DefaultParameterExtension to use getType() instead of getRawType() seems to fix the issue for me.
Closing this issue as part of our backlog cleanup effort.
This issue is outdated and/or inactive for a long time, and we’re not able to revisit it meaningfully.
If this problem is still relevant, please open a new issue and reference this one for context.
Thank you for your understanding!