Open pangyikhei opened 4 years ago
Interesting, we are always using FieldDescriptor with a description to leverage Spring restdocs throwing errors when not all/too many fields are documented (missing FieldDescriptor is equivalent to a missing description for us).
Your usage seems to be valid, however. So I'd consider it an error in the openapi3 generator.
Thanks for the report!
I think I can solve this problem. Can I handle this issue?
Not sure if this is intended behavior, but when I don't specify a description for a response field, the output snippet resource.json outputs "description": null, which causes the openapi3 gradle task to fail.
Example:
The controller returns an array of objects.
resources.json shows a null value for description
Test uses Spring @WebMvcTest and MockMvc with MockMvcRestDocumentationWrapper
Error:
If I add any description to the FieldDescriptor, the task succeeds.