-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated types clash and fail to compile #25
Comments
Any news on this or #46 ? Have any maintainers went through this ? |
I ended up just manually adding aliases for the clashing names, like:
Same in the I don't mind that much as I only have one service and my wsdl is quite stable. But would be nice if the the tool would detect those kind of duplications itself - or at least provide a standardized way to provide aliases. It seems like it's not very unlikely that a real-life wsdl would result in duplications like that... If it would bother me more and/or I had the time, I might try to fix it myself with a pull request... |
If fixed this using a JS script that patches the files after having generated the code. It's more of a workaround than a real fix of the I can share the script if you want to. I used regular expressions to find and replace the duplicates. const lServiceExportRegEx = /export { ([A-Za-z]*) } from ".\/services\/\1";/gm;
const lPortExportRegEx = /export { ([A-Za-z]*) } from ".\/ports\/\1";/gm;
const lPortImportRegEx = /import { ([A-Za-z]*) } from "..\/ports\/\1";/gm;
const lServiceInterfaceRegEx = /readonly ([A-Za-z]*): \1;/gm;
const lServiceSubValue = `export { $1 as $1Service } from "./services/$1";`;
const lPortSubValue = `export { $1 as $1Port } from "./ports/$1";`;
const lPortImportSubValue = `import { $1 as $1Port } from "../ports/$1";`;
const lServiceInterfaceSubValue = `readonly $1: $1Port;`; |
Still an issue for us. |
I've got the following WSDL spec which fails to compile with
gensrc/oil/salesorderv201901/definitions/ProductLineItemUpdateOrderRequest.ts:1:33 - error TS1149: File name 'gensrc/oil/salesorderv201901/definitions/ProductLineItem.ts' differs from already included file name 'gensrc/oil/salesorderv201901/definitions/ProductLineitem.ts' only in casing.
SalesOrder_v201901.txt
The text was updated successfully, but these errors were encountered: