Closed bobwith2bees closed 3 years ago
Hi, What version of the library are you using?
This should match the debug, the repo may be set to just Generator.dart.
openapi_generator_annotations: 3.2.0
openapi_generator: 3.2.0+2
---
@Openapi(
additionalProperties: AdditionalProperties(
pubName: 'rarible',
pubAuthor: 'rarible.org',
),
inputSpecFile: 'example/rarible_ethereum_api_v0.1.yaml',
generatorName: Generator.dioNext,
outputDirectory: 'api/rarible')
Hi, having looked into this, the issue is with the generator not generating List of enums correctly.
I have raised an issue with the Openapi generator library authors here.
I have also downloaded and modified the spec to work using a work around I found
openapi.yaml.zip
Also, you should update your annotation to below to prevent the Lock
model from clashing with the one in Dio
@Openapi(
additionalProperties: AdditionalProperties(
pubName: 'rarible',
pubAuthor: 'rarible.org',
),
typeMappings:{'Lock':'RaribleLock'}, //add this line
inputSpecFile: 'example/rarible_ethereum_api_v0.1.yaml',
generatorName: Generator.dioNext,
outputDirectory: 'api/rarible')
Hope this helps
let me know if you need further assistance
Wow - thanks for the super-thorough follow up. You even addressed the second issue I was seeing, but didn't ask!
I added a label to my repo for completeness and updated the reproduction steps in case someone wants to reproduce it in the future.
You have me working with the workaround. Do you need me to close the issue, or do you want to keep it open until the upstream fix is available? Just let me know if you need anything on my side. Thanks again!
No problem.
Just kicking the tires on the flutter package, trying to build an early version of the rarible protocol. (So the protocol.yaml is also a suspect.)
I see two flavors of errors, focusing on one for now.
error: The name 'xxxxEnum' isn't a type so it can't be used as a type argument.
I think this is an example- https://ethereum-api.rarible.org/v0.1/doc#tag/nft-order-activity-controller
It appears when there is a List of Enumerated Types, something goes wrong serializing/deserializing.
Reproduction Steps:
I have tried various permutations of Generator.dioNext, and useEnumExtension: true. There is always the possibility of operator error on my part, but I did attempt to do my homework before asking for help. Thanks.