NPE for request bodies with content that has media type MULTIPART_FORM_DATA_VALUE
#1804
Labels
bug
Something isn't working
MULTIPART_FORM_DATA_VALUE
#1804
Describe the bug
Defining the request body with the content with the
MULTIPART_FORM_DATA_VALUE
and schema properties, as shown below, results in the NPE when generating the openapi yaml:To Reproduce
Steps to reproduce the behavior:
What version of spring-boot you are using?
Confirmed same behavior on versions
2.5.5
,2.5.14
,2.7.2
.What modules and versions of springdoc-openapi are you using?
Latest:
implementation 'org.springdoc:springdoc-openapi-core:1.+'
What is the actual and the expected result using OpenAPI Description (yml or json)?
NPE when trying to get the
api-docs.yaml
Provide with a sample code (HelloController) or Test that reproduces the problem
Expected behavior
No NPE, yaml generated.
Additional context
Following the sources it's easy to conclude that
requestBodyInfo.getMergedSchema();
is alwaysnull
and there is access to the merged schema viamergedSchema.addProperty(entry.getKey(), itemSchema);
.Works fine in
1.6.9
.The text was updated successfully, but these errors were encountered: