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:
William Cheng
2018-08-01 22:31:58 +08:00
committed by GitHub
parent 21141f682f
commit ab08dd1d26
113 changed files with 441 additions and 417 deletions

View File

@@ -4,16 +4,16 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**testSpecialTags**](AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
<a name="testSpecialTags"></a>
# **testSpecialTags**
> Client testSpecialTags(client)
<a name="call123testSpecialTags"></a>
# **call123testSpecialTags**
> Client call123testSpecialTags(client)
To test special tags
To test special tags
To test special tags and operation ID starting with number
### Example
```java
@@ -25,10 +25,10 @@ To test special tags
AnotherFakeApi apiInstance = new AnotherFakeApi();
Client client = new Client(); // Client | client model
try {
Client result = apiInstance.testSpecialTags(client);
Client result = apiInstance.call123testSpecialTags(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnotherFakeApi#testSpecialTags");
System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
e.printStackTrace();
}
```

View File

@@ -37,28 +37,28 @@ public class AnotherFakeApi {
/**
* 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 fails to make API call
*/
public Client testSpecialTags(Client client) throws ApiException {
return testSpecialTagsWithHttpInfo(client).getData();
public Client call123testSpecialTags(Client client) throws ApiException {
return call123testSpecialTagsWithHttpInfo(client).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&lt;Client&gt;
* @throws ApiException if fails to make API call
*/
public ApiResponse<Client> testSpecialTagsWithHttpInfo(Client client) throws ApiException {
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client client) throws ApiException {
Object localVarPostBody = client;
// verify the required parameter 'client' is set
if (client == null) {
throw new ApiException(400, "Missing the required parameter 'client' when calling testSpecialTags");
throw new ApiException(400, "Missing the required parameter 'client' when calling call123testSpecialTags");
}
// create path and map variables