Hi, I tried using openapi and everything was smooth till I encoutered small problem with T
.
Classes:
public class RestResponse extends BasicOperation {
private RulesData rulesData;
private ResultList<Device> resultList;
}
public class ResultList<T> extends BasicOperation {
private List<T> dataList;
public ResultList(Status status, Value value, boolean isExpanded) {
super(status, value, isExpanded);
}
}
What I get from /openapi
[...]
RestResponse:
type: object
properties:
rulesData:
$ref: '#/components/schemas/RulesData'
resultList:
$ref: '#/components/schemas/ResultList'
value:
$ref: '#/components/schemas/Value'
isExpanded:
type: boolean
code:
type: string
error:
type: string
status:
$ref: '#/components/schemas/Status'
allOf:
- $ref: '#/components/schemas/BasicOperation'
[...]
ResultList:
type: object
properties:
dataList:
items:
type: object
value:
$ref: '#/components/schemas/Value'
isExpanded:
type: boolean
code:
type: string
error:
type: string
status:
$ref: '#/components/schemas/Status'
allOf:
- $ref: '#/components/schemas/StandardResponse'
[...]
What I expect to get is something like this?
[...]
ResultList:
type: object
properties:
dataList:
items:
type: object
ref: -$ '#/components/schemas/Device'
[...]
or
[...]
RestResponse:
type: object
properties:
rulesData:
$ref: '#/components/schemas/RulesData'
resultList:
$ref: '#/components/schemas/ResultList<Device>'
[...]
So what I need from openApi? Well something to describe classes used in ResultList e.g Device
or any other class thats going to be used instead of T
and Im not sure how to do it.
Versions:
jdk: 11.0.11
OpenApi: 3.0.0
Payara: 5.20222.1