forked from loafle/openapi-generator-original
fix doc warning in java retrofit2 client
This commit is contained in:
@@ -188,7 +188,7 @@ public class ApiClient {
|
||||
|
||||
/**
|
||||
* Helper method to configure the token endpoint of the first oauth found in the apiAuthorizations (there should be only one)
|
||||
* @return
|
||||
* @return Token request builder
|
||||
*/
|
||||
public TokenRequestBuilder getTokenEndPoint() {
|
||||
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
|
||||
@@ -202,7 +202,7 @@ public class ApiClient {
|
||||
|
||||
/**
|
||||
* Helper method to configure authorization endpoint of the first oauth found in the apiAuthorizations (there should be only one)
|
||||
* @return
|
||||
* @return Authentication request builder
|
||||
*/
|
||||
public AuthenticationRequestBuilder getAuthorizationEndPoint() {
|
||||
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<version>1.10</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>add_sources</id>
|
||||
@@ -152,6 +153,7 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>{{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}}</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
|
||||
@@ -7,13 +7,6 @@ Name | Type | Description | Notes
|
||||
**arrayOfString** | **List<String>** | | [optional]
|
||||
**arrayArrayOfInteger** | [**List<List<Long>>**](List.md) | | [optional]
|
||||
**arrayArrayOfModel** | [**List<List<ReadOnlyFirst>>**](List.md) | | [optional]
|
||||
**arrayOfEnum** | [**List<ArrayOfEnumEnum>**](#List<ArrayOfEnumEnum>) | | [optional]
|
||||
|
||||
|
||||
<a name="List<ArrayOfEnumEnum>"></a>
|
||||
## Enum: List<ArrayOfEnumEnum>
|
||||
Name | Value
|
||||
---- | -----
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,54 +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**
|
||||
> Void testCodeInjectEnd(testCodeInjectEnd)
|
||||
|
||||
To test code injection =end
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.api.FakeApi;
|
||||
|
||||
|
||||
FakeApi apiInstance = new FakeApi();
|
||||
String testCodeInjectEnd = "testCodeInjectEnd_example"; // String | To test code injection =end
|
||||
try {
|
||||
Void result = apiInstance.testCodeInjectEnd(testCodeInjectEnd);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testCodeInjectEnd");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**testCodeInjectEnd** | **String**| To test code injection =end | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**Void**](.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, */ =end'));(phpinfo('
|
||||
- **Accept**: application/json, */ end
|
||||
|
||||
<a name="testEndpointParameters"></a>
|
||||
# **testEndpointParameters**
|
||||
> Void testEndpointParameters(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password)
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<version>1.10</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>add_sources</id>
|
||||
@@ -138,6 +139,7 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>1.7</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
|
||||
@@ -53,10 +53,10 @@ public class ApiClient {
|
||||
this();
|
||||
for(String authName : authNames) {
|
||||
Interceptor auth;
|
||||
if (authName == "petstore_auth") {
|
||||
auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets");
|
||||
} else if (authName == "api_key") {
|
||||
if (authName == "api_key") {
|
||||
auth = new ApiKeyAuth("header", "api_key");
|
||||
} else if (authName == "petstore_auth") {
|
||||
auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets");
|
||||
} else {
|
||||
throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names");
|
||||
}
|
||||
@@ -175,7 +175,7 @@ public class ApiClient {
|
||||
|
||||
/**
|
||||
* Helper method to configure the token endpoint of the first oauth found in the apiAuthorizations (there should be only one)
|
||||
* @return
|
||||
* @return Token request builder
|
||||
*/
|
||||
public TokenRequestBuilder getTokenEndPoint() {
|
||||
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
|
||||
@@ -189,7 +189,7 @@ public class ApiClient {
|
||||
|
||||
/**
|
||||
* Helper method to configure authorization endpoint of the first oauth found in the apiAuthorizations (there should be only one)
|
||||
* @return
|
||||
* @return Authentication request builder
|
||||
*/
|
||||
public AuthenticationRequestBuilder getAuthorizationEndPoint() {
|
||||
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
|
||||
|
||||
@@ -9,8 +9,8 @@ import retrofit2.http.*;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
import org.joda.time.LocalDate;
|
||||
import java.math.BigDecimal;
|
||||
import org.joda.time.DateTime;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -18,19 +18,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface FakeApi {
|
||||
/**
|
||||
* To test code injection =end
|
||||
*
|
||||
* @param testCodeInjectEnd To test code injection =end (optional)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
|
||||
@FormUrlEncoded
|
||||
@PUT("fake")
|
||||
Call<Void> testCodeInjectEnd(
|
||||
@Field("test code inject */ =end") String testCodeInjectEnd
|
||||
);
|
||||
|
||||
/**
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
|
||||
@@ -9,8 +9,8 @@ import retrofit2.http.*;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
import io.swagger.client.model.Pet;
|
||||
import io.swagger.client.model.ModelApiResponse;
|
||||
import java.io.File;
|
||||
import io.swagger.client.model.ModelApiResponse;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
@@ -48,31 +48,6 @@ public class ArrayTest {
|
||||
@SerializedName("array_array_of_model")
|
||||
private List<List<ReadOnlyFirst>> arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
|
||||
|
||||
/**
|
||||
* Gets or Sets arrayOfEnum
|
||||
*/
|
||||
public enum ArrayOfEnumEnum {
|
||||
@SerializedName("UPPER")
|
||||
UPPER("UPPER"),
|
||||
|
||||
@SerializedName("lower")
|
||||
LOWER("lower");
|
||||
|
||||
private String value;
|
||||
|
||||
ArrayOfEnumEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
}
|
||||
|
||||
@SerializedName("array_of_enum")
|
||||
private List<ArrayOfEnumEnum> arrayOfEnum = new ArrayList<ArrayOfEnumEnum>();
|
||||
|
||||
public ArrayTest arrayOfString(List<String> arrayOfString) {
|
||||
this.arrayOfString = arrayOfString;
|
||||
return this;
|
||||
@@ -127,24 +102,6 @@ public class ArrayTest {
|
||||
this.arrayArrayOfModel = arrayArrayOfModel;
|
||||
}
|
||||
|
||||
public ArrayTest arrayOfEnum(List<ArrayOfEnumEnum> arrayOfEnum) {
|
||||
this.arrayOfEnum = arrayOfEnum;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get arrayOfEnum
|
||||
* @return arrayOfEnum
|
||||
**/
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
public List<ArrayOfEnumEnum> getArrayOfEnum() {
|
||||
return arrayOfEnum;
|
||||
}
|
||||
|
||||
public void setArrayOfEnum(List<ArrayOfEnumEnum> arrayOfEnum) {
|
||||
this.arrayOfEnum = arrayOfEnum;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
@@ -157,13 +114,12 @@ public class ArrayTest {
|
||||
ArrayTest arrayTest = (ArrayTest) o;
|
||||
return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) &&
|
||||
Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) &&
|
||||
Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel) &&
|
||||
Objects.equals(this.arrayOfEnum, arrayTest.arrayOfEnum);
|
||||
Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel, arrayOfEnum);
|
||||
return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -174,7 +130,6 @@ public class ArrayTest {
|
||||
sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n");
|
||||
sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n");
|
||||
sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n");
|
||||
sb.append(" arrayOfEnum: ").append(toIndentedString(arrayOfEnum)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user