From 49a65c362cb5977674e8a60c4330254ff9ed60a9 Mon Sep 17 00:00:00 2001 From: Charles Wahome Date: Mon, 6 Mar 2023 14:40:20 +0300 Subject: [PATCH] settings will be passed by the apps that need to override --- src/Microsoft.OpenApi.Hidi/OpenApiService.cs | 22 +------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/Microsoft.OpenApi.Hidi/OpenApiService.cs b/src/Microsoft.OpenApi.Hidi/OpenApiService.cs index 9fdca3f66..4d535ee02 100644 --- a/src/Microsoft.OpenApi.Hidi/OpenApiService.cs +++ b/src/Microsoft.OpenApi.Hidi/OpenApiService.cs @@ -324,27 +324,7 @@ public static async Task ConvertCsdlToOpenApi(Stream csdl, stri var edmModel = CsdlReader.Parse(XElement.Parse(csdlText).CreateReader()); var config = GetConfiguration(settingsFile); - var settings = new OpenApiConvertSettings() - { - AddSingleQuotesForStringParameters = true, - AddEnumDescriptionExtension = true, - DeclarePathParametersOnPathItem = true, - EnableKeyAsSegment = true, - EnableOperationId = true, - ErrorResponsesAsDefault = false, - PrefixEntityTypeNameBeforeKey = true, - TagDepth = 2, - EnablePagination = true, - EnableDiscriminatorValue = true, - EnableDerivedTypesReferencesForRequestBody = false, - EnableDerivedTypesReferencesForResponses = false, - ShowRootPath = false, - ShowLinks = false, - ExpandDerivedTypesNavigationProperties = false, - EnableCount = true, - UseSuccessStatusCodeRange = true, - EnableTypeDisambiguationForDefaultValueOfOdataTypeProperty = true - }; + var settings = new OpenApiConvertSettings(); config.GetSection("OpenApiConvertSettings").Bind(settings); OpenApiDocument document = edmModel.ConvertToOpenApi(settings);