Closed bluemon82 closed 7 months ago
@simonmoser-bluesource Hi, can you provide the generation results on the data and the full expected result?
I will look into this problem shortly.
@StarProxima sure 😊
I think the Item
Schema should inlined like this:
@RestApi()
abstract class ClientClient {
factory ClientClient(Dio dio, {String? baseUrl}) = _ClientClient;
/// create item
@MultiPart()
@POST('/api/item')
Future<String> postApiItem({
@Part(name: 'images') List<File>? images,
});
}
The tricky thing is what to do with Item
? Should it not be generated as @JsonSerializable()
, because in this case it fails with this message:
Could not generate fromJson
code for images
because of type File
.
@simonmoser-bluesource Hi, can you verify the correctness of the generation with your examples?
@StarProxima Sorry for the late response. I just testet it with 1.15.4 and the generated code looks correct with my example! Thanks a lot for your great work. ❤️
When I define a multipart/form-data $ref the generated code fails to compile:
When I define it inline it works, the generated code compiles. Both variants seams to be valid in OpenApi.