"paths": {
"/api/example": {
"post": {
"tags": [
"Instances"
],
"summary": "Creates one or more instances from a file or archive, respectively",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"file": {
"type": "string",
"format": "binary"
}
}
},
"encoding": {
"file": {
"style": "form"
}
}
}
}
},
The following is generated:
/// Creates one or more instances from a file or archive, respectively
@MultiPart()
@POST('/api/example')
Future<CreatedInstancesResponse> postExample({
@Part(name: 'file') File? file,
});
However, the type File is missing the import to import 'dart:io';:
Undefined class 'File'.
Try changing the name to the name of an existing class, or creating a class with the name 'File'.
It can be added manually, but is there a way to define this beforehand?
With the schema:
The following is generated:
However, the type File is missing the import to
import 'dart:io';
:It can be added manually, but is there a way to define this beforehand?