|
| 1 | +diff --git a/openapi/preprocess_spec.py b/openapi/preprocess_spec.py |
| 2 | +index 47b6d09..bcc56d6 100644 |
| 3 | +--- a/openapi/preprocess_spec.py |
| 4 | ++++ b/openapi/preprocess_spec.py |
| 5 | +@@ -236,7 +236,7 @@ def preserved_primitives_for_language(client_language): |
| 6 | + elif client_language == "haskell-http-client": |
| 7 | + return ["intstr.IntOrString", "resource.Quantity"] |
| 8 | + elif client_language == "typescript": |
| 9 | +- return ["intstr.IntOrString"] |
| 10 | ++ return ["intstr.IntOrString", "v1.MicroTime"] |
| 11 | + else: |
| 12 | + return [] |
| 13 | + |
| 14 | +@@ -254,6 +254,8 @@ def format_for_language(client_language): |
| 15 | + def type_for_language(client_language): |
| 16 | + if client_language == "java": |
| 17 | + return {"v1.Patch": { "type": "string"}} |
| 18 | ++ elif client_language == "typescript": |
| 19 | ++ return {"v1.MicroTime": { "type": "string", "format": "date-time-micro" }} |
| 20 | + elif client_language == "csharp": |
| 21 | + return { |
| 22 | + "v1.Patch": { "type": "object", "properties": {"content": { "type": "object"}} }, |
| 23 | +diff --git a/openapi/typescript.xml b/openapi/typescript.xml |
| 24 | +index 90db5fc..fe3c391 100644 |
| 25 | +--- a/openapi/typescript.xml |
| 26 | ++++ b/openapi/typescript.xml |
| 27 | +@@ -23,7 +23,7 @@ |
| 28 | + <skipValidateSpec>true</skipValidateSpec> |
| 29 | + <generatorName>typescript-node</generatorName> |
| 30 | + <importMappings> |
| 31 | +- IntOrString=../../types |
| 32 | ++ IntOrString=../../types,V1MicroTime=../../types |
| 33 | + </importMappings> |
| 34 | + <output>${generator.output.path}</output> |
| 35 | + <configOptions> |
| 36 | +@@ -33,7 +33,7 @@ |
| 37 | + <npmVersion>${generator.client.version}</npmVersion> |
| 38 | + <modelPropertyNaming>original</modelPropertyNaming> |
| 39 | + </configOptions> |
| 40 | +- <typeMappings>int-or-string=IntOrString</typeMappings> |
| 41 | ++ <typeMappings>int-or-string=IntOrString,date-time-micro=V1MicroTime</typeMappings> |
| 42 | + </configuration> |
| 43 | + </execution> |
| 44 | + </executions> |
0 commit comments