forked from loafle/openapi-generator-original
update JS petstore samples
This commit is contained in:
parent
649811d542
commit
36f14ab757
@ -100,6 +100,7 @@ Class | Method | HTTP request | Description
|
|||||||
*SwaggerPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
*SwaggerPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||||
*SwaggerPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
*SwaggerPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
*SwaggerPetstore.FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
*SwaggerPetstore.FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||||
|
*SwaggerPetstore.FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||||
*SwaggerPetstore.FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
*SwaggerPetstore.FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||||
*SwaggerPetstore.FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
*SwaggerPetstore.FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||||
*SwaggerPetstore.PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
*SwaggerPetstore.PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||||
|
@ -11,6 +11,7 @@ Method | HTTP request | Description
|
|||||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||||
|
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||||
|
|
||||||
|
|
||||||
@ -385,6 +386,51 @@ No authorization required
|
|||||||
- **Content-Type**: */*
|
- **Content-Type**: */*
|
||||||
- **Accept**: */*
|
- **Accept**: */*
|
||||||
|
|
||||||
|
<a name="testInlineAdditionalProperties"></a>
|
||||||
|
# **testInlineAdditionalProperties**
|
||||||
|
> testInlineAdditionalProperties(param)
|
||||||
|
|
||||||
|
test inline additionalProperties
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```javascript
|
||||||
|
import SwaggerPetstore from 'swagger_petstore';
|
||||||
|
|
||||||
|
let apiInstance = new SwaggerPetstore.FakeApi();
|
||||||
|
|
||||||
|
let param = null; // Object | request body
|
||||||
|
|
||||||
|
|
||||||
|
apiInstance.testInlineAdditionalProperties(param, (error, data, response) => {
|
||||||
|
if (error) {
|
||||||
|
console.error(error);
|
||||||
|
} else {
|
||||||
|
console.log('API called successfully.');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**param** | **Object**| request body |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
null (empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="testJsonFormData"></a>
|
<a name="testJsonFormData"></a>
|
||||||
# **testJsonFormData**
|
# **testJsonFormData**
|
||||||
> testJsonFormData(param, param2)
|
> testJsonFormData(param, param2)
|
||||||
|
@ -83,6 +83,12 @@ export default class ApiClient {
|
|||||||
if (typeof window === 'undefined') {
|
if (typeof window === 'undefined') {
|
||||||
this.agent = new superagent.agent();
|
this.agent = new superagent.agent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Allow user to override superagent agent
|
||||||
|
*/
|
||||||
|
this.requestAgent = null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -398,6 +404,11 @@ export default class ApiClient {
|
|||||||
// set header parameters
|
// set header parameters
|
||||||
request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));
|
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
|
// set request timeout
|
||||||
request.timeout(this.timeout);
|
request.timeout(this.timeout);
|
||||||
|
|
||||||
|
@ -391,6 +391,50 @@ export default class FakeApi {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback function to receive the result of the testInlineAdditionalProperties operation.
|
||||||
|
* @callback module:api/FakeApi~testInlineAdditionalPropertiesCallback
|
||||||
|
* @param {String} error Error message, if any.
|
||||||
|
* @param data This operation does not return a value.
|
||||||
|
* @param {String} response The complete HTTP response.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* test inline additionalProperties
|
||||||
|
*
|
||||||
|
* @param {Object} param request body
|
||||||
|
* @param {module:api/FakeApi~testInlineAdditionalPropertiesCallback} callback The callback function, accepting three arguments: error, data, response
|
||||||
|
*/
|
||||||
|
testInlineAdditionalProperties(param, callback) {
|
||||||
|
let postBody = param;
|
||||||
|
|
||||||
|
// verify the required parameter 'param' is set
|
||||||
|
if (param === undefined || param === null) {
|
||||||
|
throw new Error("Missing the required parameter 'param' when calling testInlineAdditionalProperties");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let pathParams = {
|
||||||
|
};
|
||||||
|
let queryParams = {
|
||||||
|
};
|
||||||
|
let headerParams = {
|
||||||
|
};
|
||||||
|
let formParams = {
|
||||||
|
};
|
||||||
|
|
||||||
|
let authNames = [];
|
||||||
|
let contentTypes = ['application/json'];
|
||||||
|
let accepts = [];
|
||||||
|
let returnType = null;
|
||||||
|
|
||||||
|
return this.apiClient.callApi(
|
||||||
|
'/fake/inline-additionalProperties', 'POST',
|
||||||
|
pathParams, queryParams, headerParams, formParams, postBody,
|
||||||
|
authNames, contentTypes, accepts, returnType, callback
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback function to receive the result of the testJsonFormData operation.
|
* Callback function to receive the result of the testJsonFormData operation.
|
||||||
* @callback module:api/FakeApi~testJsonFormDataCallback
|
* @callback module:api/FakeApi~testJsonFormDataCallback
|
||||||
|
@ -97,6 +97,7 @@ Class | Method | HTTP request | Description
|
|||||||
*SwaggerPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
*SwaggerPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||||
*SwaggerPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
*SwaggerPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
*SwaggerPetstore.FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
*SwaggerPetstore.FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||||
|
*SwaggerPetstore.FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||||
*SwaggerPetstore.FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
*SwaggerPetstore.FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||||
*SwaggerPetstore.FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
*SwaggerPetstore.FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||||
*SwaggerPetstore.PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
*SwaggerPetstore.PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||||
|
@ -11,6 +11,7 @@ Method | HTTP request | Description
|
|||||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||||
|
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||||
|
|
||||||
|
|
||||||
@ -371,6 +372,49 @@ No authorization required
|
|||||||
- **Content-Type**: */*
|
- **Content-Type**: */*
|
||||||
- **Accept**: */*
|
- **Accept**: */*
|
||||||
|
|
||||||
|
<a name="testInlineAdditionalProperties"></a>
|
||||||
|
# **testInlineAdditionalProperties**
|
||||||
|
> testInlineAdditionalProperties(param)
|
||||||
|
|
||||||
|
test inline additionalProperties
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```javascript
|
||||||
|
import SwaggerPetstore from 'swagger_petstore';
|
||||||
|
|
||||||
|
let apiInstance = new SwaggerPetstore.FakeApi();
|
||||||
|
|
||||||
|
let param = null; // Object | request body
|
||||||
|
|
||||||
|
apiInstance.testInlineAdditionalProperties(param).then(() => {
|
||||||
|
console.log('API called successfully.');
|
||||||
|
}, (error) => {
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**param** | **Object**| request body |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
null (empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="testJsonFormData"></a>
|
<a name="testJsonFormData"></a>
|
||||||
# **testJsonFormData**
|
# **testJsonFormData**
|
||||||
> testJsonFormData(param, param2)
|
> testJsonFormData(param, param2)
|
||||||
|
@ -83,6 +83,12 @@ export default class ApiClient {
|
|||||||
if (typeof window === 'undefined') {
|
if (typeof window === 'undefined') {
|
||||||
this.agent = new superagent.agent();
|
this.agent = new superagent.agent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Allow user to override superagent agent
|
||||||
|
*/
|
||||||
|
this.requestAgent = null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -391,6 +397,11 @@ export default class ApiClient {
|
|||||||
// set header parameters
|
// set header parameters
|
||||||
request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));
|
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
|
// set request timeout
|
||||||
request.timeout(this.timeout);
|
request.timeout(this.timeout);
|
||||||
|
|
||||||
|
@ -451,6 +451,56 @@ export default class FakeApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* test inline additionalProperties
|
||||||
|
*
|
||||||
|
* @param {Object} param request body
|
||||||
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||||
|
*/
|
||||||
|
testInlineAdditionalPropertiesWithHttpInfo(param) {
|
||||||
|
let postBody = param;
|
||||||
|
|
||||||
|
// verify the required parameter 'param' is set
|
||||||
|
if (param === undefined || param === null) {
|
||||||
|
throw new Error("Missing the required parameter 'param' when calling testInlineAdditionalProperties");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let pathParams = {
|
||||||
|
};
|
||||||
|
let queryParams = {
|
||||||
|
};
|
||||||
|
let headerParams = {
|
||||||
|
};
|
||||||
|
let formParams = {
|
||||||
|
};
|
||||||
|
|
||||||
|
let authNames = [];
|
||||||
|
let contentTypes = ['application/json'];
|
||||||
|
let accepts = [];
|
||||||
|
let returnType = null;
|
||||||
|
|
||||||
|
return this.apiClient.callApi(
|
||||||
|
'/fake/inline-additionalProperties', 'POST',
|
||||||
|
pathParams, queryParams, headerParams, formParams, postBody,
|
||||||
|
authNames, contentTypes, accepts, returnType
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* test inline additionalProperties
|
||||||
|
*
|
||||||
|
* @param {Object} param request body
|
||||||
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||||
|
*/
|
||||||
|
testInlineAdditionalProperties(param) {
|
||||||
|
return this.testInlineAdditionalPropertiesWithHttpInfo(param)
|
||||||
|
.then(function(response_and_data) {
|
||||||
|
return response_and_data.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test json serialization of form data
|
* test json serialization of form data
|
||||||
*
|
*
|
||||||
|
@ -122,6 +122,7 @@ Class | Method | HTTP request | Description
|
|||||||
*SwaggerPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
*SwaggerPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||||
*SwaggerPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
*SwaggerPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
*SwaggerPetstore.FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
*SwaggerPetstore.FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||||
|
*SwaggerPetstore.FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||||
*SwaggerPetstore.FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
*SwaggerPetstore.FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||||
*SwaggerPetstore.FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
*SwaggerPetstore.FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||||
*SwaggerPetstore.PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
*SwaggerPetstore.PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||||
|
@ -11,6 +11,7 @@ Method | HTTP request | Description
|
|||||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||||
|
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||||
|
|
||||||
|
|
||||||
@ -371,6 +372,49 @@ No authorization required
|
|||||||
- **Content-Type**: */*
|
- **Content-Type**: */*
|
||||||
- **Accept**: */*
|
- **Accept**: */*
|
||||||
|
|
||||||
|
<a name="testInlineAdditionalProperties"></a>
|
||||||
|
# **testInlineAdditionalProperties**
|
||||||
|
> testInlineAdditionalProperties(param)
|
||||||
|
|
||||||
|
test inline additionalProperties
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```javascript
|
||||||
|
var SwaggerPetstore = require('swagger_petstore');
|
||||||
|
|
||||||
|
var apiInstance = new SwaggerPetstore.FakeApi();
|
||||||
|
|
||||||
|
var param = null; // Object | request body
|
||||||
|
|
||||||
|
apiInstance.testInlineAdditionalProperties(param).then(function() {
|
||||||
|
console.log('API called successfully.');
|
||||||
|
}, function(error) {
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**param** | **Object**| request body |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
null (empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="testJsonFormData"></a>
|
<a name="testJsonFormData"></a>
|
||||||
# **testJsonFormData**
|
# **testJsonFormData**
|
||||||
> testJsonFormData(param, param2)
|
> testJsonFormData(param, param2)
|
||||||
|
@ -98,6 +98,10 @@
|
|||||||
this.agent = new superagent.agent();
|
this.agent = new superagent.agent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Allow user to override superagent agent
|
||||||
|
*/
|
||||||
|
this.requestAgent = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -406,6 +410,12 @@
|
|||||||
// set header parameters
|
// set header parameters
|
||||||
request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));
|
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
|
// set request timeout
|
||||||
request.timeout(this.timeout);
|
request.timeout(this.timeout);
|
||||||
|
|
||||||
|
@ -478,6 +478,58 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* test inline additionalProperties
|
||||||
|
*
|
||||||
|
* @param {Object} param request body
|
||||||
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||||
|
*/
|
||||||
|
this.testInlineAdditionalPropertiesWithHttpInfo = function(param) {
|
||||||
|
var postBody = param;
|
||||||
|
|
||||||
|
// verify the required parameter 'param' is set
|
||||||
|
if (param === undefined || param === null) {
|
||||||
|
throw new Error("Missing the required parameter 'param' when calling testInlineAdditionalProperties");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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/inline-additionalProperties', 'POST',
|
||||||
|
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||||
|
authNames, contentTypes, accepts, returnType
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* test inline additionalProperties
|
||||||
|
*
|
||||||
|
* @param {Object} param request body
|
||||||
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||||
|
*/
|
||||||
|
this.testInlineAdditionalProperties = function(param) {
|
||||||
|
return this.testInlineAdditionalPropertiesWithHttpInfo(param)
|
||||||
|
.then(function(response_and_data) {
|
||||||
|
return response_and_data.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* test json serialization of form data
|
* test json serialization of form data
|
||||||
*
|
*
|
||||||
|
@ -125,6 +125,7 @@ Class | Method | HTTP request | Description
|
|||||||
*SwaggerPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
*SwaggerPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||||
*SwaggerPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
*SwaggerPetstore.FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
*SwaggerPetstore.FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
*SwaggerPetstore.FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||||
|
*SwaggerPetstore.FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||||
*SwaggerPetstore.FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
*SwaggerPetstore.FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||||
*SwaggerPetstore.FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
*SwaggerPetstore.FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||||
*SwaggerPetstore.PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
*SwaggerPetstore.PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||||
|
@ -11,6 +11,7 @@ Method | HTTP request | Description
|
|||||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||||
|
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||||
|
|
||||||
|
|
||||||
@ -392,6 +393,52 @@ No authorization required
|
|||||||
- **Content-Type**: */*
|
- **Content-Type**: */*
|
||||||
- **Accept**: */*
|
- **Accept**: */*
|
||||||
|
|
||||||
|
<a name="testInlineAdditionalProperties"></a>
|
||||||
|
# **testInlineAdditionalProperties**
|
||||||
|
> testInlineAdditionalProperties(param)
|
||||||
|
|
||||||
|
test inline additionalProperties
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```javascript
|
||||||
|
var SwaggerPetstore = require('swagger_petstore');
|
||||||
|
|
||||||
|
var apiInstance = new SwaggerPetstore.FakeApi();
|
||||||
|
|
||||||
|
var param = null; // Object | request body
|
||||||
|
|
||||||
|
|
||||||
|
var callback = function(error, data, response) {
|
||||||
|
if (error) {
|
||||||
|
console.error(error);
|
||||||
|
} else {
|
||||||
|
console.log('API called successfully.');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
apiInstance.testInlineAdditionalProperties(param, callback);
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**param** | **Object**| request body |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
null (empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="testJsonFormData"></a>
|
<a name="testJsonFormData"></a>
|
||||||
# **testJsonFormData**
|
# **testJsonFormData**
|
||||||
> testJsonFormData(param, param2)
|
> testJsonFormData(param, param2)
|
||||||
|
@ -98,6 +98,10 @@
|
|||||||
this.agent = new superagent.agent();
|
this.agent = new superagent.agent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Allow user to override superagent agent
|
||||||
|
*/
|
||||||
|
this.requestAgent = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -415,6 +419,12 @@
|
|||||||
// set header parameters
|
// set header parameters
|
||||||
request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));
|
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
|
// set request timeout
|
||||||
request.timeout(this.timeout);
|
request.timeout(this.timeout);
|
||||||
|
|
||||||
|
@ -418,6 +418,52 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback function to receive the result of the testInlineAdditionalProperties operation.
|
||||||
|
* @callback module:api/FakeApi~testInlineAdditionalPropertiesCallback
|
||||||
|
* @param {String} error Error message, if any.
|
||||||
|
* @param data This operation does not return a value.
|
||||||
|
* @param {String} response The complete HTTP response.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* test inline additionalProperties
|
||||||
|
*
|
||||||
|
* @param {Object} param request body
|
||||||
|
* @param {module:api/FakeApi~testInlineAdditionalPropertiesCallback} callback The callback function, accepting three arguments: error, data, response
|
||||||
|
*/
|
||||||
|
this.testInlineAdditionalProperties = function(param, callback) {
|
||||||
|
var postBody = param;
|
||||||
|
|
||||||
|
// verify the required parameter 'param' is set
|
||||||
|
if (param === undefined || param === null) {
|
||||||
|
throw new Error("Missing the required parameter 'param' when calling testInlineAdditionalProperties");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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/inline-additionalProperties', 'POST',
|
||||||
|
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
|
||||||
|
authNames, contentTypes, accepts, returnType, callback
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback function to receive the result of the testJsonFormData operation.
|
* Callback function to receive the result of the testJsonFormData operation.
|
||||||
* @callback module:api/FakeApi~testJsonFormDataCallback
|
* @callback module:api/FakeApi~testJsonFormDataCallback
|
||||||
|
Loading…
x
Reference in New Issue
Block a user