From 1edda15077d02bfbfe0364a2311db8732842cabc Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 29 Jan 2024 21:26:41 +0800 Subject: [PATCH] update samples --- .../petstore/java/okhttp-gson/README.md | 1 - .../java/okhttp-gson/docs/ValuesApi.md | 60 --------- .../openapitools/client/api/ValuesApi.java | 117 ------------------ 3 files changed, 178 deletions(-) diff --git a/samples/client/petstore/java/okhttp-gson/README.md b/samples/client/petstore/java/okhttp-gson/README.md index 8cd4a7430f5f..73876bfde57c 100644 --- a/samples/client/petstore/java/okhttp-gson/README.md +++ b/samples/client/petstore/java/okhttp-gson/README.md @@ -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 diff --git a/samples/client/petstore/java/okhttp-gson/docs/ValuesApi.md b/samples/client/petstore/java/okhttp-gson/docs/ValuesApi.md index a607e93df06e..4210bff03ec9 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/ValuesApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/ValuesApi.md @@ -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 | @@ -67,62 +66,3 @@ No authorization required | **200** | successful operation | - | | **400** | Invalid Value | - | - -# **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 | - | - diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/ValuesApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/ValuesApi.java index 327ccfafe4c1..79fe043970d5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/ValuesApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/ValuesApi.java @@ -189,121 +189,4 @@ public okhttp3.Call getSomeValuesAsync(final ApiCallback _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 - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid Value -
- */ - 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 localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - 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 - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid Value -
- */ - public Variable internalOnlyGet() throws ApiException { - ApiResponse localVarResp = internalOnlyGetWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * internal only - * - * @return ApiResponse<Variable> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid Value -
- */ - public ApiResponse internalOnlyGetWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = internalOnlyGetValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.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 - - - - -
Status Code Description Response Headers
200 successful operation -
400 Invalid Value -
- */ - public okhttp3.Call internalOnlyGetAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = internalOnlyGetValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } }