-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swagger generates ArraySchema instead of StringSchema for byte array. #3511
Comments
If you're using springddoc, you need to file an issue with them. They may use our annotations, but the way they parse the annotations is up to them. |
I don’t really understand what springdoc has to do with it, because the |
Normally when other projects use swagger-core, they only rely on swagger-annotations and not our processors (because for the most part it doesn't make sense). If for some reason springdoc does use our processors, we'd ask for an example in a JAX-RS context that reproduces it. Ideally, you could provide a PR with a failing test that we'd need to fix. |
Would issue #3944 be a meaningful repro in a JAX-RS context of this problem? |
I use latest swagger 2.1.2, springdoc 1.3.1, spring boot 2.2.6 (MVC stack)
For example, one endpoint from my controller:
Request model
Base64ImageRequest
:An example of a valid request:
It was expected that the generated specification with such a structure for this request:
But at the output, it turns out that the image field is interpreted as an array of strings.
The problem is here
This line returns for field
image
io.swagger.v3.oas.models.media.ArraySchema
instead ofio.swagger.v3.oas.models.media.StringSchema
The text was updated successfully, but these errors were encountered: