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}}

View File

@ -21,5 +21,3 @@
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
pom.xml

View File

@ -96,55 +96,6 @@
</execution>
</executions>
</plugin>
<!-- For testing build.gradle, build.sbt, mvn javadoc:javadoc -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>gradle-test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>gradle</executable>
<arguments>
<argument>check</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>sbt-test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>sbt</executable>
<arguments>
<argument>publishLocal</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>mvn-javadoc-test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>mvn</executable>
<arguments>
<argument>javadoc:javadoc</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -66,7 +66,7 @@ public class ApiClient {
/**
* Basic constructor for single auth name
* @param authName
* @param authName Authentication name
*/
public ApiClient(String authName) {
this(new String[]{authName});
@ -74,8 +74,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);
@ -84,9 +84,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);
@ -95,11 +95,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);
@ -141,7 +141,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()) {
@ -155,8 +155,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()) {
@ -203,7 +203,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()) {
@ -217,9 +217,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()) {
@ -239,7 +239,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()) {
@ -253,8 +253,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)) {
@ -292,7 +292,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

@ -33,12 +33,12 @@ public interface FakeApi {
* @param date None (optional)
* @param dateTime None (optional)
* @param password None (optional)
* @return Call<Void>
* @return Call[Void]
*/
@FormUrlEncoded
@POST("fake")
Call<Void> testEndpointParameters(
Call[Void] testEndpointParameters(
@Field("number") BigDecimal number, @Field("double") Double _double, @Field("string") String string, @Field("byte") byte[] _byte, @Field("integer") Integer integer, @Field("int32") Integer int32, @Field("int64") Long int64, @Field("float") Float _float, @Field("binary") byte[] binary, @Field("date") LocalDate date, @Field("dateTime") DateTime dateTime, @Field("password") String password
);
@ -48,12 +48,12 @@ public interface FakeApi {
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
* @param enumQueryInteger Query parameter enum test (double) (optional)
* @param enumQueryDouble Query parameter enum test (double) (optional)
* @return Call<Void>
* @return Call[Void]
*/
@FormUrlEncoded
@GET("fake")
Call<Void> testEnumQueryParameters(
Call[Void] testEnumQueryParameters(
@Field("enum_query_string") String enumQueryString, @Query("enum_query_integer") BigDecimal enumQueryInteger, @Field("enum_query_double") Double enumQueryDouble
);

View File

@ -22,11 +22,11 @@ public interface PetApi {
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store (required)
* @return Call<Void>
* @return Call[Void]
*/
@POST("pet")
Call<Void> addPet(
Call[Void] addPet(
@Body Pet body
);
@ -35,11 +35,11 @@ public interface PetApi {
*
* @param petId Pet id to delete (required)
* @param apiKey (optional)
* @return Call<Void>
* @return Call[Void]
*/
@DELETE("pet/{petId}")
Call<Void> deletePet(
Call[Void] deletePet(
@Path("petId") Long petId, @Header("api_key") String apiKey
);
@ -47,11 +47,11 @@ public interface PetApi {
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for filter (required)
* @return Call<List<Pet>>
* @return Call[List<Pet>]
*/
@GET("pet/findByStatus")
Call<List<Pet>> findPetsByStatus(
Call[List<Pet>] findPetsByStatus(
@Query("status") CSVParams status
);
@ -59,11 +59,11 @@ public interface PetApi {
* Finds Pets by tags
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by (required)
* @return Call<List<Pet>>
* @return Call[List<Pet>]
*/
@GET("pet/findByTags")
Call<List<Pet>> findPetsByTags(
Call[List<Pet>] findPetsByTags(
@Query("tags") CSVParams tags
);
@ -71,11 +71,11 @@ public interface PetApi {
* Find pet by ID
* Returns a single pet
* @param petId ID of pet to return (required)
* @return Call<Pet>
* @return Call[Pet]
*/
@GET("pet/{petId}")
Call<Pet> getPetById(
Call[Pet] getPetById(
@Path("petId") Long petId
);
@ -83,11 +83,11 @@ public interface PetApi {
* Update an existing pet
*
* @param body Pet object that needs to be added to the store (required)
* @return Call<Void>
* @return Call[Void]
*/
@PUT("pet")
Call<Void> updatePet(
Call[Void] updatePet(
@Body Pet body
);
@ -97,12 +97,12 @@ public interface PetApi {
* @param petId ID of pet that needs to be updated (required)
* @param name Updated name of the pet (optional)
* @param status Updated status of the pet (optional)
* @return Call<Void>
* @return Call[Void]
*/
@FormUrlEncoded
@POST("pet/{petId}")
Call<Void> updatePetWithForm(
Call[Void] updatePetWithForm(
@Path("petId") Long petId, @Field("name") String name, @Field("status") String status
);
@ -112,12 +112,12 @@ public interface PetApi {
* @param petId ID of pet to update (required)
* @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional)
* @return Call<ModelApiResponse>
* @return Call[ModelApiResponse]
*/
@Multipart
@POST("pet/{petId}/uploadImage")
Call<ModelApiResponse> uploadFile(
Call[ModelApiResponse] uploadFile(
@Path("petId") Long petId, @Part("additionalMetadata") String additionalMetadata, @Part("file\"; filename=\"file\"") RequestBody file
);

View File

@ -20,33 +20,33 @@ public interface StoreApi {
* Delete purchase order by ID
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
* @param orderId ID of the order that needs to be deleted (required)
* @return Call<Void>
* @return Call[Void]
*/
@DELETE("store/order/{orderId}")
Call<Void> deleteOrder(
Call[Void] deleteOrder(
@Path("orderId") String orderId
);
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
* @return Call<Map<String, Integer>>
* @return Call[Map<String, Integer>]
*/
@GET("store/inventory")
Call<Map<String, Integer>> getInventory();
Call[Map<String, Integer>] getInventory();
/**
* Find purchase order by ID
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched (required)
* @return Call<Order>
* @return Call[Order]
*/
@GET("store/order/{orderId}")
Call<Order> getOrderById(
Call[Order] getOrderById(
@Path("orderId") Long orderId
);
@ -54,11 +54,11 @@ public interface StoreApi {
* Place an order for a pet
*
* @param body order placed for purchasing the pet (required)
* @return Call<Order>
* @return Call[Order]
*/
@POST("store/order")
Call<Order> placeOrder(
Call[Order] placeOrder(
@Body Order body
);

View File

@ -20,11 +20,11 @@ public interface UserApi {
* Create user
* This can only be done by the logged in user.
* @param body Created user object (required)
* @return Call<Void>
* @return Call[Void]
*/
@POST("user")
Call<Void> createUser(
Call[Void] createUser(
@Body User body
);
@ -32,11 +32,11 @@ public interface UserApi {
* Creates list of users with given input array
*
* @param body List of user object (required)
* @return Call<Void>
* @return Call[Void]
*/
@POST("user/createWithArray")
Call<Void> createUsersWithArrayInput(
Call[Void] createUsersWithArrayInput(
@Body List<User> body
);
@ -44,11 +44,11 @@ public interface UserApi {
* Creates list of users with given input array
*
* @param body List of user object (required)
* @return Call<Void>
* @return Call[Void]
*/
@POST("user/createWithList")
Call<Void> createUsersWithListInput(
Call[Void] createUsersWithListInput(
@Body List<User> body
);
@ -56,11 +56,11 @@ public interface UserApi {
* Delete user
* This can only be done by the logged in user.
* @param username The name that needs to be deleted (required)
* @return Call<Void>
* @return Call[Void]
*/
@DELETE("user/{username}")
Call<Void> deleteUser(
Call[Void] deleteUser(
@Path("username") String username
);
@ -68,11 +68,11 @@ public interface UserApi {
* Get user by user name
*
* @param username The name that needs to be fetched. Use user1 for testing. (required)
* @return Call<User>
* @return Call[User]
*/
@GET("user/{username}")
Call<User> getUserByName(
Call[User] getUserByName(
@Path("username") String username
);
@ -81,22 +81,22 @@ public interface UserApi {
*
* @param username The user name for login (required)
* @param password The password for login in clear text (required)
* @return Call<String>
* @return Call[String]
*/
@GET("user/login")
Call<String> loginUser(
Call[String] loginUser(
@Query("username") String username, @Query("password") String password
);
/**
* Logs out current logged in user session
*
* @return Call<Void>
* @return Call[Void]
*/
@GET("user/logout")
Call<Void> logoutUser();
Call[Void] logoutUser();
/**
@ -104,11 +104,11 @@ public interface UserApi {
* This can only be done by the logged in user.
* @param username name that need to be deleted (required)
* @param body Updated user object (required)
* @return Call<Void>
* @return Call[Void]
*/
@PUT("user/{username}")
Call<Void> updateUser(
Call[Void] updateUser(
@Path("username") String username, @Body User body
);