Skip to content

Commit

Permalink
settings will be passed by the apps that need to override
Browse files Browse the repository at this point in the history
  • Loading branch information
thewahome committed Mar 6, 2023
1 parent f64e08e commit 49a65c3
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 49a65c3

Please sign in to comment.