Improve jsdoc for API return values (#3327)

* Add jsdoc for usePromises, add @link for callbacks

* Update petstore samples

* Improve jsdoc for void return type + usePromises

* Add back curly brackets correctly in model template

* Add link to Promise doc in jsdoc comment

* Fix jsdoc annotation for callApi method

The return type annotation was also broken here.
This commit is contained in:
delenius
2016-07-20 05:14:51 -07:00
committed by wing328
parent 8818cf9ff4
commit c888434580
18 changed files with 97 additions and 211 deletions

View File

@@ -4,53 +4,10 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**testCodeInjectEnd**](FakeApi.md#testCodeInjectEnd) | **PUT** /fake | To test code injection =end
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
[**testEnumQueryParameters**](FakeApi.md#testEnumQueryParameters) | **GET** /fake | To test enum query parameters
<a name="testCodeInjectEnd"></a>
# **testCodeInjectEnd**
> testCodeInjectEnd(opts)
To test code injection &#x3D;end
### Example
```javascript
var SwaggerPetstore = require('swagger_petstore');
var apiInstance = new SwaggerPetstore.FakeApi();
var opts = {
'testCodeInjectEnd': "testCodeInjectEnd_example" // String | To test code injection =end
};
apiInstance.testCodeInjectEnd(opts).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**testCodeInjectEnd** | **String**| To test code injection &#x3D;end | [optional]
### Return type
null (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json, */ =end));(phpinfo(
- **Accept**: application/json, */ end
<a name="testEndpointParameters"></a>
# **testEndpointParameters**
> testEndpointParameters(_number, _double, _string, _byte, opts)