diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/PublisherCommonUtils.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/PublisherCommonUtils.java index 237fdf077414..6a881b795309 100755 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/PublisherCommonUtils.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/PublisherCommonUtils.java @@ -1841,7 +1841,8 @@ public static APIProduct addAPIProductWithGeneratedSwaggerDefinition(APIProductD apiProductDTO.setApiKeyHeader(APIConstants.API_KEY_HEADER_DEFAULT); } - apiProductDTO.setIsDefaultVersion(false); + //isDefaultVersion is true for a new API Product. + apiProductDTO.setIsDefaultVersion(true); //Remove the /{version} from the context. if (context.endsWith("/" + RestApiConstants.API_VERSION_PARAM)) {