Replies: 1 comment 1 reply
-
@dhoffer I'm a little surprised it didn't work just as you have it, but you should be able to set |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How to generate custom OpenAPI response for double array parameters?
If this is my Java code:
@JSONVIEW(Views.Abridged.class)
@Schema(type = SchemaType.ARRAY,
description = "Multi-dimensional Array.",
example = "[[[1.23, 1.0903]]]")
private List<Double[][]> data;
This is the current smallrye openapi:
"data": {
"description": "Multi-dimensional Array.",
"type": "array",
"items": {},
"example": [
[
[
1.23,
1.0903
]
]
]
},
I need it to be more like this:
"data": {
"type": "array",
"description": "Multi-dimensional Array.",
"example": [
[
[
1.23,
1.0903
]
]
],
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"format": "double"
}
}
}
How can I achieve this?
From what I can tell the OASFilter does not get triggered/called for object properties. Is that wrong and it does get called? Or is there a different way to customize how double arrays are handled?
Beta Was this translation helpful? Give feedback.
All reactions