kubernetes-client / gen

Common generator scripts for all client libraries
Apache License 2.0
150 stars 147 forks source link

Revert "Add handling of IntOrString for other typescript variations. … #218

Closed OliverMKing closed 2 years ago

OliverMKing commented 2 years ago

Reverts kubernetes-client/gen#214

We are using TypeScript-Fetch in the JavaScript client refactor and this commit breaks how we need to generate code. The generated code for this looks like

import {
    IntOrString,
    IntOrStringFromJSON,
    IntOrStringFromJSONTyped,
    IntOrStringToJSON,
} from './IntOrString';

and throws an error saying that IntOrString doesn't exist. These changes don't work because the TypeScript-fetch generator doesn't support import mapping. Until import mapping support is added, these additions will always throw an error.

This is the same problem defined in #217.

OliverMKing commented 2 years ago

Reopened this (I closed it so I could verify some things with @davidgamero). We verified by looking at the TypeScript generator code. We are working to add this feature to the generator but in the meantime we want a working version of this repo.

yliaog commented 2 years ago

/lgtm /approve

k8s-ci-robot commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: OliverMKing, yliaog

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-client/gen/blob/master/OWNERS)~~ [yliaog] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment