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

@@ -33,14 +33,14 @@ import java.util.Optional;
@Api(value = "another-fake", description = "the another-fake API")
public interface AnotherFakeApi {
@ApiOperation(value = "To test special tags", nickname = "testSpecialTags", notes = "To test special tags", response = Client.class, tags={ "$another-fake?", })
@ApiOperation(value = "To test special tags", nickname = "call123testSpecialTags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
@RequestMapping(value = "/another-fake/dummy",
produces = { "application/json" },
consumes = { "application/json" },
method = RequestMethod.PATCH)
default ResponseEntity<Mono<Client>> testSpecialTags(@ApiParam(value = "client model" ,required=true ) @Valid @RequestBody Mono<Client> client, ServerWebExchange exchange) {
default ResponseEntity<Mono<Client>> call123testSpecialTags(@ApiParam(value = "client model" ,required=true ) @Valid @RequestBody Mono<Client> client, ServerWebExchange exchange) {
Mono<Client> result = Mono.empty();
for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {

View File

@@ -1067,8 +1067,8 @@ paths:
- tag: fake
/another-fake/dummy:
patch:
description: To test special tags
operationId: test_special_tags
description: To test special tags and operation ID starting with number
operationId: 123_test_@#$%_special_tags
requestBody:
content:
application/json: