diff --git a/openapi/preprocess_spec.py b/openapi/preprocess_spec.py index 47b6d09..abb5eb6 100644 --- a/openapi/preprocess_spec.py +++ b/openapi/preprocess_spec.py @@ -235,7 +235,9 @@ def preserved_primitives_for_language(client_language): return ["intstr.IntOrString", "resource.Quantity", "v1.Patch"] elif client_language == "haskell-http-client": return ["intstr.IntOrString", "resource.Quantity"] - elif client_language == "typescript": + elif client_language.startswith("typescript"): + # Checking with the prefix because there are variations of + # typescript generators (e.g. typescript-fetch, typescript-jquery). return ["intstr.IntOrString"] else: return [] diff --git a/openapi/typescript-fetch.xml b/openapi/typescript-fetch.xml index cd7b8fa..ef947bb 100644 --- a/openapi/typescript-fetch.xml +++ b/openapi/typescript-fetch.xml @@ -22,6 +22,9 @@ ${generator.spec.path} true typescript-fetch + + IntOrString=../../types + ${generator.output.path} true @@ -31,6 +34,7 @@ ${generator.client.version} original + int-or-string=IntOrString