forked from loafle/openapi-generator-original
#1809 Some small template changes.
This commit is contained in:
parent
f4fc88c6be
commit
c54bceffe3
@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-codegen-project</artifactId>
|
||||
<version>2.1.6</version>
|
||||
<version>2.1.7-SNAPSHOT</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-codegen-project</artifactId>
|
||||
<version>2.1.6</version>
|
||||
<version>2.1.7-SNAPSHOT</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<artifactId>swagger-codegen-maven-plugin</artifactId>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<parent>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-codegen-project</artifactId>
|
||||
<version>2.1.6</version>
|
||||
<version>2.1.7-SNAPSHOT</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -25,7 +25,7 @@ public class TypeScriptAngular2ClientCodegen extends AbstractTypeScriptClientCod
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "TypeScript-Angular2";
|
||||
return "typescript-angular2";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -2,7 +2,6 @@ import {Http, Headers, RequestOptionsArgs, Response, URLSearchParams} from 'angu
|
||||
import {Injectable} from 'angular2/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import * as model from "../model/model.d.ts"
|
||||
import {AppSettings} from "../../AppSettings"
|
||||
|
||||
/* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
@ -19,9 +18,9 @@ export class {{classname}} {
|
||||
protected basePath = '{{basePath}}';
|
||||
public defaultHeaders : Headers = new Headers();
|
||||
|
||||
constructor(protected http: Http, appSettigs: AppSettings) {
|
||||
if (appSettigs && appSettigs.apiBaseUrl) {
|
||||
this.basePath = appSettigs.apiBaseUrl;
|
||||
constructor(protected http: Http, basePath: string) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
{{#models}}
|
||||
{{#model}}
|
||||
export { {{{classname}}} } from './{{{ classname }}}';
|
||||
export * from './{{{ classname }}}';
|
||||
{{/model}}
|
||||
{{/models}}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
{{#apiInfo}}
|
||||
{{#apis}}
|
||||
{{#operations}}
|
||||
@ -13,5 +13,5 @@ export * from './{{classname}}';
|
||||
{{/operations}}
|
||||
{{/apis}}
|
||||
{{/apiInfo}}
|
||||
*/
|
||||
|
||||
|
||||
|
@ -17,12 +17,11 @@ export interface {{classname}} {{#parent}}extends model.{{{parent}}} {{/parent}}
|
||||
*/
|
||||
{{/description}}
|
||||
|
||||
{{name}}?: {{#isEnum}}{{classname}}.{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}};
|
||||
{{name}}?: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}};
|
||||
{{/vars}}
|
||||
}
|
||||
|
||||
{{#hasEnums}}
|
||||
export namespace {{classname}} {
|
||||
{{#vars}}
|
||||
{{#isEnum}}
|
||||
|
||||
@ -31,7 +30,6 @@ export namespace {{classname}} {
|
||||
}
|
||||
{{/isEnum}}
|
||||
{{/vars}}
|
||||
}
|
||||
{{/hasEnums}}
|
||||
{{/model}}
|
||||
{{/models}}
|
||||
|
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-codegen-project</artifactId>
|
||||
<version>2.1.6</version>
|
||||
<version>2.1.7-SNAPSHOT</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<artifactId>swagger-generator</artifactId>
|
||||
|
2
pom.xml
2
pom.xml
@ -10,7 +10,7 @@
|
||||
<artifactId>swagger-codegen-project</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<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>
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:swagger-api/swagger-codegen.git</connection>
|
||||
|
Loading…
x
Reference in New Issue
Block a user