Closed
Description
I have an array of simple enum called weathers
. Although I can get to the array itself:
fieldWithPath("weathers").type(JsonFieldType.ARRAY).description("an array of weathers")
I can't get to the element inside it currently due to the exact same limitation as: spring-projects/spring-restdocs#505. As such, I got the following openapi3 spec:
weathers:
type: array
description: an array of weathers
items:
oneOf:
- type: object
- type: boolean
- type: string
- type: number
It seems the relevant logic is added in this PR: #62 as "default behavior".
Here is a minified demo: https://github.com/lzhoucs/spring-restdocs/tree/87-demo/samples/junit5
What I would like to see is as follows:
weathers:
type: array
description: an array of weathers
items:
type: string
enum: [SPRING, SUMMER...]
Is there any workaround to get close to what I expected above?
Metadata
Metadata
Assignees
Labels
No labels