fix javadoc error

This commit is contained in:
wing328
2016-07-05 19:38:33 +08:00
parent 5608c73938
commit 5e6a6de351
9 changed files with 90 additions and 141 deletions

View File

@@ -74,7 +74,7 @@ public class ApiClient {
/**
* Basic constructor for single auth name
* @param authName
* @param authName Authentication name
*/
public ApiClient(String authName) {
this(new String[]{authName});
@@ -82,8 +82,8 @@ public class ApiClient {
/**
* Helper constructor for single api key
* @param authName
* @param apiKey
* @param authName Authentication name
* @param apiKey API key
*/
public ApiClient(String authName, String apiKey) {
this(authName);
@@ -92,9 +92,9 @@ public class ApiClient {
/**
* Helper constructor for single basic auth or password oauth2
* @param authName
* @param username
* @param password
* @param authName Authentication name
* @param username Username
* @param password Password
*/
public ApiClient(String authName, String username, String password) {
this(authName);
@@ -103,11 +103,11 @@ public class ApiClient {
/**
* Helper constructor for single password oauth2
* @param authName
* @param clientId
* @param secret
* @param username
* @param password
* @param authName Authentication name
* @param clientId Client ID
* @param secret Client Secret
* @param username Username
* @param password Password
*/
public ApiClient(String authName, String clientId, String secret, String username, String password) {
this(authName);
@@ -154,7 +154,7 @@ public class ApiClient {
/**
* Helper method to configure the first api key found
* @param apiKey
* @param apiKey API key
*/
private void setApiKey(String apiKey) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -168,8 +168,8 @@ public class ApiClient {
/**
* Helper method to configure the username/password for basic auth or password oauth
* @param username
* @param password
* @param username Username
* @param password Password
*/
private void setCredentials(String username, String password) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -216,7 +216,7 @@ public class ApiClient {
/**
* Helper method to pre-set the oauth access token of the first oauth found in the apiAuthorizations (there should be only one)
* @param accessToken
* @param accessToken Access token
*/
public void setAccessToken(String accessToken) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -230,9 +230,9 @@ public class ApiClient {
/**
* Helper method to configure the oauth accessCode/implicit flow parameters
* @param clientId
* @param clientSecret
* @param redirectURI
* @param clientId Client ID
* @param clientSecret Client secret
* @param redirectURI Redirect URI
*/
public void configureAuthorizationFlow(String clientId, String clientSecret, String redirectURI) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -252,7 +252,7 @@ public class ApiClient {
/**
* Configures a listener which is notified when a new access token is received.
* @param accessTokenListener
* @param accessTokenListener Access token listener
*/
public void registerAccessTokenListener(AccessTokenListener accessTokenListener) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
@@ -266,8 +266,8 @@ public class ApiClient {
/**
* Adds an authorization to be used by the client
* @param authName
* @param authorization
* @param authName Authentication name
* @param authorization Authorization interceptor
*/
public void addAuthorization(String authName, Interceptor authorization) {
if (apiAuthorizations.containsKey(authName)) {
@@ -305,7 +305,7 @@ public class ApiClient {
/**
* Clones the okBuilder given in parameter, adds the auth interceptors and uses it to configure the Retrofit
* @param okClient
* @param okClient An instance of OK HTTP client
*/
public void configureFromOkclient(OkHttpClient okClient) {
this.okBuilder = okClient.newBuilder();

View File

@@ -25,12 +25,12 @@ public interface {{classname}} {
* {{summary}}
* {{notes}}
{{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
{{/allParams}} * @return Call<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>
{{/allParams}} * @return Call[{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}]
*/
{{#formParams}}{{#-first}}
{{#isMultipart}}@Multipart{{/isMultipart}}{{^isMultipart}}@FormUrlEncoded{{/isMultipart}}{{/-first}}{{/formParams}}
@{{httpMethod}}("{{path}}")
{{#useRxJava}}Observable{{/useRxJava}}{{^useRxJava}}Call{{/useRxJava}}<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}> {{operationId}}({{^allParams}});{{/allParams}}
{{#useRxJava}}Observable{{/useRxJava}}{{^useRxJava}}Call{{/useRxJava}}[{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}] {{operationId}}({{^allParams}});{{/allParams}}
{{#allParams}}{{>libraries/retrofit2/queryParams}}{{>libraries/retrofit2/pathParams}}{{>libraries/retrofit2/headerParams}}{{>libraries/retrofit2/bodyParams}}{{>libraries/retrofit2/formParams}}{{#hasMore}}, {{/hasMore}}{{^hasMore}}
);{{/hasMore}}{{/allParams}}