Skip to content

Commit

Permalink
add integration tests for ts angular2, 4 (swagger-api#6019)
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 authored Jul 10, 2017
1 parent d5a8ecf commit 0876c9d
Show file tree
Hide file tree
Showing 8 changed files with 257 additions and 22 deletions.
5 changes: 4 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions samples/client/petstore/typescript-angular2/npm/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
67 changes: 67 additions & 0 deletions samples/client/petstore/typescript-angular2/npm/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions samples/client/petstore/typescript-angular2/npm/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>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>
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
73 changes: 73 additions & 0 deletions samples/client/petstore/typescript-angular4/npm/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions samples/client/petstore/typescript-angular4/npm/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>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>

0 comments on commit 0876c9d

Please sign in to comment.