diff --git a/eventgrid/resource-manager/v2018_01_01/pom.xml b/eventgrid/resource-manager/v2018_01_01/pom.xml
index 7a030dbddb9f..93f70d40b786 100644
--- a/eventgrid/resource-manager/v2018_01_01/pom.xml
+++ b/eventgrid/resource-manager/v2018_01_01/pom.xml
@@ -71,6 +71,8 @@
azure-arm-client-runtime
test-jar
test
+
+ 1.6.5
diff --git a/eventgrid/resource-manager/v2018_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2018_01_01/EventHubEventSubscriptionDestination.java b/eventgrid/resource-manager/v2018_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2018_01_01/EventHubEventSubscriptionDestination.java
index fad21465afa0..7c1722051600 100644
--- a/eventgrid/resource-manager/v2018_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2018_01_01/EventHubEventSubscriptionDestination.java
+++ b/eventgrid/resource-manager/v2018_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2018_01_01/EventHubEventSubscriptionDestination.java
@@ -16,7 +16,7 @@
/**
* Information about the event hub destination for an event subscription.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = EventHubEventSubscriptionDestination.class)
@JsonTypeName("EventHub")
@JsonFlatten
public class EventHubEventSubscriptionDestination extends EventSubscriptionDestination {
diff --git a/eventgrid/resource-manager/v2018_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2018_01_01/EventSubscriptionDestination.java b/eventgrid/resource-manager/v2018_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2018_01_01/EventSubscriptionDestination.java
index 15fdde382b2d..c3f9a2822f35 100644
--- a/eventgrid/resource-manager/v2018_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2018_01_01/EventSubscriptionDestination.java
+++ b/eventgrid/resource-manager/v2018_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2018_01_01/EventSubscriptionDestination.java
@@ -15,7 +15,7 @@
/**
* Information about the destination for an event subscription.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = EventSubscriptionDestination.class)
@JsonTypeName("EventSubscriptionDestination")
@JsonSubTypes({
@JsonSubTypes.Type(name = "WebHook", value = WebHookEventSubscriptionDestination.class),
diff --git a/eventgrid/resource-manager/v2018_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2018_01_01/WebHookEventSubscriptionDestination.java b/eventgrid/resource-manager/v2018_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2018_01_01/WebHookEventSubscriptionDestination.java
index 06a21bd9d1c0..a44380505df2 100644
--- a/eventgrid/resource-manager/v2018_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2018_01_01/WebHookEventSubscriptionDestination.java
+++ b/eventgrid/resource-manager/v2018_01_01/src/main/java/com/microsoft/azure/management/eventgrid/v2018_01_01/WebHookEventSubscriptionDestination.java
@@ -16,7 +16,7 @@
/**
* Information about the webhook destination for an event subscription.
*/
-@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType")
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType", defaultImpl = WebHookEventSubscriptionDestination.class)
@JsonTypeName("WebHook")
@JsonFlatten
public class WebHookEventSubscriptionDestination extends EventSubscriptionDestination {
diff --git a/eventgrid/resource-manager/v2018_01_01/src/test/java/com/microsoft/azure/management/eventgrid/v2018_01_01/EventGridTest.java b/eventgrid/resource-manager/v2018_01_01/src/test/java/com/microsoft/azure/management/eventgrid/v2018_01_01/EventGridTest.java
deleted file mode 100644
index c0975e1068a1..000000000000
--- a/eventgrid/resource-manager/v2018_01_01/src/test/java/com/microsoft/azure/management/eventgrid/v2018_01_01/EventGridTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- */
-
-package com.microsoft.azure.management.eventgrid.v2018_01_01;
-import com.microsoft.azure.arm.core.TestBase;
-import com.microsoft.azure.management.eventgrid.v2018_01_01.implementation.EventGridManager;
-import com.microsoft.azure.management.resources.implementation.ResourceManager;
-import com.microsoft.rest.RestClient;
-import com.microsoft.azure.arm.utils.SdkContext;
-import org.junit.Test;
-import org.junit.Assert;
-import com.microsoft.azure.arm.resources.Region;
-import com.microsoft.azure.management.resources.ResourceGroup;
-
-public class EventGridTest extends TestBase {
- protected static ResourceManager resourceManager;
- protected static EventGridManager eventGridManager;
- private static String rgName;
- @Override
- protected void initializeClients(RestClient restClient, String defaultSubscription, String domain) {
- resourceManager = ResourceManager
- .authenticate(restClient)
- .withSubscription(defaultSubscription);
- eventGridManager = EventGridManager
- .authenticate(restClient, defaultSubscription);
- }
- @Override
- protected void cleanUpResources() {
- resourceManager.resourceGroups().deleteByName(rgName);
- }
- @Test
- public void firstTest() {
- rgName = SdkContext.randomResourceName("rg", 20);
- ResourceGroup group = resourceManager.resourceGroups()
- .define(rgName)
- .withRegion(Region.US_WEST.toString())
- .create();
- Assert.assertNotNull(group);
- }
-}
diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json
index afc88f9313de..143b2e76ed7b 100644
--- a/swagger_to_sdk_config.json
+++ b/swagger_to_sdk_config.json
@@ -6,7 +6,8 @@
"verbose": "",
"sdkrel:azure-libraries-for-java-folder": ".",
"multiapi": "",
- "use": "@microsoft.azure/autorest.java@preview"
+ "use": "@microsoft.azure/autorest.java@preview",
+ "java.clear-output-folder": ""
},
"version": "0.2.0",
"advanced_options": {