nishiichinoe
4 years agoVisitor
multipart response: 406 Could not find acceptable reprepresentation
I've created with Swagger the attached project and created a spring server project, but when I run this command via Postman:
http://localhost:8080/dms/0.1/getDoc?docid=179526682&clientid=%2F10&system=CBK_ACQ&userid=t189cbk
I'm getting:
{"timestamp":"2021-04-15T12:57:45.878Z","status":406,"error":"Not Acceptable","message":"Could not find acceptable representation","path":"/dms/0.1/getDoc"}
and on server side:
DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation]
The problem seems to be with the multipart response:
responses:
'200':
description: Successful response
content:
multipart/form-data: # <-- Content-Type of the response
schema:
type: object
properties:
# Part 1 - application/octet-stream
document: # <-- part name
type: string
format: binary
# Part 2 - application/json
docmetadata: # <-- part name
$ref: '#/components/schemas/docmetadata'
What can I do here?