mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-19 07:17:08 +00:00
Better handling of operationID starting with numbers (#691)
* add numeric operationid to test spec * better handling of operationId in more generators * fix go toOperationId * update samples * update java samples * update java samples (vertx, webclient) * update java google api client sample * fix typo, update OAS3 test spec, update php petstore (oas3) * defer camelize in operationid * remove duplicated sanitizeName
This commit is contained in:
@@ -55,14 +55,14 @@ public class AnotherFakeApi {
|
||||
}
|
||||
|
||||
/**
|
||||
* Build call for testSpecialTags
|
||||
* Build call for call123testSpecialTags
|
||||
* @param client client model (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call testSpecialTagsCall(Client client, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
public com.squareup.okhttp.Call call123testSpecialTagsCall(Client client, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = client;
|
||||
|
||||
// create path and map variables
|
||||
@@ -104,53 +104,53 @@ public class AnotherFakeApi {
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private com.squareup.okhttp.Call testSpecialTagsValidateBeforeCall(Client client, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
private com.squareup.okhttp.Call call123testSpecialTagsValidateBeforeCall(Client client, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'client' is set
|
||||
if (client == null) {
|
||||
throw new ApiException("Missing the required parameter 'client' when calling testSpecialTags(Async)");
|
||||
throw new ApiException("Missing the required parameter 'client' when calling call123testSpecialTags(Async)");
|
||||
}
|
||||
|
||||
|
||||
com.squareup.okhttp.Call call = testSpecialTagsCall(client, progressListener, progressRequestListener);
|
||||
com.squareup.okhttp.Call call = call123testSpecialTagsCall(client, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param client client model (required)
|
||||
* @return Client
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public Client testSpecialTags(Client client) throws ApiException {
|
||||
ApiResponse<Client> resp = testSpecialTagsWithHttpInfo(client);
|
||||
public Client call123testSpecialTags(Client client) throws ApiException {
|
||||
ApiResponse<Client> resp = call123testSpecialTagsWithHttpInfo(client);
|
||||
return resp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param client client model (required)
|
||||
* @return ApiResponse<Client>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Client> testSpecialTagsWithHttpInfo(Client client) throws ApiException {
|
||||
com.squareup.okhttp.Call call = testSpecialTagsValidateBeforeCall(client, null, null);
|
||||
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client client) throws ApiException {
|
||||
com.squareup.okhttp.Call call = call123testSpecialTagsValidateBeforeCall(client, null, null);
|
||||
Type localVarReturnType = new TypeToken<Client>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags (asynchronously)
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param client client model (required)
|
||||
* @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
|
||||
*/
|
||||
public com.squareup.okhttp.Call testSpecialTagsAsync(Client client, final ApiCallback<Client> callback) throws ApiException {
|
||||
public com.squareup.okhttp.Call call123testSpecialTagsAsync(Client client, final ApiCallback<Client> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
@@ -171,7 +171,7 @@ public class AnotherFakeApi {
|
||||
};
|
||||
}
|
||||
|
||||
com.squareup.okhttp.Call call = testSpecialTagsValidateBeforeCall(client, progressListener, progressRequestListener);
|
||||
com.squareup.okhttp.Call call = call123testSpecialTagsValidateBeforeCall(client, progressListener, progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<Client>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
|
||||
@@ -35,15 +35,15 @@ public class AnotherFakeApiTest {
|
||||
/**
|
||||
* To test special tags
|
||||
*
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testSpecialTagsTest() throws ApiException {
|
||||
public void call123testSpecialTagsTest() throws ApiException {
|
||||
Client client = null;
|
||||
Client response = api.testSpecialTags(client);
|
||||
Client response = api.call123testSpecialTags(client);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user