-
I have a REST endpoint that returns different Media Types according to the Accept Header. How can I specify different examples for every Media Type? I do have a How can I annotate this? There's no possibility to have several |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@cristalp you can have multiple content entries, one for each Media Type. @RequestBody(
content = {
@Content(mediaType = "application/json", schema = @Schema(/* JSON schema or $ref */), examples = { /* JSON examples */ }),
@Content(mediaType = "text/csv", schema = @Schema(/* CSV schema or $ref */), examples = { /* CSV examples */ })
}
) |
Beta Was this translation helpful? Give feedback.
@cristalp you can have multiple content entries, one for each Media Type.