forked from loafle/openapi-generator-original
[JavaScript] Update vulnerable dependencies (#784)
* Update vulnerable dependencies * Update samples: javascript-es6 * Update samples: javascript-promise * Update samples: javascript-promise-es6 * Update samples: javascript * Update samples: petstore-security-test/javascript * Rename operationId if it starts with a number * Update samples bin/javascript-petstore.sh bin/javascript-es6-petstore.sh bin/javascript-promise-petstore.sh bin/javascript-promise-es6-petstore.sh
This commit is contained in:
committed by
William Cheng
parent
afdef8f890
commit
21777f2759
@@ -837,6 +837,13 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo
|
||||
return newOperationId;
|
||||
}
|
||||
|
||||
// operationId starts with a number
|
||||
if (operationId.matches("^\\d.*")) {
|
||||
String newOperationId = camelize("call_" + operationId, true);
|
||||
LOGGER.warn(operationId + " (starting with a number) cannot be used as method name. Renamed to " + newOperationId);
|
||||
return newOperationId;
|
||||
}
|
||||
|
||||
return operationId;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"dependencies": {
|
||||
"babel": "^6.23.0",
|
||||
"babel-cli": "^6.26.0",
|
||||
"superagent": "3.5.2"
|
||||
"superagent": "3.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "6.26.0",
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"fs": false
|
||||
},
|
||||
"dependencies": {
|
||||
"superagent": "3.5.2"
|
||||
"superagent": "3.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "~2.3.4",
|
||||
|
||||
@@ -1 +1 @@
|
||||
2.3.0-SNAPSHOT
|
||||
3.2.0-SNAPSHOT
|
||||
@@ -1,12 +1,12 @@
|
||||
# swagger_petstore____end____rn_n_r
|
||||
# open_api_petstore____end____rn_n_r
|
||||
|
||||
SwaggerPetstoreEndRnNR - JavaScript client for swagger_petstore____end____rn_n_r
|
||||
OpenApiPetstoreEndRnNR - JavaScript client for open_api_petstore____end____rn_n_r
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end --
|
||||
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
||||
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
- Package version: 1.0.0 *_/ =end -- \r\n \n \r
|
||||
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen
|
||||
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -20,7 +20,7 @@ please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.co
|
||||
Then install it via:
|
||||
|
||||
```shell
|
||||
npm install swagger_petstore____end____rn_n_r --save
|
||||
npm install open_api_petstore____end____rn_n_r --save
|
||||
```
|
||||
|
||||
##### Local development
|
||||
@@ -38,13 +38,13 @@ Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the follow
|
||||
npm link
|
||||
```
|
||||
|
||||
Finally, switch to the directory you want to use your swagger_petstore____end____rn_n_r from, and run:
|
||||
Finally, switch to the directory you want to use your open_api_petstore____end____rn_n_r from, and run:
|
||||
|
||||
```shell
|
||||
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
|
||||
```
|
||||
|
||||
You should now be able to `require('swagger_petstore____end____rn_n_r')` in javascript files from the directory you ran the last
|
||||
You should now be able to `require('open_api_petstore____end____rn_n_r')` in javascript files from the directory you ran the last
|
||||
command above from.
|
||||
|
||||
#### git
|
||||
@@ -93,12 +93,11 @@ module: {
|
||||
Please follow the [installation](#installation) instruction and execute the following JS code:
|
||||
|
||||
```javascript
|
||||
var SwaggerPetstoreEndRnNR = require('swagger_petstore____end____rn_n_r');
|
||||
var OpenApiPetstoreEndRnNR = require('open_api_petstore____end____rn_n_r');
|
||||
|
||||
var api = new SwaggerPetstoreEndRnNR.FakeApi()
|
||||
|
||||
var opts = {
|
||||
'testCodeInjectEndRnNR': "testCodeInjectEndRnNR_example" // {String} To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
var api = new OpenApiPetstoreEndRnNR.FakeApi()
|
||||
var opts = {
|
||||
'UNKNOWN_BASE_TYPE': new OpenApiPetstoreEndRnNR.UNKNOWN_BASE_TYPE() // {UNKNOWN_BASE_TYPE}
|
||||
};
|
||||
|
||||
var callback = function(error, data, response) {
|
||||
@@ -114,16 +113,16 @@ api.testCodeInjectEndRnNR(opts, callback);
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *https://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r*
|
||||
All URIs are relative to *http://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*SwaggerPetstoreEndRnNR.FakeApi* | [**testCodeInjectEndRnNR**](docs/FakeApi.md#testCodeInjectEndRnNR) | **PUT** /fake | To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
*OpenApiPetstoreEndRnNR.FakeApi* | [**testCodeInjectEndRnNR**](docs/FakeApi.md#testCodeInjectEndRnNR) | **PUT** /fake | To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
- [SwaggerPetstoreEndRnNR.ModelReturn](docs/ModelReturn.md)
|
||||
- [OpenApiPetstoreEndRnNR.ModelReturn](docs/ModelReturn.md)
|
||||
|
||||
|
||||
## Documentation for Authorization
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SwaggerPetstoreEndRnNR.FakeApi
|
||||
# OpenApiPetstoreEndRnNR.FakeApi
|
||||
|
||||
All URIs are relative to *https://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r*
|
||||
All URIs are relative to *http://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
@@ -13,16 +13,16 @@ Method | HTTP request | Description
|
||||
|
||||
To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
|
||||
To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
var SwaggerPetstoreEndRnNR = require('swagger_petstore____end____rn_n_r');
|
||||
var OpenApiPetstoreEndRnNR = require('open_api_petstore____end____rn_n_r');
|
||||
|
||||
var apiInstance = new SwaggerPetstoreEndRnNR.FakeApi();
|
||||
|
||||
var opts = {
|
||||
'testCodeInjectEndRnNR': "testCodeInjectEndRnNR_example" // String | To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
var apiInstance = new OpenApiPetstoreEndRnNR.FakeApi();
|
||||
var opts = {
|
||||
'UNKNOWN_BASE_TYPE': new OpenApiPetstoreEndRnNR.UNKNOWN_BASE_TYPE() // UNKNOWN_BASE_TYPE |
|
||||
};
|
||||
|
||||
var callback = function(error, data, response) {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
@@ -37,7 +37,7 @@ apiInstance.testCodeInjectEndRnNR(opts, callback);
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**testCodeInjectEndRnNR** | **String**| To test code injection *_/ ' \" =end -- \\r\\n \\n \\r | [optional]
|
||||
**UNKNOWN_BASE_TYPE** | [**UNKNOWN_BASE_TYPE**](UNKNOWN_BASE_TYPE.md)| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -50,5 +50,5 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, *_/ =end --
|
||||
- **Accept**: application/json, *_/ =end --
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# SwaggerPetstoreEndRnNR.ModelReturn
|
||||
# OpenApiPetstoreEndRnNR.ModelReturn
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "swagger_petstore____end____rn_n_r",
|
||||
"name": "open_api_petstore____end____rn_n_r",
|
||||
"version": "1.0.0 *_/ =end -- \r\n \n \r",
|
||||
"description": "This_spec_is_mainly_for_testing_Petstore_server_and_contains_fake_endpoints_models__Please_do_not_use_this_for_any_other_purpose__Special_characters_______end______",
|
||||
"license": "Apache-2.0 */ ' " =end -- \r\n \n \r",
|
||||
@@ -11,7 +11,7 @@
|
||||
"fs": false
|
||||
},
|
||||
"dependencies": {
|
||||
"superagent": "3.5.2"
|
||||
"superagent": "3.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "~2.3.4",
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/**
|
||||
* Swagger Petstore *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end --
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* Swagger Codegen version: 2.3.0-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.0-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
@@ -23,10 +23,10 @@
|
||||
module.exports = factory(require('superagent'), require('querystring'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
if (!root.SwaggerPetstoreEndRnNR) {
|
||||
root.SwaggerPetstoreEndRnNR = {};
|
||||
if (!root.OpenApiPetstoreEndRnNR) {
|
||||
root.OpenApiPetstoreEndRnNR = {};
|
||||
}
|
||||
root.SwaggerPetstoreEndRnNR.ApiClient = factory(root.superagent, root.querystring);
|
||||
root.OpenApiPetstoreEndRnNR.ApiClient = factory(root.superagent, root.querystring);
|
||||
}
|
||||
}(this, function(superagent, querystring) {
|
||||
'use strict';
|
||||
@@ -47,9 +47,9 @@
|
||||
/**
|
||||
* The base URL against which to resolve every API call's (relative) path.
|
||||
* @type {String}
|
||||
* @default https://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* @default http://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
*/
|
||||
this.basePath = 'https://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r'.replace(/\/+$/, '');
|
||||
this.basePath = 'http://petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r'.replace(/\/+$/, '');
|
||||
|
||||
/**
|
||||
* The authentication methods to be included for all API calls.
|
||||
@@ -96,6 +96,10 @@
|
||||
this.agent = new superagent.agent();
|
||||
}
|
||||
|
||||
/*
|
||||
* Allow user to override superagent agent
|
||||
*/
|
||||
this.requestAgent = null;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -413,6 +417,12 @@
|
||||
// set header parameters
|
||||
request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));
|
||||
|
||||
|
||||
// set requestAgent if it is set by user
|
||||
if (this.requestAgent) {
|
||||
request.agent(this.requestAgent);
|
||||
}
|
||||
|
||||
// set request timeout
|
||||
request.timeout(this.timeout);
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/**
|
||||
* Swagger Petstore *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end --
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* Swagger Codegen version: 2.3.0-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.0-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
@@ -17,18 +17,18 @@
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['ApiClient'], factory);
|
||||
define(['ApiClient', 'model/UNKNOWN_BASE_TYPE'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('../ApiClient'));
|
||||
module.exports = factory(require('../ApiClient'), require('../model/UNKNOWN_BASE_TYPE'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
if (!root.SwaggerPetstoreEndRnNR) {
|
||||
root.SwaggerPetstoreEndRnNR = {};
|
||||
if (!root.OpenApiPetstoreEndRnNR) {
|
||||
root.OpenApiPetstoreEndRnNR = {};
|
||||
}
|
||||
root.SwaggerPetstoreEndRnNR.FakeApi = factory(root.SwaggerPetstoreEndRnNR.ApiClient);
|
||||
root.OpenApiPetstoreEndRnNR.FakeApi = factory(root.OpenApiPetstoreEndRnNR.ApiClient, root.OpenApiPetstoreEndRnNR.UNKNOWN_BASE_TYPE);
|
||||
}
|
||||
}(this, function(ApiClient) {
|
||||
}(this, function(ApiClient, UNKNOWN_BASE_TYPE) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
@@ -57,14 +57,15 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} opts.testCodeInjectEndRnNR To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* @param {module:model/UNKNOWN_BASE_TYPE} opts.UNKNOWN_BASE_TYPE
|
||||
* @param {module:api/FakeApi~testCodeInjectEndRnNRCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
this.testCodeInjectEndRnNR = function(opts, callback) {
|
||||
opts = opts || {};
|
||||
var postBody = null;
|
||||
var postBody = opts['UNKNOWN_BASE_TYPE'];
|
||||
|
||||
|
||||
var pathParams = {
|
||||
@@ -76,12 +77,11 @@
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
'test code inject */ ' " =end -- \r\n \n \r': opts['testCodeInjectEndRnNR']
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = ['application/json', '*_/ =end -- '];
|
||||
var accepts = ['application/json', '*_/ =end -- '];
|
||||
var accepts = [];
|
||||
var returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/**
|
||||
* Swagger Petstore *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end --
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* Swagger Codegen version: 2.3.0-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.0-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
@@ -31,9 +31,9 @@
|
||||
* <p>
|
||||
* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following:
|
||||
* <pre>
|
||||
* var SwaggerPetstoreEndRnNR = require('index'); // See note below*.
|
||||
* var xxxSvc = new SwaggerPetstoreEndRnNR.XxxApi(); // Allocate the API class we're going to use.
|
||||
* var yyyModel = new SwaggerPetstoreEndRnNR.Yyy(); // Construct a model instance.
|
||||
* var OpenApiPetstoreEndRnNR = require('index'); // See note below*.
|
||||
* var xxxSvc = new OpenApiPetstoreEndRnNR.XxxApi(); // Allocate the API class we're going to use.
|
||||
* var yyyModel = new OpenApiPetstoreEndRnNR.Yyy(); // Construct a model instance.
|
||||
* yyyModel.someProperty = 'someValue';
|
||||
* ...
|
||||
* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
|
||||
@@ -45,8 +45,8 @@
|
||||
* <p>
|
||||
* A non-AMD browser application (discouraged) might do something like this:
|
||||
* <pre>
|
||||
* var xxxSvc = new SwaggerPetstoreEndRnNR.XxxApi(); // Allocate the API class we're going to use.
|
||||
* var yyy = new SwaggerPetstoreEndRnNR.Yyy(); // Construct a model instance.
|
||||
* var xxxSvc = new OpenApiPetstoreEndRnNR.XxxApi(); // Allocate the API class we're going to use.
|
||||
* var yyy = new OpenApiPetstoreEndRnNR.Yyy(); // Construct a model instance.
|
||||
* yyyModel.someProperty = 'someValue';
|
||||
* ...
|
||||
* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/**
|
||||
* Swagger Petstore *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end --
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: apiteam@swagger.io *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* Swagger Codegen version: 2.3.0-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.0-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
@@ -23,10 +23,10 @@
|
||||
module.exports = factory(require('../ApiClient'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
if (!root.SwaggerPetstoreEndRnNR) {
|
||||
root.SwaggerPetstoreEndRnNR = {};
|
||||
if (!root.OpenApiPetstoreEndRnNR) {
|
||||
root.OpenApiPetstoreEndRnNR = {};
|
||||
}
|
||||
root.SwaggerPetstoreEndRnNR.ModelReturn = factory(root.SwaggerPetstoreEndRnNR.ApiClient);
|
||||
root.OpenApiPetstoreEndRnNR.ModelReturn = factory(root.OpenApiPetstoreEndRnNR.ApiClient);
|
||||
}
|
||||
}(this, function(ApiClient) {
|
||||
'use strict';
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.0.2-SNAPSHOT
|
||||
3.2.1-SNAPSHOT
|
||||
@@ -80,7 +80,7 @@ var callback = function(error, data, response) {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
};
|
||||
api.testSpecialTags(client, callback);
|
||||
api.call123testSpecialTags(client, callback);
|
||||
|
||||
```
|
||||
|
||||
@@ -90,11 +90,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*OpenApiPetstore.AnotherFakeApi* | [**testSpecialTags**](docs/AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
*OpenApiPetstore.AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
*OpenApiPetstore.FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
|
||||
*OpenApiPetstore.FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
|
||||
*OpenApiPetstore.FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
*OpenApiPetstore.FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
*OpenApiPetstore.FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
*OpenApiPetstore.FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
*OpenApiPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
*OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@@ -110,6 +111,7 @@ Class | Method | HTTP request | Description
|
||||
*OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
*OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
*OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||
*OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||
@@ -142,6 +144,8 @@ Class | Method | HTTP request | Description
|
||||
- [OpenApiPetstore.EnumArrays](docs/EnumArrays.md)
|
||||
- [OpenApiPetstore.EnumClass](docs/EnumClass.md)
|
||||
- [OpenApiPetstore.EnumTest](docs/EnumTest.md)
|
||||
- [OpenApiPetstore.File](docs/File.md)
|
||||
- [OpenApiPetstore.FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||
- [OpenApiPetstore.FormatTest](docs/FormatTest.md)
|
||||
- [OpenApiPetstore.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [OpenApiPetstore.List](docs/List.md)
|
||||
@@ -157,6 +161,7 @@ Class | Method | HTTP request | Description
|
||||
- [OpenApiPetstore.Pet](docs/Pet.md)
|
||||
- [OpenApiPetstore.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||
- [OpenApiPetstore.SpecialModelName](docs/SpecialModelName.md)
|
||||
- [OpenApiPetstore.StringBooleanMap](docs/StringBooleanMap.md)
|
||||
- [OpenApiPetstore.Tag](docs/Tag.md)
|
||||
- [OpenApiPetstore.User](docs/User.md)
|
||||
|
||||
|
||||
@@ -4,16 +4,16 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**testSpecialTags**](AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
|
||||
|
||||
<a name="testSpecialTags"></a>
|
||||
# **testSpecialTags**
|
||||
> Client testSpecialTags(client)
|
||||
<a name="call123testSpecialTags"></a>
|
||||
# **call123testSpecialTags**
|
||||
> Client call123testSpecialTags(client)
|
||||
|
||||
To test special tags
|
||||
|
||||
To test special tags
|
||||
To test special tags and operation ID starting with number
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
@@ -21,7 +21,7 @@ import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.AnotherFakeApi();
|
||||
let client = new OpenApiPetstore.Client(); // Client | client model
|
||||
apiInstance.testSpecialTags(client, (error, data, response) => {
|
||||
apiInstance.call123testSpecialTags(client, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
|
||||
@@ -8,6 +8,7 @@ Method | HTTP request | Description
|
||||
[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
|
||||
[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@@ -192,6 +193,48 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="testBodyWithFileSchema"></a>
|
||||
# **testBodyWithFileSchema**
|
||||
> testBodyWithFileSchema(fileSchemaTestClass)
|
||||
|
||||
|
||||
|
||||
For this test, the body for this request much reference a schema named `File`.
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.FakeApi();
|
||||
let fileSchemaTestClass = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass |
|
||||
apiInstance.testBodyWithFileSchema(fileSchemaTestClass, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully.');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testBodyWithQueryParams"></a>
|
||||
# **testBodyWithQueryParams**
|
||||
> testBodyWithQueryParams(query, user)
|
||||
|
||||
8
samples/client/petstore/javascript-es6/docs/File.md
Normal file
8
samples/client/petstore/javascript-es6/docs/File.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# OpenApiPetstore.File
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**sourceURI** | **String** | Test capitalization | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.FileSchemaTestClass
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**file** | **File** | | [optional]
|
||||
**files** | **[File]** | | [optional]
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**mapMapOfString** | **{String: {String: String}}** | | [optional]
|
||||
**mapOfEnumString** | **{String: String}** | | [optional]
|
||||
**directMap** | **{String: Boolean}** | | [optional]
|
||||
**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
|
||||
|
||||
|
||||
<a name="{String: String}"></a>
|
||||
|
||||
@@ -12,6 +12,7 @@ Method | HTTP request | Description
|
||||
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
|
||||
|
||||
<a name="addPet"></a>
|
||||
@@ -398,3 +399,54 @@ Name | Type | Description | Notes
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, opts)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
let petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.PetApi();
|
||||
let petId = 789; // Number | ID of pet to update
|
||||
let requiredFile = "/path/to/file"; // File | file to upload
|
||||
let opts = {
|
||||
'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server
|
||||
};
|
||||
apiInstance.uploadFileWithRequiredFile(petId, requiredFile, opts, (error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Number**| ID of pet to update |
|
||||
**requiredFile** | **File**| file to upload |
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# OpenApiPetstore.StringBooleanMap
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"dependencies": {
|
||||
"babel": "^6.23.0",
|
||||
"babel-cli": "^6.26.0",
|
||||
"superagent": "3.5.2"
|
||||
"superagent": "3.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "6.26.0",
|
||||
|
||||
@@ -35,8 +35,8 @@ export default class AnotherFakeApi {
|
||||
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testSpecialTags operation.
|
||||
* @callback module:api/AnotherFakeApi~testSpecialTagsCallback
|
||||
* Callback function to receive the result of the call123testSpecialTags operation.
|
||||
* @callback module:api/AnotherFakeApi~call123testSpecialTagsCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/Client} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
@@ -44,17 +44,17 @@ export default class AnotherFakeApi {
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param {module:model/Client} client client model
|
||||
* @param {module:api/AnotherFakeApi~testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* @param {module:api/AnotherFakeApi~call123testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/Client}
|
||||
*/
|
||||
testSpecialTags(client, callback) {
|
||||
call123testSpecialTags(client, callback) {
|
||||
let postBody = client;
|
||||
|
||||
// verify the required parameter 'client' is set
|
||||
if (client === undefined || client === null) {
|
||||
throw new Error("Missing the required parameter 'client' when calling testSpecialTags");
|
||||
throw new Error("Missing the required parameter 'client' when calling call123testSpecialTags");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import Client from '../model/Client';
|
||||
import FileSchemaTestClass from '../model/FileSchemaTestClass';
|
||||
import OuterComposite from '../model/OuterComposite';
|
||||
import User from '../model/User';
|
||||
|
||||
@@ -200,6 +201,49 @@ export default class FakeApi {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testBodyWithFileSchema operation.
|
||||
* @callback module:api/FakeApi~testBodyWithFileSchemaCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
* @param {module:model/FileSchemaTestClass} fileSchemaTestClass
|
||||
* @param {module:api/FakeApi~testBodyWithFileSchemaCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
testBodyWithFileSchema(fileSchemaTestClass, callback) {
|
||||
let postBody = fileSchemaTestClass;
|
||||
|
||||
// verify the required parameter 'fileSchemaTestClass' is set
|
||||
if (fileSchemaTestClass === undefined || fileSchemaTestClass === null) {
|
||||
throw new Error("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/body-with-file-schema', 'PUT',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testBodyWithQueryParams operation.
|
||||
* @callback module:api/FakeApi~testBodyWithQueryParamsCallback
|
||||
|
||||
@@ -408,5 +408,61 @@ export default class PetApi {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the uploadFileWithRequiredFile operation.
|
||||
* @callback module:api/PetApi~uploadFileWithRequiredFileCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/ApiResponse} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
* @param {Number} petId ID of pet to update
|
||||
* @param {File} requiredFile file to upload
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} opts.additionalMetadata Additional data to pass to server
|
||||
* @param {module:api/PetApi~uploadFileWithRequiredFileCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/ApiResponse}
|
||||
*/
|
||||
uploadFileWithRequiredFile(petId, requiredFile, opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId === undefined || petId === null) {
|
||||
throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// verify the required parameter 'requiredFile' is set
|
||||
if (requiredFile === undefined || requiredFile === null) {
|
||||
throw new Error("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
'petId': petId
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
'additionalMetadata': opts['additionalMetadata'],
|
||||
'requiredFile': requiredFile
|
||||
};
|
||||
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = ['multipart/form-data'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = ApiResponse;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/{petId}/uploadImageWithRequiredFile', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -29,6 +29,8 @@ import Dog from './model/Dog';
|
||||
import EnumArrays from './model/EnumArrays';
|
||||
import EnumClass from './model/EnumClass';
|
||||
import EnumTest from './model/EnumTest';
|
||||
import File from './model/File';
|
||||
import FileSchemaTestClass from './model/FileSchemaTestClass';
|
||||
import FormatTest from './model/FormatTest';
|
||||
import HasOnlyReadOnly from './model/HasOnlyReadOnly';
|
||||
import List from './model/List';
|
||||
@@ -44,6 +46,7 @@ import OuterEnum from './model/OuterEnum';
|
||||
import Pet from './model/Pet';
|
||||
import ReadOnlyFirst from './model/ReadOnlyFirst';
|
||||
import SpecialModelName from './model/SpecialModelName';
|
||||
import StringBooleanMap from './model/StringBooleanMap';
|
||||
import Tag from './model/Tag';
|
||||
import User from './model/User';
|
||||
import AnotherFakeApi from './api/AnotherFakeApi';
|
||||
@@ -188,6 +191,18 @@ export {
|
||||
*/
|
||||
EnumTest,
|
||||
|
||||
/**
|
||||
* The File model constructor.
|
||||
* @property {module:model/File}
|
||||
*/
|
||||
File,
|
||||
|
||||
/**
|
||||
* The FileSchemaTestClass model constructor.
|
||||
* @property {module:model/FileSchemaTestClass}
|
||||
*/
|
||||
FileSchemaTestClass,
|
||||
|
||||
/**
|
||||
* The FormatTest model constructor.
|
||||
* @property {module:model/FormatTest}
|
||||
@@ -278,6 +293,12 @@ export {
|
||||
*/
|
||||
SpecialModelName,
|
||||
|
||||
/**
|
||||
* The StringBooleanMap model constructor.
|
||||
* @property {module:model/StringBooleanMap}
|
||||
*/
|
||||
StringBooleanMap,
|
||||
|
||||
/**
|
||||
* The Tag model constructor.
|
||||
* @property {module:model/Tag}
|
||||
|
||||
73
samples/client/petstore/javascript-es6/src/model/File.js
Normal file
73
samples/client/petstore/javascript-es6/src/model/File.js
Normal file
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The File model module.
|
||||
* @module model/File
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class File {
|
||||
/**
|
||||
* Constructs a new <code>File</code>.
|
||||
* Must be named `File` for test.
|
||||
* @alias module:model/File
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
File.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>File</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/File} obj Optional instance to populate.
|
||||
* @return {module:model/File} The populated <code>File</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new File();
|
||||
|
||||
if (data.hasOwnProperty('sourceURI')) {
|
||||
obj['sourceURI'] = ApiClient.convertToType(data['sourceURI'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test capitalization
|
||||
* @member {String} sourceURI
|
||||
*/
|
||||
File.prototype['sourceURI'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default File;
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The FileSchemaTestClass model module.
|
||||
* @module model/FileSchemaTestClass
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class FileSchemaTestClass {
|
||||
/**
|
||||
* Constructs a new <code>FileSchemaTestClass</code>.
|
||||
* @alias module:model/FileSchemaTestClass
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
FileSchemaTestClass.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>FileSchemaTestClass</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/FileSchemaTestClass} obj Optional instance to populate.
|
||||
* @return {module:model/FileSchemaTestClass} The populated <code>FileSchemaTestClass</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new FileSchemaTestClass();
|
||||
|
||||
if (data.hasOwnProperty('file')) {
|
||||
obj['file'] = File.constructFromObject(data['file']);
|
||||
}
|
||||
if (data.hasOwnProperty('files')) {
|
||||
obj['files'] = ApiClient.convertToType(data['files'], [File]);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {File} file
|
||||
*/
|
||||
FileSchemaTestClass.prototype['file'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Array.<File>} files
|
||||
*/
|
||||
FileSchemaTestClass.prototype['files'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default FileSchemaTestClass;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
import StringBooleanMap from './StringBooleanMap';
|
||||
|
||||
/**
|
||||
* The MapTest model module.
|
||||
@@ -53,6 +54,12 @@ class MapTest {
|
||||
if (data.hasOwnProperty('map_of_enum_string')) {
|
||||
obj['map_of_enum_string'] = ApiClient.convertToType(data['map_of_enum_string'], {'String': 'String'});
|
||||
}
|
||||
if (data.hasOwnProperty('direct_map')) {
|
||||
obj['direct_map'] = ApiClient.convertToType(data['direct_map'], {'String': 'Boolean'});
|
||||
}
|
||||
if (data.hasOwnProperty('indirect_map')) {
|
||||
obj['indirect_map'] = StringBooleanMap.constructFromObject(data['indirect_map']);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
@@ -70,6 +77,16 @@ MapTest.prototype['map_map_of_string'] = undefined;
|
||||
*/
|
||||
MapTest.prototype['map_of_enum_string'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Object.<String, Boolean>} direct_map
|
||||
*/
|
||||
MapTest.prototype['direct_map'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {module:model/StringBooleanMap} indirect_map
|
||||
*/
|
||||
MapTest.prototype['indirect_map'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -48,13 +48,13 @@ class OuterComposite {
|
||||
obj = obj || new OuterComposite();
|
||||
|
||||
if (data.hasOwnProperty('my_number')) {
|
||||
obj['my_number'] = 'Number'.constructFromObject(data['my_number']);
|
||||
obj['my_number'] = ApiClient.convertToType(data['my_number'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('my_string')) {
|
||||
obj['my_string'] = 'String'.constructFromObject(data['my_string']);
|
||||
obj['my_string'] = ApiClient.convertToType(data['my_string'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('my_boolean')) {
|
||||
obj['my_boolean'] = 'Boolean'.constructFromObject(data['my_boolean']);
|
||||
obj['my_boolean'] = ApiClient.convertToType(data['my_boolean'], 'Boolean');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The StringBooleanMap model module.
|
||||
* @module model/StringBooleanMap
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class StringBooleanMap {
|
||||
/**
|
||||
* Constructs a new <code>StringBooleanMap</code>.
|
||||
* @alias module:model/StringBooleanMap
|
||||
* @extends Object
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
StringBooleanMap.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>StringBooleanMap</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/StringBooleanMap} obj Optional instance to populate.
|
||||
* @return {module:model/StringBooleanMap} The populated <code>StringBooleanMap</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new StringBooleanMap();
|
||||
|
||||
ApiClient.constructFromObject(data, obj, 'Boolean');
|
||||
|
||||
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default StringBooleanMap;
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.OpenApiPetstore);
|
||||
}
|
||||
}(this, function(expect, OpenApiPetstore) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new OpenApiPetstore.File();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('File', function() {
|
||||
it('should create an instance of File', function() {
|
||||
// uncomment below and update the code to test File
|
||||
//var instane = new OpenApiPetstore.File();
|
||||
//expect(instance).to.be.a(OpenApiPetstore.File);
|
||||
});
|
||||
|
||||
it('should have the property sourceURI (base name: "sourceURI")', function() {
|
||||
// uncomment below and update the code to test the property sourceURI
|
||||
//var instane = new OpenApiPetstore.File();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.OpenApiPetstore);
|
||||
}
|
||||
}(this, function(expect, OpenApiPetstore) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new OpenApiPetstore.FileSchemaTestClass();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('FileSchemaTestClass', function() {
|
||||
it('should create an instance of FileSchemaTestClass', function() {
|
||||
// uncomment below and update the code to test FileSchemaTestClass
|
||||
//var instane = new OpenApiPetstore.FileSchemaTestClass();
|
||||
//expect(instance).to.be.a(OpenApiPetstore.FileSchemaTestClass);
|
||||
});
|
||||
|
||||
it('should have the property file (base name: "file")', function() {
|
||||
// uncomment below and update the code to test the property file
|
||||
//var instane = new OpenApiPetstore.FileSchemaTestClass();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property files (base name: "files")', function() {
|
||||
// uncomment below and update the code to test the property files
|
||||
//var instane = new OpenApiPetstore.FileSchemaTestClass();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.OpenApiPetstore);
|
||||
}
|
||||
}(this, function(expect, OpenApiPetstore) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new OpenApiPetstore.StringBooleanMap();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('StringBooleanMap', function() {
|
||||
it('should create an instance of StringBooleanMap', function() {
|
||||
// uncomment below and update the code to test StringBooleanMap
|
||||
//var instane = new OpenApiPetstore.StringBooleanMap();
|
||||
//expect(instance).to.be.a(OpenApiPetstore.StringBooleanMap);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
@@ -1 +1 @@
|
||||
3.0.2-SNAPSHOT
|
||||
3.2.1-SNAPSHOT
|
||||
@@ -73,7 +73,7 @@ var OpenApiPetstore = require('open_api_petstore');
|
||||
|
||||
var api = new OpenApiPetstore.AnotherFakeApi()
|
||||
var client = new OpenApiPetstore.Client(); // {Client} client model
|
||||
api.testSpecialTags(client).then(function(data) {
|
||||
api.call123testSpecialTags(client).then(function(data) {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}, function(error) {
|
||||
console.error(error);
|
||||
@@ -88,11 +88,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*OpenApiPetstore.AnotherFakeApi* | [**testSpecialTags**](docs/AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
*OpenApiPetstore.AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
*OpenApiPetstore.FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
|
||||
*OpenApiPetstore.FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
|
||||
*OpenApiPetstore.FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
*OpenApiPetstore.FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
*OpenApiPetstore.FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
*OpenApiPetstore.FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
*OpenApiPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
*OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@@ -108,6 +109,7 @@ Class | Method | HTTP request | Description
|
||||
*OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
*OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
*OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||
*OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||
@@ -140,6 +142,8 @@ Class | Method | HTTP request | Description
|
||||
- [OpenApiPetstore.EnumArrays](docs/EnumArrays.md)
|
||||
- [OpenApiPetstore.EnumClass](docs/EnumClass.md)
|
||||
- [OpenApiPetstore.EnumTest](docs/EnumTest.md)
|
||||
- [OpenApiPetstore.File](docs/File.md)
|
||||
- [OpenApiPetstore.FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||
- [OpenApiPetstore.FormatTest](docs/FormatTest.md)
|
||||
- [OpenApiPetstore.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [OpenApiPetstore.List](docs/List.md)
|
||||
@@ -155,6 +159,7 @@ Class | Method | HTTP request | Description
|
||||
- [OpenApiPetstore.Pet](docs/Pet.md)
|
||||
- [OpenApiPetstore.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||
- [OpenApiPetstore.SpecialModelName](docs/SpecialModelName.md)
|
||||
- [OpenApiPetstore.StringBooleanMap](docs/StringBooleanMap.md)
|
||||
- [OpenApiPetstore.Tag](docs/Tag.md)
|
||||
- [OpenApiPetstore.User](docs/User.md)
|
||||
|
||||
|
||||
@@ -4,16 +4,16 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**testSpecialTags**](AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
|
||||
|
||||
<a name="testSpecialTags"></a>
|
||||
# **testSpecialTags**
|
||||
> Client testSpecialTags(client)
|
||||
<a name="call123testSpecialTags"></a>
|
||||
# **call123testSpecialTags**
|
||||
> Client call123testSpecialTags(client)
|
||||
|
||||
To test special tags
|
||||
|
||||
To test special tags
|
||||
To test special tags and operation ID starting with number
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
@@ -21,7 +21,7 @@ import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.AnotherFakeApi();
|
||||
let client = new OpenApiPetstore.Client(); // Client | client model
|
||||
apiInstance.testSpecialTags(client).then((data) => {
|
||||
apiInstance.call123testSpecialTags(client).then((data) => {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}, (error) => {
|
||||
console.error(error);
|
||||
|
||||
@@ -8,6 +8,7 @@ Method | HTTP request | Description
|
||||
[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
|
||||
[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@@ -188,6 +189,47 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="testBodyWithFileSchema"></a>
|
||||
# **testBodyWithFileSchema**
|
||||
> testBodyWithFileSchema(fileSchemaTestClass)
|
||||
|
||||
|
||||
|
||||
For this test, the body for this request much reference a schema named `File`.
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.FakeApi();
|
||||
let fileSchemaTestClass = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass |
|
||||
apiInstance.testBodyWithFileSchema(fileSchemaTestClass).then(() => {
|
||||
console.log('API called successfully.');
|
||||
}, (error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testBodyWithQueryParams"></a>
|
||||
# **testBodyWithQueryParams**
|
||||
> testBodyWithQueryParams(query, user)
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# OpenApiPetstore.File
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**sourceURI** | **String** | Test capitalization | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.FileSchemaTestClass
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**file** | **File** | | [optional]
|
||||
**files** | **[File]** | | [optional]
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**mapMapOfString** | **{String: {String: String}}** | | [optional]
|
||||
**mapOfEnumString** | **{String: String}** | | [optional]
|
||||
**directMap** | **{String: Boolean}** | | [optional]
|
||||
**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
|
||||
|
||||
|
||||
<a name="{String: String}"></a>
|
||||
|
||||
@@ -12,6 +12,7 @@ Method | HTTP request | Description
|
||||
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
|
||||
|
||||
<a name="addPet"></a>
|
||||
@@ -390,3 +391,53 @@ Name | Type | Description | Notes
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, opts)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
import OpenApiPetstore from 'open_api_petstore';
|
||||
let defaultClient = OpenApiPetstore.ApiClient.instance;
|
||||
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
let petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
let apiInstance = new OpenApiPetstore.PetApi();
|
||||
let petId = 789; // Number | ID of pet to update
|
||||
let requiredFile = "/path/to/file"; // File | file to upload
|
||||
let opts = {
|
||||
'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server
|
||||
};
|
||||
apiInstance.uploadFileWithRequiredFile(petId, requiredFile, opts).then((data) => {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}, (error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Number**| ID of pet to update |
|
||||
**requiredFile** | **File**| file to upload |
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# OpenApiPetstore.StringBooleanMap
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"dependencies": {
|
||||
"babel": "^6.23.0",
|
||||
"babel-cli": "^6.26.0",
|
||||
"superagent": "3.5.2"
|
||||
"superagent": "3.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "6.26.0",
|
||||
|
||||
@@ -37,16 +37,16 @@ export default class AnotherFakeApi {
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param {module:model/Client} client client model
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Client} and HTTP response
|
||||
*/
|
||||
testSpecialTagsWithHttpInfo(client) {
|
||||
call123testSpecialTagsWithHttpInfo(client) {
|
||||
let postBody = client;
|
||||
|
||||
// verify the required parameter 'client' is set
|
||||
if (client === undefined || client === null) {
|
||||
throw new Error("Missing the required parameter 'client' when calling testSpecialTags");
|
||||
throw new Error("Missing the required parameter 'client' when calling call123testSpecialTags");
|
||||
}
|
||||
|
||||
|
||||
@@ -73,12 +73,12 @@ export default class AnotherFakeApi {
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param {module:model/Client} client client model
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Client}
|
||||
*/
|
||||
testSpecialTags(client) {
|
||||
return this.testSpecialTagsWithHttpInfo(client)
|
||||
call123testSpecialTags(client) {
|
||||
return this.call123testSpecialTagsWithHttpInfo(client)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import Client from '../model/Client';
|
||||
import FileSchemaTestClass from '../model/FileSchemaTestClass';
|
||||
import OuterComposite from '../model/OuterComposite';
|
||||
import User from '../model/User';
|
||||
|
||||
@@ -221,6 +222,54 @@ export default class FakeApi {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
* @param {module:model/FileSchemaTestClass} fileSchemaTestClass
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass) {
|
||||
let postBody = fileSchemaTestClass;
|
||||
|
||||
// verify the required parameter 'fileSchemaTestClass' is set
|
||||
if (fileSchemaTestClass === undefined || fileSchemaTestClass === null) {
|
||||
throw new Error("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/body-with-file-schema', 'PUT',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
* @param {module:model/FileSchemaTestClass} fileSchemaTestClass
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
testBodyWithFileSchema(fileSchemaTestClass) {
|
||||
return this.testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param {String} query
|
||||
* @param {module:model/User} user
|
||||
|
||||
@@ -456,4 +456,67 @@ export default class PetApi {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
* @param {Number} petId ID of pet to update
|
||||
* @param {File} requiredFile file to upload
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} opts.additionalMetadata Additional data to pass to server
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiResponse} and HTTP response
|
||||
*/
|
||||
uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, opts) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId === undefined || petId === null) {
|
||||
throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// verify the required parameter 'requiredFile' is set
|
||||
if (requiredFile === undefined || requiredFile === null) {
|
||||
throw new Error("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
'petId': petId
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
'additionalMetadata': opts['additionalMetadata'],
|
||||
'requiredFile': requiredFile
|
||||
};
|
||||
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = ['multipart/form-data'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = ApiResponse;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/{petId}/uploadImageWithRequiredFile', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
* @param {Number} petId ID of pet to update
|
||||
* @param {File} requiredFile file to upload
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} opts.additionalMetadata Additional data to pass to server
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiResponse}
|
||||
*/
|
||||
uploadFileWithRequiredFile(petId, requiredFile, opts) {
|
||||
return this.uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, opts)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -29,6 +29,8 @@ import Dog from './model/Dog';
|
||||
import EnumArrays from './model/EnumArrays';
|
||||
import EnumClass from './model/EnumClass';
|
||||
import EnumTest from './model/EnumTest';
|
||||
import File from './model/File';
|
||||
import FileSchemaTestClass from './model/FileSchemaTestClass';
|
||||
import FormatTest from './model/FormatTest';
|
||||
import HasOnlyReadOnly from './model/HasOnlyReadOnly';
|
||||
import List from './model/List';
|
||||
@@ -44,6 +46,7 @@ import OuterEnum from './model/OuterEnum';
|
||||
import Pet from './model/Pet';
|
||||
import ReadOnlyFirst from './model/ReadOnlyFirst';
|
||||
import SpecialModelName from './model/SpecialModelName';
|
||||
import StringBooleanMap from './model/StringBooleanMap';
|
||||
import Tag from './model/Tag';
|
||||
import User from './model/User';
|
||||
import AnotherFakeApi from './api/AnotherFakeApi';
|
||||
@@ -188,6 +191,18 @@ export {
|
||||
*/
|
||||
EnumTest,
|
||||
|
||||
/**
|
||||
* The File model constructor.
|
||||
* @property {module:model/File}
|
||||
*/
|
||||
File,
|
||||
|
||||
/**
|
||||
* The FileSchemaTestClass model constructor.
|
||||
* @property {module:model/FileSchemaTestClass}
|
||||
*/
|
||||
FileSchemaTestClass,
|
||||
|
||||
/**
|
||||
* The FormatTest model constructor.
|
||||
* @property {module:model/FormatTest}
|
||||
@@ -278,6 +293,12 @@ export {
|
||||
*/
|
||||
SpecialModelName,
|
||||
|
||||
/**
|
||||
* The StringBooleanMap model constructor.
|
||||
* @property {module:model/StringBooleanMap}
|
||||
*/
|
||||
StringBooleanMap,
|
||||
|
||||
/**
|
||||
* The Tag model constructor.
|
||||
* @property {module:model/Tag}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The File model module.
|
||||
* @module model/File
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class File {
|
||||
/**
|
||||
* Constructs a new <code>File</code>.
|
||||
* Must be named `File` for test.
|
||||
* @alias module:model/File
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
File.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>File</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/File} obj Optional instance to populate.
|
||||
* @return {module:model/File} The populated <code>File</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new File();
|
||||
|
||||
if (data.hasOwnProperty('sourceURI')) {
|
||||
obj['sourceURI'] = ApiClient.convertToType(data['sourceURI'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test capitalization
|
||||
* @member {String} sourceURI
|
||||
*/
|
||||
File.prototype['sourceURI'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default File;
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The FileSchemaTestClass model module.
|
||||
* @module model/FileSchemaTestClass
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class FileSchemaTestClass {
|
||||
/**
|
||||
* Constructs a new <code>FileSchemaTestClass</code>.
|
||||
* @alias module:model/FileSchemaTestClass
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
FileSchemaTestClass.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>FileSchemaTestClass</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/FileSchemaTestClass} obj Optional instance to populate.
|
||||
* @return {module:model/FileSchemaTestClass} The populated <code>FileSchemaTestClass</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new FileSchemaTestClass();
|
||||
|
||||
if (data.hasOwnProperty('file')) {
|
||||
obj['file'] = File.constructFromObject(data['file']);
|
||||
}
|
||||
if (data.hasOwnProperty('files')) {
|
||||
obj['files'] = ApiClient.convertToType(data['files'], [File]);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {File} file
|
||||
*/
|
||||
FileSchemaTestClass.prototype['file'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Array.<File>} files
|
||||
*/
|
||||
FileSchemaTestClass.prototype['files'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default FileSchemaTestClass;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
import StringBooleanMap from './StringBooleanMap';
|
||||
|
||||
/**
|
||||
* The MapTest model module.
|
||||
@@ -53,6 +54,12 @@ class MapTest {
|
||||
if (data.hasOwnProperty('map_of_enum_string')) {
|
||||
obj['map_of_enum_string'] = ApiClient.convertToType(data['map_of_enum_string'], {'String': 'String'});
|
||||
}
|
||||
if (data.hasOwnProperty('direct_map')) {
|
||||
obj['direct_map'] = ApiClient.convertToType(data['direct_map'], {'String': 'Boolean'});
|
||||
}
|
||||
if (data.hasOwnProperty('indirect_map')) {
|
||||
obj['indirect_map'] = StringBooleanMap.constructFromObject(data['indirect_map']);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
@@ -70,6 +77,16 @@ MapTest.prototype['map_map_of_string'] = undefined;
|
||||
*/
|
||||
MapTest.prototype['map_of_enum_string'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {Object.<String, Boolean>} direct_map
|
||||
*/
|
||||
MapTest.prototype['direct_map'] = undefined;
|
||||
|
||||
/**
|
||||
* @member {module:model/StringBooleanMap} indirect_map
|
||||
*/
|
||||
MapTest.prototype['indirect_map'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -48,13 +48,13 @@ class OuterComposite {
|
||||
obj = obj || new OuterComposite();
|
||||
|
||||
if (data.hasOwnProperty('my_number')) {
|
||||
obj['my_number'] = 'Number'.constructFromObject(data['my_number']);
|
||||
obj['my_number'] = ApiClient.convertToType(data['my_number'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('my_string')) {
|
||||
obj['my_string'] = 'String'.constructFromObject(data['my_string']);
|
||||
obj['my_string'] = ApiClient.convertToType(data['my_string'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('my_boolean')) {
|
||||
obj['my_boolean'] = 'Boolean'.constructFromObject(data['my_boolean']);
|
||||
obj['my_boolean'] = ApiClient.convertToType(data['my_boolean'], 'Boolean');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
import ApiClient from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The StringBooleanMap model module.
|
||||
* @module model/StringBooleanMap
|
||||
* @version 1.0.0
|
||||
*/
|
||||
class StringBooleanMap {
|
||||
/**
|
||||
* Constructs a new <code>StringBooleanMap</code>.
|
||||
* @alias module:model/StringBooleanMap
|
||||
* @extends Object
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
StringBooleanMap.initialize(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the fields of this object.
|
||||
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||||
* Only for internal use.
|
||||
*/
|
||||
static initialize(obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>StringBooleanMap</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/StringBooleanMap} obj Optional instance to populate.
|
||||
* @return {module:model/StringBooleanMap} The populated <code>StringBooleanMap</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new StringBooleanMap();
|
||||
|
||||
ApiClient.constructFromObject(data, obj, 'Boolean');
|
||||
|
||||
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default StringBooleanMap;
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.OpenApiPetstore);
|
||||
}
|
||||
}(this, function(expect, OpenApiPetstore) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new OpenApiPetstore.File();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('File', function() {
|
||||
it('should create an instance of File', function() {
|
||||
// uncomment below and update the code to test File
|
||||
//var instane = new OpenApiPetstore.File();
|
||||
//expect(instance).to.be.a(OpenApiPetstore.File);
|
||||
});
|
||||
|
||||
it('should have the property sourceURI (base name: "sourceURI")', function() {
|
||||
// uncomment below and update the code to test the property sourceURI
|
||||
//var instane = new OpenApiPetstore.File();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.OpenApiPetstore);
|
||||
}
|
||||
}(this, function(expect, OpenApiPetstore) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new OpenApiPetstore.FileSchemaTestClass();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('FileSchemaTestClass', function() {
|
||||
it('should create an instance of FileSchemaTestClass', function() {
|
||||
// uncomment below and update the code to test FileSchemaTestClass
|
||||
//var instane = new OpenApiPetstore.FileSchemaTestClass();
|
||||
//expect(instance).to.be.a(OpenApiPetstore.FileSchemaTestClass);
|
||||
});
|
||||
|
||||
it('should have the property file (base name: "file")', function() {
|
||||
// uncomment below and update the code to test the property file
|
||||
//var instane = new OpenApiPetstore.FileSchemaTestClass();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property files (base name: "files")', function() {
|
||||
// uncomment below and update the code to test the property files
|
||||
//var instane = new OpenApiPetstore.FileSchemaTestClass();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.OpenApiPetstore);
|
||||
}
|
||||
}(this, function(expect, OpenApiPetstore) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new OpenApiPetstore.StringBooleanMap();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('StringBooleanMap', function() {
|
||||
it('should create an instance of StringBooleanMap', function() {
|
||||
// uncomment below and update the code to test StringBooleanMap
|
||||
//var instane = new OpenApiPetstore.StringBooleanMap();
|
||||
//expect(instance).to.be.a(OpenApiPetstore.StringBooleanMap);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
@@ -1 +1 @@
|
||||
3.0.2-SNAPSHOT
|
||||
3.2.1-SNAPSHOT
|
||||
@@ -97,7 +97,7 @@ var OpenApiPetstore = require('open_api_petstore');
|
||||
|
||||
var api = new OpenApiPetstore.AnotherFakeApi()
|
||||
var client = new OpenApiPetstore.Client(); // {Client} client model
|
||||
api.testSpecialTags(client).then(function(data) {
|
||||
api.call123testSpecialTags(client).then(function(data) {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}, function(error) {
|
||||
console.error(error);
|
||||
@@ -112,11 +112,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*OpenApiPetstore.AnotherFakeApi* | [**testSpecialTags**](docs/AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
*OpenApiPetstore.AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
*OpenApiPetstore.FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
|
||||
*OpenApiPetstore.FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
|
||||
*OpenApiPetstore.FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
*OpenApiPetstore.FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
*OpenApiPetstore.FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
*OpenApiPetstore.FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
*OpenApiPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
*OpenApiPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@@ -132,6 +133,7 @@ Class | Method | HTTP request | Description
|
||||
*OpenApiPetstore.PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
*OpenApiPetstore.PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*OpenApiPetstore.PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
*OpenApiPetstore.PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
*OpenApiPetstore.StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||
*OpenApiPetstore.StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*OpenApiPetstore.StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||
@@ -164,6 +166,8 @@ Class | Method | HTTP request | Description
|
||||
- [OpenApiPetstore.EnumArrays](docs/EnumArrays.md)
|
||||
- [OpenApiPetstore.EnumClass](docs/EnumClass.md)
|
||||
- [OpenApiPetstore.EnumTest](docs/EnumTest.md)
|
||||
- [OpenApiPetstore.File](docs/File.md)
|
||||
- [OpenApiPetstore.FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||
- [OpenApiPetstore.FormatTest](docs/FormatTest.md)
|
||||
- [OpenApiPetstore.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [OpenApiPetstore.List](docs/List.md)
|
||||
@@ -179,6 +183,7 @@ Class | Method | HTTP request | Description
|
||||
- [OpenApiPetstore.Pet](docs/Pet.md)
|
||||
- [OpenApiPetstore.ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||
- [OpenApiPetstore.SpecialModelName](docs/SpecialModelName.md)
|
||||
- [OpenApiPetstore.StringBooleanMap](docs/StringBooleanMap.md)
|
||||
- [OpenApiPetstore.Tag](docs/Tag.md)
|
||||
- [OpenApiPetstore.User](docs/User.md)
|
||||
|
||||
|
||||
@@ -4,16 +4,16 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**testSpecialTags**](AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
|
||||
|
||||
<a name="testSpecialTags"></a>
|
||||
# **testSpecialTags**
|
||||
> Client testSpecialTags(client)
|
||||
<a name="call123testSpecialTags"></a>
|
||||
# **call123testSpecialTags**
|
||||
> Client call123testSpecialTags(client)
|
||||
|
||||
To test special tags
|
||||
|
||||
To test special tags
|
||||
To test special tags and operation ID starting with number
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
@@ -21,7 +21,7 @@ var OpenApiPetstore = require('open_api_petstore');
|
||||
|
||||
var apiInstance = new OpenApiPetstore.AnotherFakeApi();
|
||||
var client = new OpenApiPetstore.Client(); // Client | client model
|
||||
apiInstance.testSpecialTags(client).then(function(data) {
|
||||
apiInstance.call123testSpecialTags(client).then(function(data) {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}, function(error) {
|
||||
console.error(error);
|
||||
|
||||
@@ -8,6 +8,7 @@ Method | HTTP request | Description
|
||||
[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
|
||||
[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@@ -188,6 +189,47 @@ No authorization required
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="testBodyWithFileSchema"></a>
|
||||
# **testBodyWithFileSchema**
|
||||
> testBodyWithFileSchema(fileSchemaTestClass)
|
||||
|
||||
|
||||
|
||||
For this test, the body for this request much reference a schema named `File`.
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
var OpenApiPetstore = require('open_api_petstore');
|
||||
|
||||
var apiInstance = new OpenApiPetstore.FakeApi();
|
||||
var fileSchemaTestClass = new OpenApiPetstore.FileSchemaTestClass(); // FileSchemaTestClass |
|
||||
apiInstance.testBodyWithFileSchema(fileSchemaTestClass).then(function() {
|
||||
console.log('API called successfully.');
|
||||
}, function(error) {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testBodyWithQueryParams"></a>
|
||||
# **testBodyWithQueryParams**
|
||||
> testBodyWithQueryParams(query, user)
|
||||
|
||||
8
samples/client/petstore/javascript-promise/docs/File.md
Normal file
8
samples/client/petstore/javascript-promise/docs/File.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# OpenApiPetstore.File
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**sourceURI** | **String** | Test capitalization | [optional]
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# OpenApiPetstore.FileSchemaTestClass
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**file** | **File** | | [optional]
|
||||
**files** | **[File]** | | [optional]
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**mapMapOfString** | **{String: {String: String}}** | | [optional]
|
||||
**mapOfEnumString** | **{String: String}** | | [optional]
|
||||
**directMap** | **{String: Boolean}** | | [optional]
|
||||
**indirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
|
||||
|
||||
|
||||
<a name="{String: String}"></a>
|
||||
|
||||
@@ -12,6 +12,7 @@ Method | HTTP request | Description
|
||||
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
|
||||
|
||||
<a name="addPet"></a>
|
||||
@@ -382,3 +383,52 @@ Name | Type | Description | Notes
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, opts)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
### Example
|
||||
```javascript
|
||||
var OpenApiPetstore = require('open_api_petstore');
|
||||
var defaultClient = OpenApiPetstore.ApiClient.instance;
|
||||
// Configure OAuth2 access token for authorization: petstore_auth
|
||||
var petstore_auth = defaultClient.authentications['petstore_auth'];
|
||||
petstore_auth.accessToken = 'YOUR ACCESS TOKEN';
|
||||
|
||||
var apiInstance = new OpenApiPetstore.PetApi();
|
||||
var petId = 789; // Number | ID of pet to update
|
||||
var requiredFile = "/path/to/file"; // File | file to upload
|
||||
var opts = {
|
||||
'additionalMetadata': "additionalMetadata_example" // String | Additional data to pass to server
|
||||
};
|
||||
apiInstance.uploadFileWithRequiredFile(petId, requiredFile, opts).then(function(data) {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}, function(error) {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Number**| ID of pet to update |
|
||||
**requiredFile** | **File**| file to upload |
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# OpenApiPetstore.StringBooleanMap
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"fs": false
|
||||
},
|
||||
"dependencies": {
|
||||
"superagent": "3.5.2"
|
||||
"superagent": "3.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "~2.3.4",
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
@@ -50,16 +50,16 @@
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param {module:model/Client} client client model
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Client} and HTTP response
|
||||
*/
|
||||
this.testSpecialTagsWithHttpInfo = function(client) {
|
||||
this.call123testSpecialTagsWithHttpInfo = function(client) {
|
||||
var postBody = client;
|
||||
|
||||
// verify the required parameter 'client' is set
|
||||
if (client === undefined || client === null) {
|
||||
throw new Error("Missing the required parameter 'client' when calling testSpecialTags");
|
||||
throw new Error("Missing the required parameter 'client' when calling call123testSpecialTags");
|
||||
}
|
||||
|
||||
|
||||
@@ -88,12 +88,12 @@
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param {module:model/Client} client client model
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Client}
|
||||
*/
|
||||
this.testSpecialTags = function(client) {
|
||||
return this.testSpecialTagsWithHttpInfo(client)
|
||||
this.call123testSpecialTags = function(client) {
|
||||
return this.call123testSpecialTagsWithHttpInfo(client)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
@@ -16,18 +16,18 @@
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['ApiClient', 'model/Client', 'model/OuterComposite', 'model/User'], factory);
|
||||
define(['ApiClient', 'model/Client', 'model/FileSchemaTestClass', 'model/OuterComposite', 'model/User'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('../ApiClient'), require('../model/Client'), require('../model/OuterComposite'), require('../model/User'));
|
||||
module.exports = factory(require('../ApiClient'), require('../model/Client'), require('../model/FileSchemaTestClass'), require('../model/OuterComposite'), require('../model/User'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
if (!root.OpenApiPetstore) {
|
||||
root.OpenApiPetstore = {};
|
||||
}
|
||||
root.OpenApiPetstore.FakeApi = factory(root.OpenApiPetstore.ApiClient, root.OpenApiPetstore.Client, root.OpenApiPetstore.OuterComposite, root.OpenApiPetstore.User);
|
||||
root.OpenApiPetstore.FakeApi = factory(root.OpenApiPetstore.ApiClient, root.OpenApiPetstore.Client, root.OpenApiPetstore.FileSchemaTestClass, root.OpenApiPetstore.OuterComposite, root.OpenApiPetstore.User);
|
||||
}
|
||||
}(this, function(ApiClient, Client, OuterComposite, User) {
|
||||
}(this, function(ApiClient, Client, FileSchemaTestClass, OuterComposite, User) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
@@ -240,6 +240,56 @@
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
* @param {module:model/FileSchemaTestClass} fileSchemaTestClass
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
this.testBodyWithFileSchemaWithHttpInfo = function(fileSchemaTestClass) {
|
||||
var postBody = fileSchemaTestClass;
|
||||
|
||||
// verify the required parameter 'fileSchemaTestClass' is set
|
||||
if (fileSchemaTestClass === undefined || fileSchemaTestClass === null) {
|
||||
throw new Error("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = ['application/json'];
|
||||
var accepts = [];
|
||||
var returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/body-with-file-schema', 'PUT',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
* @param {module:model/FileSchemaTestClass} fileSchemaTestClass
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
this.testBodyWithFileSchema = function(fileSchemaTestClass) {
|
||||
return this.testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param {String} query
|
||||
* @param {module:model/User} user
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
@@ -488,6 +488,71 @@
|
||||
return response_and_data.data;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
* @param {Number} petId ID of pet to update
|
||||
* @param {File} requiredFile file to upload
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} opts.additionalMetadata Additional data to pass to server
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiResponse} and HTTP response
|
||||
*/
|
||||
this.uploadFileWithRequiredFileWithHttpInfo = function(petId, requiredFile, opts) {
|
||||
opts = opts || {};
|
||||
var postBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId === undefined || petId === null) {
|
||||
throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// verify the required parameter 'requiredFile' is set
|
||||
if (requiredFile === undefined || requiredFile === null) {
|
||||
throw new Error("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
|
||||
var pathParams = {
|
||||
'petId': petId
|
||||
};
|
||||
var queryParams = {
|
||||
};
|
||||
var collectionQueryParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
'additionalMetadata': opts['additionalMetadata'],
|
||||
'requiredFile': requiredFile
|
||||
};
|
||||
|
||||
var authNames = ['petstore_auth'];
|
||||
var contentTypes = ['multipart/form-data'];
|
||||
var accepts = ['application/json'];
|
||||
var returnType = ApiResponse;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/{petId}/uploadImageWithRequiredFile', 'POST',
|
||||
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
* @param {Number} petId ID of pet to update
|
||||
* @param {File} requiredFile file to upload
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} opts.additionalMetadata Additional data to pass to server
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiResponse}
|
||||
*/
|
||||
this.uploadFileWithRequiredFile = function(petId, requiredFile, opts) {
|
||||
return this.uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, opts)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return exports;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
@@ -16,12 +16,12 @@
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['ApiClient', 'model/AdditionalPropertiesClass', 'model/Animal', 'model/AnimalFarm', 'model/ApiResponse', 'model/ArrayOfArrayOfNumberOnly', 'model/ArrayOfNumberOnly', 'model/ArrayTest', 'model/Capitalization', 'model/Cat', 'model/Category', 'model/ClassModel', 'model/Client', 'model/Dog', 'model/EnumArrays', 'model/EnumClass', 'model/EnumTest', 'model/FormatTest', 'model/HasOnlyReadOnly', 'model/List', 'model/MapTest', 'model/MixedPropertiesAndAdditionalPropertiesClass', 'model/Model200Response', 'model/ModelReturn', 'model/Name', 'model/NumberOnly', 'model/Order', 'model/OuterComposite', 'model/OuterEnum', 'model/Pet', 'model/ReadOnlyFirst', 'model/SpecialModelName', 'model/Tag', 'model/User', 'api/AnotherFakeApi', 'api/FakeApi', 'api/FakeClassnameTags123Api', 'api/PetApi', 'api/StoreApi', 'api/UserApi'], factory);
|
||||
define(['ApiClient', 'model/AdditionalPropertiesClass', 'model/Animal', 'model/AnimalFarm', 'model/ApiResponse', 'model/ArrayOfArrayOfNumberOnly', 'model/ArrayOfNumberOnly', 'model/ArrayTest', 'model/Capitalization', 'model/Cat', 'model/Category', 'model/ClassModel', 'model/Client', 'model/Dog', 'model/EnumArrays', 'model/EnumClass', 'model/EnumTest', 'model/File', 'model/FileSchemaTestClass', 'model/FormatTest', 'model/HasOnlyReadOnly', 'model/List', 'model/MapTest', 'model/MixedPropertiesAndAdditionalPropertiesClass', 'model/Model200Response', 'model/ModelReturn', 'model/Name', 'model/NumberOnly', 'model/Order', 'model/OuterComposite', 'model/OuterEnum', 'model/Pet', 'model/ReadOnlyFirst', 'model/SpecialModelName', 'model/StringBooleanMap', 'model/Tag', 'model/User', 'api/AnotherFakeApi', 'api/FakeApi', 'api/FakeClassnameTags123Api', 'api/PetApi', 'api/StoreApi', 'api/UserApi'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('./ApiClient'), require('./model/AdditionalPropertiesClass'), require('./model/Animal'), require('./model/AnimalFarm'), require('./model/ApiResponse'), require('./model/ArrayOfArrayOfNumberOnly'), require('./model/ArrayOfNumberOnly'), require('./model/ArrayTest'), require('./model/Capitalization'), require('./model/Cat'), require('./model/Category'), require('./model/ClassModel'), require('./model/Client'), require('./model/Dog'), require('./model/EnumArrays'), require('./model/EnumClass'), require('./model/EnumTest'), require('./model/FormatTest'), require('./model/HasOnlyReadOnly'), require('./model/List'), require('./model/MapTest'), require('./model/MixedPropertiesAndAdditionalPropertiesClass'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/NumberOnly'), require('./model/Order'), require('./model/OuterComposite'), require('./model/OuterEnum'), require('./model/Pet'), require('./model/ReadOnlyFirst'), require('./model/SpecialModelName'), require('./model/Tag'), require('./model/User'), require('./api/AnotherFakeApi'), require('./api/FakeApi'), require('./api/FakeClassnameTags123Api'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
|
||||
module.exports = factory(require('./ApiClient'), require('./model/AdditionalPropertiesClass'), require('./model/Animal'), require('./model/AnimalFarm'), require('./model/ApiResponse'), require('./model/ArrayOfArrayOfNumberOnly'), require('./model/ArrayOfNumberOnly'), require('./model/ArrayTest'), require('./model/Capitalization'), require('./model/Cat'), require('./model/Category'), require('./model/ClassModel'), require('./model/Client'), require('./model/Dog'), require('./model/EnumArrays'), require('./model/EnumClass'), require('./model/EnumTest'), require('./model/File'), require('./model/FileSchemaTestClass'), require('./model/FormatTest'), require('./model/HasOnlyReadOnly'), require('./model/List'), require('./model/MapTest'), require('./model/MixedPropertiesAndAdditionalPropertiesClass'), require('./model/Model200Response'), require('./model/ModelReturn'), require('./model/Name'), require('./model/NumberOnly'), require('./model/Order'), require('./model/OuterComposite'), require('./model/OuterEnum'), require('./model/Pet'), require('./model/ReadOnlyFirst'), require('./model/SpecialModelName'), require('./model/StringBooleanMap'), require('./model/Tag'), require('./model/User'), require('./api/AnotherFakeApi'), require('./api/FakeApi'), require('./api/FakeClassnameTags123Api'), require('./api/PetApi'), require('./api/StoreApi'), require('./api/UserApi'));
|
||||
}
|
||||
}(function(ApiClient, AdditionalPropertiesClass, Animal, AnimalFarm, ApiResponse, ArrayOfArrayOfNumberOnly, ArrayOfNumberOnly, ArrayTest, Capitalization, Cat, Category, ClassModel, Client, Dog, EnumArrays, EnumClass, EnumTest, FormatTest, HasOnlyReadOnly, List, MapTest, MixedPropertiesAndAdditionalPropertiesClass, Model200Response, ModelReturn, Name, NumberOnly, Order, OuterComposite, OuterEnum, Pet, ReadOnlyFirst, SpecialModelName, Tag, User, AnotherFakeApi, FakeApi, FakeClassnameTags123Api, PetApi, StoreApi, UserApi) {
|
||||
}(function(ApiClient, AdditionalPropertiesClass, Animal, AnimalFarm, ApiResponse, ArrayOfArrayOfNumberOnly, ArrayOfNumberOnly, ArrayTest, Capitalization, Cat, Category, ClassModel, Client, Dog, EnumArrays, EnumClass, EnumTest, File, FileSchemaTestClass, FormatTest, HasOnlyReadOnly, List, MapTest, MixedPropertiesAndAdditionalPropertiesClass, Model200Response, ModelReturn, Name, NumberOnly, Order, OuterComposite, OuterEnum, Pet, ReadOnlyFirst, SpecialModelName, StringBooleanMap, Tag, User, AnotherFakeApi, FakeApi, FakeClassnameTags123Api, PetApi, StoreApi, UserApi) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
@@ -141,6 +141,16 @@
|
||||
* @property {module:model/EnumTest}
|
||||
*/
|
||||
EnumTest: EnumTest,
|
||||
/**
|
||||
* The File model constructor.
|
||||
* @property {module:model/File}
|
||||
*/
|
||||
File: File,
|
||||
/**
|
||||
* The FileSchemaTestClass model constructor.
|
||||
* @property {module:model/FileSchemaTestClass}
|
||||
*/
|
||||
FileSchemaTestClass: FileSchemaTestClass,
|
||||
/**
|
||||
* The FormatTest model constructor.
|
||||
* @property {module:model/FormatTest}
|
||||
@@ -216,6 +226,11 @@
|
||||
* @property {module:model/SpecialModelName}
|
||||
*/
|
||||
SpecialModelName: SpecialModelName,
|
||||
/**
|
||||
* The StringBooleanMap model constructor.
|
||||
* @property {module:model/StringBooleanMap}
|
||||
*/
|
||||
StringBooleanMap: StringBooleanMap,
|
||||
/**
|
||||
* The Tag model constructor.
|
||||
* @property {module:model/Tag}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
83
samples/client/petstore/javascript-promise/src/model/File.js
Normal file
83
samples/client/petstore/javascript-promise/src/model/File.js
Normal file
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['ApiClient'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('../ApiClient'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
if (!root.OpenApiPetstore) {
|
||||
root.OpenApiPetstore = {};
|
||||
}
|
||||
root.OpenApiPetstore.File = factory(root.OpenApiPetstore.ApiClient);
|
||||
}
|
||||
}(this, function(ApiClient) {
|
||||
'use strict';
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The File model module.
|
||||
* @module model/File
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructs a new <code>File</code>.
|
||||
* Must be named `File` for test.
|
||||
* @alias module:model/File
|
||||
* @class
|
||||
*/
|
||||
var exports = function() {
|
||||
var _this = this;
|
||||
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructs a <code>File</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/File} obj Optional instance to populate.
|
||||
* @return {module:model/File} The populated <code>File</code> instance.
|
||||
*/
|
||||
exports.constructFromObject = function(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new exports();
|
||||
|
||||
if (data.hasOwnProperty('sourceURI')) {
|
||||
obj['sourceURI'] = ApiClient.convertToType(data['sourceURI'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test capitalization
|
||||
* @member {String} sourceURI
|
||||
*/
|
||||
exports.prototype['sourceURI'] = undefined;
|
||||
|
||||
|
||||
|
||||
return exports;
|
||||
}));
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['ApiClient'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('../ApiClient'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
if (!root.OpenApiPetstore) {
|
||||
root.OpenApiPetstore = {};
|
||||
}
|
||||
root.OpenApiPetstore.FileSchemaTestClass = factory(root.OpenApiPetstore.ApiClient);
|
||||
}
|
||||
}(this, function(ApiClient) {
|
||||
'use strict';
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The FileSchemaTestClass model module.
|
||||
* @module model/FileSchemaTestClass
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Constructs a new <code>FileSchemaTestClass</code>.
|
||||
* @alias module:model/FileSchemaTestClass
|
||||
* @class
|
||||
*/
|
||||
var exports = function() {
|
||||
var _this = this;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructs a <code>FileSchemaTestClass</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @param {module:model/FileSchemaTestClass} obj Optional instance to populate.
|
||||
* @return {module:model/FileSchemaTestClass} The populated <code>FileSchemaTestClass</code> instance.
|
||||
*/
|
||||
exports.constructFromObject = function(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new exports();
|
||||
|
||||
if (data.hasOwnProperty('file')) {
|
||||
obj['file'] = File.constructFromObject(data['file']);
|
||||
}
|
||||
if (data.hasOwnProperty('files')) {
|
||||
obj['files'] = ApiClient.convertToType(data['files'], [File]);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @member {File} file
|
||||
*/
|
||||
exports.prototype['file'] = undefined;
|
||||
/**
|
||||
* @member {Array.<File>} files
|
||||
*/
|
||||
exports.prototype['files'] = undefined;
|
||||
|
||||
|
||||
|
||||
return exports;
|
||||
}));
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
@@ -16,18 +16,18 @@
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['ApiClient'], factory);
|
||||
define(['ApiClient', 'model/StringBooleanMap'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory(require('../ApiClient'));
|
||||
module.exports = factory(require('../ApiClient'), require('./StringBooleanMap'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
if (!root.OpenApiPetstore) {
|
||||
root.OpenApiPetstore = {};
|
||||
}
|
||||
root.OpenApiPetstore.MapTest = factory(root.OpenApiPetstore.ApiClient);
|
||||
root.OpenApiPetstore.MapTest = factory(root.OpenApiPetstore.ApiClient, root.OpenApiPetstore.StringBooleanMap);
|
||||
}
|
||||
}(this, function(ApiClient) {
|
||||
}(this, function(ApiClient, StringBooleanMap) {
|
||||
'use strict';
|
||||
|
||||
|
||||
@@ -49,6 +49,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -68,6 +70,12 @@
|
||||
if (data.hasOwnProperty('map_of_enum_string')) {
|
||||
obj['map_of_enum_string'] = ApiClient.convertToType(data['map_of_enum_string'], {'String': 'String'});
|
||||
}
|
||||
if (data.hasOwnProperty('direct_map')) {
|
||||
obj['direct_map'] = ApiClient.convertToType(data['direct_map'], {'String': 'Boolean'});
|
||||
}
|
||||
if (data.hasOwnProperty('indirect_map')) {
|
||||
obj['indirect_map'] = StringBooleanMap.constructFromObject(data['indirect_map']);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
@@ -80,6 +88,14 @@
|
||||
* @member {Object.<String, module:model/MapTest.InnerEnum>} map_of_enum_string
|
||||
*/
|
||||
exports.prototype['map_of_enum_string'] = undefined;
|
||||
/**
|
||||
* @member {Object.<String, Boolean>} direct_map
|
||||
*/
|
||||
exports.prototype['direct_map'] = undefined;
|
||||
/**
|
||||
* @member {module:model/StringBooleanMap} indirect_map
|
||||
*/
|
||||
exports.prototype['indirect_map'] = undefined;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
*
|
||||
* OpenAPI Generator version: 3.0.2-SNAPSHOT
|
||||
* OpenAPI Generator version: 3.2.1-SNAPSHOT
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user