mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-10-13 16:03:43 +00:00
Squashed commit of the following:
commit b33232e52b9642e9edf724429dc99afe39d9df07 Merge: e3a1e30 3e76185 Author: wing328 <wing328hk@gmail.com> Date: Sun Jul 23 01:38:09 2017 +0800 Merge branch 'add-petstore-support-typescript-jquery' of https://github.com/StingrayDigital/swagger-codegen into StingrayDigital-add-petstore-support-typescript-jquery commit 3e76185d906d8b53cc3e7a198546b9e111a0cca4 Author: Jean-François Côté <jcote@stingray.com> Date: Thu Jul 20 13:50:01 2017 -0400 Add working npm generator. commit 5c27df7c4822fed10ddb81b8a35f60ca40b60914 Author: Jean-François Côté <jcote@stingray.com> Date: Fri Jul 7 14:39:39 2017 -0400 Fix suggested by @wing328 's review commit 41da37b3576a82ad6056434d36e9d579ef495492 Author: Jean-François Côté <jcote@stingray.com> Date: Wed Jul 5 15:47:40 2017 -0400 Add petstore integration and updated sample
This commit is contained in:
parent
e3a1e308c4
commit
6c922fdae1
@ -27,10 +27,10 @@ fi
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
|
||||
echo "Typescript jquery Petstore API client (default setting)"
|
||||
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-jquery -o samples/client/petstore/typescript-jquery/default"
|
||||
echo "Typescript Petstore API client (default)"
|
||||
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l typescript-jquery -o samples/client/petstore/typescript-jquery/default"
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
||||
echo "Typescript jquery Petstore API client with npm setting"
|
||||
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-jquery -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-jquery/npm"
|
||||
echo "Typescript Petstore API client (npm setting)"
|
||||
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l typescript-jquery -c bin/typescript-jquery-petstore-npm.json -o samples/client/petstore/typescript-jquery/npm"
|
||||
java $JAVA_OPTS -jar $executable $ags
|
6
bin/typescript-jquery-petstore-npm.json
Normal file
6
bin/typescript-jquery-petstore-npm.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"npmName": "@swagger/jquery-typescript-petstore",
|
||||
"npmVersion": "0.0.1",
|
||||
"npmRepository" : "https://skimdb.npmjs.com/registry",
|
||||
"snapshot" : false
|
||||
}
|
31
bin/typescript-jquery-petstore-with-npm.sh
Normal file
31
bin/typescript-jquery-petstore-with-npm.sh
Normal file
@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l typescript-jquery -c bin/typescript-jquery-petstore-npm.json -o samples/client/petstore/typescript-jquery/npm"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
31
bin/typescript-jquery-petstore.sh
Normal file
31
bin/typescript-jquery-petstore.sh
Normal file
@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPT="$0"
|
||||
|
||||
while [ -h "$SCRIPT" ] ; do
|
||||
ls=`ls -ld "$SCRIPT"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
SCRIPT="$link"
|
||||
else
|
||||
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -d "${APP_DIR}" ]; then
|
||||
APP_DIR=`dirname "$SCRIPT"`/..
|
||||
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||
fi
|
||||
|
||||
executable="./modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"
|
||||
|
||||
if [ ! -f "$executable" ]
|
||||
then
|
||||
mvn clean package
|
||||
fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l typescript-jquery -o samples/client/petstore/typescript-jquery/default"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
10
bin/windows/typescript-jquery-with-npm.bat
Normal file
10
bin/windows/typescript-jquery-with-npm.bat
Normal file
@ -0,0 +1,10 @@
|
||||
set executable=.\modules\swagger-codegen-cli\target\swagger-codegen-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -c bin\typescript-petstore-npm.json -l typescript-jquery -o samples\client\petstore\typescript-jquery\npm
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
10
bin/windows/typescript-jquery.bat
Normal file
10
bin/windows/typescript-jquery.bat
Normal file
@ -0,0 +1,10 @@
|
||||
set executable=.\modules\swagger-codegen-cli\target\swagger-codegen-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
|
||||
set ags=generate -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -l typescript-query -o samples\client\petstore\typescript-jquery\default
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
@ -15,7 +15,7 @@ import io.swagger.codegen.CliOption;
|
||||
import io.swagger.codegen.SupportingFile;
|
||||
|
||||
public class TypeScriptJqueryClientCodegen extends AbstractTypeScriptClientCodegen {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(TypeScriptNodeClientCodegen.class);
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(TypeScriptJqueryClientCodegen.class);
|
||||
private static final SimpleDateFormat SNAPSHOT_SUFFIX_FORMAT = new SimpleDateFormat("yyyyMMddHHmm");
|
||||
|
||||
public static final String NPM_NAME = "npmName";
|
||||
|
@ -10,11 +10,12 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bluebird": "^3.3.5",
|
||||
"request": "^2.72.0"
|
||||
"request": "^2.72.0",
|
||||
"jquery": "^3.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^1.8.10",
|
||||
"typings": "^0.8.1"
|
||||
"typescript": "2.2.2",
|
||||
"typings": "^1.3.0"
|
||||
}{{#npmRepository}},
|
||||
"publishConfig":{
|
||||
"registry":"{{npmRepository}}"
|
||||
|
@ -11,8 +11,8 @@
|
||||
"declaration": true
|
||||
},
|
||||
"files": [
|
||||
"api.ts",
|
||||
"typings/main.d.ts"
|
||||
"index.ts",
|
||||
"typings/index.d.ts"
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
"core-js": "registry:dt/core-js#0.0.0+20160317120654",
|
||||
"node": "registry:dt/node#4.0.0+20160423143914"
|
||||
},
|
||||
"dependencies": {
|
||||
"request": "registry:npm/request#2.69.0+20160304121250"
|
||||
"globalDependencies": {
|
||||
"jquery": "registry:dt/jquery#1.10.0+20170310222111"
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -43,15 +43,19 @@ export class PetApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @summary Add a new pet to the store
|
||||
* @param body Pet object that needs to be added to the store
|
||||
*/
|
||||
public addPet(body?: models.Pet): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
public addPet(body: models.Pet): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
let localVarPath = this.basePath + '/pet';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = {};
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling addPet.');
|
||||
}
|
||||
|
||||
|
||||
localVarPath = localVarPath + "?" + $.param(queryParameters);
|
||||
@ -63,8 +67,8 @@ export class PetApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
@ -102,8 +106,8 @@ export class PetApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
* @summary Deletes a pet
|
||||
* @param petId Pet id to delete
|
||||
* @param apiKey
|
||||
*/
|
||||
@ -128,8 +132,8 @@ export class PetApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
@ -164,20 +168,22 @@ export class PetApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* @summary Finds Pets by status
|
||||
* @param status Status values that need to be considered for filter
|
||||
*/
|
||||
public findPetsByStatus(status?: Array<string>): JQueryPromise<{ response: JQueryXHR; body: Array<models.Pet>; }> {
|
||||
public findPetsByStatus(status: Array<string>): JQueryPromise<{ response: JQueryXHR; body: Array<models.Pet>; }> {
|
||||
let localVarPath = this.basePath + '/pet/findByStatus';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = {};
|
||||
// verify required parameter 'status' is not null or undefined
|
||||
if (status === null || status === undefined) {
|
||||
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
|
||||
}
|
||||
|
||||
if (status) {
|
||||
status.forEach((element: any) => {
|
||||
queryParameters['status'].push(element);
|
||||
});
|
||||
queryParameters['status'] = status.join(COLLECTION_FORMATS['csv']);
|
||||
}
|
||||
|
||||
localVarPath = localVarPath + "?" + $.param(queryParameters);
|
||||
@ -187,8 +193,8 @@ export class PetApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
@ -223,20 +229,22 @@ export class PetApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @summary Finds Pets by tags
|
||||
* @param tags Tags to filter by
|
||||
*/
|
||||
public findPetsByTags(tags?: Array<string>): JQueryPromise<{ response: JQueryXHR; body: Array<models.Pet>; }> {
|
||||
public findPetsByTags(tags: Array<string>): JQueryPromise<{ response: JQueryXHR; body: Array<models.Pet>; }> {
|
||||
let localVarPath = this.basePath + '/pet/findByTags';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = {};
|
||||
// verify required parameter 'tags' is not null or undefined
|
||||
if (tags === null || tags === undefined) {
|
||||
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
|
||||
}
|
||||
|
||||
if (tags) {
|
||||
tags.forEach((element: any) => {
|
||||
queryParameters['tags'].push(element);
|
||||
});
|
||||
queryParameters['tags'] = tags.join(COLLECTION_FORMATS['csv']);
|
||||
}
|
||||
|
||||
localVarPath = localVarPath + "?" + $.param(queryParameters);
|
||||
@ -246,8 +254,8 @@ export class PetApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
@ -282,9 +290,9 @@ export class PetApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
* @param petId ID of pet that needs to be fetched
|
||||
* Returns a single pet
|
||||
* @summary Find pet by ID
|
||||
* @param petId ID of pet to return
|
||||
*/
|
||||
public getPetById(petId: number): JQueryPromise<{ response: JQueryXHR; body: models.Pet; }> {
|
||||
let localVarPath = this.basePath + '/pet/{petId}'.replace('{' + 'petId' + '}', String(petId));
|
||||
@ -304,8 +312,8 @@ export class PetApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
// authentication (api_key) required
|
||||
@ -313,15 +321,6 @@ export class PetApi {
|
||||
headerParams['api_key'] = this.configuration.apiKey;
|
||||
}
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
// oauth required
|
||||
if (this.configuration.accessToken) {
|
||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headerParams['Authorization'] = 'Bearer ' + accessToken;
|
||||
}
|
||||
|
||||
|
||||
let requestOptions: JQueryAjaxSettings = {
|
||||
url: localVarPath,
|
||||
@ -345,15 +344,19 @@ export class PetApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
* @summary Update an existing pet
|
||||
* @param body Pet object that needs to be added to the store
|
||||
*/
|
||||
public updatePet(body?: models.Pet): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
public updatePet(body: models.Pet): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
let localVarPath = this.basePath + '/pet';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = {};
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling updatePet.');
|
||||
}
|
||||
|
||||
|
||||
localVarPath = localVarPath + "?" + $.param(queryParameters);
|
||||
@ -365,8 +368,8 @@ export class PetApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
@ -404,13 +407,13 @@ export class PetApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
* @summary 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
|
||||
*/
|
||||
public updatePetWithForm(petId: string, name?: string, status?: string): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
let localVarPath = this.basePath + '/pet/{petId}'.replace('{' + 'petId' + '}', String(petId));
|
||||
|
||||
let queryParameters: any = {};
|
||||
@ -442,8 +445,8 @@ export class PetApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
@ -486,13 +489,13 @@ export class PetApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
* @summary uploads an image
|
||||
* @param petId ID of pet to update
|
||||
* @param additionalMetadata Additional data to pass to server
|
||||
* @param file file to upload
|
||||
*/
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any): JQueryPromise<{ response: JQueryXHR; body: models.ApiResponse; }> {
|
||||
let localVarPath = this.basePath + '/pet/{petId}/uploadImage'.replace('{' + 'petId' + '}', String(petId));
|
||||
|
||||
let queryParameters: any = {};
|
||||
@ -525,8 +528,7 @@ export class PetApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/json'
|
||||
];
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
@ -560,7 +562,7 @@ export class PetApi {
|
||||
|
||||
let dfd = $.Deferred();
|
||||
$.ajax(requestOptions).then(
|
||||
(data: any, textStatus: string, jqXHR: JQueryXHR) =>
|
||||
(data: models.ApiResponse, textStatus: string, jqXHR: JQueryXHR) =>
|
||||
dfd.resolve(jqXHR, data),
|
||||
(xhr: JQueryXHR, textStatus: string, errorThrown: string) =>
|
||||
dfd.reject(xhr, errorThrown)
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -43,8 +43,8 @@ export class StoreApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @summary Delete purchase order by ID
|
||||
* @param orderId ID of the order that needs to be deleted
|
||||
*/
|
||||
public deleteOrder(orderId: string): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
@ -65,8 +65,8 @@ export class StoreApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
@ -92,8 +92,8 @@ export class StoreApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @summary Returns pet inventories by status
|
||||
*/
|
||||
public getInventory(): JQueryPromise<{ response: JQueryXHR; body: { [key: string]: number; }; }> {
|
||||
let localVarPath = this.basePath + '/store/inventory';
|
||||
@ -108,8 +108,7 @@ export class StoreApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/json'
|
||||
];
|
||||
|
||||
// authentication (api_key) required
|
||||
@ -140,11 +139,11 @@ export class StoreApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @summary Find purchase order by ID
|
||||
* @param orderId ID of pet that needs to be fetched
|
||||
*/
|
||||
public getOrderById(orderId: string): JQueryPromise<{ response: JQueryXHR; body: models.Order; }> {
|
||||
public getOrderById(orderId: number): JQueryPromise<{ response: JQueryXHR; body: models.Order; }> {
|
||||
let localVarPath = this.basePath + '/store/order/{orderId}'.replace('{' + 'orderId' + '}', String(orderId));
|
||||
|
||||
let queryParameters: any = {};
|
||||
@ -162,8 +161,8 @@ export class StoreApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
@ -189,15 +188,19 @@ export class StoreApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @summary Place an order for a pet
|
||||
* @param body order placed for purchasing the pet
|
||||
*/
|
||||
public placeOrder(body?: models.Order): JQueryPromise<{ response: JQueryXHR; body: models.Order; }> {
|
||||
public placeOrder(body: models.Order): JQueryPromise<{ response: JQueryXHR; body: models.Order; }> {
|
||||
let localVarPath = this.basePath + '/store/order';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = {};
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling placeOrder.');
|
||||
}
|
||||
|
||||
|
||||
localVarPath = localVarPath + "?" + $.param(queryParameters);
|
||||
@ -207,8 +210,8 @@ export class StoreApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -43,15 +43,19 @@ export class UserApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @summary Create user
|
||||
* @param body Created user object
|
||||
*/
|
||||
public createUser(body?: models.User): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
public createUser(body: models.User): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
let localVarPath = this.basePath + '/user';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = {};
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling createUser.');
|
||||
}
|
||||
|
||||
|
||||
localVarPath = localVarPath + "?" + $.param(queryParameters);
|
||||
@ -61,8 +65,8 @@ export class UserApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
@ -91,15 +95,19 @@ export class UserApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @summary Creates list of users with given input array
|
||||
* @param body List of user object
|
||||
*/
|
||||
public createUsersWithArrayInput(body?: Array<models.User>): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
public createUsersWithArrayInput(body: Array<models.User>): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
let localVarPath = this.basePath + '/user/createWithArray';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = {};
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
|
||||
}
|
||||
|
||||
|
||||
localVarPath = localVarPath + "?" + $.param(queryParameters);
|
||||
@ -109,8 +117,8 @@ export class UserApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
@ -139,15 +147,19 @@ export class UserApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @summary Creates list of users with given input array
|
||||
* @param body List of user object
|
||||
*/
|
||||
public createUsersWithListInput(body?: Array<models.User>): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
public createUsersWithListInput(body: Array<models.User>): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
let localVarPath = this.basePath + '/user/createWithList';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = {};
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
|
||||
}
|
||||
|
||||
|
||||
localVarPath = localVarPath + "?" + $.param(queryParameters);
|
||||
@ -157,8 +169,8 @@ export class UserApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
@ -187,8 +199,8 @@ export class UserApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
* @summary Delete user
|
||||
* @param username The name that needs to be deleted
|
||||
*/
|
||||
public deleteUser(username: string): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
@ -209,8 +221,8 @@ export class UserApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
@ -236,8 +248,8 @@ export class UserApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @summary Get user by user name
|
||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||
*/
|
||||
public getUserByName(username: string): JQueryPromise<{ response: JQueryXHR; body: models.User; }> {
|
||||
@ -258,8 +270,8 @@ export class UserApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
@ -285,17 +297,25 @@ export class UserApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
* @summary Logs user into the system
|
||||
* @param username The user name for login
|
||||
* @param password The password for login in clear text
|
||||
*/
|
||||
public loginUser(username?: string, password?: string): JQueryPromise<{ response: JQueryXHR; body: string; }> {
|
||||
public loginUser(username: string, password: string): JQueryPromise<{ response: JQueryXHR; body: string; }> {
|
||||
let localVarPath = this.basePath + '/user/login';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = {};
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new Error('Required parameter username was null or undefined when calling loginUser.');
|
||||
}
|
||||
|
||||
// verify required parameter 'password' is not null or undefined
|
||||
if (password === null || password === undefined) {
|
||||
throw new Error('Required parameter password was null or undefined when calling loginUser.');
|
||||
}
|
||||
|
||||
if (username !== null && username !== undefined) {
|
||||
queryParameters['username'] = <string><any>username;
|
||||
@ -311,8 +331,8 @@ export class UserApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
@ -338,8 +358,8 @@ export class UserApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
* @summary Logs out current logged in user session
|
||||
*/
|
||||
public logoutUser(): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
let localVarPath = this.basePath + '/user/logout';
|
||||
@ -354,8 +374,8 @@ export class UserApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
@ -381,12 +401,12 @@ export class UserApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* @summary Updated user
|
||||
* @param username name that need to be deleted
|
||||
* @param body Updated user object
|
||||
*/
|
||||
public updateUser(username: string, body?: models.User): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
public updateUser(username: string, body: models.User): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
let localVarPath = this.basePath + '/user/{username}'.replace('{' + 'username' + '}', String(username));
|
||||
|
||||
let queryParameters: any = {};
|
||||
@ -396,6 +416,10 @@ export class UserApi {
|
||||
throw new Error('Required parameter username was null or undefined when calling updateUser.');
|
||||
}
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling updateUser.');
|
||||
}
|
||||
|
||||
|
||||
localVarPath = localVarPath + "?" + $.param(queryParameters);
|
||||
@ -405,8 +429,8 @@ export class UserApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import * as models from './models';
|
||||
|
||||
/**
|
||||
* Describes the result of uploading an image resource
|
||||
*/
|
||||
export interface ApiResponse {
|
||||
code?: number;
|
||||
|
||||
type?: string;
|
||||
|
||||
message?: string;
|
||||
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -12,6 +12,9 @@
|
||||
|
||||
import * as models from './models';
|
||||
|
||||
/**
|
||||
* A category for a pet
|
||||
*/
|
||||
export interface Category {
|
||||
id?: number;
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -12,6 +12,9 @@
|
||||
|
||||
import * as models from './models';
|
||||
|
||||
/**
|
||||
* An order for a pets from the pet store
|
||||
*/
|
||||
export interface Order {
|
||||
id?: number;
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -12,6 +12,9 @@
|
||||
|
||||
import * as models from './models';
|
||||
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
*/
|
||||
export interface Pet {
|
||||
id?: number;
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -12,6 +12,9 @@
|
||||
|
||||
import * as models from './models';
|
||||
|
||||
/**
|
||||
* A tag for a pet
|
||||
*/
|
||||
export interface Tag {
|
||||
id?: number;
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -12,6 +12,9 @@
|
||||
|
||||
import * as models from './models';
|
||||
|
||||
/**
|
||||
* A User who is purchasing from the pet store
|
||||
*/
|
||||
export interface User {
|
||||
id?: number;
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
export * from './ApiResponse';
|
||||
export * from './Category';
|
||||
export * from './Order';
|
||||
export * from './Pet';
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -43,15 +43,19 @@ export class PetApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @summary Add a new pet to the store
|
||||
* @param body Pet object that needs to be added to the store
|
||||
*/
|
||||
public addPet(body?: models.Pet): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
public addPet(body: models.Pet): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
let localVarPath = this.basePath + '/pet';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = {};
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling addPet.');
|
||||
}
|
||||
|
||||
|
||||
localVarPath = localVarPath + "?" + $.param(queryParameters);
|
||||
@ -63,8 +67,8 @@ export class PetApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
@ -102,8 +106,8 @@ export class PetApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
* @summary Deletes a pet
|
||||
* @param petId Pet id to delete
|
||||
* @param apiKey
|
||||
*/
|
||||
@ -128,8 +132,8 @@ export class PetApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
@ -164,20 +168,22 @@ export class PetApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* @summary Finds Pets by status
|
||||
* @param status Status values that need to be considered for filter
|
||||
*/
|
||||
public findPetsByStatus(status?: Array<string>): JQueryPromise<{ response: JQueryXHR; body: Array<models.Pet>; }> {
|
||||
public findPetsByStatus(status: Array<string>): JQueryPromise<{ response: JQueryXHR; body: Array<models.Pet>; }> {
|
||||
let localVarPath = this.basePath + '/pet/findByStatus';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = {};
|
||||
// verify required parameter 'status' is not null or undefined
|
||||
if (status === null || status === undefined) {
|
||||
throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.');
|
||||
}
|
||||
|
||||
if (status) {
|
||||
status.forEach((element: any) => {
|
||||
queryParameters['status'].push(element);
|
||||
});
|
||||
queryParameters['status'] = status.join(COLLECTION_FORMATS['csv']);
|
||||
}
|
||||
|
||||
localVarPath = localVarPath + "?" + $.param(queryParameters);
|
||||
@ -187,8 +193,8 @@ export class PetApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
@ -223,20 +229,22 @@ export class PetApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @summary Finds Pets by tags
|
||||
* @param tags Tags to filter by
|
||||
*/
|
||||
public findPetsByTags(tags?: Array<string>): JQueryPromise<{ response: JQueryXHR; body: Array<models.Pet>; }> {
|
||||
public findPetsByTags(tags: Array<string>): JQueryPromise<{ response: JQueryXHR; body: Array<models.Pet>; }> {
|
||||
let localVarPath = this.basePath + '/pet/findByTags';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = {};
|
||||
// verify required parameter 'tags' is not null or undefined
|
||||
if (tags === null || tags === undefined) {
|
||||
throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.');
|
||||
}
|
||||
|
||||
if (tags) {
|
||||
tags.forEach((element: any) => {
|
||||
queryParameters['tags'].push(element);
|
||||
});
|
||||
queryParameters['tags'] = tags.join(COLLECTION_FORMATS['csv']);
|
||||
}
|
||||
|
||||
localVarPath = localVarPath + "?" + $.param(queryParameters);
|
||||
@ -246,8 +254,8 @@ export class PetApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
@ -282,9 +290,9 @@ export class PetApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
* @param petId ID of pet that needs to be fetched
|
||||
* Returns a single pet
|
||||
* @summary Find pet by ID
|
||||
* @param petId ID of pet to return
|
||||
*/
|
||||
public getPetById(petId: number): JQueryPromise<{ response: JQueryXHR; body: models.Pet; }> {
|
||||
let localVarPath = this.basePath + '/pet/{petId}'.replace('{' + 'petId' + '}', String(petId));
|
||||
@ -304,8 +312,8 @@ export class PetApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
// authentication (api_key) required
|
||||
@ -313,15 +321,6 @@ export class PetApi {
|
||||
headerParams['api_key'] = this.configuration.apiKey;
|
||||
}
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
// oauth required
|
||||
if (this.configuration.accessToken) {
|
||||
let accessToken = typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headerParams['Authorization'] = 'Bearer ' + accessToken;
|
||||
}
|
||||
|
||||
|
||||
let requestOptions: JQueryAjaxSettings = {
|
||||
url: localVarPath,
|
||||
@ -345,15 +344,19 @@ export class PetApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
* @summary Update an existing pet
|
||||
* @param body Pet object that needs to be added to the store
|
||||
*/
|
||||
public updatePet(body?: models.Pet): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
public updatePet(body: models.Pet): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
let localVarPath = this.basePath + '/pet';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = {};
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling updatePet.');
|
||||
}
|
||||
|
||||
|
||||
localVarPath = localVarPath + "?" + $.param(queryParameters);
|
||||
@ -365,8 +368,8 @@ export class PetApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
@ -404,13 +407,13 @@ export class PetApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
* @summary 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
|
||||
*/
|
||||
public updatePetWithForm(petId: string, name?: string, status?: string): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
public updatePetWithForm(petId: number, name?: string, status?: string): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
let localVarPath = this.basePath + '/pet/{petId}'.replace('{' + 'petId' + '}', String(petId));
|
||||
|
||||
let queryParameters: any = {};
|
||||
@ -442,8 +445,8 @@ export class PetApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
@ -486,13 +489,13 @@ export class PetApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
* @summary uploads an image
|
||||
* @param petId ID of pet to update
|
||||
* @param additionalMetadata Additional data to pass to server
|
||||
* @param file file to upload
|
||||
*/
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
public uploadFile(petId: number, additionalMetadata?: string, file?: any): JQueryPromise<{ response: JQueryXHR; body: models.ApiResponse; }> {
|
||||
let localVarPath = this.basePath + '/pet/{petId}/uploadImage'.replace('{' + 'petId' + '}', String(petId));
|
||||
|
||||
let queryParameters: any = {};
|
||||
@ -525,8 +528,7 @@ export class PetApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/json'
|
||||
];
|
||||
|
||||
// authentication (petstore_auth) required
|
||||
@ -560,7 +562,7 @@ export class PetApi {
|
||||
|
||||
let dfd = $.Deferred();
|
||||
$.ajax(requestOptions).then(
|
||||
(data: any, textStatus: string, jqXHR: JQueryXHR) =>
|
||||
(data: models.ApiResponse, textStatus: string, jqXHR: JQueryXHR) =>
|
||||
dfd.resolve(jqXHR, data),
|
||||
(xhr: JQueryXHR, textStatus: string, errorThrown: string) =>
|
||||
dfd.reject(xhr, errorThrown)
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -43,8 +43,8 @@ export class StoreApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @summary Delete purchase order by ID
|
||||
* @param orderId ID of the order that needs to be deleted
|
||||
*/
|
||||
public deleteOrder(orderId: string): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
@ -65,8 +65,8 @@ export class StoreApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
@ -92,8 +92,8 @@ export class StoreApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @summary Returns pet inventories by status
|
||||
*/
|
||||
public getInventory(): JQueryPromise<{ response: JQueryXHR; body: { [key: string]: number; }; }> {
|
||||
let localVarPath = this.basePath + '/store/inventory';
|
||||
@ -108,8 +108,7 @@ export class StoreApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/json'
|
||||
];
|
||||
|
||||
// authentication (api_key) required
|
||||
@ -140,11 +139,11 @@ export class StoreApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @summary Find purchase order by ID
|
||||
* @param orderId ID of pet that needs to be fetched
|
||||
*/
|
||||
public getOrderById(orderId: string): JQueryPromise<{ response: JQueryXHR; body: models.Order; }> {
|
||||
public getOrderById(orderId: number): JQueryPromise<{ response: JQueryXHR; body: models.Order; }> {
|
||||
let localVarPath = this.basePath + '/store/order/{orderId}'.replace('{' + 'orderId' + '}', String(orderId));
|
||||
|
||||
let queryParameters: any = {};
|
||||
@ -162,8 +161,8 @@ export class StoreApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
@ -189,15 +188,19 @@ export class StoreApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @summary Place an order for a pet
|
||||
* @param body order placed for purchasing the pet
|
||||
*/
|
||||
public placeOrder(body?: models.Order): JQueryPromise<{ response: JQueryXHR; body: models.Order; }> {
|
||||
public placeOrder(body: models.Order): JQueryPromise<{ response: JQueryXHR; body: models.Order; }> {
|
||||
let localVarPath = this.basePath + '/store/order';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = {};
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling placeOrder.');
|
||||
}
|
||||
|
||||
|
||||
localVarPath = localVarPath + "?" + $.param(queryParameters);
|
||||
@ -207,8 +210,8 @@ export class StoreApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -43,15 +43,19 @@ export class UserApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @summary Create user
|
||||
* @param body Created user object
|
||||
*/
|
||||
public createUser(body?: models.User): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
public createUser(body: models.User): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
let localVarPath = this.basePath + '/user';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = {};
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling createUser.');
|
||||
}
|
||||
|
||||
|
||||
localVarPath = localVarPath + "?" + $.param(queryParameters);
|
||||
@ -61,8 +65,8 @@ export class UserApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
@ -91,15 +95,19 @@ export class UserApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @summary Creates list of users with given input array
|
||||
* @param body List of user object
|
||||
*/
|
||||
public createUsersWithArrayInput(body?: Array<models.User>): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
public createUsersWithArrayInput(body: Array<models.User>): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
let localVarPath = this.basePath + '/user/createWithArray';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = {};
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling createUsersWithArrayInput.');
|
||||
}
|
||||
|
||||
|
||||
localVarPath = localVarPath + "?" + $.param(queryParameters);
|
||||
@ -109,8 +117,8 @@ export class UserApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
@ -139,15 +147,19 @@ export class UserApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @summary Creates list of users with given input array
|
||||
* @param body List of user object
|
||||
*/
|
||||
public createUsersWithListInput(body?: Array<models.User>): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
public createUsersWithListInput(body: Array<models.User>): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
let localVarPath = this.basePath + '/user/createWithList';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = {};
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling createUsersWithListInput.');
|
||||
}
|
||||
|
||||
|
||||
localVarPath = localVarPath + "?" + $.param(queryParameters);
|
||||
@ -157,8 +169,8 @@ export class UserApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
@ -187,8 +199,8 @@ export class UserApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
* @summary Delete user
|
||||
* @param username The name that needs to be deleted
|
||||
*/
|
||||
public deleteUser(username: string): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
@ -209,8 +221,8 @@ export class UserApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
@ -236,8 +248,8 @@ export class UserApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @summary Get user by user name
|
||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||
*/
|
||||
public getUserByName(username: string): JQueryPromise<{ response: JQueryXHR; body: models.User; }> {
|
||||
@ -258,8 +270,8 @@ export class UserApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
@ -285,17 +297,25 @@ export class UserApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
* @summary Logs user into the system
|
||||
* @param username The user name for login
|
||||
* @param password The password for login in clear text
|
||||
*/
|
||||
public loginUser(username?: string, password?: string): JQueryPromise<{ response: JQueryXHR; body: string; }> {
|
||||
public loginUser(username: string, password: string): JQueryPromise<{ response: JQueryXHR; body: string; }> {
|
||||
let localVarPath = this.basePath + '/user/login';
|
||||
|
||||
let queryParameters: any = {};
|
||||
let headerParams: any = {};
|
||||
// verify required parameter 'username' is not null or undefined
|
||||
if (username === null || username === undefined) {
|
||||
throw new Error('Required parameter username was null or undefined when calling loginUser.');
|
||||
}
|
||||
|
||||
// verify required parameter 'password' is not null or undefined
|
||||
if (password === null || password === undefined) {
|
||||
throw new Error('Required parameter password was null or undefined when calling loginUser.');
|
||||
}
|
||||
|
||||
if (username !== null && username !== undefined) {
|
||||
queryParameters['username'] = <string><any>username;
|
||||
@ -311,8 +331,8 @@ export class UserApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
@ -338,8 +358,8 @@ export class UserApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
* @summary Logs out current logged in user session
|
||||
*/
|
||||
public logoutUser(): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
let localVarPath = this.basePath + '/user/logout';
|
||||
@ -354,8 +374,8 @@ export class UserApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
@ -381,12 +401,12 @@ export class UserApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* @summary Updated user
|
||||
* @param username name that need to be deleted
|
||||
* @param body Updated user object
|
||||
*/
|
||||
public updateUser(username: string, body?: models.User): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
public updateUser(username: string, body: models.User): JQueryPromise<{ response: JQueryXHR; body?: any; }> {
|
||||
let localVarPath = this.basePath + '/user/{username}'.replace('{' + 'username' + '}', String(username));
|
||||
|
||||
let queryParameters: any = {};
|
||||
@ -396,6 +416,10 @@ export class UserApi {
|
||||
throw new Error('Required parameter username was null or undefined when calling updateUser.');
|
||||
}
|
||||
|
||||
// verify required parameter 'body' is not null or undefined
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling updateUser.');
|
||||
}
|
||||
|
||||
|
||||
localVarPath = localVarPath + "?" + $.param(queryParameters);
|
||||
@ -405,8 +429,8 @@ export class UserApi {
|
||||
|
||||
// to determine the Accept header
|
||||
let produces: string[] = [
|
||||
'application/json',
|
||||
'application/xml'
|
||||
'application/xml',
|
||||
'application/json'
|
||||
];
|
||||
|
||||
|
||||
|
@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import * as models from './models';
|
||||
|
||||
/**
|
||||
* Describes the result of uploading an image resource
|
||||
*/
|
||||
export interface ApiResponse {
|
||||
code?: number;
|
||||
|
||||
type?: string;
|
||||
|
||||
message?: string;
|
||||
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -12,6 +12,9 @@
|
||||
|
||||
import * as models from './models';
|
||||
|
||||
/**
|
||||
* A category for a pet
|
||||
*/
|
||||
export interface Category {
|
||||
id?: number;
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -12,6 +12,9 @@
|
||||
|
||||
import * as models from './models';
|
||||
|
||||
/**
|
||||
* An order for a pets from the pet store
|
||||
*/
|
||||
export interface Order {
|
||||
id?: number;
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -12,6 +12,9 @@
|
||||
|
||||
import * as models from './models';
|
||||
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
*/
|
||||
export interface Pet {
|
||||
id?: number;
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -12,6 +12,9 @@
|
||||
|
||||
import * as models from './models';
|
||||
|
||||
/**
|
||||
* A tag for a pet
|
||||
*/
|
||||
export interface Tag {
|
||||
id?: number;
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -12,6 +12,9 @@
|
||||
|
||||
import * as models from './models';
|
||||
|
||||
/**
|
||||
* A User who is purchasing from the pet store
|
||||
*/
|
||||
export interface User {
|
||||
id?: number;
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
export * from './ApiResponse';
|
||||
export * from './Category';
|
||||
export * from './Order';
|
||||
export * from './Pet';
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@swagger/angular2-typescript-petstore",
|
||||
"name": "@swagger/jquery-typescript-petstore",
|
||||
"version": "0.0.1",
|
||||
"description": "JQuery client for @swagger/angular2-typescript-petstore",
|
||||
"description": "JQuery client for @swagger/jquery-typescript-petstore",
|
||||
"main": "api.js",
|
||||
"scripts": {
|
||||
"build": "tsc"
|
||||
@ -10,11 +10,12 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bluebird": "^3.3.5",
|
||||
"request": "^2.72.0"
|
||||
"request": "^2.72.0",
|
||||
"jquery": "^3.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^1.8.10",
|
||||
"typings": "^0.8.1"
|
||||
"typescript": "2.2.2",
|
||||
"typings": "^1.3.0"
|
||||
},
|
||||
"publishConfig":{
|
||||
"registry":"https://skimdb.npmjs.com/registry"
|
||||
|
@ -1,46 +0,0 @@
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>TSJQueryNPMPestoreClientTests</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<name>TS jQuery npm Petstore Client</name>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>npm-install</id>
|
||||
<phase>pre-integration-test</phase>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<executable>npm</executable>
|
||||
<arguments>
|
||||
<argument>install</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -11,8 +11,8 @@
|
||||
"declaration": true
|
||||
},
|
||||
"files": [
|
||||
"api.ts",
|
||||
"typings/main.d.ts"
|
||||
"index.ts",
|
||||
"typings/index.d.ts"
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
"core-js": "registry:dt/core-js#0.0.0+20160317120654",
|
||||
"node": "registry:dt/node#4.0.0+20160423143914"
|
||||
},
|
||||
"dependencies": {
|
||||
"request": "registry:npm/request#2.69.0+20160304121250"
|
||||
"globalDependencies": {
|
||||
"jquery": "registry:dt/jquery#1.10.0+20170310222111"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user