Files
cbsnexora-backend/fineract-provider/config/swagger/templates/api_doc.mustache
T

81 lines
3.4 KiB
Plaintext

# {{classname}}{{#description}}
{{description}}{{/description}}
All URIs are relative to *{{basePath}}*
Method | HTTP request | Description
------------- | ------------- | -------------
{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}
{{/operation}}{{/operations}}
{{#operations}}
{{#operation}}
<a name="{{operationId}}"></a>
# **{{operationId}}**
> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
{{summary}}{{#notes}}
{{notes}}{{/notes}}
### Example
```java
{{#hasAuthMethods}}
ApiClient defaultClient = new ApiClient();
{{#authMethods}}{{#isBasic}}
// Uncomment this if you want to use HTTP basic authorization: "{{{name}}}"
//defaultClient = new ApiClient("{{{name}}}");
//defaultClient.setCredentials("YOUR USERNAME", "YOUR PASSWORD");{{/isBasic}}{{#isApiKey}}
// API Key Authorization: "{{{name}}}"
// USE THIS IF YOU ARE TESTING THE LIBRARY
defaultClient = new ApiClient("{{{name}}}");
defaultClient.setApiKey("default");
// Uncomment this if you are using OAuth2 access token for authorization: "{{{name}}}"
//OAuth {{{name}}} = (OAuth) defaultClient.getAuthentication("{{{name}}}");
//{{{name}}}.setAccessToken("YOUR ACCESS TOKEN");{{/isApiKey}}
{{/authMethods}}
{{/hasAuthMethods}}
{{classname}} apiService = defaultClient.createService({{classname}}.class);
// Initialize these parameters earlier.
Call<{{returnType}}> call = apiService.{{operationId}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
call.enqueue(new Callback<{{returnType}}>() {
@Override
public void onResponse(Call<{{returnType}}> call, Response<{{returnType}}> response) {
System.out.println(call.toString() + "\n" + response.toString());
}
@Override
public void onFailure(Call<{{returnType}}> call, Throwable t) {
System.out.println(t.getMessage());
}
});
```
### Parameters
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#@last}}
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------{{/@last}}{{/allParams}}
{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^@last}}, {{/@last}}{{/values}}]{{/allowableValues}}
{{/allParams}}
### Return type
{{#returnType}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null (empty response body){{/returnType}}
### Authorization
{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{name}}](../README.md#{{name}}){{^@last}}, {{/@last}}{{/authMethods}}
### HTTP request headers
- **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}
- **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}}
{{/operation}}
{{/operations}}