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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I am working with last versión and I found a problem with upload endpoint file:
If we have the next endpoint:
post:
summary: Creates a remittance and start a bulk process.
description: Creates a remittance and start a bulk process with the purchase orders from the file.
operationId: createRemittancesBulk
tags:
- Remittances
requestBody:
$ref: '#/components/requestBodies/CreateRemittancesBulk'
responses:
'201':
$ref: '#/components/responses/CreateRemittancesBulk'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'406':
$ref: '#/components/responses/NotAcceptable'
'413':
$ref: '#/components/responses/PayloadTooLarge'
'500':
$ref: '#/components/responses/InternalServerError'
'503':
$ref: '#/components/responses/ServiceUnavailable'
'504':
$ref: '#/components/responses/GatewayTimeout'
security:
- JWTProfile:
- remittances.CREATE
with this requestBody:
CreateRemittancesBulk:
description: body
required: true
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/RemittanceFile'
and with this reference:
RemittanceFile:
description: Data structure containing remittance file with the purchase orders.
type: object
required:
- file
properties:
file:
type: string
description: File to be uploaded or downloaded.
format: binary
example: attachment; filename="file.media-type"
It work correctly and it create a Multipartfile in request
But if I change the propertie file and I add a reference to File as follow:
RemittanceFile:
description: Data structure containing remittance file with the purchase orders.
type: object
required:
- file
properties:
file:
$ref: '#/components/schemas/File'
with this reference:
File:
type: string
description: File to be uploaded or downloaded.
format: binary
example: attachment; filename="file.media-type"
It will create a Resource (org.springframework.core.io.Resource)
Why is it happened? Shouldn't it create the same object in both??
codegen version:
io.swagger.codegen.v3
swagger-codegen-maven-plugin
3.0.41
Beta Was this translation helpful? Give feedback.
All reactions