Include api and model package in angular

This commit is contained in:
Mads Mætzke Tandrup 2015-07-24 11:05:36 +02:00
parent 7a1f3dbf9e
commit 34b341874c
No known key found for this signature in database
GPG Key ID: 67056F406C84B14B
11 changed files with 14 additions and 10 deletions

View File

@ -600,7 +600,7 @@ public class DefaultCodegen {
public CodegenProperty fromProperty(String name, Property p) {
if (p == null) {
LOGGER.error("unexpected missing property for name " + null);
LOGGER.error("unexpected missing property for name " + name);
return null;
}
CodegenProperty property = CodegenModelFactory.newInstance(CodegenModelType.PROPERTY);

View File

@ -2,6 +2,8 @@ package io.swagger.codegen.languages;
import io.swagger.codegen.SupportingFile;
import java.io.File;
public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCodegen {
@Override
@ -19,6 +21,8 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
modelTemplateFiles.put("model.mustache", ".ts");
apiTemplateFiles.put("api.mustache", ".ts");
templateDir = "TypeScript-Angular";
supportingFiles.add(new SupportingFile("api.d.mustache", apiPackage, "api.d.ts"));
apiPackage = "API.Client";
modelPackage = "API.Client";
supportingFiles.add(new SupportingFile("api.d.mustache", apiPackage().replace('.', File.separatorChar), "api.d.ts"));
}
}

View File

@ -1,6 +1,6 @@
/// <reference path="api.d.ts" />
module {
module API.Client {
'use strict';
export class Category {

View File

@ -1,6 +1,6 @@
/// <reference path="api.d.ts" />
module {
module API.Client {
'use strict';
export class Order {

View File

@ -1,6 +1,6 @@
/// <reference path="api.d.ts" />
module {
module API.Client {
'use strict';
export class Pet {

View File

@ -2,7 +2,7 @@
/* tslint:disable:no-unused-variable member-ordering */
module {
module API.Client {
'use strict';
export class PetApi {

View File

@ -2,7 +2,7 @@
/* tslint:disable:no-unused-variable member-ordering */
module {
module API.Client {
'use strict';
export class StoreApi {

View File

@ -1,6 +1,6 @@
/// <reference path="api.d.ts" />
module {
module API.Client {
'use strict';
export class Tag {

View File

@ -1,6 +1,6 @@
/// <reference path="api.d.ts" />
module {
module API.Client {
'use strict';
export class User {

View File

@ -2,7 +2,7 @@
/* tslint:disable:no-unused-variable member-ordering */
module {
module API.Client {
'use strict';
export class UserApi {