mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-04 14:40:53 +00:00
Include api and model package in angular
This commit is contained in:
parent
7a1f3dbf9e
commit
34b341874c
@ -600,7 +600,7 @@ public class DefaultCodegen {
|
|||||||
|
|
||||||
public CodegenProperty fromProperty(String name, Property p) {
|
public CodegenProperty fromProperty(String name, Property p) {
|
||||||
if (p == null) {
|
if (p == null) {
|
||||||
LOGGER.error("unexpected missing property for name " + null);
|
LOGGER.error("unexpected missing property for name " + name);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
CodegenProperty property = CodegenModelFactory.newInstance(CodegenModelType.PROPERTY);
|
CodegenProperty property = CodegenModelFactory.newInstance(CodegenModelType.PROPERTY);
|
||||||
|
@ -2,6 +2,8 @@ package io.swagger.codegen.languages;
|
|||||||
|
|
||||||
import io.swagger.codegen.SupportingFile;
|
import io.swagger.codegen.SupportingFile;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCodegen {
|
public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCodegen {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -19,6 +21,8 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
|
|||||||
modelTemplateFiles.put("model.mustache", ".ts");
|
modelTemplateFiles.put("model.mustache", ".ts");
|
||||||
apiTemplateFiles.put("api.mustache", ".ts");
|
apiTemplateFiles.put("api.mustache", ".ts");
|
||||||
templateDir = "TypeScript-Angular";
|
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"));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
/// <reference path="api.d.ts" />
|
/// <reference path="api.d.ts" />
|
||||||
|
|
||||||
module {
|
module API.Client {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
export class Category {
|
export class Category {
|
@ -1,6 +1,6 @@
|
|||||||
/// <reference path="api.d.ts" />
|
/// <reference path="api.d.ts" />
|
||||||
|
|
||||||
module {
|
module API.Client {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
export class Order {
|
export class Order {
|
@ -1,6 +1,6 @@
|
|||||||
/// <reference path="api.d.ts" />
|
/// <reference path="api.d.ts" />
|
||||||
|
|
||||||
module {
|
module API.Client {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
export class Pet {
|
export class Pet {
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/* tslint:disable:no-unused-variable member-ordering */
|
/* tslint:disable:no-unused-variable member-ordering */
|
||||||
|
|
||||||
module {
|
module API.Client {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
export class PetApi {
|
export class PetApi {
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/* tslint:disable:no-unused-variable member-ordering */
|
/* tslint:disable:no-unused-variable member-ordering */
|
||||||
|
|
||||||
module {
|
module API.Client {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
export class StoreApi {
|
export class StoreApi {
|
@ -1,6 +1,6 @@
|
|||||||
/// <reference path="api.d.ts" />
|
/// <reference path="api.d.ts" />
|
||||||
|
|
||||||
module {
|
module API.Client {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
export class Tag {
|
export class Tag {
|
@ -1,6 +1,6 @@
|
|||||||
/// <reference path="api.d.ts" />
|
/// <reference path="api.d.ts" />
|
||||||
|
|
||||||
module {
|
module API.Client {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
export class User {
|
export class User {
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/* tslint:disable:no-unused-variable member-ordering */
|
/* tslint:disable:no-unused-variable member-ordering */
|
||||||
|
|
||||||
module {
|
module API.Client {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
export class UserApi {
|
export class UserApi {
|
Loading…
x
Reference in New Issue
Block a user