diff --git a/play-2.6/swagger-play2/app/play/modules/swagger/PlayReader.java b/play-2.6/swagger-play2/app/play/modules/swagger/PlayReader.java index dc02edd..f627287 100644 --- a/play-2.6/swagger-play2/app/play/modules/swagger/PlayReader.java +++ b/play-2.6/swagger-play2/app/play/modules/swagger/PlayReader.java @@ -430,8 +430,7 @@ private Operation parseMethod(Class cls, Method method, Route route) { ApiOperation apiOperation = ReflectionUtils.getAnnotation(method, ApiOperation.class); ApiResponses responseAnnotation = ReflectionUtils.getAnnotation(method, ApiResponses.class); - String operationId = method.getName(); - operation.operationId(operationId); + String operationId = null; String responseContainer = null; Type responseType = null; diff --git a/play-2.6/swagger-play2/test/PlayApiListingCacheSpec.scala b/play-2.6/swagger-play2/test/PlayApiListingCacheSpec.scala index 3a1eaf2..bde8415 100644 --- a/play-2.6/swagger-play2/test/PlayApiListingCacheSpec.scala +++ b/play-2.6/swagger-play2/test/PlayApiListingCacheSpec.scala @@ -128,7 +128,7 @@ PUT /api/dog/api/:id testdata.DogController.add0(id:String) opCatGet.getProduces must beNull val opCatPut = pathCat.getOperationMap.get(HttpMethod.PUT) - opCatPut.getOperationId must beEqualTo("add1") + opCatPut.getOperationId must beEqualTo(null) opCatPut.getParameters.head.getName must beEqualTo("cat") opCatPut.getParameters.head.getIn must beEqualTo("body") opCatPut.getParameters.head.asInstanceOf[BodyParameter].getSchema.getReference must beEqualTo("#/definitions/Cat") @@ -162,7 +162,7 @@ PUT /api/dog/api/:id testdata.DogController.add0(id:String) opDogGet.getProduces.asScala.toList must beEqualTo(List("application/json","application/xml")) val opDogPut = pathDog.getOperationMap.get(HttpMethod.PUT) - opDogPut.getOperationId must beEqualTo("add1") + opDogPut.getOperationId must beEqualTo(null) opDogPut.getParameters.head.getName must beEqualTo("dog") opDogPut.getParameters.head.getIn must beEqualTo("body") opDogPut.getParameters.head.asInstanceOf[BodyParameter].getSchema.getReference must beEqualTo("#/definitions/Dog") @@ -174,7 +174,7 @@ PUT /api/dog/api/:id testdata.DogController.add0(id:String) pathDogParam.getOperations.size must beEqualTo(1) val opDogParamPut = pathDogParam.getOperationMap.get(HttpMethod.PUT) - opDogParamPut.getOperationId must beEqualTo("add0") + opDogParamPut.getOperationId must beEqualTo(null) opDogParamPut.getParameters.head.getName must beEqualTo("id") opDogParamPut.getParameters.head.getIn must beEqualTo("path") opDogParamPut.getParameters.head.asInstanceOf[PathParameter].getType must beEqualTo("string")