Merge remote-tracking branch 'origin/master' into 2.3.0

This commit is contained in:
wing328
2017-07-02 22:43:08 +08:00
61 changed files with 586 additions and 417 deletions

View File

@@ -77,8 +77,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
-------------------------- | ------------ | -------------------------- | -----
2.3.0 (upcoming minor release) | Apr/May 2017 | 1.0, 1.1, 1.2, 2.0 | Minor release with breaking changes
2.2.3 (upcoming patch release) | TBD | 1.0, 1.1, 1.2, 2.0 | Patch release without breaking changes
2.3.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/swagger-codegen/2.3.0-SNAPSHOT/)| Jul/Aug 2017 | 1.0, 1.1, 1.2, 2.0 | Minor release with breaking changes
2.2.3 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/swagger-codegen/2.2.3-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0 | Patch release without breaking changes
[2.2.2](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.2.2) (**current stable**) | 2017-03-01 | 1.0, 1.1, 1.2, 2.0 | [tag v2.2.2](https://github.com/swagger-api/swagger-codegen/tree/v2.2.2)
[2.2.1](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.2.1) | 2016-08-07 | 1.0, 1.1, 1.2, 2.0 | [tag v2.2.1](https://github.com/swagger-api/swagger-codegen/tree/v2.2.1)
[2.1.6](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.1.6) | 2016-04-06 | 1.0, 1.1, 1.2, 2.0 | [tag v2.1.6](https://github.com/swagger-api/swagger-codegen/tree/v2.1.6)

View File

@@ -36,5 +36,5 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml
java $JAVA_OPTS -jar $executable $ags
echo "Typescript Petstore API client (with interfaces generated)"
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-angular2 -o samples/client/petstore/typescript-angular2/with-interfaces -D withInterfaces=true"
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l typescript-angular2 -o samples/client/petstore/typescript-angular2/with-interfaces -D withInterfaces=true"
java $JAVA_OPTS -jar $executable $ags

View File

@@ -26,6 +26,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-angular2 -o samples/client/petstore/typescript-angular2/with-interfaces -D withInterfaces=true"
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l typescript-angular2 -o samples/client/petstore/typescript-angular2/with-interfaces -D withInterfaces=true"
java $JAVA_OPTS -jar $executable $ags

View File

@@ -26,6 +26,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-angular2 -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-angular2/npm"
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l typescript-angular2 -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-angular2/npm"
java $JAVA_OPTS -jar $executable $ags

View File

@@ -26,6 +26,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-angular2 -o samples/client/petstore/typescript-angular2/default"
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l typescript-angular2 -o samples/client/petstore/typescript-angular2/default"
java $JAVA_OPTS -jar $executable $ags

View File

@@ -607,7 +607,7 @@ public class DefaultCodegen {
* @return properly-escaped pattern
*/
public String toRegularExpression(String pattern) {
return escapeText(addRegularExpressionDelimiter(pattern));
return addRegularExpressionDelimiter(escapeText(pattern));
}
/**
@@ -3572,9 +3572,14 @@ public class DefaultCodegen {
* @return the pattern with delimiter
*/
public String addRegularExpressionDelimiter(String pattern) {
if (pattern != null && !pattern.matches("^/.*")) {
return "/" + pattern + "/";
if (StringUtils.isEmpty(pattern)) {
return pattern;
}
if (!pattern.matches("^/.*")) {
return "/" + pattern.replaceAll("/", "\\\\/") + "/";
}
return pattern;
}

View File

@@ -312,10 +312,10 @@ public class CppRestClientCodegen extends DefaultCodegen implements CodegenConfi
return "0.0";
} else if (p instanceof FloatProperty) {
return "0.0f";
} else if (p instanceof IntegerProperty || p instanceof BaseIntegerProperty) {
return "0";
} else if (p instanceof LongProperty) {
return "0L";
} else if (p instanceof IntegerProperty || p instanceof BaseIntegerProperty) {
return "0";
} else if (p instanceof DecimalProperty) {
return "0.0";
} else if (p instanceof MapProperty) {

View File

@@ -286,10 +286,10 @@ public class PistacheServerCodegen extends DefaultCodegen implements CodegenConf
return "0.0";
} else if (p instanceof FloatProperty) {
return "0.0f";
} else if (p instanceof IntegerProperty || p instanceof BaseIntegerProperty) {
return "0";
} else if (p instanceof LongProperty) {
return "0L";
} else if (p instanceof IntegerProperty || p instanceof BaseIntegerProperty) {
return "0";
} else if (p instanceof DecimalProperty) {
return "0.0";
} else if (p instanceof MapProperty) {

View File

@@ -318,10 +318,10 @@ public class RestbedCodegen extends DefaultCodegen implements CodegenConfig {
return "0.0";
} else if (p instanceof FloatProperty) {
return "0.0f";
} else if (p instanceof IntegerProperty || p instanceof BaseIntegerProperty) {
return "0";
} else if (p instanceof LongProperty) {
return "0L";
} else if (p instanceof IntegerProperty || p instanceof BaseIntegerProperty) {
return "0";
} else if (p instanceof DecimalProperty) {
return "0.0";
} else if (p instanceof MapProperty) {

View File

@@ -26,9 +26,9 @@ Gem::Specification.new do |s|
s.required_ruby_version = "{{{gemRequiredRubyVersion}}}{{^gemRequiredRubyVersion}}>= 1.9{{/gemRequiredRubyVersion}}"
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
s.add_runtime_dependency 'json', '~> 1.8', '>= 1.8.3'
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
s.add_development_dependency 'rspec', '~> 3.4', '>= 3.4.0'
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'

View File

@@ -221,7 +221,7 @@ export class UserService {
// to determine the Accept header
let produces: string[] = [
'application/xml',
'application/xml',
'application/json'
];
@@ -267,7 +267,7 @@ export class UserService {
// to determine the Accept header
let produces: string[] = [
'application/xml',
'application/xml',
'application/json'
];
@@ -313,7 +313,7 @@ export class UserService {
// to determine the Accept header
let produces: string[] = [
'application/xml',
'application/xml',
'application/json'
];
@@ -359,7 +359,7 @@ export class UserService {
// to determine the Accept header
let produces: string[] = [
'application/xml',
'application/xml',
'application/json'
];
@@ -403,7 +403,7 @@ export class UserService {
// to determine the Accept header
let produces: string[] = [
'application/xml',
'application/xml',
'application/json'
];
@@ -458,7 +458,7 @@ export class UserService {
// to determine the Accept header
let produces: string[] = [
'application/xml',
'application/xml',
'application/json'
];
@@ -497,7 +497,7 @@ export class UserService {
// to determine the Accept header
let produces: string[] = [
'application/xml',
'application/xml',
'application/json'
];
@@ -546,7 +546,7 @@ export class UserService {
// to determine the Accept header
let produces: string[] = [
'application/xml',
'application/xml',
'application/json'
];

View File

@@ -21,7 +21,7 @@ namespace model {
Category::Category()
{
m_Id = 0;
m_Id = 0L;
m_IdIsSet = false;
m_Name = U("");
m_NameIsSet = false;

View File

@@ -21,9 +21,9 @@ namespace model {
Order::Order()
{
m_Id = 0;
m_Id = 0L;
m_IdIsSet = false;
m_PetId = 0;
m_PetId = 0L;
m_PetIdIsSet = false;
m_Quantity = 0;
m_QuantityIsSet = false;

View File

@@ -21,7 +21,7 @@ namespace model {
Pet::Pet()
{
m_Id = 0;
m_Id = 0L;
m_IdIsSet = false;
m_CategoryIsSet = false;
m_Name = U("");

View File

@@ -21,7 +21,7 @@ namespace model {
Tag::Tag()
{
m_Id = 0;
m_Id = 0L;
m_IdIsSet = false;
m_Name = U("");
m_NameIsSet = false;

View File

@@ -21,7 +21,7 @@ namespace model {
User::User()
{
m_Id = 0;
m_Id = 0L;
m_IdIsSet = false;
m_Username = U("");
m_UsernameIsSet = false;

View File

@@ -2,49 +2,51 @@ PATH
remote: .
specs:
petstore (1.0.0)
json (~> 1.8, >= 1.8.3)
json (~> 2.1, >= 2.1.0)
typhoeus (~> 1.0, >= 1.0.1)
GEM
remote: https://rubygems.org/
specs:
ZenTest (4.11.0)
addressable (2.3.8)
ZenTest (4.11.1)
addressable (2.5.1)
public_suffix (~> 2.0, >= 2.0.2)
autotest (4.4.6)
ZenTest (>= 4.4.1)
autotest-fsevent (0.2.12)
sys-uname
autotest-growl (0.2.16)
autotest-rails-pure (4.1.2)
crack (0.4.2)
crack (0.4.3)
safe_yaml (~> 1.0.0)
diff-lcs (1.2.5)
ethon (0.8.1)
diff-lcs (1.3)
ethon (0.10.1)
ffi (>= 1.3.0)
ffi (1.9.8)
hashdiff (0.3.0)
json (1.8.3)
ffi (1.9.18)
hashdiff (0.3.4)
json (2.1.0)
public_suffix (2.0.5)
rake (12.0.0)
rspec (3.4.0)
rspec-core (~> 3.4.0)
rspec-expectations (~> 3.4.0)
rspec-mocks (~> 3.4.0)
rspec-core (3.4.4)
rspec-support (~> 3.4.0)
rspec-expectations (3.4.0)
rspec (3.6.0)
rspec-core (~> 3.6.0)
rspec-expectations (~> 3.6.0)
rspec-mocks (~> 3.6.0)
rspec-core (3.6.0)
rspec-support (~> 3.6.0)
rspec-expectations (3.6.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-mocks (3.4.1)
rspec-support (~> 3.6.0)
rspec-mocks (3.6.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-support (3.4.1)
rspec-support (~> 3.6.0)
rspec-support (3.6.0)
safe_yaml (1.0.4)
sys-uname (1.0.3)
ffi (>= 1.0.0)
typhoeus (1.0.1)
ethon (>= 0.8.0)
vcr (3.0.1)
webmock (1.24.5)
typhoeus (1.1.2)
ethon (>= 0.9.0)
vcr (3.0.3)
webmock (1.24.6)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
@@ -59,9 +61,6 @@ DEPENDENCIES
autotest-rails-pure (~> 4.1, >= 4.1.2)
petstore!
rake (~> 12.0.0)
rspec (~> 3.4, >= 3.4.0)
rspec (~> 3.6, >= 3.6.0)
vcr (~> 3.0, >= 3.0.1)
webmock (~> 1.24, >= 1.24.3)
BUNDLED WITH
1.12.3

View File

@@ -274,7 +274,7 @@ double = 1.2 # Float | None
pattern_without_delimiter = "pattern_without_delimiter_example" # String | None
byte = "B" # String | None
byte = "byte_example" # String | None
opts = {
integer: 56, # Integer | None

View File

@@ -198,6 +198,10 @@ module Petstore
invalid_properties.push("invalid value for 'byte', byte cannot be nil.")
end
if @byte !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
invalid_properties.push("invalid value for 'byte', must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.")
end
if @date.nil?
invalid_properties.push("invalid value for 'date', date cannot be nil.")
end
@@ -233,6 +237,7 @@ module Petstore
return false if !@double.nil? && @double < 67.8
return false if !@string.nil? && @string !~ Regexp.new(/[a-z]/i)
return false if @byte.nil?
return false if @byte !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
return false if @date.nil?
return false if @password.nil?
return false if @password.to_s.length > 64
@@ -329,6 +334,20 @@ module Petstore
@string = string
end
# Custom attribute writer method with validation
# @param [Object] byte Value to be assigned
def byte=(byte)
if byte.nil?
fail ArgumentError, "byte cannot be nil"
end
if byte !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
fail ArgumentError, "invalid value for 'byte', must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/."
end
@byte = byte
end
# Custom attribute writer method with validation
# @param [Object] password Value to be assigned
def password=(password)

View File

@@ -29,9 +29,9 @@ Gem::Specification.new do |s|
s.required_ruby_version = ">= 1.9"
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
s.add_runtime_dependency 'json', '~> 1.8', '>= 1.8.3'
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
s.add_development_dependency 'rspec', '~> 3.4', '>= 3.4.0'
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -20,6 +20,7 @@ import { Response, ResponseContentType } from '@angular/http
import { Observable } from 'rxjs/Observable';
import '../rxjs-operators';
import { ApiResponse } from '../model/apiResponse';
import { Pet } from '../model/pet';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
@@ -77,7 +78,7 @@ export class PetService {
*
* @param body Pet object that needs to be added to the store
*/
public addPet(body?: Pet, extraHttpRequestParams?: any): Observable<{}> {
public addPet(body: Pet, extraHttpRequestParams?: any): Observable<{}> {
return this.addPetWithHttpInfo(body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -110,7 +111,7 @@ export class PetService {
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for filter
*/
public findPetsByStatus(status?: Array<string>, extraHttpRequestParams?: any): Observable<Array<Pet>> {
public findPetsByStatus(status: Array<string>, extraHttpRequestParams?: any): Observable<Array<Pet>> {
return this.findPetsByStatusWithHttpInfo(status, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -126,7 +127,7 @@ export class PetService {
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by
*/
public findPetsByTags(tags?: Array<string>, extraHttpRequestParams?: any): Observable<Array<Pet>> {
public findPetsByTags(tags: Array<string>, extraHttpRequestParams?: any): Observable<Array<Pet>> {
return this.findPetsByTagsWithHttpInfo(tags, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -139,8 +140,8 @@ export class PetService {
/**
* Find pet by ID
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched
* Returns a single pet
* @param petId ID of pet to return
*/
public getPetById(petId: number, extraHttpRequestParams?: any): Observable<Pet> {
return this.getPetByIdWithHttpInfo(petId, extraHttpRequestParams)
@@ -158,7 +159,7 @@ export class PetService {
*
* @param body Pet object that needs to be added to the store
*/
public updatePet(body?: Pet, extraHttpRequestParams?: any): Observable<{}> {
public updatePet(body: Pet, extraHttpRequestParams?: any): Observable<{}> {
return this.updatePetWithHttpInfo(body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -176,7 +177,7 @@ export class PetService {
* @param name Updated name of the pet
* @param status Updated status of the pet
*/
public updatePetWithForm(petId: string, name?: string, status?: string, extraHttpRequestParams?: any): Observable<{}> {
public updatePetWithForm(petId: number, name?: string, status?: string, extraHttpRequestParams?: any): Observable<{}> {
return this.updatePetWithFormWithHttpInfo(petId, name, status, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -194,7 +195,7 @@ export class PetService {
* @param additionalMetadata Additional data to pass to server
* @param file file to upload
*/
public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: any): Observable<{}> {
public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: any): Observable<ApiResponse> {
return this.uploadFileWithHttpInfo(petId, additionalMetadata, file, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -211,17 +212,21 @@ export class PetService {
*
* @param body Pet object that needs to be added to the store
*/
public addPetWithHttpInfo(body?: Pet, extraHttpRequestParams?: any): Observable<Response> {
public addPetWithHttpInfo(body: Pet, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/pet';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling addPet.');
}
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
// authentication (petstore_auth) required
@@ -275,8 +280,8 @@ export class PetService {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
// authentication (petstore_auth) required
@@ -308,23 +313,25 @@ export class PetService {
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for filter
*/
public findPetsByStatusWithHttpInfo(status?: Array<string>, extraHttpRequestParams?: any): Observable<Response> {
public findPetsByStatusWithHttpInfo(status: Array<string>, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/pet/findByStatus';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'status' is not null or undefined
if (status === null || status === undefined) {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
}
if (status) {
status.forEach((element) => {
queryParameters.append('status', <any>element);
})
queryParameters.set('status', status.join(COLLECTION_FORMATS['csv']));
}
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
// authentication (petstore_auth) required
@@ -356,23 +363,25 @@ export class PetService {
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by
*/
public findPetsByTagsWithHttpInfo(tags?: Array<string>, extraHttpRequestParams?: any): Observable<Response> {
public findPetsByTagsWithHttpInfo(tags: Array<string>, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/pet/findByTags';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'tags' is not null or undefined
if (tags === null || tags === undefined) {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
}
if (tags) {
tags.forEach((element) => {
queryParameters.append('tags', <any>element);
})
queryParameters.set('tags', tags.join(COLLECTION_FORMATS['csv']));
}
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
// authentication (petstore_auth) required
@@ -401,8 +410,8 @@ export class PetService {
/**
* Find pet by ID
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched
* Returns a single pet
* @param petId ID of pet to return
*/
public getPetByIdWithHttpInfo(petId: number, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/pet/${petId}'
@@ -418,8 +427,8 @@ export class PetService {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
// authentication (api_key) required
@@ -427,15 +436,6 @@ export class PetService {
headers.set('api_key', this.configuration.apiKeys["api_key"]);
}
// authentication (petstore_auth) required
// oauth required
if (this.configuration.accessToken) {
let accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers.set('Authorization', 'Bearer ' + accessToken);
}
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@@ -456,17 +456,21 @@ export class PetService {
*
* @param body Pet object that needs to be added to the store
*/
public updatePetWithHttpInfo(body?: Pet, extraHttpRequestParams?: any): Observable<Response> {
public updatePetWithHttpInfo(body: Pet, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/pet';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling updatePet.');
}
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
// authentication (petstore_auth) required
@@ -503,7 +507,7 @@ export class PetService {
* @param name Updated name of the pet
* @param status Updated status of the pet
*/
public updatePetWithFormWithHttpInfo(petId: string, name?: string, status?: string, extraHttpRequestParams?: any): Observable<Response> {
public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/pet/${petId}'
.replace('${' + 'petId' + '}', String(petId));
@@ -526,8 +530,8 @@ export class PetService {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
// authentication (petstore_auth) required
@@ -594,8 +598,7 @@ export class PetService {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/json'
];
// authentication (petstore_auth) required

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -108,7 +108,7 @@ export class StoreService {
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched
*/
public getOrderById(orderId: string, extraHttpRequestParams?: any): Observable<Order> {
public getOrderById(orderId: number, extraHttpRequestParams?: any): Observable<Order> {
return this.getOrderByIdWithHttpInfo(orderId, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -124,7 +124,7 @@ export class StoreService {
*
* @param body order placed for purchasing the pet
*/
public placeOrder(body?: Order, extraHttpRequestParams?: any): Observable<Order> {
public placeOrder(body: Order, extraHttpRequestParams?: any): Observable<Order> {
return this.placeOrderWithHttpInfo(body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -155,8 +155,8 @@ export class StoreService {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
@@ -187,8 +187,7 @@ export class StoreService {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/json'
];
// authentication (api_key) required
@@ -216,7 +215,7 @@ export class StoreService {
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched
*/
public getOrderByIdWithHttpInfo(orderId: string, extraHttpRequestParams?: any): Observable<Response> {
public getOrderByIdWithHttpInfo(orderId: number, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/store/order/${orderId}'
.replace('${' + 'orderId' + '}', String(orderId));
@@ -230,8 +229,8 @@ export class StoreService {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
@@ -254,17 +253,21 @@ export class StoreService {
*
* @param body order placed for purchasing the pet
*/
public placeOrderWithHttpInfo(body?: Order, extraHttpRequestParams?: any): Observable<Response> {
public placeOrderWithHttpInfo(body: Order, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/store/order';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling placeOrder.');
}
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -77,7 +77,7 @@ export class UserService {
* This can only be done by the logged in user.
* @param body Created user object
*/
public createUser(body?: User, extraHttpRequestParams?: any): Observable<{}> {
public createUser(body: User, extraHttpRequestParams?: any): Observable<{}> {
return this.createUserWithHttpInfo(body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -93,7 +93,7 @@ export class UserService {
*
* @param body List of user object
*/
public createUsersWithArrayInput(body?: Array<User>, extraHttpRequestParams?: any): Observable<{}> {
public createUsersWithArrayInput(body: Array<User>, extraHttpRequestParams?: any): Observable<{}> {
return this.createUsersWithArrayInputWithHttpInfo(body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -109,7 +109,7 @@ export class UserService {
*
* @param body List of user object
*/
public createUsersWithListInput(body?: Array<User>, extraHttpRequestParams?: any): Observable<{}> {
public createUsersWithListInput(body: Array<User>, extraHttpRequestParams?: any): Observable<{}> {
return this.createUsersWithListInputWithHttpInfo(body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -158,7 +158,7 @@ export class UserService {
* @param username The user name for login
* @param password The password for login in clear text
*/
public loginUser(username?: string, password?: string, extraHttpRequestParams?: any): Observable<string> {
public loginUser(username: string, password: string, extraHttpRequestParams?: any): Observable<string> {
return this.loginUserWithHttpInfo(username, password, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -190,7 +190,7 @@ export class UserService {
* @param username name that need to be deleted
* @param body Updated user object
*/
public updateUser(username: string, body?: User, extraHttpRequestParams?: any): Observable<{}> {
public updateUser(username: string, body: User, extraHttpRequestParams?: any): Observable<{}> {
return this.updateUserWithHttpInfo(username, body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -207,17 +207,21 @@ export class UserService {
* This can only be done by the logged in user.
* @param body Created user object
*/
public createUserWithHttpInfo(body?: User, extraHttpRequestParams?: any): Observable<Response> {
public createUserWithHttpInfo(body: User, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/user';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createUser.');
}
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
@@ -243,17 +247,21 @@ export class UserService {
*
* @param body List of user object
*/
public createUsersWithArrayInputWithHttpInfo(body?: Array<User>, extraHttpRequestParams?: any): Observable<Response> {
public createUsersWithArrayInputWithHttpInfo(body: Array<User>, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/user/createWithArray';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
}
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
@@ -279,17 +287,21 @@ export class UserService {
*
* @param body List of user object
*/
public createUsersWithListInputWithHttpInfo(body?: Array<User>, extraHttpRequestParams?: any): Observable<Response> {
public createUsersWithListInputWithHttpInfo(body: Array<User>, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/user/createWithList';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
}
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
@@ -329,8 +341,8 @@ export class UserService {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
@@ -367,8 +379,8 @@ export class UserService {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
@@ -392,12 +404,20 @@ export class UserService {
* @param username The user name for login
* @param password The password for login in clear text
*/
public loginUserWithHttpInfo(username?: string, password?: string, extraHttpRequestParams?: any): Observable<Response> {
public loginUserWithHttpInfo(username: string, password: string, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/user/login';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'username' is not null or undefined
if (username === null || username === undefined) {
throw new Error('Required parameter username was null or undefined when calling loginUser.');
}
// verify required parameter 'password' is not null or undefined
if (password === null || password === undefined) {
throw new Error('Required parameter password was null or undefined when calling loginUser.');
}
if (username !== undefined) {
queryParameters.set('username', <any>username);
}
@@ -409,8 +429,8 @@ export class UserService {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
@@ -441,8 +461,8 @@ export class UserService {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
@@ -466,7 +486,7 @@ export class UserService {
* @param username name that need to be deleted
* @param body Updated user object
*/
public updateUserWithHttpInfo(username: string, body?: User, extraHttpRequestParams?: any): Observable<Response> {
public updateUserWithHttpInfo(username: string, body: User, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/user/${username}'
.replace('${' + 'username' + '}', String(username));
@@ -477,11 +497,15 @@ export class UserService {
if (username === null || username === undefined) {
throw new Error('Required parameter username was null or undefined when calling updateUser.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling updateUser.');
}
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -12,6 +12,9 @@
/**
* A category for a pet
*/
export interface Category {
id?: number;

View File

@@ -1,3 +1,4 @@
export * from './apiResponse';
export * from './category';
export * from './order';
export * from './pet';

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -12,6 +12,9 @@
/**
* An order for a pets from the pet store
*/
export interface Order {
id?: number;

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -14,6 +14,9 @@ import { Category } from './category';
import { Tag } from './tag';
/**
* A pet for sale in the pet store
*/
export interface Pet {
id?: number;

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -12,6 +12,9 @@
/**
* A tag for a pet
*/
export interface Tag {
id?: number;

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -12,6 +12,9 @@
/**
* A User who is purchasing from the pet store
*/
export interface User {
id?: number;

View File

@@ -6,4 +6,4 @@ export const COLLECTION_FORMATS = {
'tsv': ' ',
'ssv': ' ',
'pipes': '|'
}
}

View File

@@ -1,4 +1,4 @@
import { InjectionToken<string> } from '@angular/core';
import { InjectionToken } from '@angular/core';
export const BASE_PATH = new InjectionToken<string>('basePath');
export const COLLECTION_FORMATS = {

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -47,7 +47,7 @@ export class PetApi implements PetApiInterface {
*
* @param body Pet object that needs to be added to the store
*/
public addPet(body?: models.Pet, extraHttpRequestParams?: any): Observable<{}> {
public addPet(body: models.Pet, extraHttpRequestParams?: any): Observable<{}> {
return this.addPetWithHttpInfo(body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -80,7 +80,7 @@ export class PetApi implements PetApiInterface {
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for filter
*/
public findPetsByStatus(status?: Array<string>, extraHttpRequestParams?: any): Observable<Array<models.Pet>> {
public findPetsByStatus(status: Array<string>, extraHttpRequestParams?: any): Observable<Array<models.Pet>> {
return this.findPetsByStatusWithHttpInfo(status, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -96,7 +96,7 @@ export class PetApi implements PetApiInterface {
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by
*/
public findPetsByTags(tags?: Array<string>, extraHttpRequestParams?: any): Observable<Array<models.Pet>> {
public findPetsByTags(tags: Array<string>, extraHttpRequestParams?: any): Observable<Array<models.Pet>> {
return this.findPetsByTagsWithHttpInfo(tags, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -109,8 +109,8 @@ export class PetApi implements PetApiInterface {
/**
* Find pet by ID
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched
* Returns a single pet
* @param petId ID of pet to return
*/
public getPetById(petId: number, extraHttpRequestParams?: any): Observable<models.Pet> {
return this.getPetByIdWithHttpInfo(petId, extraHttpRequestParams)
@@ -128,7 +128,7 @@ export class PetApi implements PetApiInterface {
*
* @param body Pet object that needs to be added to the store
*/
public updatePet(body?: models.Pet, extraHttpRequestParams?: any): Observable<{}> {
public updatePet(body: models.Pet, extraHttpRequestParams?: any): Observable<{}> {
return this.updatePetWithHttpInfo(body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -146,7 +146,7 @@ export class PetApi implements PetApiInterface {
* @param name Updated name of the pet
* @param status Updated status of the pet
*/
public updatePetWithForm(petId: string, name?: string, status?: string, extraHttpRequestParams?: any): Observable<{}> {
public updatePetWithForm(petId: number, name?: string, status?: string, extraHttpRequestParams?: any): Observable<{}> {
return this.updatePetWithFormWithHttpInfo(petId, name, status, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -164,7 +164,7 @@ export class PetApi implements PetApiInterface {
* @param additionalMetadata Additional data to pass to server
* @param file file to upload
*/
public uploadFile(petId: number, additionalMetadata?: string, file?: any, extraHttpRequestParams?: any): Observable<{}> {
public uploadFile(petId: number, additionalMetadata?: string, file?: any, extraHttpRequestParams?: any): Observable<models.ApiResponse> {
return this.uploadFileWithHttpInfo(petId, additionalMetadata, file, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -181,21 +181,25 @@ export class PetApi implements PetApiInterface {
*
* @param body Pet object that needs to be added to the store
*/
public addPetWithHttpInfo(body?: models.Pet, extraHttpRequestParams?: any): Observable<Response> {
public addPetWithHttpInfo(body: models.Pet, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/pet';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling addPet.');
}
// 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/xml'
'application/xml',
'application/json'
];
// authentication (petstore_auth) required
@@ -250,8 +254,8 @@ export class PetApi implements PetApiInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
// authentication (petstore_auth) required
@@ -282,15 +286,17 @@ export class PetApi implements PetApiInterface {
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for filter
*/
public findPetsByStatusWithHttpInfo(status?: Array<string>, extraHttpRequestParams?: any): Observable<Response> {
public findPetsByStatusWithHttpInfo(status: Array<string>, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/pet/findByStatus';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'status' is not null or undefined
if (status === null || status === undefined) {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
}
if (status) {
status.forEach((element) => {
queryParameters.append('status', <any>element);
})
queryParameters.set('status', status.join(COLLECTION_FORMATS['csv']));
}
// to determine the Content-Type header
@@ -299,8 +305,8 @@ export class PetApi implements PetApiInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
// authentication (petstore_auth) required
@@ -331,15 +337,17 @@ export class PetApi implements PetApiInterface {
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by
*/
public findPetsByTagsWithHttpInfo(tags?: Array<string>, extraHttpRequestParams?: any): Observable<Response> {
public findPetsByTagsWithHttpInfo(tags: Array<string>, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/pet/findByTags';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'tags' is not null or undefined
if (tags === null || tags === undefined) {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
}
if (tags) {
tags.forEach((element) => {
queryParameters.append('tags', <any>element);
})
queryParameters.set('tags', tags.join(COLLECTION_FORMATS['csv']));
}
// to determine the Content-Type header
@@ -348,8 +356,8 @@ export class PetApi implements PetApiInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
// authentication (petstore_auth) required
@@ -377,8 +385,8 @@ export class PetApi implements PetApiInterface {
/**
* Find pet by ID
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched
* Returns a single pet
* @param petId ID of pet to return
*/
public getPetByIdWithHttpInfo(petId: number, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/pet/${petId}'
@@ -396,8 +404,8 @@ export class PetApi implements PetApiInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
// authentication (api_key) required
@@ -405,15 +413,6 @@ export class PetApi implements PetApiInterface {
headers.set('api_key', this.configuration.apiKey);
}
// authentication (petstore_auth) required
// oauth required
if (this.configuration.accessToken) {
let accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers.set('Authorization', 'Bearer ' + accessToken);
}
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
headers: headers,
@@ -433,21 +432,25 @@ export class PetApi implements PetApiInterface {
*
* @param body Pet object that needs to be added to the store
*/
public updatePetWithHttpInfo(body?: models.Pet, extraHttpRequestParams?: any): Observable<Response> {
public updatePetWithHttpInfo(body: models.Pet, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/pet';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling updatePet.');
}
// 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/xml'
'application/xml',
'application/json'
];
// authentication (petstore_auth) required
@@ -483,7 +486,7 @@ export class PetApi implements PetApiInterface {
* @param name Updated name of the pet
* @param status Updated status of the pet
*/
public updatePetWithFormWithHttpInfo(petId: string, name?: string, status?: string, extraHttpRequestParams?: any): Observable<Response> {
public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/pet/${petId}'
.replace('${' + 'petId' + '}', String(petId));
@@ -502,8 +505,8 @@ export class PetApi implements PetApiInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
// authentication (petstore_auth) required
@@ -566,8 +569,7 @@ export class PetApi implements PetApiInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/json'
];
// authentication (petstore_auth) required

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -28,7 +28,7 @@ export interface PetApiInterface {
*
* @param body Pet object that needs to be added to the store
*/
addPet(body?: models.Pet, extraHttpRequestParams?: any): Observable<{}>;
addPet(body: models.Pet, extraHttpRequestParams?: any): Observable<{}>;
/**
* Deletes a pet
@@ -43,19 +43,19 @@ export interface PetApiInterface {
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for filter
*/
findPetsByStatus(status?: Array<string>, extraHttpRequestParams?: any): Observable<Array<models.Pet>>;
findPetsByStatus(status: Array<string>, extraHttpRequestParams?: any): Observable<Array<models.Pet>>;
/**
* Finds Pets by tags
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by
*/
findPetsByTags(tags?: Array<string>, extraHttpRequestParams?: any): Observable<Array<models.Pet>>;
findPetsByTags(tags: Array<string>, extraHttpRequestParams?: any): Observable<Array<models.Pet>>;
/**
* Find pet by ID
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched
* Returns a single pet
* @param petId ID of pet to return
*/
getPetById(petId: number, extraHttpRequestParams?: any): Observable<models.Pet>;
@@ -64,7 +64,7 @@ export interface PetApiInterface {
*
* @param body Pet object that needs to be added to the store
*/
updatePet(body?: models.Pet, extraHttpRequestParams?: any): Observable<{}>;
updatePet(body: models.Pet, extraHttpRequestParams?: any): Observable<{}>;
/**
* Updates a pet in the store with form data
@@ -73,7 +73,7 @@ export interface PetApiInterface {
* @param name Updated name of the pet
* @param status Updated status of the pet
*/
updatePetWithForm(petId: string, name?: string, status?: string, extraHttpRequestParams?: any): Observable<{}>;
updatePetWithForm(petId: number, name?: string, status?: string, extraHttpRequestParams?: any): Observable<{}>;
/**
* uploads an image
@@ -82,6 +82,6 @@ export interface PetApiInterface {
* @param additionalMetadata Additional data to pass to server
* @param file file to upload
*/
uploadFile(petId: number, additionalMetadata?: string, file?: any, extraHttpRequestParams?: any): Observable<{}>;
uploadFile(petId: number, additionalMetadata?: string, file?: any, extraHttpRequestParams?: any): Observable<models.ApiResponse>;
}

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -78,7 +78,7 @@ export class StoreApi implements StoreApiInterface {
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched
*/
public getOrderById(orderId: string, extraHttpRequestParams?: any): Observable<models.Order> {
public getOrderById(orderId: number, extraHttpRequestParams?: any): Observable<models.Order> {
return this.getOrderByIdWithHttpInfo(orderId, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -94,7 +94,7 @@ export class StoreApi implements StoreApiInterface {
*
* @param body order placed for purchasing the pet
*/
public placeOrder(body?: models.Order, extraHttpRequestParams?: any): Observable<models.Order> {
public placeOrder(body: models.Order, extraHttpRequestParams?: any): Observable<models.Order> {
return this.placeOrderWithHttpInfo(body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -127,8 +127,8 @@ export class StoreApi implements StoreApiInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
@@ -160,8 +160,7 @@ export class StoreApi implements StoreApiInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/json'
];
// authentication (api_key) required
@@ -188,7 +187,7 @@ export class StoreApi implements StoreApiInterface {
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched
*/
public getOrderByIdWithHttpInfo(orderId: string, extraHttpRequestParams?: any): Observable<Response> {
public getOrderByIdWithHttpInfo(orderId: number, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/store/order/${orderId}'
.replace('${' + 'orderId' + '}', String(orderId));
@@ -204,8 +203,8 @@ export class StoreApi implements StoreApiInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
@@ -227,19 +226,23 @@ export class StoreApi implements StoreApiInterface {
*
* @param body order placed for purchasing the pet
*/
public placeOrderWithHttpInfo(body?: models.Order, extraHttpRequestParams?: any): Observable<Response> {
public placeOrderWithHttpInfo(body: models.Order, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/store/order';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling placeOrder.');
}
// to determine the Content-Type header
let consumes: string[] = [
];
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
headers.set('Content-Type', 'application/json');

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -41,13 +41,13 @@ export interface StoreApiInterface {
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched
*/
getOrderById(orderId: string, extraHttpRequestParams?: any): Observable<models.Order>;
getOrderById(orderId: number, extraHttpRequestParams?: any): Observable<models.Order>;
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet
*/
placeOrder(body?: models.Order, extraHttpRequestParams?: any): Observable<models.Order>;
placeOrder(body: models.Order, extraHttpRequestParams?: any): Observable<models.Order>;
}

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -47,7 +47,7 @@ export class UserApi implements UserApiInterface {
* This can only be done by the logged in user.
* @param body Created user object
*/
public createUser(body?: models.User, extraHttpRequestParams?: any): Observable<{}> {
public createUser(body: models.User, extraHttpRequestParams?: any): Observable<{}> {
return this.createUserWithHttpInfo(body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -63,7 +63,7 @@ export class UserApi implements UserApiInterface {
*
* @param body List of user object
*/
public createUsersWithArrayInput(body?: Array<models.User>, extraHttpRequestParams?: any): Observable<{}> {
public createUsersWithArrayInput(body: Array<models.User>, extraHttpRequestParams?: any): Observable<{}> {
return this.createUsersWithArrayInputWithHttpInfo(body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -79,7 +79,7 @@ export class UserApi implements UserApiInterface {
*
* @param body List of user object
*/
public createUsersWithListInput(body?: Array<models.User>, extraHttpRequestParams?: any): Observable<{}> {
public createUsersWithListInput(body: Array<models.User>, extraHttpRequestParams?: any): Observable<{}> {
return this.createUsersWithListInputWithHttpInfo(body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -128,7 +128,7 @@ export class UserApi implements UserApiInterface {
* @param username The user name for login
* @param password The password for login in clear text
*/
public loginUser(username?: string, password?: string, extraHttpRequestParams?: any): Observable<string> {
public loginUser(username: string, password: string, extraHttpRequestParams?: any): Observable<string> {
return this.loginUserWithHttpInfo(username, password, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -160,7 +160,7 @@ export class UserApi implements UserApiInterface {
* @param username name that need to be deleted
* @param body Updated user object
*/
public updateUser(username: string, body?: models.User, extraHttpRequestParams?: any): Observable<{}> {
public updateUser(username: string, body: models.User, extraHttpRequestParams?: any): Observable<{}> {
return this.updateUserWithHttpInfo(username, body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -177,19 +177,23 @@ export class UserApi implements UserApiInterface {
* This can only be done by the logged in user.
* @param body Created user object
*/
public createUserWithHttpInfo(body?: models.User, extraHttpRequestParams?: any): Observable<Response> {
public createUserWithHttpInfo(body: models.User, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/user';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createUser.');
}
// to determine the Content-Type header
let consumes: string[] = [
];
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
headers.set('Content-Type', 'application/json');
@@ -214,19 +218,23 @@ export class UserApi implements UserApiInterface {
*
* @param body List of user object
*/
public createUsersWithArrayInputWithHttpInfo(body?: Array<models.User>, extraHttpRequestParams?: any): Observable<Response> {
public createUsersWithArrayInputWithHttpInfo(body: Array<models.User>, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/user/createWithArray';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
}
// to determine the Content-Type header
let consumes: string[] = [
];
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
headers.set('Content-Type', 'application/json');
@@ -251,19 +259,23 @@ export class UserApi implements UserApiInterface {
*
* @param body List of user object
*/
public createUsersWithListInputWithHttpInfo(body?: Array<models.User>, extraHttpRequestParams?: any): Observable<Response> {
public createUsersWithListInputWithHttpInfo(body: Array<models.User>, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/user/createWithList';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
}
// to determine the Content-Type header
let consumes: string[] = [
];
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
headers.set('Content-Type', 'application/json');
@@ -304,8 +316,8 @@ export class UserApi implements UserApiInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
@@ -343,8 +355,8 @@ export class UserApi implements UserApiInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
@@ -367,11 +379,19 @@ export class UserApi implements UserApiInterface {
* @param username The user name for login
* @param password The password for login in clear text
*/
public loginUserWithHttpInfo(username?: string, password?: string, extraHttpRequestParams?: any): Observable<Response> {
public loginUserWithHttpInfo(username: string, password: string, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/user/login';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'username' is not null or undefined
if (username === null || username === undefined) {
throw new Error('Required parameter username was null or undefined when calling loginUser.');
}
// verify required parameter 'password' is not null or undefined
if (password === null || password === undefined) {
throw new Error('Required parameter password was null or undefined when calling loginUser.');
}
if (username !== undefined) {
queryParameters.set('username', <any>username);
}
@@ -386,8 +406,8 @@ export class UserApi implements UserApiInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
@@ -419,8 +439,8 @@ export class UserApi implements UserApiInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
@@ -443,7 +463,7 @@ export class UserApi implements UserApiInterface {
* @param username name that need to be deleted
* @param body Updated user object
*/
public updateUserWithHttpInfo(username: string, body?: models.User, extraHttpRequestParams?: any): Observable<Response> {
public updateUserWithHttpInfo(username: string, body: models.User, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/user/${username}'
.replace('${' + 'username' + '}', String(username));
@@ -453,14 +473,18 @@ export class UserApi implements UserApiInterface {
if (username === null || username === undefined) {
throw new Error('Required parameter username was null or undefined when calling updateUser.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling updateUser.');
}
// to determine the Content-Type header
let consumes: string[] = [
];
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
headers.set('Content-Type', 'application/json');

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -28,21 +28,21 @@ export interface UserApiInterface {
* This can only be done by the logged in user.
* @param body Created user object
*/
createUser(body?: models.User, extraHttpRequestParams?: any): Observable<{}>;
createUser(body: models.User, extraHttpRequestParams?: any): Observable<{}>;
/**
* Creates list of users with given input array
*
* @param body List of user object
*/
createUsersWithArrayInput(body?: Array<models.User>, extraHttpRequestParams?: any): Observable<{}>;
createUsersWithArrayInput(body: Array<models.User>, extraHttpRequestParams?: any): Observable<{}>;
/**
* Creates list of users with given input array
*
* @param body List of user object
*/
createUsersWithListInput(body?: Array<models.User>, extraHttpRequestParams?: any): Observable<{}>;
createUsersWithListInput(body: Array<models.User>, extraHttpRequestParams?: any): Observable<{}>;
/**
* Delete user
@@ -64,7 +64,7 @@ export interface UserApiInterface {
* @param username The user name for login
* @param password The password for login in clear text
*/
loginUser(username?: string, password?: string, extraHttpRequestParams?: any): Observable<string>;
loginUser(username: string, password: string, extraHttpRequestParams?: any): Observable<string>;
/**
* Logs out current logged in user session
@@ -78,6 +78,6 @@ export interface UserApiInterface {
* @param username name that need to be deleted
* @param body Updated user object
*/
updateUser(username: string, body?: models.User, extraHttpRequestParams?: any): Observable<{}>;
updateUser(username: string, body: models.User, extraHttpRequestParams?: any): Observable<{}>;
}

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -20,6 +20,7 @@ import { Response, ResponseContentType } from '@angular/http
import { Observable } from 'rxjs/Observable';
import '../rxjs-operators';
import { ApiResponse } from '../model/apiResponse';
import { Pet } from '../model/pet';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
@@ -78,7 +79,7 @@ export class PetService implements PetServiceInterface {
*
* @param body Pet object that needs to be added to the store
*/
public addPet(body?: Pet, extraHttpRequestParams?: any): Observable<{}> {
public addPet(body: Pet, extraHttpRequestParams?: any): Observable<{}> {
return this.addPetWithHttpInfo(body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -111,7 +112,7 @@ export class PetService implements PetServiceInterface {
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for filter
*/
public findPetsByStatus(status?: Array<string>, extraHttpRequestParams?: any): Observable<Array<Pet>> {
public findPetsByStatus(status: Array<string>, extraHttpRequestParams?: any): Observable<Array<Pet>> {
return this.findPetsByStatusWithHttpInfo(status, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -127,7 +128,7 @@ export class PetService implements PetServiceInterface {
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by
*/
public findPetsByTags(tags?: Array<string>, extraHttpRequestParams?: any): Observable<Array<Pet>> {
public findPetsByTags(tags: Array<string>, extraHttpRequestParams?: any): Observable<Array<Pet>> {
return this.findPetsByTagsWithHttpInfo(tags, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -140,8 +141,8 @@ export class PetService implements PetServiceInterface {
/**
* Find pet by ID
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched
* Returns a single pet
* @param petId ID of pet to return
*/
public getPetById(petId: number, extraHttpRequestParams?: any): Observable<Pet> {
return this.getPetByIdWithHttpInfo(petId, extraHttpRequestParams)
@@ -159,7 +160,7 @@ export class PetService implements PetServiceInterface {
*
* @param body Pet object that needs to be added to the store
*/
public updatePet(body?: Pet, extraHttpRequestParams?: any): Observable<{}> {
public updatePet(body: Pet, extraHttpRequestParams?: any): Observable<{}> {
return this.updatePetWithHttpInfo(body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -177,7 +178,7 @@ export class PetService implements PetServiceInterface {
* @param name Updated name of the pet
* @param status Updated status of the pet
*/
public updatePetWithForm(petId: string, name?: string, status?: string, extraHttpRequestParams?: any): Observable<{}> {
public updatePetWithForm(petId: number, name?: string, status?: string, extraHttpRequestParams?: any): Observable<{}> {
return this.updatePetWithFormWithHttpInfo(petId, name, status, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -195,7 +196,7 @@ export class PetService implements PetServiceInterface {
* @param additionalMetadata Additional data to pass to server
* @param file file to upload
*/
public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: any): Observable<{}> {
public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: any): Observable<ApiResponse> {
return this.uploadFileWithHttpInfo(petId, additionalMetadata, file, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -212,17 +213,21 @@ export class PetService implements PetServiceInterface {
*
* @param body Pet object that needs to be added to the store
*/
public addPetWithHttpInfo(body?: Pet, extraHttpRequestParams?: any): Observable<Response> {
public addPetWithHttpInfo(body: Pet, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/pet';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling addPet.');
}
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
// authentication (petstore_auth) required
@@ -276,8 +281,8 @@ export class PetService implements PetServiceInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
// authentication (petstore_auth) required
@@ -309,23 +314,25 @@ export class PetService implements PetServiceInterface {
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for filter
*/
public findPetsByStatusWithHttpInfo(status?: Array<string>, extraHttpRequestParams?: any): Observable<Response> {
public findPetsByStatusWithHttpInfo(status: Array<string>, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/pet/findByStatus';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'status' is not null or undefined
if (status === null || status === undefined) {
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
}
if (status) {
status.forEach((element) => {
queryParameters.append('status', <any>element);
})
queryParameters.set('status', status.join(COLLECTION_FORMATS['csv']));
}
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
// authentication (petstore_auth) required
@@ -357,23 +364,25 @@ export class PetService implements PetServiceInterface {
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by
*/
public findPetsByTagsWithHttpInfo(tags?: Array<string>, extraHttpRequestParams?: any): Observable<Response> {
public findPetsByTagsWithHttpInfo(tags: Array<string>, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/pet/findByTags';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'tags' is not null or undefined
if (tags === null || tags === undefined) {
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
}
if (tags) {
tags.forEach((element) => {
queryParameters.append('tags', <any>element);
})
queryParameters.set('tags', tags.join(COLLECTION_FORMATS['csv']));
}
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
// authentication (petstore_auth) required
@@ -402,8 +411,8 @@ export class PetService implements PetServiceInterface {
/**
* Find pet by ID
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched
* Returns a single pet
* @param petId ID of pet to return
*/
public getPetByIdWithHttpInfo(petId: number, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/pet/${petId}'
@@ -419,8 +428,8 @@ export class PetService implements PetServiceInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
// authentication (api_key) required
@@ -428,15 +437,6 @@ export class PetService implements PetServiceInterface {
headers.set('api_key', this.configuration.apiKeys["api_key"]);
}
// authentication (petstore_auth) required
// oauth required
if (this.configuration.accessToken) {
let accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers.set('Authorization', 'Bearer ' + accessToken);
}
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@@ -457,17 +457,21 @@ export class PetService implements PetServiceInterface {
*
* @param body Pet object that needs to be added to the store
*/
public updatePetWithHttpInfo(body?: Pet, extraHttpRequestParams?: any): Observable<Response> {
public updatePetWithHttpInfo(body: Pet, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/pet';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling updatePet.');
}
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
// authentication (petstore_auth) required
@@ -504,7 +508,7 @@ export class PetService implements PetServiceInterface {
* @param name Updated name of the pet
* @param status Updated status of the pet
*/
public updatePetWithFormWithHttpInfo(petId: string, name?: string, status?: string, extraHttpRequestParams?: any): Observable<Response> {
public updatePetWithFormWithHttpInfo(petId: number, name?: string, status?: string, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/pet/${petId}'
.replace('${' + 'petId' + '}', String(petId));
@@ -527,8 +531,8 @@ export class PetService implements PetServiceInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
// authentication (petstore_auth) required
@@ -595,8 +599,7 @@ export class PetService implements PetServiceInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/json'
];
// authentication (petstore_auth) required

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -28,7 +28,7 @@ export interface PetServiceInterface {
*
* @param body Pet object that needs to be added to the store
*/
addPet(body?: Pet, extraHttpRequestParams?: any): Observable<{}>;
addPet(body: Pet, extraHttpRequestParams?: any): Observable<{}>;
/**
* Deletes a pet
@@ -43,19 +43,19 @@ export interface PetServiceInterface {
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for filter
*/
findPetsByStatus(status?: Array<string>, extraHttpRequestParams?: any): Observable<Array<Pet>>;
findPetsByStatus(status: Array<string>, extraHttpRequestParams?: any): Observable<Array<Pet>>;
/**
* Finds Pets by tags
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by
*/
findPetsByTags(tags?: Array<string>, extraHttpRequestParams?: any): Observable<Array<Pet>>;
findPetsByTags(tags: Array<string>, extraHttpRequestParams?: any): Observable<Array<Pet>>;
/**
* Find pet by ID
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched
* Returns a single pet
* @param petId ID of pet to return
*/
getPetById(petId: number, extraHttpRequestParams?: any): Observable<Pet>;
@@ -64,7 +64,7 @@ export interface PetServiceInterface {
*
* @param body Pet object that needs to be added to the store
*/
updatePet(body?: Pet, extraHttpRequestParams?: any): Observable<{}>;
updatePet(body: Pet, extraHttpRequestParams?: any): Observable<{}>;
/**
* Updates a pet in the store with form data
@@ -73,7 +73,7 @@ export interface PetServiceInterface {
* @param name Updated name of the pet
* @param status Updated status of the pet
*/
updatePetWithForm(petId: string, name?: string, status?: string, extraHttpRequestParams?: any): Observable<{}>;
updatePetWithForm(petId: number, name?: string, status?: string, extraHttpRequestParams?: any): Observable<{}>;
/**
* uploads an image
@@ -82,6 +82,6 @@ export interface PetServiceInterface {
* @param additionalMetadata Additional data to pass to server
* @param file file to upload
*/
uploadFile(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: any): Observable<{}>;
uploadFile(petId: number, additionalMetadata?: string, file?: Blob, extraHttpRequestParams?: any): Observable<ApiResponse>;
}

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -109,7 +109,7 @@ export class StoreService implements StoreServiceInterface {
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched
*/
public getOrderById(orderId: string, extraHttpRequestParams?: any): Observable<Order> {
public getOrderById(orderId: number, extraHttpRequestParams?: any): Observable<Order> {
return this.getOrderByIdWithHttpInfo(orderId, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -125,7 +125,7 @@ export class StoreService implements StoreServiceInterface {
*
* @param body order placed for purchasing the pet
*/
public placeOrder(body?: Order, extraHttpRequestParams?: any): Observable<Order> {
public placeOrder(body: Order, extraHttpRequestParams?: any): Observable<Order> {
return this.placeOrderWithHttpInfo(body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -156,8 +156,8 @@ export class StoreService implements StoreServiceInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
@@ -188,8 +188,7 @@ export class StoreService implements StoreServiceInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/json'
];
// authentication (api_key) required
@@ -217,7 +216,7 @@ export class StoreService implements StoreServiceInterface {
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched
*/
public getOrderByIdWithHttpInfo(orderId: string, extraHttpRequestParams?: any): Observable<Response> {
public getOrderByIdWithHttpInfo(orderId: number, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/store/order/${orderId}'
.replace('${' + 'orderId' + '}', String(orderId));
@@ -231,8 +230,8 @@ export class StoreService implements StoreServiceInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
@@ -255,17 +254,21 @@ export class StoreService implements StoreServiceInterface {
*
* @param body order placed for purchasing the pet
*/
public placeOrderWithHttpInfo(body?: Order, extraHttpRequestParams?: any): Observable<Response> {
public placeOrderWithHttpInfo(body: Order, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/store/order';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling placeOrder.');
}
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -41,13 +41,13 @@ export interface StoreServiceInterface {
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched
*/
getOrderById(orderId: string, extraHttpRequestParams?: any): Observable<Order>;
getOrderById(orderId: number, extraHttpRequestParams?: any): Observable<Order>;
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet
*/
placeOrder(body?: Order, extraHttpRequestParams?: any): Observable<Order>;
placeOrder(body: Order, extraHttpRequestParams?: any): Observable<Order>;
}

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -78,7 +78,7 @@ export class UserService implements UserServiceInterface {
* This can only be done by the logged in user.
* @param body Created user object
*/
public createUser(body?: User, extraHttpRequestParams?: any): Observable<{}> {
public createUser(body: User, extraHttpRequestParams?: any): Observable<{}> {
return this.createUserWithHttpInfo(body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -94,7 +94,7 @@ export class UserService implements UserServiceInterface {
*
* @param body List of user object
*/
public createUsersWithArrayInput(body?: Array<User>, extraHttpRequestParams?: any): Observable<{}> {
public createUsersWithArrayInput(body: Array<User>, extraHttpRequestParams?: any): Observable<{}> {
return this.createUsersWithArrayInputWithHttpInfo(body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -110,7 +110,7 @@ export class UserService implements UserServiceInterface {
*
* @param body List of user object
*/
public createUsersWithListInput(body?: Array<User>, extraHttpRequestParams?: any): Observable<{}> {
public createUsersWithListInput(body: Array<User>, extraHttpRequestParams?: any): Observable<{}> {
return this.createUsersWithListInputWithHttpInfo(body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -159,7 +159,7 @@ export class UserService implements UserServiceInterface {
* @param username The user name for login
* @param password The password for login in clear text
*/
public loginUser(username?: string, password?: string, extraHttpRequestParams?: any): Observable<string> {
public loginUser(username: string, password: string, extraHttpRequestParams?: any): Observable<string> {
return this.loginUserWithHttpInfo(username, password, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -191,7 +191,7 @@ export class UserService implements UserServiceInterface {
* @param username name that need to be deleted
* @param body Updated user object
*/
public updateUser(username: string, body?: User, extraHttpRequestParams?: any): Observable<{}> {
public updateUser(username: string, body: User, extraHttpRequestParams?: any): Observable<{}> {
return this.updateUserWithHttpInfo(username, body, extraHttpRequestParams)
.map((response: Response) => {
if (response.status === 204) {
@@ -208,17 +208,21 @@ export class UserService implements UserServiceInterface {
* This can only be done by the logged in user.
* @param body Created user object
*/
public createUserWithHttpInfo(body?: User, extraHttpRequestParams?: any): Observable<Response> {
public createUserWithHttpInfo(body: User, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/user';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createUser.');
}
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
@@ -244,17 +248,21 @@ export class UserService implements UserServiceInterface {
*
* @param body List of user object
*/
public createUsersWithArrayInputWithHttpInfo(body?: Array<User>, extraHttpRequestParams?: any): Observable<Response> {
public createUsersWithArrayInputWithHttpInfo(body: Array<User>, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/user/createWithArray';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
}
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
@@ -280,17 +288,21 @@ export class UserService implements UserServiceInterface {
*
* @param body List of user object
*/
public createUsersWithListInputWithHttpInfo(body?: Array<User>, extraHttpRequestParams?: any): Observable<Response> {
public createUsersWithListInputWithHttpInfo(body: Array<User>, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/user/createWithList';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
}
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
@@ -330,8 +342,8 @@ export class UserService implements UserServiceInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
@@ -368,8 +380,8 @@ export class UserService implements UserServiceInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
@@ -393,12 +405,20 @@ export class UserService implements UserServiceInterface {
* @param username The user name for login
* @param password The password for login in clear text
*/
public loginUserWithHttpInfo(username?: string, password?: string, extraHttpRequestParams?: any): Observable<Response> {
public loginUserWithHttpInfo(username: string, password: string, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/user/login';
let queryParameters = new URLSearchParams();
let headers = new Headers(this.defaultHeaders.toJSON()); // https://github.com/angular/angular/issues/6845
// verify required parameter 'username' is not null or undefined
if (username === null || username === undefined) {
throw new Error('Required parameter username was null or undefined when calling loginUser.');
}
// verify required parameter 'password' is not null or undefined
if (password === null || password === undefined) {
throw new Error('Required parameter password was null or undefined when calling loginUser.');
}
if (username !== undefined) {
queryParameters.set('username', <any>username);
}
@@ -410,8 +430,8 @@ export class UserService implements UserServiceInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
@@ -442,8 +462,8 @@ export class UserService implements UserServiceInterface {
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];
@@ -467,7 +487,7 @@ export class UserService implements UserServiceInterface {
* @param username name that need to be deleted
* @param body Updated user object
*/
public updateUserWithHttpInfo(username: string, body?: User, extraHttpRequestParams?: any): Observable<Response> {
public updateUserWithHttpInfo(username: string, body: User, extraHttpRequestParams?: any): Observable<Response> {
const path = this.basePath + '/user/${username}'
.replace('${' + 'username' + '}', String(username));
@@ -478,11 +498,15 @@ export class UserService implements UserServiceInterface {
if (username === null || username === undefined) {
throw new Error('Required parameter username was null or undefined when calling updateUser.');
}
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling updateUser.');
}
// to determine the Accept header
let produces: string[] = [
'application/json',
'application/xml'
'application/xml',
'application/json'
];

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -28,21 +28,21 @@ export interface UserServiceInterface {
* This can only be done by the logged in user.
* @param body Created user object
*/
createUser(body?: User, extraHttpRequestParams?: any): Observable<{}>;
createUser(body: User, extraHttpRequestParams?: any): Observable<{}>;
/**
* Creates list of users with given input array
*
* @param body List of user object
*/
createUsersWithArrayInput(body?: Array<User>, extraHttpRequestParams?: any): Observable<{}>;
createUsersWithArrayInput(body: Array<User>, extraHttpRequestParams?: any): Observable<{}>;
/**
* Creates list of users with given input array
*
* @param body List of user object
*/
createUsersWithListInput(body?: Array<User>, extraHttpRequestParams?: any): Observable<{}>;
createUsersWithListInput(body: Array<User>, extraHttpRequestParams?: any): Observable<{}>;
/**
* Delete user
@@ -64,7 +64,7 @@ export interface UserServiceInterface {
* @param username The user name for login
* @param password The password for login in clear text
*/
loginUser(username?: string, password?: string, extraHttpRequestParams?: any): Observable<string>;
loginUser(username: string, password: string, extraHttpRequestParams?: any): Observable<string>;
/**
* Logs out current logged in user session
@@ -78,6 +78,6 @@ export interface UserServiceInterface {
* @param username name that need to be deleted
* @param body Updated user object
*/
updateUser(username: string, body?: User, extraHttpRequestParams?: any): Observable<{}>;
updateUser(username: string, body: User, extraHttpRequestParams?: any): Observable<{}>;
}

View File

@@ -0,0 +1,25 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
/**
* Describes the result of uploading an image resource
*/
export interface ApiResponse {
code?: number;
type?: string;
message?: string;
}

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -12,6 +12,9 @@
/**
* A category for a pet
*/
export interface Category {
id?: number;

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -12,6 +12,9 @@
/**
* An order for a pets from the pet store
*/
export interface Order {
id?: number;

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -14,6 +14,9 @@ import { Category } from './category';
import { Tag } from './tag';
/**
* A pet for sale in the pet store
*/
export interface Pet {
id?: number;

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -12,6 +12,9 @@
/**
* A tag for a pet
*/
export interface Tag {
id?: number;

View File

@@ -1,9 +1,9 @@
/**
* Swagger Petstore
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@wordnik.com
* Contact: apiteam@swagger.io
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
@@ -12,6 +12,9 @@
/**
* A User who is purchasing from the pet store
*/
export interface User {
id?: number;

View File

@@ -1,3 +1,4 @@
export * from './apiResponse';
export * from './category';
export * from './order';
export * from './pet';

View File

@@ -1,4 +1,4 @@
import { InjectionToken<string> } from '@angular/core';
import { InjectionToken } from '@angular/core';
export const BASE_PATH = new InjectionToken<string>('basePath');
export const COLLECTION_FORMATS = {

View File

@@ -20,7 +20,7 @@ namespace model {
Category::Category()
{
m_Id = 0;
m_Id = 0L;
m_IdIsSet = false;
m_Name = "";
m_NameIsSet = false;

View File

@@ -20,9 +20,9 @@ namespace model {
Order::Order()
{
m_Id = 0;
m_Id = 0L;
m_IdIsSet = false;
m_PetId = 0;
m_PetId = 0L;
m_PetIdIsSet = false;
m_Quantity = 0;
m_QuantityIsSet = false;

View File

@@ -20,7 +20,7 @@ namespace model {
Pet::Pet()
{
m_Id = 0;
m_Id = 0L;
m_IdIsSet = false;
m_CategoryIsSet = false;
m_Name = "";

View File

@@ -20,7 +20,7 @@ namespace model {
Tag::Tag()
{
m_Id = 0;
m_Id = 0L;
m_IdIsSet = false;
m_Name = "";
m_NameIsSet = false;

View File

@@ -20,7 +20,7 @@ namespace model {
User::User()
{
m_Id = 0;
m_Id = 0L;
m_IdIsSet = false;
m_Username = "";
m_UsernameIsSet = false;

View File

@@ -30,7 +30,7 @@ namespace model {
Category::Category()
{
m_Id = 0;
m_Id = 0L;
m_Name = "";
}
@@ -54,7 +54,7 @@ void Category::fromJsonString(std::string const& jsonString)
std::stringstream ss(jsonString);
ptree pt;
read_json(ss,pt);
m_Id = pt.get("Id", 0);
m_Id = pt.get("Id", 0L);
m_Name = pt.get("Name", "");
}

View File

@@ -30,8 +30,8 @@ namespace model {
Order::Order()
{
m_Id = 0;
m_PetId = 0;
m_Id = 0L;
m_PetId = 0L;
m_Quantity = 0;
m_ShipDate = "";
m_Status = "";
@@ -62,8 +62,8 @@ void Order::fromJsonString(std::string const& jsonString)
std::stringstream ss(jsonString);
ptree pt;
read_json(ss,pt);
m_Id = pt.get("Id", 0);
m_PetId = pt.get("PetId", 0);
m_Id = pt.get("Id", 0L);
m_PetId = pt.get("PetId", 0L);
m_Quantity = pt.get("Quantity", 0);
m_ShipDate = pt.get("ShipDate", "");
m_Status = pt.get("Status", "");

View File

@@ -30,7 +30,7 @@ namespace model {
Pet::Pet()
{
m_Id = 0;
m_Id = 0L;
m_Name = "";
m_Status = "";
@@ -56,7 +56,7 @@ void Pet::fromJsonString(std::string const& jsonString)
std::stringstream ss(jsonString);
ptree pt;
read_json(ss,pt);
m_Id = pt.get("Id", 0);
m_Id = pt.get("Id", 0L);
m_Name = pt.get("Name", "");
m_Status = pt.get("Status", "");
}

View File

@@ -30,7 +30,7 @@ namespace model {
Tag::Tag()
{
m_Id = 0;
m_Id = 0L;
m_Name = "";
}
@@ -54,7 +54,7 @@ void Tag::fromJsonString(std::string const& jsonString)
std::stringstream ss(jsonString);
ptree pt;
read_json(ss,pt);
m_Id = pt.get("Id", 0);
m_Id = pt.get("Id", 0L);
m_Name = pt.get("Name", "");
}

View File

@@ -30,7 +30,7 @@ namespace model {
User::User()
{
m_Id = 0;
m_Id = 0L;
m_Username = "";
m_FirstName = "";
m_LastName = "";
@@ -66,7 +66,7 @@ void User::fromJsonString(std::string const& jsonString)
std::stringstream ss(jsonString);
ptree pt;
read_json(ss,pt);
m_Id = pt.get("Id", 0);
m_Id = pt.get("Id", 0L);
m_Username = pt.get("Username", "");
m_FirstName = pt.get("FirstName", "");
m_LastName = pt.get("LastName", "");