From 82561105bfd7f62696666fec3a02ae0c51bfa9e0 Mon Sep 17 00:00:00 2001 From: ryan10132 Date: Tue, 16 Feb 2016 14:03:50 -0800 Subject: [PATCH] Path param type from string -> any Allows for non string types as path params and query params - adds generality --- .travis.yml | 1 + .../src/main/resources/httpApiBridge.ts | 2 +- .../palantir/code/ts/generator/ServiceGeneratorEteTest.java | 3 +++ .../eteTestData/complexServiceTestOutput/httpApiBridge.ts | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6ac3ac8..02a3705 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ jdk: - oraclejdk8 after_success: - ./gradlew --info bintrayUpload +script: ./gradlew check --info env: global: - secure: SjUxVTBt5QeYiG5VsAy6ZK1XxjcH9OFDV9bSkCz/B1YhZr2zujTv5zlaviNkLNTStS+Xq+MZnrWfA2hue53QkRPOgw5xN2YOPPb/W6xeE9KmZ2iicjsgQPBFhDbFbpFMYKniFavE7dgvLykeHu3Gwlc5rcgWfF6CB4UJdUl61jjUEaV9hTRNbvXcpfJ650xAWBWjCxSYX5qZJF/UueM2jBZ/cUzsK0YbdHB6CZrMq633zup8PU92GqaQFYN3KiWQ5QR0or/iHPJLtELEWCle0t6PutI6jhh71h3scGlmRRDBjsNpzldYTl7zY0uL4psSffdfFc8YPcu/ZF4wfTTomGZYB42vRQINmFcRQLEOm/7UlGSHPu7jxlqPnE7Z1dHJDochVTUN7ueX9X2FQxOSwxwyOOI5ECPg4/bbR792k2StTHYFHdrF9VU0udTv9On6FfDUjcVBLiDbHC5T2wg2M3XpRowcXZPfSHRV3Q9nwOUGwPEKJ1zZVYixNX5sy2x9mCKRfSgfQzztL8uBOMItKzptFLJkDzwRUxERw21dkCl0gI3Vgum8LtVXX2NUfLjNCyvOjBDuUEYwjc1Uv74ks0hCyTsp3LjY3n9kQ6v6RHdvQQXMaf6mnw0TStqSGJp3PkSG2zczSpTDkcO387rYYffPGh/dlAH4ZQPkqykj8Fs= diff --git a/typescript-service-generator-core/src/main/resources/httpApiBridge.ts b/typescript-service-generator-core/src/main/resources/httpApiBridge.ts index 4f212a8..a2320c7 100644 --- a/typescript-service-generator-core/src/main/resources/httpApiBridge.ts +++ b/typescript-service-generator-core/src/main/resources/httpApiBridge.ts @@ -5,7 +5,7 @@ export interface %sHttpEndpointOptions { method: string; mediaType: string; requiredHeaders: string[]; - pathArguments: string[]; + pathArguments: any[]; queryArguments: any; data?: any; } diff --git a/typescript-service-generator-core/src/test/java/com/palantir/code/ts/generator/ServiceGeneratorEteTest.java b/typescript-service-generator-core/src/test/java/com/palantir/code/ts/generator/ServiceGeneratorEteTest.java index db1eeff..042f3e3 100644 --- a/typescript-service-generator-core/src/test/java/com/palantir/code/ts/generator/ServiceGeneratorEteTest.java +++ b/typescript-service-generator-core/src/test/java/com/palantir/code/ts/generator/ServiceGeneratorEteTest.java @@ -10,6 +10,7 @@ import java.io.File; import java.io.IOException; import java.net.URISyntaxException; +import java.util.Arrays; import org.apache.commons.io.FileUtils; import org.junit.Rule; @@ -46,6 +47,8 @@ private void assertDirectoriesEqual(File a, File b) throws IOException { if (a.isDirectory()) { File[] aFiles = a.listFiles(); File[] bFiles = b.listFiles(); + Arrays.sort(aFiles); + Arrays.sort(bFiles); if (aFiles.length != bFiles.length) fail(); for (int i = 0; i < aFiles.length; i++) { assertDirectoriesEqual(aFiles[i], bFiles[i]); diff --git a/typescript-service-generator-core/src/test/resources/eteTestData/complexServiceTestOutput/httpApiBridge.ts b/typescript-service-generator-core/src/test/resources/eteTestData/complexServiceTestOutput/httpApiBridge.ts index 3902c6e..0f36274 100644 --- a/typescript-service-generator-core/src/test/resources/eteTestData/complexServiceTestOutput/httpApiBridge.ts +++ b/typescript-service-generator-core/src/test/resources/eteTestData/complexServiceTestOutput/httpApiBridge.ts @@ -9,7 +9,7 @@ module ModuleName { method: string; mediaType: string; requiredHeaders: string[]; - pathArguments: string[]; + pathArguments: any[]; queryArguments: any; data?: any; }