Unfortunately, it generates invalid code - see generated psmdb\index.ts:
// *** WARNING: this file was generated by crd2pulumi. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
// Export sub-modules:
import * as v1 from "./v1";
import * as v1-1-0 from "./v1-1-0";
import * as v1-10-0 from "./v1-10-0";
import * as v1-11-0 from "./v1-11-0";
import * as v1-2-0 from "./v1-2-0";
import * as v1-3-0 from "./v1-3-0";
import * as v1-4-0 from "./v1-4-0";
import * as v1-5-0 from "./v1-5-0";
import * as v1-6-0 from "./v1-6-0";
import * as v1-7-0 from "./v1-7-0";
import * as v1-8-0 from "./v1-8-0";
import * as v1-9-0 from "./v1-9-0";
import * as v1alpha1 from "./v1alpha1";
export {
v1,
v1-1-0,
v1-10-0,
v1-11-0,
v1-2-0,
v1-3-0,
v1-4-0,
v1-5-0,
v1-6-0,
v1-7-0,
v1-8-0,
v1-9-0,
v1alpha1,
};
This leads to typescript error ts(2300) with the message Duplicate identifier 'v1'
Hello!
Issue details
I would like to generate typescript CRDs for Percona Server for MongoDB Operator.
Source CRD: https://github.com/percona/percona-server-mongodb-operator/blob/main/deploy/crd.yaml
Unfortunately, it generates invalid code - see generated
psmdb\index.ts
:This leads to typescript error ts(2300) with the message
Duplicate identifier 'v1'
Steps to reproduce
Expected:
I would expect crd2pulumi to ensure naming is valid for imports:
Actual: Produces invalid code.