Skip to content

Commit

Permalink
update samples
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed Jan 29, 2024
1 parent b802635 commit 1edda15
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 178 deletions.
1 change: 0 additions & 1 deletion samples/client/petstore/java/okhttp-gson/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ Class | Method | HTTP request | Description
*UserApi* | [**logoutUser**](docs/UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
*UserApi* | [**updateUser**](docs/UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
*ValuesApi* | [**getSomeValues**](docs/ValuesApi.md#getSomeValues) | **GET** /values | Get some primitive variable values
*ValuesApi* | [**internalOnlyGet**](docs/ValuesApi.md#internalOnlyGet) | **GET** /internal/only | internal only


## Documentation for Models
Expand Down
60 changes: 0 additions & 60 deletions samples/client/petstore/java/okhttp-gson/docs/ValuesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**getSomeValues**](ValuesApi.md#getSomeValues) | **GET** /values | Get some primitive variable values |
| [**internalOnlyGet**](ValuesApi.md#internalOnlyGet) | **GET** /internal/only | internal only |


<a id="getSomeValues"></a>
Expand Down Expand Up @@ -67,62 +66,3 @@ No authorization required
| **200** | successful operation | - |
| **400** | Invalid Value | - |

<a id="internalOnlyGet"></a>
# **internalOnlyGet**
> Variable internalOnlyGet()
internal only



### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.ValuesApi;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");

ValuesApi apiInstance = new ValuesApi(defaultClient);
try {
Variable result = apiInstance.internalOnlyGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ValuesApi#internalOnlyGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**Variable**](Variable.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **400** | Invalid Value | - |

Original file line number Diff line number Diff line change
Expand Up @@ -189,121 +189,4 @@ public okhttp3.Call getSomeValuesAsync(final ApiCallback<Variable> _callback) th
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for internalOnlyGet
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid Value </td><td> - </td></tr>
</table>
*/
public okhttp3.Call internalOnlyGetCall(final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };

// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}

Object localVarPostBody = null;

// create path and map variables
String localVarPath = "/internal/only";

List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();

final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}

final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}

String[] localVarAuthNames = new String[] { };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}

@SuppressWarnings("rawtypes")
private okhttp3.Call internalOnlyGetValidateBeforeCall(final ApiCallback _callback) throws ApiException {
return internalOnlyGetCall(_callback);

}

/**
* internal only
*
* @return Variable
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid Value </td><td> - </td></tr>
</table>
*/
public Variable internalOnlyGet() throws ApiException {
ApiResponse<Variable> localVarResp = internalOnlyGetWithHttpInfo();
return localVarResp.getData();
}

/**
* internal only
*
* @return ApiResponse&lt;Variable&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid Value </td><td> - </td></tr>
</table>
*/
public ApiResponse<Variable> internalOnlyGetWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = internalOnlyGetValidateBeforeCall(null);
Type localVarReturnType = new TypeToken<Variable>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}

/**
* internal only (asynchronously)
*
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid Value </td><td> - </td></tr>
</table>
*/
public okhttp3.Call internalOnlyGetAsync(final ApiCallback<Variable> _callback) throws ApiException {

okhttp3.Call localVarCall = internalOnlyGetValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken<Variable>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}

0 comments on commit 1edda15

Please sign in to comment.