From f760d93cd74d547c0acbfaf350f3d74e4ad1fd14 Mon Sep 17 00:00:00 2001 From: Sebastian List Date: Tue, 14 Feb 2017 11:04:23 +0100 Subject: [PATCH] Updated npm configuration to use new typescript2 typings system This also removes the dependency to the typings project. Issue #4761 --- .../typescript-angular2/README.mustache | 56 ++++++++++++++++++- .../typescript-angular2/package.mustache | 32 +++++------ .../typescript-angular2/tsconfig.mustache | 10 ++-- .../typescript-angular2/default/api/PetApi.ts | 18 +++--- .../default/api/StoreApi.ts | 6 +- .../default/api/UserApi.ts | 16 +++--- .../typescript-angular2/npm/README.md | 56 ++++++++++++++++++- .../typescript-angular2/npm/api/PetApi.ts | 18 +++--- .../typescript-angular2/npm/api/StoreApi.ts | 6 +- .../typescript-angular2/npm/api/UserApi.ts | 16 +++--- .../typescript-angular2/npm/package.json | 32 +++++------ .../typescript-angular2/npm/tsconfig.json | 10 ++-- .../with-interfaces/api/PetApi.ts | 20 +++---- .../with-interfaces/api/StoreApi.ts | 8 +-- .../with-interfaces/api/UserApi.ts | 16 +++--- 15 files changed, 210 insertions(+), 110 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/typescript-angular2/README.mustache b/modules/swagger-codegen/src/main/resources/typescript-angular2/README.mustache index 218831c42d1..5c46e73275f 100644 --- a/modules/swagger-codegen/src/main/resources/typescript-angular2/README.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-angular2/README.mustache @@ -28,9 +28,37 @@ _unPublished (not recommended):_ npm install PATH_TO_GENERATED_PACKAGE --save ``` +_using `npm link`:_ + +In PATH_TO_GENERATED_PACKAGE: +``` +npm link +``` + +In your project: +``` +npm link {{npmName}}@{{npmVersion}} +``` + In your angular2 project: -TODO: paste example. +``` +import { DefaultApi } from '{{npmName}}/api/api'; +@NgModule({ + imports: [], + declarations: [], + exports: [], + providers: [AppModule] +}) +export class CoreModule {} +``` +``` +import { DefaultApi } from '{{npmName}}/api/api'; + +export class AppComponent { + constructor(private apiGateway: DefaultApi) { } +} +``` ### Set service base path If different than the generated base path, during app bootstrap, you can provide the base path to your service. @@ -41,4 +69,30 @@ import { BASE_PATH } from './path-to-swagger-gen-service/index'; bootstrap(AppComponent, [ { provide: BASE_PATH, useValue: 'https://your-web-service.com' }, ]); +``` + +#### Using @angular/cli +First extend your `src/environments/*.ts` files by adding the corresponding base path: + +``` +export const environment = { + production: false, + API_BASE_PATH: 'http://127.0.0.1:8080' +}; +``` + +In the src/app/app.module.ts: +``` +import { BASE_PATH } from '{{npmName}}'; +import { environment } from '../environments/environment'; + +@NgModule({ + declarations: [ + AppComponent, + ], + imports: [ ], + providers: [{ provide: BASE_PATH, useValue: useValue: environment.API_BASE_PATH }], + bootstrap: [AppComponent] +}) +export class AppModule { } ``` \ No newline at end of file diff --git a/modules/swagger-codegen/src/main/resources/typescript-angular2/package.mustache b/modules/swagger-codegen/src/main/resources/typescript-angular2/package.mustache index 757e397a15d..7e26cea9755 100644 --- a/modules/swagger-codegen/src/main/resources/typescript-angular2/package.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-angular2/package.mustache @@ -10,31 +10,29 @@ "main": "dist/index.js", "typings": "dist/index.d.ts", "scripts": { - "build": "typings install && tsc --outDir dist/", + "build": "tsc", "postinstall": "npm run build" }, "peerDependencies": { - "@angular/core": "^2.0.0-rc.5", - "@angular/http": "^2.0.0-rc.5", - "@angular/common": "^2.0.0-rc.5", - "@angular/compiler": "^2.0.0-rc.5", + "@angular/core": "^2.2.2", + "@angular/http": "^2.2.2", + "@angular/common": "^2.2.2", + "@angular/compiler": "^2.2.2", "core-js": "^2.4.0", "reflect-metadata": "^0.1.3", - "rxjs": "5.0.0-beta.6", - "zone.js": "^0.6.17" + "rxjs": "^5.1.0", + "zone.js": "^0.7.6" }, "devDependencies": { - "@angular/core": "^2.0.0-rc.5", - "@angular/http": "^2.0.0-rc.5", - "@angular/common": "^2.0.0-rc.5", - "@angular/compiler": "^2.0.0-rc.5", - "@angular/platform-browser": "^2.0.0-rc.5", - "core-js": "^2.4.0", + "@angular/core": "^2.2.2", + "@angular/http": "^2.2.2", + "@angular/common": "^2.2.2", + "@angular/compiler": "^2.2.2", + "@angular/platform-browser": "^2.2.2", "reflect-metadata": "^0.1.3", - "rxjs": "5.0.0-beta.6", - "zone.js": "^0.6.17", - "typescript": "^1.8.10", - "typings": "^1.3.2" + "rxjs": "5.1.0", + "zone.js": "^0.7.6", + "typescript": "^2.1.5" }{{#npmRepository}},{{/npmRepository}} {{#npmRepository}} "publishConfig":{ diff --git a/modules/swagger-codegen/src/main/resources/typescript-angular2/tsconfig.mustache b/modules/swagger-codegen/src/main/resources/typescript-angular2/tsconfig.mustache index 3db6e8690e9..a6e9096bbf7 100644 --- a/modules/swagger-codegen/src/main/resources/typescript-angular2/tsconfig.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-angular2/tsconfig.mustache @@ -5,23 +5,21 @@ "noImplicitAny": false, "suppressImplicitAnyIndexErrors": true, "target": "es5", - "module": "commonjs", + "module": "es6", "moduleResolution": "node", "removeComments": true, "sourceMap": true, "outDir": "./dist", "noLib": false, - "declaration": true + "declaration": true, + "lib": [ "es6", "dom" ] }, "exclude": [ "node_modules", - "typings/main.d.ts", - "typings/main", "dist" ], "filesGlob": [ "./model/*.ts", - "./api/*.ts", - "typings/browser.d.ts" + "./api/*.ts" ] } diff --git a/samples/client/petstore/typescript-angular2/default/api/PetApi.ts b/samples/client/petstore/typescript-angular2/default/api/PetApi.ts index 0587fede365..e5238eda30d 100644 --- a/samples/client/petstore/typescript-angular2/default/api/PetApi.ts +++ b/samples/client/petstore/typescript-angular2/default/api/PetApi.ts @@ -191,13 +191,13 @@ export class PetApi { } // to determine the Content-Type header let consumes: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -253,7 +253,7 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -304,7 +304,7 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -355,7 +355,7 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -403,7 +403,7 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -442,13 +442,13 @@ export class PetApi { } // to determine the Content-Type header let consumes: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -504,7 +504,7 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; diff --git a/samples/client/petstore/typescript-angular2/default/api/StoreApi.ts b/samples/client/petstore/typescript-angular2/default/api/StoreApi.ts index a0847d7049a..a4257efc440 100644 --- a/samples/client/petstore/typescript-angular2/default/api/StoreApi.ts +++ b/samples/client/petstore/typescript-angular2/default/api/StoreApi.ts @@ -126,7 +126,7 @@ export class StoreApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -202,7 +202,7 @@ export class StoreApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -240,7 +240,7 @@ export class StoreApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; diff --git a/samples/client/petstore/typescript-angular2/default/api/UserApi.ts b/samples/client/petstore/typescript-angular2/default/api/UserApi.ts index f5680156442..681d5849424 100644 --- a/samples/client/petstore/typescript-angular2/default/api/UserApi.ts +++ b/samples/client/petstore/typescript-angular2/default/api/UserApi.ts @@ -191,7 +191,7 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -232,7 +232,7 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -273,7 +273,7 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -315,7 +315,7 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -354,7 +354,7 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -405,7 +405,7 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -438,7 +438,7 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -482,7 +482,7 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; diff --git a/samples/client/petstore/typescript-angular2/npm/README.md b/samples/client/petstore/typescript-angular2/npm/README.md index fbf37be47b0..038fd51491c 100644 --- a/samples/client/petstore/typescript-angular2/npm/README.md +++ b/samples/client/petstore/typescript-angular2/npm/README.md @@ -28,9 +28,37 @@ _unPublished (not recommended):_ npm install PATH_TO_GENERATED_PACKAGE --save ``` +_using `npm link`:_ + +In PATH_TO_GENERATED_PACKAGE: +``` +npm link +``` + +In your project: +``` +npm link @swagger/angular2-typescript-petstore@0.0.1 +``` + In your angular2 project: -TODO: paste example. +``` +import { DefaultApi } from '@swagger/angular2-typescript-petstore/api/api'; +@NgModule({ + imports: [], + declarations: [], + exports: [], + providers: [AppModule] +}) +export class CoreModule {} +``` +``` +import { DefaultApi } from '@swagger/angular2-typescript-petstore/api/api'; + +export class AppComponent { + constructor(private apiGateway: DefaultApi) { } +} +``` ### Set service base path If different than the generated base path, during app bootstrap, you can provide the base path to your service. @@ -41,4 +69,30 @@ import { BASE_PATH } from './path-to-swagger-gen-service/index'; bootstrap(AppComponent, [ { provide: BASE_PATH, useValue: 'https://your-web-service.com' }, ]); +``` + +#### Using @angular/cli +First extend your `src/environments/*.ts` files by adding the corresponding base path: + +``` +export const environment = { + production: false, + API_BASE_PATH: 'http://127.0.0.1:8080' +}; +``` + +In the src/app/app.module.ts: +``` +import { BASE_PATH } from '@swagger/angular2-typescript-petstore'; +import { environment } from '../environments/environment'; + +@NgModule({ + declarations: [ + AppComponent, + ], + imports: [ ], + providers: [{ provide: BASE_PATH, useValue: useValue: environment.API_BASE_PATH }], + bootstrap: [AppComponent] +}) +export class AppModule { } ``` \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular2/npm/api/PetApi.ts b/samples/client/petstore/typescript-angular2/npm/api/PetApi.ts index 0587fede365..e5238eda30d 100644 --- a/samples/client/petstore/typescript-angular2/npm/api/PetApi.ts +++ b/samples/client/petstore/typescript-angular2/npm/api/PetApi.ts @@ -191,13 +191,13 @@ export class PetApi { } // to determine the Content-Type header let consumes: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -253,7 +253,7 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -304,7 +304,7 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -355,7 +355,7 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -403,7 +403,7 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -442,13 +442,13 @@ export class PetApi { } // to determine the Content-Type header let consumes: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -504,7 +504,7 @@ export class PetApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; diff --git a/samples/client/petstore/typescript-angular2/npm/api/StoreApi.ts b/samples/client/petstore/typescript-angular2/npm/api/StoreApi.ts index a0847d7049a..a4257efc440 100644 --- a/samples/client/petstore/typescript-angular2/npm/api/StoreApi.ts +++ b/samples/client/petstore/typescript-angular2/npm/api/StoreApi.ts @@ -126,7 +126,7 @@ export class StoreApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -202,7 +202,7 @@ export class StoreApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -240,7 +240,7 @@ export class StoreApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; diff --git a/samples/client/petstore/typescript-angular2/npm/api/UserApi.ts b/samples/client/petstore/typescript-angular2/npm/api/UserApi.ts index f5680156442..681d5849424 100644 --- a/samples/client/petstore/typescript-angular2/npm/api/UserApi.ts +++ b/samples/client/petstore/typescript-angular2/npm/api/UserApi.ts @@ -191,7 +191,7 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -232,7 +232,7 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -273,7 +273,7 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -315,7 +315,7 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -354,7 +354,7 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -405,7 +405,7 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -438,7 +438,7 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; @@ -482,7 +482,7 @@ export class UserApi { // to determine the Accept header let produces: string[] = [ - 'application/xml', + 'application/xml', 'application/json' ]; diff --git a/samples/client/petstore/typescript-angular2/npm/package.json b/samples/client/petstore/typescript-angular2/npm/package.json index 70255c80f82..bff6586d567 100644 --- a/samples/client/petstore/typescript-angular2/npm/package.json +++ b/samples/client/petstore/typescript-angular2/npm/package.json @@ -10,31 +10,29 @@ "main": "dist/index.js", "typings": "dist/index.d.ts", "scripts": { - "build": "typings install && tsc --outDir dist/", + "build": "tsc", "postinstall": "npm run build" }, "peerDependencies": { - "@angular/core": "^2.0.0-rc.5", - "@angular/http": "^2.0.0-rc.5", - "@angular/common": "^2.0.0-rc.5", - "@angular/compiler": "^2.0.0-rc.5", + "@angular/core": "^2.2.2", + "@angular/http": "^2.2.2", + "@angular/common": "^2.2.2", + "@angular/compiler": "^2.2.2", "core-js": "^2.4.0", "reflect-metadata": "^0.1.3", - "rxjs": "5.0.0-beta.6", - "zone.js": "^0.6.17" + "rxjs": "^5.1.0", + "zone.js": "^0.7.6" }, "devDependencies": { - "@angular/core": "^2.0.0-rc.5", - "@angular/http": "^2.0.0-rc.5", - "@angular/common": "^2.0.0-rc.5", - "@angular/compiler": "^2.0.0-rc.5", - "@angular/platform-browser": "^2.0.0-rc.5", - "core-js": "^2.4.0", + "@angular/core": "^2.2.2", + "@angular/http": "^2.2.2", + "@angular/common": "^2.2.2", + "@angular/compiler": "^2.2.2", + "@angular/platform-browser": "^2.2.2", "reflect-metadata": "^0.1.3", - "rxjs": "5.0.0-beta.6", - "zone.js": "^0.6.17", - "typescript": "^1.8.10", - "typings": "^1.3.2" + "rxjs": "5.1.0", + "zone.js": "^0.7.6", + "typescript": "^2.1.5" }, "publishConfig":{ "registry":"https://skimdb.npmjs.com/registry" diff --git a/samples/client/petstore/typescript-angular2/npm/tsconfig.json b/samples/client/petstore/typescript-angular2/npm/tsconfig.json index 3db6e8690e9..a6e9096bbf7 100644 --- a/samples/client/petstore/typescript-angular2/npm/tsconfig.json +++ b/samples/client/petstore/typescript-angular2/npm/tsconfig.json @@ -5,23 +5,21 @@ "noImplicitAny": false, "suppressImplicitAnyIndexErrors": true, "target": "es5", - "module": "commonjs", + "module": "es6", "moduleResolution": "node", "removeComments": true, "sourceMap": true, "outDir": "./dist", "noLib": false, - "declaration": true + "declaration": true, + "lib": [ "es6", "dom" ] }, "exclude": [ "node_modules", - "typings/main.d.ts", - "typings/main", "dist" ], "filesGlob": [ "./model/*.ts", - "./api/*.ts", - "typings/browser.d.ts" + "./api/*.ts" ] } diff --git a/samples/client/petstore/typescript-angular2/with-interfaces/api/PetApi.ts b/samples/client/petstore/typescript-angular2/with-interfaces/api/PetApi.ts index b23d131cca1..ac63e3a84de 100644 --- a/samples/client/petstore/typescript-angular2/with-interfaces/api/PetApi.ts +++ b/samples/client/petstore/typescript-angular2/with-interfaces/api/PetApi.ts @@ -188,13 +188,13 @@ export class PetApi implements PetApiInterface { let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 // to determine the Content-Type header let consumes: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; // to determine the Accept header let produces: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; @@ -250,7 +250,7 @@ export class PetApi implements PetApiInterface { // to determine the Accept header let produces: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; @@ -299,7 +299,7 @@ export class PetApi implements PetApiInterface { // to determine the Accept header let produces: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; @@ -348,7 +348,7 @@ export class PetApi implements PetApiInterface { // to determine the Accept header let produces: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; @@ -396,7 +396,7 @@ export class PetApi implements PetApiInterface { // to determine the Accept header let produces: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; @@ -440,13 +440,13 @@ export class PetApi implements PetApiInterface { let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845 // to determine the Content-Type header let consumes: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; // to determine the Accept header let produces: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; @@ -502,7 +502,7 @@ export class PetApi implements PetApiInterface { // to determine the Accept header let produces: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; @@ -566,7 +566,7 @@ export class PetApi implements PetApiInterface { // to determine the Accept header let produces: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; diff --git a/samples/client/petstore/typescript-angular2/with-interfaces/api/StoreApi.ts b/samples/client/petstore/typescript-angular2/with-interfaces/api/StoreApi.ts index dcefb6f6b28..ed76ded48e6 100644 --- a/samples/client/petstore/typescript-angular2/with-interfaces/api/StoreApi.ts +++ b/samples/client/petstore/typescript-angular2/with-interfaces/api/StoreApi.ts @@ -127,7 +127,7 @@ export class StoreApi implements StoreApiInterface { // to determine the Accept header let produces: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; @@ -160,7 +160,7 @@ export class StoreApi implements StoreApiInterface { // to determine the Accept header let produces: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; @@ -204,7 +204,7 @@ export class StoreApi implements StoreApiInterface { // to determine the Accept header let produces: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; @@ -238,7 +238,7 @@ export class StoreApi implements StoreApiInterface { // to determine the Accept header let produces: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; diff --git a/samples/client/petstore/typescript-angular2/with-interfaces/api/UserApi.ts b/samples/client/petstore/typescript-angular2/with-interfaces/api/UserApi.ts index b8738b0e463..0bb23fb6c90 100644 --- a/samples/client/petstore/typescript-angular2/with-interfaces/api/UserApi.ts +++ b/samples/client/petstore/typescript-angular2/with-interfaces/api/UserApi.ts @@ -188,7 +188,7 @@ export class UserApi implements UserApiInterface { // to determine the Accept header let produces: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; @@ -225,7 +225,7 @@ export class UserApi implements UserApiInterface { // to determine the Accept header let produces: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; @@ -262,7 +262,7 @@ export class UserApi implements UserApiInterface { // to determine the Accept header let produces: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; @@ -304,7 +304,7 @@ export class UserApi implements UserApiInterface { // to determine the Accept header let produces: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; @@ -343,7 +343,7 @@ export class UserApi implements UserApiInterface { // to determine the Accept header let produces: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; @@ -386,7 +386,7 @@ export class UserApi implements UserApiInterface { // to determine the Accept header let produces: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; @@ -419,7 +419,7 @@ export class UserApi implements UserApiInterface { // to determine the Accept header let produces: string[] = [ - 'application/json', + 'application/json', 'application/xml' ]; @@ -459,7 +459,7 @@ export class UserApi implements UserApiInterface { // to determine the Accept header let produces: string[] = [ - 'application/json', + 'application/json', 'application/xml' ];