forked from loafle/openapi-generator-original
Merge branch 'master' into javascript-auth
Conflicts: modules/swagger-codegen/src/main/resources/Javascript/ApiClient.mustache modules/swagger-codegen/src/main/resources/Javascript/api.mustache
This commit is contained in:
@@ -258,6 +258,8 @@
|
||||
request.accept(accept);
|
||||
}
|
||||
|
||||
|
||||
|
||||
request.end(function(error, response) {
|
||||
if (callback) {
|
||||
var data = null;
|
||||
@@ -269,6 +271,7 @@
|
||||
});
|
||||
|
||||
return request;
|
||||
|
||||
};
|
||||
|
||||
ApiClient.parseDate = function parseDate(str) {
|
||||
@@ -291,8 +294,7 @@
|
||||
default:
|
||||
if (typeof type === 'function') {
|
||||
// for model type like: User
|
||||
var model = new type();
|
||||
model.constructFromObject(data);
|
||||
var model = type.constructFromObject(data);
|
||||
return model;
|
||||
} else if (Array.isArray(type)) {
|
||||
// for array type like: ['String']
|
||||
|
||||
Reference in New Issue
Block a user