Skip to content
Closed
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,8 @@ samples/client/petstore/typescript-node/**/typings
samples/client/petstore/typescript-angular/**/typings
samples/client/petstore/typescript-fetch/**/dist/
samples/client/petstore/typescript-fetch/**/typings
samples/client/petstore/typescript-angular2/*/lib/
samples/client/petstore/typescript-angular2/*/node_modules/
samples/client/petstore/typescript-angular2/*/typings/


13 changes: 13 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,18 @@
<module>samples/client/petstore/typescript-node/npm</module>
</modules>
</profile>
<profile>
<id>typescript-angular2-npm-client</id>
<activation>
<property>
<name>env</name>
<value>java</value>
</property>
</activation>
<modules>
<module>samples/client/petstore/typescript-angular2/npm</module>
</modules>
</profile>
<profile>
<id>ruby-client</id>
<activation>
Expand Down Expand Up @@ -550,6 +562,7 @@
<!-- 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-angular2/npm</module>
<module>samples/client/petstore/typescript-angular</module>
<module>samples/client/petstore/typescript-node/npm</module>
<module>samples/client/petstore/android/volley</module>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
4 changes: 2 additions & 2 deletions samples/client/petstore/typescript-angular2/npm/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201605120027
## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201605231647

### Building

Expand All @@ -19,7 +19,7 @@ navigate to the folder of your consuming project and run one of next commando's.
_published:_

```
npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201605120027 --save
npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201605231647 --save
```

_unPublished (not recommended):_
Expand Down
6 changes: 3 additions & 3 deletions samples/client/petstore/typescript-angular2/npm/api/PetApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class PetApi {
* Multiple status values can be provided with comma seperated strings
* @param status Status values that need to be considered for filter
*/
public findPetsByStatus (status?: models.Array<string>, extraHttpRequestParams?: any ) : Observable<Array<models.Pet>> {
public findPetsByStatus (status?: Array<string>, extraHttpRequestParams?: any ) : Observable<Array<models.Pet>> {
const path = this.basePath + '/pet/findByStatus';

let queryParameters: any = ""; // This should probably be an object in the future
Expand All @@ -97,7 +97,7 @@ export class PetApi {
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by
*/
public findPetsByTags (tags?: models.Array<string>, extraHttpRequestParams?: any ) : Observable<Array<models.Pet>> {
public findPetsByTags (tags?: Array<string>, extraHttpRequestParams?: any ) : Observable<Array<models.Pet>> {
const path = this.basePath + '/pet/findByTags';

let queryParameters: any = ""; // This should probably be an object in the future
Expand Down Expand Up @@ -205,7 +205,7 @@ export class PetApi {
* @param additionalMetadata Additional data to pass to server
* @param file file to upload
*/
public uploadFile (petId: number, additionalMetadata?: string, file?: models.any, extraHttpRequestParams?: any ) : Observable<{}> {
public uploadFile (petId: number, additionalMetadata?: string, file?: any, extraHttpRequestParams?: any ) : Observable<{}> {
const path = this.basePath + '/pet/{petId}/uploadImage'
.replace('{' + 'petId' + '}', String(petId));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class UserApi {
*
* @param body List of user object
*/
public createUsersWithArrayInput (body?: models.Array<models.User>, extraHttpRequestParams?: any ) : Observable<{}> {
public createUsersWithArrayInput (body?: Array<models.User>, extraHttpRequestParams?: any ) : Observable<{}> {
const path = this.basePath + '/user/createWithArray';

let queryParameters: any = ""; // This should probably be an object in the future
Expand All @@ -66,7 +66,7 @@ export class UserApi {
*
* @param body List of user object
*/
public createUsersWithListInput (body?: models.Array<models.User>, extraHttpRequestParams?: any ) : Observable<{}> {
public createUsersWithListInput (body?: Array<models.User>, extraHttpRequestParams?: any ) : Observable<{}> {
const path = this.basePath + '/user/createWithList';

let queryParameters: any = ""; // This should probably be an object in the future
Expand Down
8 changes: 3 additions & 5 deletions samples/client/petstore/typescript-angular2/npm/api/api.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export * from '../api/PetApi';
export * from '../api/StoreApi';
export * from '../api/UserApi';


export * from './PetApi';
export * from './StoreApi';
export * from './UserApi';
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import * as models from './models';

export interface Category {


id?: number;

name?: string;
}

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import * as models from './models';

export interface Order {


id?: number;

Expand All @@ -18,7 +19,6 @@ export interface Order {

complete?: boolean;
}

export namespace Order {

export enum StatusEnum {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import * as models from './models';

export interface Pet {


id?: number;

Expand All @@ -18,7 +19,6 @@ export interface Pet {
*/
status?: Pet.StatusEnum;
}

export namespace Pet {

export enum StatusEnum {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import * as models from './models';

export interface Tag {


id?: number;

name?: string;
}

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import * as models from './models';

export interface User {


id?: number;

Expand All @@ -22,4 +23,3 @@ export interface User {
*/
userStatus?: number;
}

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ export * from './Order';
export * from './Pet';
export * from './Tag';
export * from './User';



11 changes: 2 additions & 9 deletions samples/client/petstore/typescript-angular2/npm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swagger/angular2-typescript-petstore",
"version": "0.0.1-SNAPSHOT.201605120027",
"version": "0.0.1-SNAPSHOT.201605231647",
"description": "swagger client for @swagger/angular2-typescript-petstore",
"author": "Swagger Codegen Contributors",
"keywords": [
Expand All @@ -16,15 +16,8 @@
"build": "typings install && tsc"
},
"peerDependencies": {
"@angular/common": "^2.0.0-rc.1",
"@angular/compiler": "^2.0.0-rc.1",
"@angular/core": "^2.0.0-rc.1",
"@angular/http": "^2.0.0-rc.1",
"@angular/platform-browser": "^2.0.0-rc.1",
"@angular/platform-browser-dynamic": "^2.0.0-rc.1",
"core-js": "^2.3.0",
"rxjs": "^5.0.0-beta.6",
"zone.js": "^0.6.12"
"@angular/http": "^2.0.0-rc.1"
},
"devDependencies": {
"@angular/common": "^2.0.0-rc.1",
Expand Down
60 changes: 60 additions & 0 deletions samples/client/petstore/typescript-angular2/npm/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.wordnik</groupId>
<artifactId>TypeScriptAngular2NPMPestoreClientTests</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>TS Angualr2 npm 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-run-build</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>npm</executable>
<arguments>
<argument>run</argument>
<argument>build</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>