add integration tests for ts angular2, 4 (#6019)

This commit is contained in:
wing328 2017-07-11 00:20:25 +08:00 committed by GitHub
parent d5a8ecfe1c
commit 0876c9d408
8 changed files with 257 additions and 22 deletions

View File

@ -823,7 +823,10 @@
<module>samples/client/petstore/typescript-fetch/builds/with-npm-version</module>
<module>samples/client/petstore/typescript-fetch/tests/default</module>
<module>samples/client/petstore/typescript-angular</module>
<module>samples/client/petstore/typescript-node/npm</module>
<!-- comment out due to error with github rate limiting
<module>samples/client/petstore/typescript-node/npm</module>-->
<module>samples/client/petstore/typescript-angular2/npm</module>
<module>samples/client/petstore/typescript-angular4/npm</module>
<module>samples/client/petstore/typescript-jquery/npm</module>
<module>samples/client/petstore/swift3/default/SwaggerClientTests</module>
<module>samples/client/petstore/swift3/promisekit/SwaggerClientTests</module>

View File

@ -2,18 +2,18 @@ export interface ConfigurationParameters {
apiKeys?: {[ key: string ]: string};
username?: string;
password?: string;
accessToken?: string;
accessToken?: string | (() => string);
basePath?: string;
withCredentials?: boolean;
}
export class Configuration {
apiKeys: {[ key: string ]: string};
username: string;
password: string;
accessToken: string | (() => string);
basePath: string;
withCredentials: boolean;
apiKeys?: {[ key: string ]: string};
username?: string;
password?: string;
accessToken?: string | (() => string);
basePath?: string;
withCredentials?: boolean;
constructor(configurationParameters: ConfigurationParameters = {}) {
this.apiKeys = configurationParameters.apiKeys;

View File

@ -2,18 +2,18 @@ export interface ConfigurationParameters {
apiKeys?: {[ key: string ]: string};
username?: string;
password?: string;
accessToken?: string;
accessToken?: string | (() => string);
basePath?: string;
withCredentials?: boolean;
}
export class Configuration {
apiKeys: {[ key: string ]: string};
username: string;
password: string;
accessToken: string | (() => string);
basePath: string;
withCredentials: boolean;
apiKeys?: {[ key: string ]: string};
username?: string;
password?: string;
accessToken?: string | (() => string);
basePath?: string;
withCredentials?: boolean;
constructor(configurationParameters: ConfigurationParameters = {}) {
this.apiKeys = configurationParameters.apiKeys;

View File

@ -0,0 +1,67 @@
{
"name": "@swagger/angular2-typescript-petstore",
"version": "0.0.1",
"lockfileVersion": 1,
"dependencies": {
"@angular/common": {
"version": "2.4.10",
"resolved": "https://registry.npmjs.org/@angular/common/-/common-2.4.10.tgz",
"integrity": "sha1-o6aC0iKPow7CPdDrV8joh/uiaZc=",
"dev": true
},
"@angular/compiler": {
"version": "2.4.10",
"resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-2.4.10.tgz",
"integrity": "sha1-9R/TSCCyoCx8th+89JhzxYBW+ww=",
"dev": true
},
"@angular/core": {
"version": "2.4.10",
"resolved": "https://registry.npmjs.org/@angular/core/-/core-2.4.10.tgz",
"integrity": "sha1-C4MgplBlll2ZhkWx9c0892m0Qeo=",
"dev": true
},
"@angular/http": {
"version": "2.4.10",
"resolved": "https://registry.npmjs.org/@angular/http/-/http-2.4.10.tgz",
"integrity": "sha1-/2vq3ls5yYnr8jk8SbNO69Q+lVU=",
"dev": true
},
"@angular/platform-browser": {
"version": "2.4.10",
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-2.4.10.tgz",
"integrity": "sha1-y/JWCBSPtP/vlsxQBbpdez4JOQY=",
"dev": true
},
"reflect-metadata": {
"version": "0.1.10",
"resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.10.tgz",
"integrity": "sha1-tPg3BEFqytiZiMmxVjXUfgO5NEo=",
"dev": true
},
"rxjs": {
"version": "5.4.2",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.4.2.tgz",
"integrity": "sha1-KjI2/L8D31e64G/Wly/ZnlwI/Pc=",
"dev": true
},
"symbol-observable": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz",
"integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=",
"dev": true
},
"typescript": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.4.1.tgz",
"integrity": "sha1-w8yxbdqgsjFN4DHn5v7onlujRrw=",
"dev": true
},
"zone.js": {
"version": "0.7.8",
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.7.8.tgz",
"integrity": "sha1-Tz/og01EWX8mOQU6D6Q43zT//e0=",
"dev": true
}
}
}

View File

@ -0,0 +1,46 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.wordnik</groupId>
<artifactId>TSAngular2PestoreTest</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>TS Angular2 Pettore Test</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>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -2,18 +2,18 @@ export interface ConfigurationParameters {
apiKeys?: {[ key: string ]: string};
username?: string;
password?: string;
accessToken?: string;
accessToken?: string | (() => string);
basePath?: string;
withCredentials?: boolean;
}
export class Configuration {
apiKeys: {[ key: string ]: string};
username: string;
password: string;
accessToken: string | (() => string);
basePath: string;
withCredentials: boolean;
apiKeys?: {[ key: string ]: string};
username?: string;
password?: string;
accessToken?: string | (() => string);
basePath?: string;
withCredentials?: boolean;
constructor(configurationParameters: ConfigurationParameters = {}) {
this.apiKeys = configurationParameters.apiKeys;

View File

@ -0,0 +1,73 @@
{
"name": "@swagger/angular2-typescript-petstore",
"version": "0.0.1",
"lockfileVersion": 1,
"dependencies": {
"@angular/common": {
"version": "4.2.6",
"resolved": "https://registry.npmjs.org/@angular/common/-/common-4.2.6.tgz",
"integrity": "sha1-IQrOS9JON1+LQbpS/rNLGKiH1do=",
"dev": true
},
"@angular/compiler": {
"version": "4.2.6",
"resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-4.2.6.tgz",
"integrity": "sha1-ZndW1JXKDUXSBhJooQ1Sr4Ofr/Q=",
"dev": true
},
"@angular/core": {
"version": "4.2.6",
"resolved": "https://registry.npmjs.org/@angular/core/-/core-4.2.6.tgz",
"integrity": "sha1-DByP8BV/B29KfAtyHKFCPxu+Fk4=",
"dev": true
},
"@angular/http": {
"version": "4.2.6",
"resolved": "https://registry.npmjs.org/@angular/http/-/http-4.2.6.tgz",
"integrity": "sha1-SZ4roLvB89cbdt6+wDTJWMrxE04=",
"dev": true
},
"@angular/platform-browser": {
"version": "4.2.6",
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-4.2.6.tgz",
"integrity": "sha1-oTH/WSIl/mSWvKLJr/YSpNvd9Dc=",
"dev": true
},
"reflect-metadata": {
"version": "0.1.10",
"resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.10.tgz",
"integrity": "sha1-tPg3BEFqytiZiMmxVjXUfgO5NEo=",
"dev": true
},
"rxjs": {
"version": "5.4.2",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.4.2.tgz",
"integrity": "sha1-KjI2/L8D31e64G/Wly/ZnlwI/Pc=",
"dev": true
},
"symbol-observable": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz",
"integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=",
"dev": true
},
"tslib": {
"version": "1.7.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.7.1.tgz",
"integrity": "sha1-vIAEFkaRkjp5/oN4u+s9ogF1OOw=",
"dev": true
},
"typescript": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.4.1.tgz",
"integrity": "sha1-w8yxbdqgsjFN4DHn5v7onlujRrw=",
"dev": true
},
"zone.js": {
"version": "0.7.8",
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.7.8.tgz",
"integrity": "sha1-Tz/og01EWX8mOQU6D6Q43zT//e0=",
"dev": true
}
}
}

View File

@ -0,0 +1,46 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.wordnik</groupId>
<artifactId>TSAngular4PestoreTest</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>TS Angular4 Pettore Test</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>
</executions>
</plugin>
</plugins>
</build>
</project>