[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:
Akihito Nakano
2018-08-10 22:50:33 +09:00
committed by William Cheng
parent afdef8f890
commit 21777f2759
171 changed files with 3065 additions and 255 deletions

View 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 &#x60;File&#x60; 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;

View 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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;