Add Bearer authentication support to JS client (#2020)

* add bearer authentication support to js client

* add bearer format to js client

* fix test case

* update php ze-ph samples
This commit is contained in:
William Cheng
2019-01-31 15:27:24 +08:00
committed by GitHub
parent cbda3fad98
commit 6801741592
53 changed files with 2797 additions and 81 deletions

View File

@@ -17,6 +17,7 @@ import Client from '../model/Client';
import FileSchemaTestClass from '../model/FileSchemaTestClass';
import OuterComposite from '../model/OuterComposite';
import User from '../model/User';
import XmlItem from '../model/XmlItem';
/**
* Fake service.
@@ -37,6 +38,50 @@ export default class FakeApi {
}
/**
* Callback function to receive the result of the createXmlItem operation.
* @callback module:api/FakeApi~createXmlItemCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* creates an XmlItem
* this route creates an XmlItem
* @param {module:model/XmlItem} xmlItem XmlItem Body
* @param {module:api/FakeApi~createXmlItemCallback} callback The callback function, accepting three arguments: error, data, response
*/
createXmlItem(xmlItem, callback) {
let postBody = xmlItem;
// verify the required parameter 'xmlItem' is set
if (xmlItem === undefined || xmlItem === null) {
throw new Error("Missing the required parameter 'xmlItem' when calling createXmlItem");
}
let pathParams = {
};
let queryParams = {
};
let headerParams = {
};
let formParams = {
};
let authNames = [];
let contentTypes = ['application/xml', 'application/xml; charset=utf-8', 'application/xml; charset=utf-16', 'text/xml', 'text/xml; charset=utf-8', 'text/xml; charset=utf-16'];
let accepts = [];
let returnType = null;
return this.apiClient.callApi(
'/fake/create_xml_item', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the fakeOuterBooleanSerialize operation.
* @callback module:api/FakeApi~fakeOuterBooleanSerializeCallback