-
-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the feature
The following annotation would give compilation error
@OpenApiContent(
exampleObjects = {
@OpenApiExampleProperty(
name = "metadata",
objects = {
@OpenApiExampleProperty(name = "source", value = "document"),
@OpenApiExampleProperty(name = "author", value = "John Doe"),
@OpenApiExampleProperty(
name = "tags",
objects = {
@OpenApiExampleProperty(value = "important"),
@OpenApiExampleProperty(value = "research")
})
})
}
)
Error message:
java.lang.IllegalArgumentException: Example object must have a name (ExampleProperty(name=-- This string represents a null value and shouldn't be used --, value=important, objects=[]))
Additional context
Related issue: #193
The list annotation can only work for a simple list.
@OpenApiContent(
exampleObjects = {
@OpenApiExampleProperty(value = "important"),
@OpenApiExampleProperty(value = "research")
}
)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
β
Done