fix(typescript-angular): improve small template issues (#3466)

* fix(typescript-angular): improve small template issues

* fix: template adjustments

* fix: repair hasSomeFormParamsLogic

* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java

Co-Authored-By: Esteban Gehring <esteban.gehring@gmail.com>
This commit is contained in:
Erik Seliger 2019-07-31 22:24:02 +02:00 committed by Esteban Gehring
parent 0e621dcc29
commit f90f214121
55 changed files with 166 additions and 960 deletions

View File

@ -352,7 +352,11 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
objs.put("apiFilename", getApiFilenameFromClassname(objs.get("classname").toString()));
List<CodegenOperation> ops = (List<CodegenOperation>) objs.get("operation");
boolean hasSomeFormParams = false;
for (CodegenOperation op : ops) {
if (op.getHasFormParams()) {
hasSomeFormParams = true;
}
if ((boolean) additionalProperties.get("useHttpClient")) {
op.httpMethod = op.httpMethod.toLowerCase(Locale.ENGLISH);
} else {
@ -428,6 +432,8 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
op.path = pathBuffer.toString();
}
operations.put("hasSomeFormParams", hasSomeFormParams);
// Add additional filename information for model imports in the services
List<Map<String, Object>> imports = (List<Map<String, Object>>) operations.get("imports");
for (Map<String, Object> im : imports) {

View File

@ -82,6 +82,7 @@ export class {{classname}} {
{{/useHttpClient}}
}
{{#hasSomeFormParams}}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
@ -95,6 +96,7 @@ export class {{classname}} {
}
return false;
}
{{/hasSomeFormParams}}
{{^useHttpClient}}
{{! Before HttpClient implementation or method overloading we relied on 2 functions, 1 to return the straight body as json
@ -129,8 +131,12 @@ export class {{classname}} {
{{#operation}}
/**
{{#summary}}
* {{summary}}
{{/summary}}
{{#notes}}
* {{notes}}
{{/notes}}
{{#allParams}}* @param {{paramName}} {{description}}
{{/allParams}}{{#useHttpClient}}* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.{{/useHttpClient}}
@ -256,12 +262,25 @@ export class {{classname}} {
{{/useHttpClient}}
}
{{#bodyParam}}
{{- duplicated below, don't forget to change}}
// to determine the Content-Type header
const consumes: string[] = [
{{#consumes}}
'{{{mediaType}}}'{{#hasMore}},{{/hasMore}}
{{/consumes}}
];
{{/bodyParam}}
{{#hasFormParams}}
{{^bodyParam}}
// to determine the Content-Type header
const consumes: string[] = [
{{#consumes}}
'{{{mediaType}}}'{{#hasMore}},{{/hasMore}}
{{/consumes}}
];
{{/bodyParam}}
{{/hasFormParams}}
{{#bodyParam}}
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {

View File

@ -7,9 +7,9 @@ import { QueryEncoder } from '@angular/http';
{{#useHttpClient}}
/**
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
export class CustomHttpParameterCodec implements HttpParameterCodec {
encodeKey(k: string): string {
return encodeURIComponent(k);
@ -27,10 +27,10 @@ export class CustomHttpParameterCodec implements HttpParameterCodec {
{{/useHttpClient}}
{{^useHttpClient}}
/**
* Custom QueryEncoder
* Fix plus sign (+) not encoding, so sent as blank space
* See: https://github.com/angular/angular/issues/11058#issuecomment-247367318
*/
* Custom QueryEncoder
* Fix plus sign (+) not encoding, so sent as blank space
* See: https://github.com/angular/angular/issues/11058#issuecomment-247367318
*/
export class CustomQueryEncoderHelper extends QueryEncoder {
encodeKey(k: string): string {
k = super.encodeKey(k);

View File

@ -196,7 +196,6 @@ export class PetService {
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store
*/
@ -223,6 +222,7 @@ export class PetService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -249,7 +249,6 @@ export class PetService {
/**
* Deletes a pet
*
* @param petId Pet id to delete
* @param apiKey
@ -280,9 +279,6 @@ export class PetService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Delete,
@ -333,9 +329,6 @@ export class PetService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -387,9 +380,6 @@ export class PetService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -433,9 +423,6 @@ export class PetService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -452,7 +439,6 @@ export class PetService {
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store
*/
@ -479,6 +465,7 @@ export class PetService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -505,7 +492,6 @@ export class PetService {
/**
* Updates a pet in the store with form data
*
* @param petId ID of pet that needs to be updated
* @param name Updated name of the pet
* @param status Updated status of the pet
@ -577,7 +563,6 @@ export class PetService {
/**
* uploads an image
*
* @param petId ID of pet to update
* @param additionalMetadata Additional data to pass to server
* @param file file to upload

View File

@ -45,19 +45,6 @@ export class StoreService {
this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
@ -144,9 +131,6 @@ export class StoreService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Delete,
@ -184,9 +168,6 @@ export class StoreService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -224,9 +205,6 @@ export class StoreService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -243,7 +221,6 @@ export class StoreService {
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet
*/
@ -264,6 +241,7 @@ export class StoreService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -45,19 +45,6 @@ export class UserService {
this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
* This can only be done by the logged in user.
@ -210,6 +197,7 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -234,7 +222,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
*/
@ -253,6 +240,7 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -277,7 +265,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
*/
@ -296,6 +283,7 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -339,9 +327,6 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Delete,
@ -358,7 +343,6 @@ export class UserService {
/**
* Get user by user name
*
* @param username The name that needs to be fetched. Use user1 for testing.
*/
@ -379,9 +363,6 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -398,7 +379,6 @@ export class UserService {
/**
* Logs user into the system
*
* @param username The user name for login
* @param password The password for login in clear text
@ -431,9 +411,6 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -451,7 +428,6 @@ export class UserService {
/**
* Logs out current logged in user session
*
*/
public logoutUserWithHttpInfo(extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
@ -466,9 +442,6 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -508,6 +481,7 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -1,10 +1,10 @@
import { QueryEncoder } from '@angular/http';
/**
* Custom QueryEncoder
* Fix plus sign (+) not encoding, so sent as blank space
* See: https://github.com/angular/angular/issues/11058#issuecomment-247367318
*/
* Custom QueryEncoder
* Fix plus sign (+) not encoding, so sent as blank space
* See: https://github.com/angular/angular/issues/11058#issuecomment-247367318
*/
export class CustomQueryEncoderHelper extends QueryEncoder {
encodeKey(k: string): string {
k = super.encodeKey(k);

View File

@ -196,7 +196,6 @@ export class PetService {
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store
*/
@ -223,6 +222,7 @@ export class PetService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -249,7 +249,6 @@ export class PetService {
/**
* Deletes a pet
*
* @param petId Pet id to delete
* @param apiKey
@ -280,9 +279,6 @@ export class PetService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Delete,
@ -333,9 +329,6 @@ export class PetService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -387,9 +380,6 @@ export class PetService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -433,9 +423,6 @@ export class PetService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -452,7 +439,6 @@ export class PetService {
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store
*/
@ -479,6 +465,7 @@ export class PetService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -505,7 +492,6 @@ export class PetService {
/**
* Updates a pet in the store with form data
*
* @param petId ID of pet that needs to be updated
* @param name Updated name of the pet
* @param status Updated status of the pet
@ -577,7 +563,6 @@ export class PetService {
/**
* uploads an image
*
* @param petId ID of pet to update
* @param additionalMetadata Additional data to pass to server
* @param file file to upload

View File

@ -45,19 +45,6 @@ export class StoreService {
this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
@ -144,9 +131,6 @@ export class StoreService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Delete,
@ -184,9 +168,6 @@ export class StoreService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -224,9 +205,6 @@ export class StoreService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -243,7 +221,6 @@ export class StoreService {
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet
*/
@ -264,6 +241,7 @@ export class StoreService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -45,19 +45,6 @@ export class UserService {
this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
* This can only be done by the logged in user.
@ -210,6 +197,7 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -234,7 +222,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
*/
@ -253,6 +240,7 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -277,7 +265,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
*/
@ -296,6 +283,7 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -339,9 +327,6 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Delete,
@ -358,7 +343,6 @@ export class UserService {
/**
* Get user by user name
*
* @param username The name that needs to be fetched. Use user1 for testing.
*/
@ -379,9 +363,6 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -398,7 +379,6 @@ export class UserService {
/**
* Logs user into the system
*
* @param username The user name for login
* @param password The password for login in clear text
@ -431,9 +411,6 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -451,7 +428,6 @@ export class UserService {
/**
* Logs out current logged in user session
*
*/
public logoutUserWithHttpInfo(extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
@ -466,9 +442,6 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -508,6 +481,7 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -1,10 +1,10 @@
import { QueryEncoder } from '@angular/http';
/**
* Custom QueryEncoder
* Fix plus sign (+) not encoding, so sent as blank space
* See: https://github.com/angular/angular/issues/11058#issuecomment-247367318
*/
* Custom QueryEncoder
* Fix plus sign (+) not encoding, so sent as blank space
* See: https://github.com/angular/angular/issues/11058#issuecomment-247367318
*/
export class CustomQueryEncoderHelper extends QueryEncoder {
encodeKey(k: string): string {
k = super.encodeKey(k);

View File

@ -197,7 +197,6 @@ export class PetService implements PetServiceInterface {
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store
*/
@ -224,6 +223,7 @@ export class PetService implements PetServiceInterface {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -250,7 +250,6 @@ export class PetService implements PetServiceInterface {
/**
* Deletes a pet
*
* @param petId Pet id to delete
* @param apiKey
@ -281,9 +280,6 @@ export class PetService implements PetServiceInterface {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Delete,
@ -334,9 +330,6 @@ export class PetService implements PetServiceInterface {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -388,9 +381,6 @@ export class PetService implements PetServiceInterface {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -434,9 +424,6 @@ export class PetService implements PetServiceInterface {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -453,7 +440,6 @@ export class PetService implements PetServiceInterface {
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store
*/
@ -480,6 +466,7 @@ export class PetService implements PetServiceInterface {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -506,7 +493,6 @@ export class PetService implements PetServiceInterface {
/**
* Updates a pet in the store with form data
*
* @param petId ID of pet that needs to be updated
* @param name Updated name of the pet
* @param status Updated status of the pet
@ -578,7 +564,6 @@ export class PetService implements PetServiceInterface {
/**
* uploads an image
*
* @param petId ID of pet to update
* @param additionalMetadata Additional data to pass to server
* @param file file to upload

View File

@ -46,19 +46,6 @@ export class StoreService implements StoreServiceInterface {
this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
@ -145,9 +132,6 @@ export class StoreService implements StoreServiceInterface {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Delete,
@ -185,9 +169,6 @@ export class StoreService implements StoreServiceInterface {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -225,9 +206,6 @@ export class StoreService implements StoreServiceInterface {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -244,7 +222,6 @@ export class StoreService implements StoreServiceInterface {
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet
*/
@ -265,6 +242,7 @@ export class StoreService implements StoreServiceInterface {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -46,19 +46,6 @@ export class UserService implements UserServiceInterface {
this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
* This can only be done by the logged in user.
@ -211,6 +198,7 @@ export class UserService implements UserServiceInterface {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -235,7 +223,6 @@ export class UserService implements UserServiceInterface {
/**
* Creates list of users with given input array
*
* @param body List of user object
*/
@ -254,6 +241,7 @@ export class UserService implements UserServiceInterface {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -278,7 +266,6 @@ export class UserService implements UserServiceInterface {
/**
* Creates list of users with given input array
*
* @param body List of user object
*/
@ -297,6 +284,7 @@ export class UserService implements UserServiceInterface {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -340,9 +328,6 @@ export class UserService implements UserServiceInterface {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Delete,
@ -359,7 +344,6 @@ export class UserService implements UserServiceInterface {
/**
* Get user by user name
*
* @param username The name that needs to be fetched. Use user1 for testing.
*/
@ -380,9 +364,6 @@ export class UserService implements UserServiceInterface {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -399,7 +380,6 @@ export class UserService implements UserServiceInterface {
/**
* Logs user into the system
*
* @param username The user name for login
* @param password The password for login in clear text
@ -432,9 +412,6 @@ export class UserService implements UserServiceInterface {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -452,7 +429,6 @@ export class UserService implements UserServiceInterface {
/**
* Logs out current logged in user session
*
*/
public logoutUserWithHttpInfo(extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
@ -467,9 +443,6 @@ export class UserService implements UserServiceInterface {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -509,6 +482,7 @@ export class UserService implements UserServiceInterface {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -1,10 +1,10 @@
import { QueryEncoder } from '@angular/http';
/**
* Custom QueryEncoder
* Fix plus sign (+) not encoding, so sent as blank space
* See: https://github.com/angular/angular/issues/11058#issuecomment-247367318
*/
* Custom QueryEncoder
* Fix plus sign (+) not encoding, so sent as blank space
* See: https://github.com/angular/angular/issues/11058#issuecomment-247367318
*/
export class CustomQueryEncoderHelper extends QueryEncoder {
encodeKey(k: string): string {
k = super.encodeKey(k);

View File

@ -61,7 +61,6 @@ export class PetService {
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -92,6 +91,7 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -115,7 +115,6 @@ export class PetService {
/**
* Deletes a pet
*
* @param petId Pet id to delete
* @param apiKey
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
@ -150,9 +149,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
{
@ -204,9 +200,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{
@ -259,9 +252,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{
@ -306,9 +296,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Pet>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
{
@ -322,7 +309,6 @@ export class PetService {
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -353,6 +339,7 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -376,7 +363,6 @@ export class PetService {
/**
* Updates a pet in the store with form data
*
* @param petId ID of pet that needs to be updated
* @param name Updated name of the pet
* @param status Updated status of the pet
@ -445,7 +431,6 @@ export class PetService {
/**
* uploads an image
*
* @param petId ID of pet to update
* @param additionalMetadata Additional data to pass to server
* @param file file to upload

View File

@ -43,19 +43,6 @@ export class StoreService {
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
@ -83,9 +70,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
{
@ -124,9 +108,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`,
{
@ -165,9 +146,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Order>(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
{
@ -181,7 +159,6 @@ export class StoreService {
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -206,6 +183,7 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -43,19 +43,6 @@ export class UserService {
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
@ -83,6 +70,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -104,7 +92,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -127,6 +114,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -148,7 +136,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -171,6 +158,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -215,9 +203,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`,
{
@ -231,7 +216,6 @@ export class UserService {
/**
* Get user by user name
*
* @param username The name that needs to be fetched. Use user1 for testing.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -256,9 +240,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<User>(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`,
{
@ -272,7 +253,6 @@ export class UserService {
/**
* Logs user into the system
*
* @param username The user name for login
* @param password The password for login in clear text
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
@ -309,9 +289,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{
@ -326,7 +303,6 @@ export class UserService {
/**
* Logs out current logged in user session
*
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
@ -345,9 +321,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<any>(`${this.configuration.basePath}/user/logout`,
{
@ -388,6 +361,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -1,9 +1,9 @@
import { HttpParameterCodec } from '@angular/common/http';
/**
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
export class CustomHttpParameterCodec implements HttpParameterCodec {
encodeKey(k: string): string {
return encodeURIComponent(k);

View File

@ -196,7 +196,6 @@ export class PetService {
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store
*/
@ -223,6 +222,7 @@ export class PetService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -249,7 +249,6 @@ export class PetService {
/**
* Deletes a pet
*
* @param petId Pet id to delete
* @param apiKey
@ -280,9 +279,6 @@ export class PetService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Delete,
@ -333,9 +329,6 @@ export class PetService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -387,9 +380,6 @@ export class PetService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -433,9 +423,6 @@ export class PetService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -452,7 +439,6 @@ export class PetService {
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store
*/
@ -479,6 +465,7 @@ export class PetService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -505,7 +492,6 @@ export class PetService {
/**
* Updates a pet in the store with form data
*
* @param petId ID of pet that needs to be updated
* @param name Updated name of the pet
* @param status Updated status of the pet
@ -577,7 +563,6 @@ export class PetService {
/**
* uploads an image
*
* @param petId ID of pet to update
* @param additionalMetadata Additional data to pass to server
* @param file file to upload

View File

@ -45,19 +45,6 @@ export class StoreService {
this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
@ -144,9 +131,6 @@ export class StoreService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Delete,
@ -184,9 +168,6 @@ export class StoreService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -224,9 +205,6 @@ export class StoreService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -243,7 +221,6 @@ export class StoreService {
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet
*/
@ -264,6 +241,7 @@ export class StoreService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -45,19 +45,6 @@ export class UserService {
this.encoder = this.configuration.encoder || new CustomQueryEncoderHelper();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
* This can only be done by the logged in user.
@ -210,6 +197,7 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -234,7 +222,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
*/
@ -253,6 +240,7 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -277,7 +265,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
*/
@ -296,6 +283,7 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -339,9 +327,6 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Delete,
@ -358,7 +343,6 @@ export class UserService {
/**
* Get user by user name
*
* @param username The name that needs to be fetched. Use user1 for testing.
*/
@ -379,9 +363,6 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -398,7 +379,6 @@ export class UserService {
/**
* Logs user into the system
*
* @param username The user name for login
* @param password The password for login in clear text
@ -431,9 +411,6 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -451,7 +428,6 @@ export class UserService {
/**
* Logs out current logged in user session
*
*/
public logoutUserWithHttpInfo(extraHttpRequestParams?: RequestOptionsArgs): Observable<Response> {
@ -466,9 +442,6 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
let requestOptions: RequestOptionsArgs = new RequestOptions({
method: RequestMethod.Get,
@ -508,6 +481,7 @@ export class UserService {
headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -1,10 +1,10 @@
import { QueryEncoder } from '@angular/http';
/**
* Custom QueryEncoder
* Fix plus sign (+) not encoding, so sent as blank space
* See: https://github.com/angular/angular/issues/11058#issuecomment-247367318
*/
* Custom QueryEncoder
* Fix plus sign (+) not encoding, so sent as blank space
* See: https://github.com/angular/angular/issues/11058#issuecomment-247367318
*/
export class CustomQueryEncoderHelper extends QueryEncoder {
encodeKey(k: string): string {
k = super.encodeKey(k);

View File

@ -61,7 +61,6 @@ export class PetService {
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -92,6 +91,7 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -115,7 +115,6 @@ export class PetService {
/**
* Deletes a pet
*
* @param petId Pet id to delete
* @param apiKey
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
@ -150,9 +149,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
{
@ -204,9 +200,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{
@ -259,9 +252,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{
@ -306,9 +296,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Pet>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
{
@ -322,7 +309,6 @@ export class PetService {
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -353,6 +339,7 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -376,7 +363,6 @@ export class PetService {
/**
* Updates a pet in the store with form data
*
* @param petId ID of pet that needs to be updated
* @param name Updated name of the pet
* @param status Updated status of the pet
@ -445,7 +431,6 @@ export class PetService {
/**
* uploads an image
*
* @param petId ID of pet to update
* @param additionalMetadata Additional data to pass to server
* @param file file to upload

View File

@ -43,19 +43,6 @@ export class StoreService {
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
@ -83,9 +70,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
{
@ -124,9 +108,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`,
{
@ -165,9 +146,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Order>(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
{
@ -181,7 +159,6 @@ export class StoreService {
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -206,6 +183,7 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -43,19 +43,6 @@ export class UserService {
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
@ -83,6 +70,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -104,7 +92,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -127,6 +114,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -148,7 +136,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -171,6 +158,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -215,9 +203,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`,
{
@ -231,7 +216,6 @@ export class UserService {
/**
* Get user by user name
*
* @param username The name that needs to be fetched. Use user1 for testing.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -256,9 +240,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<User>(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`,
{
@ -272,7 +253,6 @@ export class UserService {
/**
* Logs user into the system
*
* @param username The user name for login
* @param password The password for login in clear text
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
@ -309,9 +289,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{
@ -326,7 +303,6 @@ export class UserService {
/**
* Logs out current logged in user session
*
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
@ -345,9 +321,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<any>(`${this.configuration.basePath}/user/logout`,
{
@ -388,6 +361,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -1,9 +1,9 @@
import { HttpParameterCodec } from '@angular/common/http';
/**
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
export class CustomHttpParameterCodec implements HttpParameterCodec {
encodeKey(k: string): string {
return encodeURIComponent(k);

View File

@ -61,7 +61,6 @@ export class PetService {
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -92,6 +91,7 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -115,7 +115,6 @@ export class PetService {
/**
* Deletes a pet
*
* @param petId Pet id to delete
* @param apiKey
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
@ -150,9 +149,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
{
@ -204,9 +200,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{
@ -259,9 +252,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{
@ -306,9 +296,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Pet>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
{
@ -322,7 +309,6 @@ export class PetService {
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -353,6 +339,7 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -376,7 +363,6 @@ export class PetService {
/**
* Updates a pet in the store with form data
*
* @param petId ID of pet that needs to be updated
* @param name Updated name of the pet
* @param status Updated status of the pet
@ -445,7 +431,6 @@ export class PetService {
/**
* uploads an image
*
* @param petId ID of pet to update
* @param additionalMetadata Additional data to pass to server
* @param file file to upload

View File

@ -43,19 +43,6 @@ export class StoreService {
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
@ -83,9 +70,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
{
@ -124,9 +108,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`,
{
@ -165,9 +146,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Order>(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
{
@ -181,7 +159,6 @@ export class StoreService {
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -206,6 +183,7 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -43,19 +43,6 @@ export class UserService {
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
@ -83,6 +70,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -104,7 +92,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -127,6 +114,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -148,7 +136,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -171,6 +158,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -215,9 +203,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`,
{
@ -231,7 +216,6 @@ export class UserService {
/**
* Get user by user name
*
* @param username The name that needs to be fetched. Use user1 for testing.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -256,9 +240,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<User>(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`,
{
@ -272,7 +253,6 @@ export class UserService {
/**
* Logs user into the system
*
* @param username The user name for login
* @param password The password for login in clear text
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
@ -309,9 +289,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{
@ -326,7 +303,6 @@ export class UserService {
/**
* Logs out current logged in user session
*
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
@ -345,9 +321,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<any>(`${this.configuration.basePath}/user/logout`,
{
@ -388,6 +361,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -1,9 +1,9 @@
import { HttpParameterCodec } from '@angular/common/http';
/**
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
export class CustomHttpParameterCodec implements HttpParameterCodec {
encodeKey(k: string): string {
return encodeURIComponent(k);

View File

@ -63,7 +63,6 @@ export class PetService {
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -94,6 +93,7 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -117,7 +117,6 @@ export class PetService {
/**
* Deletes a pet
*
* @param petId Pet id to delete
* @param apiKey
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
@ -152,9 +151,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
{
@ -206,9 +202,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{
@ -261,9 +254,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{
@ -308,9 +298,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Pet>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
{
@ -324,7 +311,6 @@ export class PetService {
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -355,6 +341,7 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -378,7 +365,6 @@ export class PetService {
/**
* Updates a pet in the store with form data
*
* @param petId ID of pet that needs to be updated
* @param name Updated name of the pet
* @param status Updated status of the pet
@ -447,7 +433,6 @@ export class PetService {
/**
* uploads an image
*
* @param petId ID of pet to update
* @param additionalMetadata Additional data to pass to server
* @param file file to upload

View File

@ -45,19 +45,6 @@ export class StoreService {
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
@ -85,9 +72,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
{
@ -126,9 +110,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`,
{
@ -167,9 +148,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Order>(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
{
@ -183,7 +161,6 @@ export class StoreService {
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -208,6 +185,7 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -45,19 +45,6 @@ export class UserService {
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
@ -85,6 +72,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -106,7 +94,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -129,6 +116,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -150,7 +138,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -173,6 +160,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -217,9 +205,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`,
{
@ -233,7 +218,6 @@ export class UserService {
/**
* Get user by user name
*
* @param username The name that needs to be fetched. Use user1 for testing.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -258,9 +242,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<User>(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`,
{
@ -274,7 +255,6 @@ export class UserService {
/**
* Logs user into the system
*
* @param username The user name for login
* @param password The password for login in clear text
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
@ -311,9 +291,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{
@ -328,7 +305,6 @@ export class UserService {
/**
* Logs out current logged in user session
*
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
@ -347,9 +323,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<any>(`${this.configuration.basePath}/user/logout`,
{
@ -390,6 +363,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -1,9 +1,9 @@
import { HttpParameterCodec } from '@angular/common/http';
/**
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
export class CustomHttpParameterCodec implements HttpParameterCodec {
encodeKey(k: string): string {
return encodeURIComponent(k);

View File

@ -63,7 +63,6 @@ export class PetService {
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -94,6 +93,7 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -117,7 +117,6 @@ export class PetService {
/**
* Deletes a pet
*
* @param petId Pet id to delete
* @param apiKey
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
@ -152,9 +151,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
{
@ -206,9 +202,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{
@ -261,9 +254,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{
@ -308,9 +298,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Pet>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
{
@ -324,7 +311,6 @@ export class PetService {
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -355,6 +341,7 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -378,7 +365,6 @@ export class PetService {
/**
* Updates a pet in the store with form data
*
* @param petId ID of pet that needs to be updated
* @param name Updated name of the pet
* @param status Updated status of the pet
@ -447,7 +433,6 @@ export class PetService {
/**
* uploads an image
*
* @param petId ID of pet to update
* @param additionalMetadata Additional data to pass to server
* @param file file to upload

View File

@ -45,19 +45,6 @@ export class StoreService {
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
@ -85,9 +72,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
{
@ -126,9 +110,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`,
{
@ -167,9 +148,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Order>(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
{
@ -183,7 +161,6 @@ export class StoreService {
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -208,6 +185,7 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -45,19 +45,6 @@ export class UserService {
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
@ -85,6 +72,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -106,7 +94,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -129,6 +116,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -150,7 +138,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -173,6 +160,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -217,9 +205,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`,
{
@ -233,7 +218,6 @@ export class UserService {
/**
* Get user by user name
*
* @param username The name that needs to be fetched. Use user1 for testing.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -258,9 +242,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<User>(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`,
{
@ -274,7 +255,6 @@ export class UserService {
/**
* Logs user into the system
*
* @param username The user name for login
* @param password The password for login in clear text
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
@ -311,9 +291,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{
@ -328,7 +305,6 @@ export class UserService {
/**
* Logs out current logged in user session
*
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
@ -347,9 +323,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<any>(`${this.configuration.basePath}/user/logout`,
{
@ -390,6 +363,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -1,9 +1,9 @@
import { HttpParameterCodec } from '@angular/common/http';
/**
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
export class CustomHttpParameterCodec implements HttpParameterCodec {
encodeKey(k: string): string {
return encodeURIComponent(k);

View File

@ -61,7 +61,6 @@ export class PetService {
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -92,6 +91,7 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -115,7 +115,6 @@ export class PetService {
/**
* Deletes a pet
*
* @param petId Pet id to delete
* @param apiKey
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
@ -150,9 +149,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
{
@ -204,9 +200,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{
@ -259,9 +252,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{
@ -306,9 +296,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Pet>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
{
@ -322,7 +309,6 @@ export class PetService {
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -353,6 +339,7 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -376,7 +363,6 @@ export class PetService {
/**
* Updates a pet in the store with form data
*
* @param petId ID of pet that needs to be updated
* @param name Updated name of the pet
* @param status Updated status of the pet
@ -445,7 +431,6 @@ export class PetService {
/**
* uploads an image
*
* @param petId ID of pet to update
* @param additionalMetadata Additional data to pass to server
* @param file file to upload

View File

@ -43,19 +43,6 @@ export class StoreService {
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
@ -83,9 +70,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
{
@ -124,9 +108,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`,
{
@ -165,9 +146,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Order>(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
{
@ -181,7 +159,6 @@ export class StoreService {
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -206,6 +183,7 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -43,19 +43,6 @@ export class UserService {
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
@ -83,6 +70,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -104,7 +92,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -127,6 +114,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -148,7 +136,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -171,6 +158,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -215,9 +203,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`,
{
@ -231,7 +216,6 @@ export class UserService {
/**
* Get user by user name
*
* @param username The name that needs to be fetched. Use user1 for testing.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -256,9 +240,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<User>(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`,
{
@ -272,7 +253,6 @@ export class UserService {
/**
* Logs user into the system
*
* @param username The user name for login
* @param password The password for login in clear text
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
@ -309,9 +289,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{
@ -326,7 +303,6 @@ export class UserService {
/**
* Logs out current logged in user session
*
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
@ -345,9 +321,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<any>(`${this.configuration.basePath}/user/logout`,
{
@ -388,6 +361,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -1,9 +1,9 @@
import { HttpParameterCodec } from '@angular/common/http';
/**
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
export class CustomHttpParameterCodec implements HttpParameterCodec {
encodeKey(k: string): string {
return encodeURIComponent(k);

View File

@ -61,7 +61,6 @@ export class PetService {
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -92,6 +91,7 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -115,7 +115,6 @@ export class PetService {
/**
* Deletes a pet
*
* @param petId Pet id to delete
* @param apiKey
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
@ -150,9 +149,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
{
@ -204,9 +200,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{
@ -259,9 +252,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{
@ -306,9 +296,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Pet>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
{
@ -322,7 +309,6 @@ export class PetService {
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -353,6 +339,7 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -376,7 +363,6 @@ export class PetService {
/**
* Updates a pet in the store with form data
*
* @param petId ID of pet that needs to be updated
* @param name Updated name of the pet
* @param status Updated status of the pet
@ -445,7 +431,6 @@ export class PetService {
/**
* uploads an image
*
* @param petId ID of pet to update
* @param additionalMetadata Additional data to pass to server
* @param file file to upload

View File

@ -43,19 +43,6 @@ export class StoreService {
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
@ -83,9 +70,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
{
@ -124,9 +108,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`,
{
@ -165,9 +146,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Order>(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
{
@ -181,7 +159,6 @@ export class StoreService {
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -206,6 +183,7 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -43,19 +43,6 @@ export class UserService {
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
@ -83,6 +70,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -104,7 +92,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -127,6 +114,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -148,7 +136,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -171,6 +158,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -215,9 +203,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`,
{
@ -231,7 +216,6 @@ export class UserService {
/**
* Get user by user name
*
* @param username The name that needs to be fetched. Use user1 for testing.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -256,9 +240,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<User>(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`,
{
@ -272,7 +253,6 @@ export class UserService {
/**
* Logs user into the system
*
* @param username The user name for login
* @param password The password for login in clear text
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
@ -309,9 +289,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{
@ -326,7 +303,6 @@ export class UserService {
/**
* Logs out current logged in user session
*
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
@ -345,9 +321,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<any>(`${this.configuration.basePath}/user/logout`,
{
@ -388,6 +361,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -1,9 +1,9 @@
import { HttpParameterCodec } from '@angular/common/http';
/**
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
export class CustomHttpParameterCodec implements HttpParameterCodec {
encodeKey(k: string): string {
return encodeURIComponent(k);

View File

@ -63,7 +63,6 @@ export class PetService {
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -94,6 +93,7 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -117,7 +117,6 @@ export class PetService {
/**
* Deletes a pet
*
* @param petId Pet id to delete
* @param apiKey
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
@ -152,9 +151,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
{
@ -206,9 +202,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{
@ -261,9 +254,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{
@ -308,9 +298,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Pet>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
{
@ -324,7 +311,6 @@ export class PetService {
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -355,6 +341,7 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -378,7 +365,6 @@ export class PetService {
/**
* Updates a pet in the store with form data
*
* @param petId ID of pet that needs to be updated
* @param name Updated name of the pet
* @param status Updated status of the pet
@ -447,7 +433,6 @@ export class PetService {
/**
* uploads an image
*
* @param petId ID of pet to update
* @param additionalMetadata Additional data to pass to server
* @param file file to upload

View File

@ -45,19 +45,6 @@ export class StoreService {
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
@ -85,9 +72,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
{
@ -126,9 +110,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`,
{
@ -167,9 +148,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Order>(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
{
@ -183,7 +161,6 @@ export class StoreService {
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -208,6 +185,7 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -45,19 +45,6 @@ export class UserService {
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
@ -85,6 +72,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -106,7 +94,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -129,6 +116,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -150,7 +138,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -173,6 +160,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -217,9 +205,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`,
{
@ -233,7 +218,6 @@ export class UserService {
/**
* Get user by user name
*
* @param username The name that needs to be fetched. Use user1 for testing.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -258,9 +242,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<User>(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`,
{
@ -274,7 +255,6 @@ export class UserService {
/**
* Logs user into the system
*
* @param username The user name for login
* @param password The password for login in clear text
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
@ -311,9 +291,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{
@ -328,7 +305,6 @@ export class UserService {
/**
* Logs out current logged in user session
*
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
@ -347,9 +323,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<any>(`${this.configuration.basePath}/user/logout`,
{
@ -390,6 +363,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -1,9 +1,9 @@
import { HttpParameterCodec } from '@angular/common/http';
/**
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
export class CustomHttpParameterCodec implements HttpParameterCodec {
encodeKey(k: string): string {
return encodeURIComponent(k);

View File

@ -63,7 +63,6 @@ export class PetService {
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -94,6 +93,7 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -117,7 +117,6 @@ export class PetService {
/**
* Deletes a pet
*
* @param petId Pet id to delete
* @param apiKey
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
@ -152,9 +151,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
{
@ -206,9 +202,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByStatus`,
{
@ -261,9 +254,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Array<Pet>>(`${this.configuration.basePath}/pet/findByTags`,
{
@ -308,9 +298,6 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Pet>(`${this.configuration.basePath}/pet/${encodeURIComponent(String(petId))}`,
{
@ -324,7 +311,6 @@ export class PetService {
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -355,6 +341,7 @@ export class PetService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json',
@ -378,7 +365,6 @@ export class PetService {
/**
* Updates a pet in the store with form data
*
* @param petId ID of pet that needs to be updated
* @param name Updated name of the pet
* @param status Updated status of the pet
@ -447,7 +433,6 @@ export class PetService {
/**
* uploads an image
*
* @param petId ID of pet to update
* @param additionalMetadata Additional data to pass to server
* @param file file to upload

View File

@ -45,19 +45,6 @@ export class StoreService {
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
@ -85,9 +72,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
{
@ -126,9 +110,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<{ [key: string]: number; }>(`${this.configuration.basePath}/store/inventory`,
{
@ -167,9 +148,6 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<Order>(`${this.configuration.basePath}/store/order/${encodeURIComponent(String(orderId))}`,
{
@ -183,7 +161,6 @@ export class StoreService {
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -208,6 +185,7 @@ export class StoreService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -45,19 +45,6 @@ export class UserService {
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
@ -85,6 +72,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -106,7 +94,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -129,6 +116,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -150,7 +138,6 @@ export class UserService {
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -173,6 +160,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
@ -217,9 +205,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.delete<any>(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`,
{
@ -233,7 +218,6 @@ export class UserService {
/**
* Get user by user name
*
* @param username The name that needs to be fetched. Use user1 for testing.
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
@ -258,9 +242,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<User>(`${this.configuration.basePath}/user/${encodeURIComponent(String(username))}`,
{
@ -274,7 +255,6 @@ export class UserService {
/**
* Logs user into the system
*
* @param username The user name for login
* @param password The password for login in clear text
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
@ -311,9 +291,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<string>(`${this.configuration.basePath}/user/login`,
{
@ -328,7 +305,6 @@ export class UserService {
/**
* Logs out current logged in user session
*
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
@ -347,9 +323,6 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];
return this.httpClient.get<any>(`${this.configuration.basePath}/user/logout`,
{
@ -390,6 +363,7 @@ export class UserService {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
];

View File

@ -1,9 +1,9 @@
import { HttpParameterCodec } from '@angular/common/http';
/**
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
export class CustomHttpParameterCodec implements HttpParameterCodec {
encodeKey(k: string): string {
return encodeURIComponent(k);