Open janek9971 opened 3 years ago
@AlexanderSher could you take a look?
Minimal input to repro the issue:
openapi: "3.0.0"
info:
title: Multipart
version: 1.0.0
servers:
- url: http://test.swagger.io/v1
paths:
/op:
post:
operationId: testOp
responses:
'201':
description: Null response
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
test:
type: object
properties:
nested:
type: integer
fileName:
type: string
format: binary
This is an object schema that has serializationFormats
that isn't supported.
objects:
- !ObjectSchema &ref_2
type: object
apiVersions:
- !ApiVersion
version: 1.0.0
properties:
- !Property
schema: *ref_1
serializedName: nested
language: !Languages
default:
name: nested
description: ''
protocol: !Protocols {}
serializationFormats:
- multipart
usage:
- input
extensions:
x-internal-autorest-anonymous-schema:
anonymous: true
language: !Languages
default:
name: PostContentSchemaTest
description: ''
namespace: ''
protocol: !Protocols {}
I had the same issue: https://github.com/Azure/autorest.csharp/issues/1455
It looks to be related to any multipart request body having more than one type?
Also maybe related to this one: https://github.com/Azure/autorest.csharp/issues/985
I encountered an internal error in autorest for method in api called UploadPicture. Nswag did not have any problem with this.
I attach zipped Configuration.json and CodeModel.yaml Configuration.zip
Error message: