mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-12 00:21:18 +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:
@@ -42,37 +42,37 @@ public class AnotherFakeApi {
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* <p><b>200</b> - successful operation
|
||||
* @param client client model
|
||||
* @return Client
|
||||
* @throws IOException if an error occurs while attempting to invoke the API
|
||||
**/
|
||||
public Client testSpecialTags(Client client) throws IOException {
|
||||
HttpResponse response = testSpecialTagsForHttpResponse(client);
|
||||
public Client call123testSpecialTags(Client client) throws IOException {
|
||||
HttpResponse response = call123testSpecialTagsForHttpResponse(client);
|
||||
TypeReference typeRef = new TypeReference<Client>() {};
|
||||
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* <p><b>200</b> - successful operation
|
||||
* @param client client model
|
||||
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
|
||||
* @return Client
|
||||
* @throws IOException if an error occurs while attempting to invoke the API
|
||||
**/
|
||||
public Client testSpecialTags(Client client, Map<String, Object> params) throws IOException {
|
||||
HttpResponse response = testSpecialTagsForHttpResponse(client, params);
|
||||
public Client call123testSpecialTags(Client client, Map<String, Object> params) throws IOException {
|
||||
HttpResponse response = call123testSpecialTagsForHttpResponse(client, params);
|
||||
TypeReference typeRef = new TypeReference<Client>() {};
|
||||
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
|
||||
}
|
||||
|
||||
public HttpResponse testSpecialTagsForHttpResponse(Client client) throws IOException {
|
||||
public HttpResponse call123testSpecialTagsForHttpResponse(Client client) throws IOException {
|
||||
// verify the required parameter 'client' is set
|
||||
if (client == null) {
|
||||
throw new IllegalArgumentException("Missing the required parameter 'client' when calling testSpecialTags");
|
||||
throw new IllegalArgumentException("Missing the required parameter 'client' when calling call123testSpecialTags");
|
||||
}
|
||||
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/another-fake/dummy");
|
||||
|
||||
@@ -83,10 +83,10 @@ public class AnotherFakeApi {
|
||||
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PATCH, genericUrl, content).execute();
|
||||
}
|
||||
|
||||
public HttpResponse testSpecialTagsForHttpResponse(java.io.InputStream client, String mediaType) throws IOException {
|
||||
public HttpResponse call123testSpecialTagsForHttpResponse(java.io.InputStream client, String mediaType) throws IOException {
|
||||
// verify the required parameter 'client' is set
|
||||
if (client == null) {
|
||||
throw new IllegalArgumentException("Missing the required parameter 'client' when calling testSpecialTags");
|
||||
throw new IllegalArgumentException("Missing the required parameter 'client' when calling call123testSpecialTags");
|
||||
}
|
||||
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/another-fake/dummy");
|
||||
|
||||
@@ -99,10 +99,10 @@ public class AnotherFakeApi {
|
||||
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PATCH, genericUrl, content).execute();
|
||||
}
|
||||
|
||||
public HttpResponse testSpecialTagsForHttpResponse(Client client, Map<String, Object> params) throws IOException {
|
||||
public HttpResponse call123testSpecialTagsForHttpResponse(Client client, Map<String, Object> params) throws IOException {
|
||||
// verify the required parameter 'client' is set
|
||||
if (client == null) {
|
||||
throw new IllegalArgumentException("Missing the required parameter 'client' when calling testSpecialTags");
|
||||
throw new IllegalArgumentException("Missing the required parameter 'client' when calling call123testSpecialTags");
|
||||
}
|
||||
UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/another-fake/dummy");
|
||||
|
||||
|
||||
@@ -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 IOException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testSpecialTagsTest() throws IOException {
|
||||
public void call123testSpecialTagsTest() throws IOException {
|
||||
Client client = null;
|
||||
Client response = api.testSpecialTags(client);
|
||||
Client response = api.call123testSpecialTags(client);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user