Open Dreaming-Codes opened 1 week ago
Hi, could you try adding import mappig config to your annotation? That seemed to work for me when I had this issue last time
@Openapi(
additionalProperties:
DioProperties(pubName: 'masterai_api', pubAuthor: 'DreamingCodes'),
inputSpec:
InputSpec(path: 'openapi/openapi.json'),
importMappings: {
'OneOf': 'package:one_of/one_of.dart', // <--- add this
},
generatorName: Generator.dio,
runSourceGenOnOutput: true,
outputDirectory: 'api/masterai_api',
)
class MasteraiClient {}
Description of the bug
In one of the generated api dart code OneOf is not imported
Steps to reproduce
Generated code with the following schema
Minimal openapi specification
I'm not sure where the problem is so this is just a stripped down version of mine
Annotation used
Expected behavior
OneOf gets imported and everything works.
Platform
Linux
Library version
6.0.0
Flutter version
3.24.3
Flutter channel
stable