Skip to content
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

feat: Update @hey-api/openapi-ts version and re-enable namespacing enums #136

Merged
Prev Previous commit
Next Next commit
fix: ensure that getShortType regex isn't greedy
collink committed Aug 1, 2024
commit 424165768a4b6946bcbce56a52e85b49fccc628c
2 changes: 1 addition & 1 deletion src/common.mts
Original file line number Diff line number Diff line change
@@ -116,7 +116,7 @@ export function extractPropertiesFromObjectParam(param: ParameterDeclaration) {
* TODO: Replace with a more robust solution.
*/
export function getShortType(type: string) {
return type.replaceAll(/import\(".*"\)\./g, "");
return type.replaceAll(/import\(".*?"\)\./g, "");
}

export function getClassesFromService(node: SourceFile) {