Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4849,6 +4849,8 @@ public CodegenOperation fromOperation(String path,
} else {
op.path = path;
}
// remove backslash from path, e.g. /api/v2/GetPetById\\(\\) => /api/v2/GetPetById()
op.path = op.path.replace("\\", "");

op.summary = escapeText(operation.getSummary());
op.unescapedNotes = operation.getDescription();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,13 @@ paths:
items:
"$ref": "#/components/schemas/myObject"
- type: 'null'
"/fake/path/backslash/GetPetById\\(\\)":
get:
tags:
- fake
responses:
'200':
description: ''
externalDocs:
description: Find out more about Swagger
url: 'http://swagger.io'
Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/java/okhttp-gson-3.1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ Class | Method | HTTP request | Description
*FakeApi* | [**fakeInlineSchemaAnyofPath1Get**](docs/FakeApi.md#fakeInlineSchemaAnyofPath1Get) | **GET** /fake/inline/schema/anyof/path1 |
*FakeApi* | [**fakeInlineSchemaAnyofPath2Get**](docs/FakeApi.md#fakeInlineSchemaAnyofPath2Get) | **GET** /fake/inline/schema/anyof/path2 |
*FakeApi* | [**fakeInlineSchemaAnyofPath3Get**](docs/FakeApi.md#fakeInlineSchemaAnyofPath3Get) | **GET** /fake/inline/schema/anyof/path3 |
*FakeApi* | [**fakePathBackslashGetPetByIdGet**](docs/FakeApi.md#fakePathBackslashGetPetByIdGet) | **GET** /fake/path/backslash/GetPetById() |
*FakeApi* | [**op1**](docs/FakeApi.md#op1) | **POST** /fake/api/changeowner | op1
*FakeApi* | [**op2**](docs/FakeApi.md#op2) | **POST** /fake/api/changename | op2
*FakeApi* | [**op3**](docs/FakeApi.md#op3) | **POST** /fake/api/query/enum | op3
Expand Down
9 changes: 9 additions & 0 deletions samples/client/petstore/java/okhttp-gson-3.1/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,15 @@ paths:
- fake
x-accepts:
- application/json
/fake/path/backslash/GetPetById\(\):
get:
responses:
"200":
description: ""
tags:
- fake
x-accepts:
- application/json
components:
parameters:
ref_to_uuid:
Expand Down
56 changes: 56 additions & 0 deletions samples/client/petstore/java/okhttp-gson-3.1/docs/FakeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All URIs are relative to *http://petstore.swagger.io/v2*
| [**fakeInlineSchemaAnyofPath1Get**](FakeApi.md#fakeInlineSchemaAnyofPath1Get) | **GET** /fake/inline/schema/anyof/path1 | |
| [**fakeInlineSchemaAnyofPath2Get**](FakeApi.md#fakeInlineSchemaAnyofPath2Get) | **GET** /fake/inline/schema/anyof/path2 | |
| [**fakeInlineSchemaAnyofPath3Get**](FakeApi.md#fakeInlineSchemaAnyofPath3Get) | **GET** /fake/inline/schema/anyof/path3 | |
| [**fakePathBackslashGetPetByIdGet**](FakeApi.md#fakePathBackslashGetPetByIdGet) | **GET** /fake/path/backslash/GetPetById() | |
| [**op1**](FakeApi.md#op1) | **POST** /fake/api/changeowner | op1 |
| [**op2**](FakeApi.md#op2) | **POST** /fake/api/changename | op2 |
| [**op3**](FakeApi.md#op3) | **POST** /fake/api/query/enum | op3 |
Expand Down Expand Up @@ -186,6 +187,61 @@ No authorization required
|-------------|-------------|------------------|
| **200** | | - |

<a id="fakePathBackslashGetPetByIdGet"></a>
# **fakePathBackslashGetPetByIdGet**
> fakePathBackslashGetPetByIdGet()



### 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.FakeApi;

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

FakeApi apiInstance = new FakeApi(defaultClient);
try {
apiInstance.fakePathBackslashGetPetByIdGet();
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#fakePathBackslashGetPetByIdGet");
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

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | | - |

<a id="op1"></a>
# **op1**
> Object op1()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,118 @@ public okhttp3.Call fakeInlineSchemaAnyofPath3GetAsync(final ApiCallback<List<Ob
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for fakePathBackslashGetPetByIdGet
* @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 border="1">
<caption>Response Details</caption>
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> </td><td> - </td></tr>
</table>
*/
public okhttp3.Call fakePathBackslashGetPetByIdGetCall(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 = "/fake/path/backslash/GetPetById()";

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 = {
};
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 fakePathBackslashGetPetByIdGetValidateBeforeCall(final ApiCallback _callback) throws ApiException {
return fakePathBackslashGetPetByIdGetCall(_callback);

}

/**
*
*
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table border="1">
<caption>Response Details</caption>
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> </td><td> - </td></tr>
</table>
*/
public void fakePathBackslashGetPetByIdGet() throws ApiException {
fakePathBackslashGetPetByIdGetWithHttpInfo();
}

/**
*
*
* @return ApiResponse&lt;Void&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table border="1">
<caption>Response Details</caption>
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> </td><td> - </td></tr>
</table>
*/
public ApiResponse<Void> fakePathBackslashGetPetByIdGetWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = fakePathBackslashGetPetByIdGetValidateBeforeCall(null);
return localVarApiClient.execute(localVarCall);
}

/**
* (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 border="1">
<caption>Response Details</caption>
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> </td><td> - </td></tr>
</table>
*/
public okhttp3.Call fakePathBackslashGetPetByIdGetAsync(final ApiCallback<Void> _callback) throws ApiException {

okhttp3.Call localVarCall = fakePathBackslashGetPetByIdGetValidateBeforeCall(_callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for op1
* @param _callback Callback for upload/download progress
Expand Down
Loading