-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
1,780 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
samples/client/petstore/javascript-es6/docs/AnotherFakeApi.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# SwaggerPetstore.AnotherFakeApi | ||
|
||
All URIs are relative to *http://petstore.swagger.io:80/v2* | ||
|
||
Method | HTTP request | Description | ||
------------- | ------------- | ------------- | ||
[**testSpecialTags**](AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | ||
|
||
|
||
<a name="testSpecialTags"></a> | ||
# **testSpecialTags** | ||
> Client testSpecialTags(body) | ||
To test special tags | ||
|
||
To test special tags | ||
|
||
### Example | ||
```javascript | ||
import SwaggerPetstore from 'swagger_petstore'; | ||
|
||
let apiInstance = new SwaggerPetstore.AnotherFakeApi(); | ||
|
||
let body = new SwaggerPetstore.Client(); // Client | client model | ||
|
||
|
||
apiInstance.testSpecialTags(body, (error, data, response) => { | ||
if (error) { | ||
console.error(error); | ||
} else { | ||
console.log('API called successfully. Returned data: ' + data); | ||
} | ||
}); | ||
``` | ||
|
||
### Parameters | ||
|
||
Name | Type | Description | Notes | ||
------------- | ------------- | ------------- | ------------- | ||
**body** | [**Client**](Client.md)| client model | | ||
|
||
### Return type | ||
|
||
[**Client**](Client.md) | ||
|
||
### Authorization | ||
|
||
No authorization required | ||
|
||
### HTTP request headers | ||
|
||
- **Content-Type**: application/json | ||
- **Accept**: application/json | ||
|
59 changes: 59 additions & 0 deletions
59
samples/client/petstore/javascript-es6/docs/FakeClassnameTags123Api.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# SwaggerPetstore.FakeClassnameTags123Api | ||
|
||
All URIs are relative to *http://petstore.swagger.io:80/v2* | ||
|
||
Method | HTTP request | Description | ||
------------- | ------------- | ------------- | ||
[**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | ||
|
||
|
||
<a name="testClassname"></a> | ||
# **testClassname** | ||
> Client testClassname(body) | ||
To test class name in snake case | ||
|
||
### Example | ||
```javascript | ||
import SwaggerPetstore from 'swagger_petstore'; | ||
let defaultClient = SwaggerPetstore.ApiClient.instance; | ||
|
||
// Configure API key authorization: api_key_query | ||
let api_key_query = defaultClient.authentications['api_key_query']; | ||
api_key_query.apiKey = 'YOUR API KEY'; | ||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) | ||
//api_key_query.apiKeyPrefix = 'Token'; | ||
|
||
let apiInstance = new SwaggerPetstore.FakeClassnameTags123Api(); | ||
|
||
let body = new SwaggerPetstore.Client(); // Client | client model | ||
|
||
|
||
apiInstance.testClassname(body, (error, data, response) => { | ||
if (error) { | ||
console.error(error); | ||
} else { | ||
console.log('API called successfully. Returned data: ' + data); | ||
} | ||
}); | ||
``` | ||
|
||
### Parameters | ||
|
||
Name | Type | Description | Notes | ||
------------- | ------------- | ------------- | ------------- | ||
**body** | [**Client**](Client.md)| client model | | ||
|
||
### Return type | ||
|
||
[**Client**](Client.md) | ||
|
||
### Authorization | ||
|
||
[api_key_query](../README.md#api_key_query) | ||
|
||
### HTTP request headers | ||
|
||
- **Content-Type**: application/json | ||
- **Accept**: application/json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
samples/client/petstore/javascript-es6/src/api/AnotherFakeApi.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/** | ||
* 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: \" \\ | ||
* | ||
* OpenAPI spec version: 1.0.0 | ||
* Contact: apiteam@swagger.io | ||
* | ||
* NOTE: This class is auto generated by the swagger code generator program. | ||
* https://github.com/swagger-api/swagger-codegen.git | ||
* Do not edit the class manually. | ||
* | ||
*/ | ||
|
||
|
||
import ApiClient from "../ApiClient"; | ||
import Client from '../model/Client'; | ||
|
||
/** | ||
* AnotherFake service. | ||
* @module api/AnotherFakeApi | ||
* @version 1.0.0 | ||
*/ | ||
export default class AnotherFakeApi { | ||
|
||
/** | ||
* Constructs a new AnotherFakeApi. | ||
* @alias module:api/AnotherFakeApi | ||
* @class | ||
* @param {module:ApiClient} [apiClient] Optional API client implementation to use, | ||
* default to {@link module:ApiClient#instance} if unspecified. | ||
*/ | ||
constructor(apiClient) { | ||
this.apiClient = apiClient || ApiClient.instance; | ||
} | ||
|
||
|
||
/** | ||
* Callback function to receive the result of the testSpecialTags operation. | ||
* @callback module:api/AnotherFakeApi~testSpecialTagsCallback | ||
* @param {String} error Error message, if any. | ||
* @param {module:model/Client} data The data returned by the service call. | ||
* @param {String} response The complete HTTP response. | ||
*/ | ||
|
||
/** | ||
* To test special tags | ||
* To test special tags | ||
* @param {module:model/Client} body client model | ||
* @param {module:api/AnotherFakeApi~testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response | ||
* data is of type: {@link module:model/Client} | ||
*/ | ||
testSpecialTags(body, callback) { | ||
let postBody = body; | ||
|
||
// verify the required parameter 'body' is set | ||
if (body === undefined || body === null) { | ||
throw new Error("Missing the required parameter 'body' when calling testSpecialTags"); | ||
} | ||
|
||
|
||
let pathParams = { | ||
}; | ||
let queryParams = { | ||
}; | ||
let headerParams = { | ||
}; | ||
let formParams = { | ||
}; | ||
|
||
let authNames = []; | ||
let contentTypes = ['application/json']; | ||
let accepts = ['application/json']; | ||
let returnType = Client; | ||
|
||
return this.apiClient.callApi( | ||
'/another-fake/dummy', 'PATCH', | ||
pathParams, queryParams, headerParams, formParams, postBody, | ||
authNames, contentTypes, accepts, returnType, callback | ||
); | ||
} | ||
|
||
|
||
} |
82 changes: 82 additions & 0 deletions
82
samples/client/petstore/javascript-es6/src/api/FakeClassnameTags123Api.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/** | ||
* 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: \" \\ | ||
* | ||
* OpenAPI spec version: 1.0.0 | ||
* Contact: apiteam@swagger.io | ||
* | ||
* NOTE: This class is auto generated by the swagger code generator program. | ||
* https://github.com/swagger-api/swagger-codegen.git | ||
* Do not edit the class manually. | ||
* | ||
*/ | ||
|
||
|
||
import ApiClient from "../ApiClient"; | ||
import Client from '../model/Client'; | ||
|
||
/** | ||
* FakeClassnameTags123 service. | ||
* @module api/FakeClassnameTags123Api | ||
* @version 1.0.0 | ||
*/ | ||
export default class FakeClassnameTags123Api { | ||
|
||
/** | ||
* Constructs a new FakeClassnameTags123Api. | ||
* @alias module:api/FakeClassnameTags123Api | ||
* @class | ||
* @param {module:ApiClient} [apiClient] Optional API client implementation to use, | ||
* default to {@link module:ApiClient#instance} if unspecified. | ||
*/ | ||
constructor(apiClient) { | ||
this.apiClient = apiClient || ApiClient.instance; | ||
} | ||
|
||
|
||
/** | ||
* Callback function to receive the result of the testClassname operation. | ||
* @callback module:api/FakeClassnameTags123Api~testClassnameCallback | ||
* @param {String} error Error message, if any. | ||
* @param {module:model/Client} data The data returned by the service call. | ||
* @param {String} response The complete HTTP response. | ||
*/ | ||
|
||
/** | ||
* To test class name in snake case | ||
* @param {module:model/Client} body client model | ||
* @param {module:api/FakeClassnameTags123Api~testClassnameCallback} callback The callback function, accepting three arguments: error, data, response | ||
* data is of type: {@link module:model/Client} | ||
*/ | ||
testClassname(body, callback) { | ||
let postBody = body; | ||
|
||
// verify the required parameter 'body' is set | ||
if (body === undefined || body === null) { | ||
throw new Error("Missing the required parameter 'body' when calling testClassname"); | ||
} | ||
|
||
|
||
let pathParams = { | ||
}; | ||
let queryParams = { | ||
}; | ||
let headerParams = { | ||
}; | ||
let formParams = { | ||
}; | ||
|
||
let authNames = ['api_key_query']; | ||
let contentTypes = ['application/json']; | ||
let accepts = ['application/json']; | ||
let returnType = Client; | ||
|
||
return this.apiClient.callApi( | ||
'/fake_classname_test', 'PATCH', | ||
pathParams, queryParams, headerParams, formParams, postBody, | ||
authNames, contentTypes, accepts, returnType, callback | ||
); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.