mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 10:58:55 +00:00
[Typscript][Angular2] Remove tab in TS Angular2 template (#4294)
* remove tab in ts angular2 template * update petstore sample after basing on master
This commit is contained in:
parent
af0d217c38
commit
87cb779fd4
@ -22,7 +22,7 @@ import { Configuration } from '../configurat
|
||||
{{/description}}
|
||||
@Injectable()
|
||||
export class {{classname}} {
|
||||
protected basePath = '{{basePath}}';
|
||||
protected basePath = '{{{basePath}}}';
|
||||
public defaultHeaders: Headers = new Headers();
|
||||
public configuration: Configuration = new Configuration();
|
||||
|
||||
@ -34,8 +34,8 @@ export class {{classname}} {
|
||||
this.configuration = configuration;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
*
|
||||
* Extends object by coping non-existing properties.
|
||||
* @param objA object to be extended
|
||||
@ -185,4 +185,4 @@ export class {{classname}} {
|
||||
|
||||
{{/operation}}
|
||||
}
|
||||
{{/operations}}
|
||||
{{/operations}}
|
||||
|
@ -39,8 +39,8 @@ export class PetApi {
|
||||
this.configuration = configuration;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
*
|
||||
* Extends object by coping non-existing properties.
|
||||
* @param objA object to be extended
|
||||
@ -414,17 +414,17 @@ export class PetApi {
|
||||
'application/xml'
|
||||
];
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKey)
|
||||
{
|
||||
headers.set('api_key', this.configuration.apiKey);
|
||||
}
|
||||
// authentication (petstore_auth) required
|
||||
// oauth required
|
||||
if (this.configuration.accessToken)
|
||||
{
|
||||
headers.set('Authorization', 'Bearer ' + this.configuration.accessToken);
|
||||
}
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKey)
|
||||
{
|
||||
headers.set('api_key', this.configuration.apiKey);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -39,8 +39,8 @@ export class StoreApi {
|
||||
this.configuration = configuration;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
*
|
||||
* Extends object by coping non-existing properties.
|
||||
* @param objA object to be extended
|
||||
|
@ -39,8 +39,8 @@ export class UserApi {
|
||||
this.configuration = configuration;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
*
|
||||
* Extends object by coping non-existing properties.
|
||||
* @param objA object to be extended
|
||||
|
@ -1,4 +1,4 @@
|
||||
## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201611201817
|
||||
## @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201612011557
|
||||
|
||||
### Building
|
||||
|
||||
@ -19,7 +19,7 @@ navigate to the folder of your consuming project and run one of next commando's.
|
||||
_published:_
|
||||
|
||||
```
|
||||
npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201611201817 --save
|
||||
npm install @swagger/angular2-typescript-petstore@0.0.1-SNAPSHOT.201612011557 --save
|
||||
```
|
||||
|
||||
_unPublished (not recommended):_
|
||||
|
@ -39,8 +39,8 @@ export class PetApi {
|
||||
this.configuration = configuration;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
*
|
||||
* Extends object by coping non-existing properties.
|
||||
* @param objA object to be extended
|
||||
@ -414,17 +414,17 @@ export class PetApi {
|
||||
'application/xml'
|
||||
];
|
||||
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKey)
|
||||
{
|
||||
headers.set('api_key', this.configuration.apiKey);
|
||||
}
|
||||
// authentication (petstore_auth) required
|
||||
// oauth required
|
||||
if (this.configuration.accessToken)
|
||||
{
|
||||
headers.set('Authorization', 'Bearer ' + this.configuration.accessToken);
|
||||
}
|
||||
// authentication (api_key) required
|
||||
if (this.configuration.apiKey)
|
||||
{
|
||||
headers.set('api_key', this.configuration.apiKey);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -39,8 +39,8 @@ export class StoreApi {
|
||||
this.configuration = configuration;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
*
|
||||
* Extends object by coping non-existing properties.
|
||||
* @param objA object to be extended
|
||||
|
@ -39,8 +39,8 @@ export class UserApi {
|
||||
this.configuration = configuration;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
*
|
||||
* Extends object by coping non-existing properties.
|
||||
* @param objA object to be extended
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@swagger/angular2-typescript-petstore",
|
||||
"version": "0.0.1-SNAPSHOT.201611201817",
|
||||
"version": "0.0.1-SNAPSHOT.201612011557",
|
||||
"description": "swagger client for @swagger/angular2-typescript-petstore",
|
||||
"author": "Swagger Codegen Contributors",
|
||||
"keywords": [
|
||||
|
Loading…
Reference in New Issue
Block a user