Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ samples/client/petstore/python/.venv/

# ts
samples/client/petstore/typescript-node/npm/node_modules
samples/client/petstore/typescript-node/**/typings
samples/client/petstore/typescript-angular/**/typings
samples/client/petstore/typescript-fetch/**/dist/
samples/client/petstore/typescript-fetch/**/typings

1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
before_install:
# required when sudo: required for the Ruby petstore tests
- gem install bundler
- npm install -g typescript

install:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
"name": "{{npmName}}",
"version": "{{npmVersion}}",
"description": "NodeJS client for {{npmName}}",
"repository": "{{gitUserId}}/{{gitRepoId}}",
"main": "api.js",
"scripts": {
"clean": "rm -Rf node_modules/ typings/ *.js",
"build": "typings install && tsc"
},
"author": "Swagger Codegen Contributors",
"license": "MIT",
"license": "Apache-2.0",
"dependencies": {
"bluebird": "^3.3.5",
"request": "^2.72.0"
Expand Down
82 changes: 81 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,78 @@
<module>samples/server/petstore/jaxrs</module>
</modules>
</profile>
<profile>
<id>typescript-fetch-client-tests-default</id>
<activation>
<property>
<name>env</name>
<value>java</value>
</property>
</activation>
<modules>
<module>samples/client/petstore/typescript-fetch/tests/default</module>
</modules>
</profile>
<profile>
<id>typescript-fetch-client-builds-default</id>
<activation>
<property>
<name>env</name>
<value>java</value>
</property>
</activation>
<modules>
<module>samples/client/petstore/typescript-fetch/builds/default</module>
</modules>
</profile>
<profile>
<id>typescript-fetch-client-builds-es6-target</id>
<activation>
<property>
<name>env</name>
<value>java</value>
</property>
</activation>
<modules>
<module>samples/client/petstore/typescript-fetch/builds/es6-target</module>
</modules>
</profile>
<profile>
<id>typescript-fetch-client-builds-with-npm-version</id>
<activation>
<property>
<name>env</name>
<value>java</value>
</property>
</activation>
<modules>
<module>samples/client/petstore/typescript-fetch/builds/with-npm-version</module>
</modules>
</profile>
<profile>
<id>typescript-angular-client</id>
<activation>
<property>
<name>env</name>
<value>java</value>
</property>
</activation>
<modules>
<module>samples/client/petstore/typescript-angular/npm</module>
</modules>
</profile>
<profile>
<id>typescript-node-npm-client</id>
<activation>
<property>
<name>env</name>
<value>java</value>
</property>
</activation>
<modules>
<module>samples/client/petstore/typescript-node/npm</module>
</modules>
</profile>
<profile>
<id>ruby-client</id>
<activation>
Expand Down Expand Up @@ -471,6 +543,15 @@
</property>
</activation>
<modules>
<!--<module>samples/client/petstore/typescript-fetch/tests/default</module>
<module>samples/client/petstore/typescript-fetch/builds/default</module>
<module>samples/client/petstore/typescript-fetch/builds/es6-target</module>
<module>samples/client/petstore/typescript-fetch/builds/with-npm-version</module>-->
<!-- run ruby test first which has a random delay script to
avoid issues with running 2 CI jobs in parallel. -->
<module>samples/client/petstore/ruby</module>
<module>samples/client/petstore/typescript-angular</module>
<module>samples/client/petstore/typescript-node/npm</module>
<module>samples/client/petstore/android/volley</module>
<module>samples/client/petstore/clojure</module>
<module>samples/client/petstore/java/default</module>
Expand All @@ -483,7 +564,6 @@
<module>samples/client/petstore/javascript</module>
<module>samples/client/petstore/scala</module>
<module>samples/server/petstore/spring-mvc</module>
<module>samples/client/petstore/ruby</module>
<module>samples/server/petstore/jaxrs</module>
<module>samples/server/petstore/jaxrs-resteasy</module>
<!--module>samples/client/petstore/objc/SwaggerClientTests</module-->
Expand Down
5 changes: 3 additions & 2 deletions samples/client/petstore/typescript-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"name": "petstore-typescript-node-sample",
"version": "1.0.0",
"repository": "GIT_USER_ID/GIT_REPO_ID",
"description": "Sample of generated TypeScript petstore client",
"main": "api.js",
"scripts": {
"postinstall": "tsd reinstall --overwrite",
"test": "tsc --target ES6 && node client.js",
"clean": "rm -Rf node_modules/ typings/ *.js"
},
"author": "Mads M. Tandrup",
"license": "Apache 2.0",
"author": "Swagger Codegen Contributors & Mads M. Tandrup",
"license": "Apache-2.0",
"dependencies": {
"request": "^2.60.0",
"angular": "^1.4.3"
Expand Down
59 changes: 59 additions & 0 deletions samples/client/petstore/typescript-angular/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.wordnik</groupId>
<artifactId>TypeScriptAngularPestoreClientTests</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>TS Angular Petstore Client</name>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>npm-install</id>
<phase>pre-integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>npm</executable>
<arguments>
<argument>install</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>npm-test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>npm</executable>
<arguments>
<argument>test</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
46 changes: 46 additions & 0 deletions samples/client/petstore/typescript-fetch/builds/default/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.wordnik</groupId>
<artifactId>TypeScriptAngularBuildPestoreClientTests</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>TS Angular Build Petstore Client</name>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>npm-install</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>npm</executable>
<arguments>
<argument>install</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
46 changes: 46 additions & 0 deletions samples/client/petstore/typescript-fetch/builds/es6-target/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.wordnik</groupId>
<artifactId>TypeScriptAngularBuildES6PestoreClientTests</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>TS Angular Build ES6 Petstore Client</name>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>npm-install</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>npm</executable>
<arguments>
<argument>install</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.wordnik</groupId>
<artifactId>TypeScriptAngularBuildWithNPMVersionPestoreClientTests</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>TS Angular Build With NPM Version Petstore Client</name>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>npm-install</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>npm</executable>
<arguments>
<argument>install</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
},
"scripts": {
"prepublish": "./scripts/prepublish.sh",
"pretest": "npm install mocha",
"test": "mocha"
},
"name": "typescript-fetch-test",
Expand Down
Loading