Closed simllll closed 3 years ago
@simllll thanks for reporting this issue. I don't recognise the code snippet.
Could you please post the command you're running to generate using openapi-generator-plus so I can inspect the output?
Oh sorry that I didn't response any more, I couldn't find time to look into it .. but I also guess I'm on the wrong repo, I've used the openapi-generaotr (not the plus one :-)) I will test yours though soon! Thanks and sorry
@simllll no problem at all Simon, everyone is working on a million things :-) I'd love it if you give it a go. I do care about making this a really good generator project... we are using it actively on half-a-dozen projects ourselves and counting. The latest generator is our Swift one https://github.com/karlvr/openapi-generator-plus-swift-client-generator which has a number of improvements that I intend to bring to the client generators in this repository too!
I tried swichting fomr typescript-axios to this library, with following command:
openapi-generator-cli generate -t openapi-template -p disallowAdditionalPropertiesIfNotPresent=false -p apiPackage=apipkg -p modelPackage=modelPkg -p withSeparateModelsAndApi=true -p typescriptThreePlus=true -p modelPropertyNaming=original -p supportsES6=true -i https://raw.githubusercontent.com/Asana/developer-docs/master/defs/asana_oas.yaml -g typescript-fetch -o src/AsanaClient --skip-validate-spec && eslint --ext ts --fix src/AsanaClient
but this generated invalid code: e.g. look for the
&
here:ts 'filters': !exists(json, 'filters') ? undefined : ((json['filters'] as Array<any>).map(WebhookFilter & objectFromJSON)),
It did work with the typescirpt-axios verison, therefore I assume the openapi spec is safe, it must be something with the client genreator I guess?
Plesae let me know if I can help you somehow with this!
Thanks