Skip to content

Commit

Permalink
Merge pull request #1179 from thewahome/thewahome/feature/remove-defa…
Browse files Browse the repository at this point in the history
…ult-settings-overrides

Feature: removes default conversion settings
  • Loading branch information
MaggieKimani1 authored Mar 6, 2023
2 parents f64e08e + 49a65c3 commit 46e9db7
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions src/Microsoft.OpenApi.Hidi/OpenApiService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -324,27 +324,7 @@ public static async Task<OpenApiDocument> 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);
Expand Down

0 comments on commit 46e9db7

Please sign in to comment.