forked from loafle/openapi-generator-original
better code injection handling for js
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Swagger 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: \" \\
|
||||
* 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
|
||||
* Contact: apiteam@swagger.io
|
||||
@@ -56,6 +56,47 @@
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testCodeInjectEnd operation.
|
||||
* @callback module:api/FakeApi~testCodeInjectEndCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* To test code injection =end
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} opts.testCodeInjectEnd To test code injection =end
|
||||
* @param {module:api/FakeApi~testCodeInjectEndCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
this.testCodeInjectEnd = function(opts, callback) {
|
||||
opts = opts || {};
|
||||
var postBody = null;
|
||||
|
||||
|
||||
var pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
'test code inject */ =end': opts['testCodeInjectEnd']
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = ['application/json', '*/ =end));(phpinfo('];
|
||||
var accepts = ['application/json', '*/ end'];
|
||||
var returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake', 'PUT',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testEndpointParameters operation.
|
||||
* @callback module:api/FakeApi~testEndpointParametersCallback
|
||||
@@ -139,6 +180,51 @@
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testEnumQueryParameters operation.
|
||||
* @callback module:api/FakeApi~testEnumQueryParametersCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* To test enum query parameters
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {module:model/String} opts.enumQueryString Query parameter enum test (string) (default to -efg)
|
||||
* @param {Number} opts.enumQueryInteger Query parameter enum test (double)
|
||||
* @param {Number} opts.enumQueryDouble Query parameter enum test (double)
|
||||
* @param {module:api/FakeApi~testEnumQueryParametersCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
this.testEnumQueryParameters = function(opts, callback) {
|
||||
opts = opts || {};
|
||||
var postBody = null;
|
||||
|
||||
|
||||
var pathParams = {
|
||||
};
|
||||
var queryParams = {
|
||||
'enum_query_integer': opts['enumQueryInteger']
|
||||
};
|
||||
var headerParams = {
|
||||
};
|
||||
var formParams = {
|
||||
'enum_query_string': opts['enumQueryString'],
|
||||
'enum_query_double': opts['enumQueryDouble']
|
||||
};
|
||||
|
||||
var authNames = [];
|
||||
var contentTypes = ['application/json'];
|
||||
var accepts = ['application/json'];
|
||||
var returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
return exports;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Swagger 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: \" \\
|
||||
* 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
|
||||
* Contact: apiteam@swagger.io
|
||||
@@ -160,7 +160,7 @@
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* @param {Array.<String>} status Status values that need to be considered for filter
|
||||
* @param {Array.<module:model/String>} status Status values that need to be considered for filter
|
||||
* @param {module:api/PetApi~findPetsByStatusCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {Array.<module:model/Pet>}
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Swagger 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: \" \\
|
||||
* 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
|
||||
* Contact: apiteam@swagger.io
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Swagger 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: \" \\
|
||||
* 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
|
||||
* Contact: apiteam@swagger.io
|
||||
|
||||
Reference in New Issue
Block a user