#1809 Some small template changes.

This commit is contained in:
Kristof Vrolijkx 2016-04-19 11:56:29 +02:00
parent f4fc88c6be
commit c54bceffe3
9 changed files with 16 additions and 19 deletions

View File

@ -3,7 +3,7 @@
<parent> <parent>
<groupId>io.swagger</groupId> <groupId>io.swagger</groupId>
<artifactId>swagger-codegen-project</artifactId> <artifactId>swagger-codegen-project</artifactId>
<version>2.1.6</version> <version>2.1.7-SNAPSHOT</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -6,7 +6,7 @@
<parent> <parent>
<groupId>io.swagger</groupId> <groupId>io.swagger</groupId>
<artifactId>swagger-codegen-project</artifactId> <artifactId>swagger-codegen-project</artifactId>
<version>2.1.6</version> <version>2.1.7-SNAPSHOT</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<artifactId>swagger-codegen-maven-plugin</artifactId> <artifactId>swagger-codegen-maven-plugin</artifactId>

View File

@ -3,7 +3,7 @@
<parent> <parent>
<groupId>io.swagger</groupId> <groupId>io.swagger</groupId>
<artifactId>swagger-codegen-project</artifactId> <artifactId>swagger-codegen-project</artifactId>
<version>2.1.6</version> <version>2.1.7-SNAPSHOT</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -25,7 +25,7 @@ public class TypeScriptAngular2ClientCodegen extends AbstractTypeScriptClientCod
@Override @Override
public String getName() { public String getName() {
return "TypeScript-Angular2"; return "typescript-angular2";
} }
@Override @Override

View File

@ -2,7 +2,6 @@ import {Http, Headers, RequestOptionsArgs, Response, URLSearchParams} from 'angu
import {Injectable} from 'angular2/core'; import {Injectable} from 'angular2/core';
import {Observable} from 'rxjs/Observable'; import {Observable} from 'rxjs/Observable';
import * as model from "../model/model.d.ts" import * as model from "../model/model.d.ts"
import {AppSettings} from "../../AppSettings"
/* tslint:disable:no-unused-variable member-ordering */ /* tslint:disable:no-unused-variable member-ordering */
@ -19,9 +18,9 @@ export class {{classname}} {
protected basePath = '{{basePath}}'; protected basePath = '{{basePath}}';
public defaultHeaders : Headers = new Headers(); public defaultHeaders : Headers = new Headers();
constructor(protected http: Http, appSettigs: AppSettings) { constructor(protected http: Http, basePath: string) {
if (appSettigs && appSettigs.apiBaseUrl) { if (basePath) {
this.basePath = appSettigs.apiBaseUrl; this.basePath = basePath;
} }
} }

View File

@ -1,11 +1,11 @@
{{#models}} {{#models}}
{{#model}} {{#model}}
export { {{{classname}}} } from './{{{ classname }}}'; export * from './{{{ classname }}}';
{{/model}} {{/model}}
{{/models}} {{/models}}
/*
{{#apiInfo}} {{#apiInfo}}
{{#apis}} {{#apis}}
{{#operations}} {{#operations}}
@ -13,5 +13,5 @@ export * from './{{classname}}';
{{/operations}} {{/operations}}
{{/apis}} {{/apis}}
{{/apiInfo}} {{/apiInfo}}
*/

View File

@ -17,12 +17,11 @@ export interface {{classname}} {{#parent}}extends model.{{{parent}}} {{/parent}}
*/ */
{{/description}} {{/description}}
{{name}}?: {{#isEnum}}{{classname}}.{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}}; {{name}}?: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}};
{{/vars}} {{/vars}}
} }
{{#hasEnums}} {{#hasEnums}}
export namespace {{classname}} {
{{#vars}} {{#vars}}
{{#isEnum}} {{#isEnum}}
@ -31,7 +30,6 @@ export namespace {{classname}} {
} }
{{/isEnum}} {{/isEnum}}
{{/vars}} {{/vars}}
}
{{/hasEnums}} {{/hasEnums}}
{{/model}} {{/model}}
{{/models}} {{/models}}

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>io.swagger</groupId> <groupId>io.swagger</groupId>
<artifactId>swagger-codegen-project</artifactId> <artifactId>swagger-codegen-project</artifactId>
<version>2.1.6</version> <version>2.1.7-SNAPSHOT</version>
<relativePath>../..</relativePath> <relativePath>../..</relativePath>
</parent> </parent>
<artifactId>swagger-generator</artifactId> <artifactId>swagger-generator</artifactId>

View File

@ -10,7 +10,7 @@
<artifactId>swagger-codegen-project</artifactId> <artifactId>swagger-codegen-project</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>swagger-codegen-project</name> <name>swagger-codegen-project</name>
<version>2.1.6</version> <version>2.1.7-SNAPSHOT</version>
<url>https://github.com/swagger-api/swagger-codegen</url> <url>https://github.com/swagger-api/swagger-codegen</url>
<scm> <scm>
<connection>scm:git:git@github.com:swagger-api/swagger-codegen.git</connection> <connection>scm:git:git@github.com:swagger-api/swagger-codegen.git</connection>