You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Execution failed for task ':example:openapi3'.
> com.fasterxml.jackson.module.kotlin.MissingKotlinParameterException: Instantiation of [simple type, class com.epages.restdocs.apispec.model.FieldDescriptor] value failed for JSON property description due to missing (therefore NULL) value for creator parameter description which is a non-nullable type
...
com.epages.restdocs.apispec.model.ResourceModel["response"]->com.epages.restdocs.apispec.model.ResponseModel["responseFields"]->java.util.ArrayList[0]->com.epages.restdocs.apispec.model.FieldDescriptor["description"])
If I add any description to the FieldDescriptor, the task succeeds.
The text was updated successfully, but these errors were encountered:
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.
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.
The text was updated successfully, but these errors were encountered: