diff --git a/src/Microsoft.OpenApi.OData.Reader/OpenApiConvertSettings.cs b/src/Microsoft.OpenApi.OData.Reader/OpenApiConvertSettings.cs index 5615f3ff..a7021c44 100644 --- a/src/Microsoft.OpenApi.OData.Reader/OpenApiConvertSettings.cs +++ b/src/Microsoft.OpenApi.OData.Reader/OpenApiConvertSettings.cs @@ -10,393 +10,391 @@ using Microsoft.OpenApi.OData.Extensions; using Microsoft.OpenApi.OData.Vocabulary.Core; -namespace Microsoft.OpenApi.OData +namespace Microsoft.OpenApi.OData; +/// +/// Convert settings. +/// +public class OpenApiConvertSettings { /// - /// Convert settings. + /// Gets/sets the service root. /// - public class OpenApiConvertSettings + public Uri ServiceRoot { get; set; } = new Uri("http://localhost"); + + /// + /// Get/set the metadata version. + /// + public string SemVerVersion { get; set; } = "1.0.0"; + + /// + /// Gets/set a value indicating whether to output key as segment path. + /// + public bool? EnableKeyAsSegment { get; set; } + + /// + /// Gets/set a value indicating whether to output un-qualified operation call. + /// + public bool EnableUnqualifiedCall { get; set; } + + /// + /// Gets/set a value indicating whether to output the path for Edm operation. + /// + public bool EnableOperationPath { get; set; } = true; + + /// + /// Gets/set a value indicating whether to output the path for Edm operation import. + /// + public bool EnableOperationImportPath { get; set; } = true; + + /// + /// Gets/set a value indicating whether to output the path for Edm navigation property. + /// + public bool EnableNavigationPropertyPath { get; set; } = true; + + /// + /// Gets/set a value indicating the tags name depth. + /// + public int TagDepth { get; set; } = 4; + + /// + /// Gets/set a value indicating whether we prefix entity type name before single key. + /// + public bool PrefixEntityTypeNameBeforeKey { get; set; } = false; + + /// + /// Gets/sets a value indicating whether the version of openApi to serialize to is v2. + /// Currently only impacts nullable references for EdmTypeSchemaGenerator + /// + public OpenApiSpecVersion OpenApiSpecVersion { get; set; } = OpenApiSpecVersion.OpenApi3_1; + + /// + /// Gets/sets a value indicating to set the OperationId on Open API operation. + /// + public bool EnableOperationId { get; set; } = true; + + /// + /// Gets/sets a value indicating whether to output the binding function as Uri escape function if applied the UriEscapeFunction term. + /// + public bool EnableUriEscapeFunctionCall { get; set; } = false; + + /// + /// Gets/sets a value indicating whether to verify the edm model before converter. + /// + public bool VerifyEdmModel { get; set; } + + /// + /// Gets/sets a value indicating whether the server is IEEE754 compatible. + /// If it is IEEE754Compatible, the server will write quoted string for INT64 and decimal to prevent data loss; + /// otherwise keep number without quotes. + /// + public bool IEEE754Compatible { get; set; } + + /// + /// Gets or sets $Top example value. + /// + public int TopExample { get; set; } = 50; + + /// + /// Gets/sets a value indicating whether or not to allow paging a collection of entities. + /// + public bool EnablePagination { get; set; } + + /// + /// Gets/sets a value indicating whether or not to allow the count of a collection of entities. + /// + public bool EnableCount { get; set; } + + /// + /// Gets/sets a value indicating whether or not to reference @odata.nextLink, @odata.deltaLink and @odata.count in responses + /// + public bool EnableODataAnnotationReferencesForResponses { get; set; } = true; + + /// + /// Gets/sets a value that specifies the name of the operation for retrieving the next page in a collection of entities. + /// + public string PageableOperationName { get; set; } = "listMore"; + + /// + /// Gets/sets a value indicating whether or not to allow discriminator value support. + /// + public bool EnableDiscriminatorValue { get; set; } = false; + + /// + /// Gets/sets a value indicating whether or not to show the derived types of a base type reference in the responses payload. + /// + public bool EnableDerivedTypesReferencesForResponses { get; set; } = false; + + /// + /// Gets/sets a value indicating whether or not to show the derived types of a base type reference in the requestBody payload. + /// + public bool EnableDerivedTypesReferencesForRequestBody { get; set; } = false; + + /// + /// Gets/sets a value indicating whether or not to generate paths with alternate key parameters + /// + public bool AddAlternateKeyPaths { get; set; } = false; + + /// + /// Gets/sets a value that specifies a prefix to be prepended to all generated paths. + /// + public string? PathPrefix { - /// - /// Gets/sets the service root. - /// - public Uri ServiceRoot { get; set; } = new Uri("http://localhost"); - - /// - /// Get/set the metadata version. - /// - public string SemVerVersion { get; set; } = "1.0.0"; - - /// - /// Gets/set a value indicating whether to output key as segment path. - /// - public bool? EnableKeyAsSegment { get; set; } - - /// - /// Gets/set a value indicating whether to output un-qualified operation call. - /// - public bool EnableUnqualifiedCall { get; set; } - - /// - /// Gets/set a value indicating whether to output the path for Edm operation. - /// - public bool EnableOperationPath { get; set; } = true; - - /// - /// Gets/set a value indicating whether to output the path for Edm operation import. - /// - public bool EnableOperationImportPath { get; set; } = true; - - /// - /// Gets/set a value indicating whether to output the path for Edm navigation property. - /// - public bool EnableNavigationPropertyPath { get; set; } = true; - - /// - /// Gets/set a value indicating the tags name depth. - /// - public int TagDepth { get; set; } = 4; - - /// - /// Gets/set a value indicating whether we prefix entity type name before single key. - /// - public bool PrefixEntityTypeNameBeforeKey { get; set; } = false; - - /// - /// Gets/sets a value indicating whether the version of openApi to serialize to is v2. - /// Currently only impacts nullable references for EdmTypeSchemaGenerator - /// - public OpenApiSpecVersion OpenApiSpecVersion { get; set; } = OpenApiSpecVersion.OpenApi3_1; - - /// - /// Gets/sets a value indicating to set the OperationId on Open API operation. - /// - public bool EnableOperationId { get; set; } = true; - - /// - /// Gets/sets a value indicating whether to output the binding function as Uri escape function if applied the UriEscapeFunction term. - /// - public bool EnableUriEscapeFunctionCall { get; set; } = false; - - /// - /// Gets/sets a value indicating whether to verify the edm model before converter. - /// - public bool VerifyEdmModel { get; set; } - - /// - /// Gets/sets a value indicating whether the server is IEEE754 compatible. - /// If it is IEEE754Compatible, the server will write quoted string for INT64 and decimal to prevent data loss; - /// otherwise keep number without quotes. - /// - public bool IEEE754Compatible { get; set; } - - /// - /// Gets or sets $Top example value. - /// - public int TopExample { get; set; } = 50; - - /// - /// Gets/sets a value indicating whether or not to allow paging a collection of entities. - /// - public bool EnablePagination { get; set; } - - /// - /// Gets/sets a value indicating whether or not to allow the count of a collection of entities. - /// - public bool EnableCount { get; set; } - - /// - /// Gets/sets a value indicating whether or not to reference @odata.nextLink, @odata.deltaLink and @odata.count in responses - /// - public bool EnableODataAnnotationReferencesForResponses { get; set; } = true; - - /// - /// Gets/sets a value that specifies the name of the operation for retrieving the next page in a collection of entities. - /// - public string PageableOperationName { get; set; } = "listMore"; - - /// - /// Gets/sets a value indicating whether or not to allow discriminator value support. - /// - public bool EnableDiscriminatorValue { get; set; } = false; - - /// - /// Gets/sets a value indicating whether or not to show the derived types of a base type reference in the responses payload. - /// - public bool EnableDerivedTypesReferencesForResponses { get; set; } = false; - - /// - /// Gets/sets a value indicating whether or not to show the derived types of a base type reference in the requestBody payload. - /// - public bool EnableDerivedTypesReferencesForRequestBody { get; set; } = false; - - /// - /// Gets/sets a value indicating whether or not to generate paths with alternate key parameters - /// - public bool AddAlternateKeyPaths { get; set; } = false; - - /// - /// Gets/sets a value that specifies a prefix to be prepended to all generated paths. - /// - public string? PathPrefix + get { - get + if (RoutePathPrefixProvider != null) { - if (RoutePathPrefixProvider != null) - { - return RoutePathPrefixProvider.PathPrefix; - } - - return null; + return RoutePathPrefixProvider.PathPrefix; } - set + + return null; + } + set + { + if (string.IsNullOrWhiteSpace(value)) { - if (string.IsNullOrWhiteSpace(value)) - { - throw Error.ArgumentNullOrEmpty("value"); - } - - RoutePathPrefixProvider = new ODataRoutePathPrefixProvider - { - PathPrefix = value - }; + throw Error.ArgumentNullOrEmpty("value"); } + + RoutePathPrefixProvider = new ODataRoutePathPrefixProvider + { + PathPrefix = value + }; } + } - /// - /// Gets/sets a route path prefix provider. - /// - public IODataRoutePathPrefixProvider? RoutePathPrefixProvider { get; set; } - - /// - /// Gets/Sets a value indicating whether or not to show the OpenAPI links in the responses. - /// - public bool ShowLinks { get; set; } = false; - - /// - /// Gets/Sets a value indicating whether or not to show schema examples. - /// - public bool ShowSchemaExamples { get; set; } = false; - - /// - /// Gets/Sets a value indicating whether or not to require the - /// Validation.DerivedTypeConstraint to be applied to NavigationSources - /// to bind operations of derived types to them. - /// - public bool RequireDerivedTypesConstraintForBoundOperations { get; set; } = false; - - /// - /// Gets/sets a value indicating whether or not to show the root path of the described API. - /// - public bool ShowRootPath { get; set; } = false; - - /// - /// Gets/sets a value indicating whether or not to show the group path extension. - /// - public bool ShowMsDosGroupPath { get; set; } = true; - - /// - /// Gets/sets links to external documentation for operations - /// - public bool ShowExternalDocs { get; set; } = true; - - /// - /// Gets/sets a the path provider. - /// - public IODataPathProvider? PathProvider { get; set; } - - /// - /// Gets/sets a value indicating whether or not add OData $count segments in the description for collections. - /// - public bool EnableDollarCountPath { get; set; } = true; - - /// - /// Gets/sets a value indicating whether or not single quotes surrounding string parameters in url templates should be added. - /// - public bool AddSingleQuotesForStringParameters { get; set; } = false; - - /// - /// Gets/sets a value indicating whether or not to include the OData type cast segments. - /// - public bool EnableODataTypeCast { get; set; } = true; - - /// - /// Gets/sets a value indicating whether or not to require a derived types constraint to include the OData type cast segments. - /// - public bool RequireDerivedTypesConstraintForODataTypeCastSegments { get; set; } = true; - - /// - /// Gets/Sets a value indicating whether or not to retrieve complex or navigation properties declared in derived types. - /// - public bool GenerateDerivedTypesProperties { get; set; } = true; - - /// - /// Gets/sets a value indicating whether or not to set the deprecated tag for the operation when a revision is present as well as the "x-ms-deprecation" extension with additional information. - /// - public bool EnableDeprecationInformation { get; set; } = true; - - /// - /// Gets/sets a value indicating whether or not to add a "x-ms-enum" extension to the enum type schema for V2 and V3 descriptions. - /// V3.1 will won't add the extension. - /// https://github.com/Azure/autorest/blob/main/docs/extensions/readme.md#x-ms-enum - /// - public bool AddEnumDescriptionExtension { get; set; } = false; - - /// - /// Gets/sets a value indicating whether or not to add a "x-ms-enum-flags" extension to the enum type schema. - /// - public bool AddEnumFlagsExtension { get; set; } = true; - - /// - /// Gets/sets a value indicating whether the error responses should be described as a default response or as 4XX and 5XX error responses. - /// - public bool ErrorResponsesAsDefault { get; set; } = true; - - /// - /// Gets/Sets the name of the complex type to look for in the main namespace to use as the inner error type. - /// - public string InnerErrorComplexTypeName { get; set; } = "InnerError"; - - /// - /// Gets/Sets a value indicating whether path parameters should be declared on path item object. - /// If true, path parameters will be declared on the path item object, otherwise they - /// will be declared on the operation object. - /// - public bool DeclarePathParametersOnPathItem { get; set; } = false; - - /// - /// Gets/Sets a value indicating whether or not to use restrictions annotations to generate paths for complex properties. - /// - public bool RequireRestrictionAnnotationsToGenerateComplexPropertyPaths { get; set; } = true; - - /// - /// Gets/sets a dictionary containing a mapping of custom attribute names and extension names. - /// - public Dictionary CustomXMLAttributesMapping { get; set; } = new(); - - /// - /// Gets/sets a value indicating whether or not to append bound operations on derived type cast segments. - /// - public bool AppendBoundOperationsOnDerivedTypeCastSegments { get; set; } = false; - - /// - /// Gets/Sets a value indicating whether or not to use the HTTP success status code range 2XX - /// to represent all response codes between 200 - 299. - /// - public bool UseSuccessStatusCodeRange { get; set; } = false; - - /// - /// Gets/Sets a value indicating whether to show the version of the assembly used for generating - /// Open API document - /// - public bool IncludeAssemblyInfo { get; set; } = true; - - /// - /// Get/Sets a dictionary containing a mapping of HTTP methods to custom link relation types - /// - public Dictionary CustomHttpMethodLinkRelMapping { get; set; } = new() - { - { LinkRelKey.List, "https://graph.microsoft.com/rels/docs/list" }, - { LinkRelKey.ReadByKey, "https://graph.microsoft.com/rels/docs/get" }, - { LinkRelKey.Create, "https://graph.microsoft.com/rels/docs/create" }, - { LinkRelKey.Update, "https://graph.microsoft.com/rels/docs/update" }, - { LinkRelKey.Delete, "https://graph.microsoft.com/rels/docs/delete" }, - { LinkRelKey.Action, "https://graph.microsoft.com/rels/docs/action" }, - { LinkRelKey.Function, "https://graph.microsoft.com/rels/docs/function" } - }; + /// + /// Gets/sets a route path prefix provider. + /// + public IODataRoutePathPrefixProvider? RoutePathPrefixProvider { get; set; } + + /// + /// Gets/Sets a value indicating whether or not to show the OpenAPI links in the responses. + /// + public bool ShowLinks { get; set; } = false; + + /// + /// Gets/Sets a value indicating whether or not to show schema examples. + /// + public bool ShowSchemaExamples { get; set; } = false; - /// - /// Gets/sets a value indicating whether to set the default value for a structured type's @odata.type property. - /// If false, the value will be set conditionally based on whether the type's base type is abstract (and not entity) - /// and is referenced in the properties of a structural property or an action. - /// - public bool EnableTypeDisambiguationForDefaultValueOfOdataTypeProperty { get; set; } = false; - - /// - /// The namespace prefix to be stripped from the in method paths. - /// - public string? NamespacePrefixToStripForInMethodPaths { get; set; } - - /// - /// Enables the use of aliases for the type cast segments to shorten the url path. - /// - public bool EnableAliasForTypeCastSegments { get; set; } = false; - - /// - /// Enables the use of aliases for operation segments to shorten the url path. - /// - public bool EnableAliasForOperationSegments { get; set; } = false; - - /// - /// Gets/Sets a value indicating whether or not to generate the schema of query options as an array of string values. - /// If false, the schema will be generated as an array of enum string values. - /// - public bool UseStringArrayForQueryOptionsSchema { get; set; } = true; - - /// - /// Gets/Sets a value indicating the depth to expand composable functions. - /// - public int ComposableFunctionsExpansionDepth { get; set; } = 1; - - internal OpenApiConvertSettings Clone() + /// + /// Gets/Sets a value indicating whether or not to require the + /// Validation.DerivedTypeConstraint to be applied to NavigationSources + /// to bind operations of derived types to them. + /// + public bool RequireDerivedTypesConstraintForBoundOperations { get; set; } = false; + + /// + /// Gets/sets a value indicating whether or not to show the root path of the described API. + /// + public bool ShowRootPath { get; set; } = false; + + /// + /// Gets/sets a value indicating whether or not to show the group path extension. + /// + public bool ShowMsDosGroupPath { get; set; } = true; + + /// + /// Gets/sets links to external documentation for operations + /// + public bool ShowExternalDocs { get; set; } = true; + + /// + /// Gets/sets a the path provider. + /// + public IODataPathProvider? PathProvider { get; set; } + + /// + /// Gets/sets a value indicating whether or not add OData $count segments in the description for collections. + /// + public bool EnableDollarCountPath { get; set; } = true; + + /// + /// Gets/sets a value indicating whether or not single quotes surrounding string parameters in url templates should be added. + /// + public bool AddSingleQuotesForStringParameters { get; set; } = false; + + /// + /// Gets/sets a value indicating whether or not to include the OData type cast segments. + /// + public bool EnableODataTypeCast { get; set; } = true; + + /// + /// Gets/sets a value indicating whether or not to require a derived types constraint to include the OData type cast segments. + /// + public bool RequireDerivedTypesConstraintForODataTypeCastSegments { get; set; } = true; + + /// + /// Gets/Sets a value indicating whether or not to retrieve complex or navigation properties declared in derived types. + /// + public bool GenerateDerivedTypesProperties { get; set; } = true; + + /// + /// Gets/sets a value indicating whether or not to set the deprecated tag for the operation when a revision is present as well as the "x-ms-deprecation" extension with additional information. + /// + public bool EnableDeprecationInformation { get; set; } = true; + + /// + /// Gets/sets a value indicating whether or not to add a "x-ms-enum" extension to the enum type schema for V2 and V3 descriptions. + /// V3.1 will won't add the extension. + /// https://github.com/Azure/autorest/blob/main/docs/extensions/readme.md#x-ms-enum + /// + public bool AddEnumDescriptionExtension { get; set; } = false; + + /// + /// Gets/sets a value indicating whether or not to add a "x-ms-enum-flags" extension to the enum type schema. + /// + public bool AddEnumFlagsExtension { get; set; } = true; + + /// + /// Gets/sets a value indicating whether the error responses should be described as a default response or as 4XX and 5XX error responses. + /// + public bool ErrorResponsesAsDefault { get; set; } = true; + + /// + /// Gets/Sets the name of the complex type to look for in the main namespace to use as the inner error type. + /// + public string InnerErrorComplexTypeName { get; set; } = "InnerError"; + + /// + /// Gets/Sets a value indicating whether path parameters should be declared on path item object. + /// If true, path parameters will be declared on the path item object, otherwise they + /// will be declared on the operation object. + /// + public bool DeclarePathParametersOnPathItem { get; set; } = false; + + /// + /// Gets/Sets a value indicating whether or not to use restrictions annotations to generate paths for complex properties. + /// + public bool RequireRestrictionAnnotationsToGenerateComplexPropertyPaths { get; set; } = true; + + /// + /// Gets/sets a dictionary containing a mapping of custom attribute names and extension names. + /// + public Dictionary CustomXMLAttributesMapping { get; set; } = new(); + + /// + /// Gets/sets a value indicating whether or not to append bound operations on derived type cast segments. + /// + public bool AppendBoundOperationsOnDerivedTypeCastSegments { get; set; } = false; + + /// + /// Gets/Sets a value indicating whether or not to use the HTTP success status code range 2XX + /// to represent all response codes between 200 - 299. + /// + public bool UseSuccessStatusCodeRange { get; set; } = false; + + /// + /// Gets/Sets a value indicating whether to show the version of the assembly used for generating + /// Open API document + /// + public bool IncludeAssemblyInfo { get; set; } = true; + + /// + /// Get/Sets a dictionary containing a mapping of HTTP methods to custom link relation types + /// + public Dictionary CustomHttpMethodLinkRelMapping { get; set; } = new() + { + { LinkRelKey.List, "https://graph.microsoft.com/rels/docs/list" }, + { LinkRelKey.ReadByKey, "https://graph.microsoft.com/rels/docs/get" }, + { LinkRelKey.Create, "https://graph.microsoft.com/rels/docs/create" }, + { LinkRelKey.Update, "https://graph.microsoft.com/rels/docs/update" }, + { LinkRelKey.Delete, "https://graph.microsoft.com/rels/docs/delete" }, + { LinkRelKey.Action, "https://graph.microsoft.com/rels/docs/action" }, + { LinkRelKey.Function, "https://graph.microsoft.com/rels/docs/function" } + }; + + /// + /// Gets/sets a value indicating whether to set the default value for a structured type's @odata.type property. + /// If false, the value will be set conditionally based on whether the type's base type is abstract (and not entity) + /// and is referenced in the properties of a structural property or an action. + /// + public bool EnableTypeDisambiguationForDefaultValueOfOdataTypeProperty { get; set; } = false; + + /// + /// The namespace prefix to be stripped from the in method paths. + /// + public string? NamespacePrefixToStripForInMethodPaths { get; set; } + + /// + /// Enables the use of aliases for the type cast segments to shorten the url path. + /// + public bool EnableAliasForTypeCastSegments { get; set; } = false; + + /// + /// Enables the use of aliases for operation segments to shorten the url path. + /// + public bool EnableAliasForOperationSegments { get; set; } = false; + + /// + /// Gets/Sets a value indicating whether or not to generate the schema of query options as an array of string values. + /// If false, the schema will be generated as an array of enum string values. + /// + public bool UseStringArrayForQueryOptionsSchema { get; set; } = true; + + /// + /// Gets/Sets a value indicating the depth to expand composable functions. + /// + public int ComposableFunctionsExpansionDepth { get; set; } = 1; + + internal OpenApiConvertSettings Clone() + { + var newSettings = new OpenApiConvertSettings { - var newSettings = new OpenApiConvertSettings - { - ServiceRoot = this.ServiceRoot, - EnableKeyAsSegment = this.EnableKeyAsSegment, - EnableUnqualifiedCall = this.EnableUnqualifiedCall, - EnableOperationPath = this.EnableOperationPath, - EnableOperationImportPath = this.EnableOperationImportPath, - EnableNavigationPropertyPath = this.EnableNavigationPropertyPath, - TagDepth = this.TagDepth, - PrefixEntityTypeNameBeforeKey = this.PrefixEntityTypeNameBeforeKey, - OpenApiSpecVersion = this.OpenApiSpecVersion, - EnableOperationId = this.EnableOperationId, - VerifyEdmModel = this.VerifyEdmModel, - IEEE754Compatible = this.IEEE754Compatible, - TopExample = this.TopExample, - EnableUriEscapeFunctionCall = this.EnableUriEscapeFunctionCall, - EnablePagination = this.EnablePagination, - PageableOperationName = this.PageableOperationName, - EnableDiscriminatorValue = this.EnableDiscriminatorValue, - EnableDerivedTypesReferencesForResponses = this.EnableDerivedTypesReferencesForResponses, - EnableDerivedTypesReferencesForRequestBody = this.EnableDerivedTypesReferencesForRequestBody, - RoutePathPrefixProvider = this.RoutePathPrefixProvider, - ShowLinks = this.ShowLinks, - RequireDerivedTypesConstraintForBoundOperations = this.RequireDerivedTypesConstraintForBoundOperations, - ShowSchemaExamples = this.ShowSchemaExamples, - ShowRootPath = this.ShowRootPath, - ShowExternalDocs = this.ShowExternalDocs, - PathProvider = this.PathProvider, - EnableDollarCountPath = this.EnableDollarCountPath, - AddSingleQuotesForStringParameters = this.AddSingleQuotesForStringParameters, - EnableODataTypeCast = this.EnableODataTypeCast, - RequireDerivedTypesConstraintForODataTypeCastSegments = this.RequireDerivedTypesConstraintForODataTypeCastSegments, - EnableDeprecationInformation = this.EnableDeprecationInformation, - AddEnumDescriptionExtension = this.AddEnumDescriptionExtension, - AddEnumFlagsExtension = this.AddEnumFlagsExtension, - ErrorResponsesAsDefault = this.ErrorResponsesAsDefault, - InnerErrorComplexTypeName = this.InnerErrorComplexTypeName, - RequireRestrictionAnnotationsToGenerateComplexPropertyPaths = this.RequireRestrictionAnnotationsToGenerateComplexPropertyPaths, - GenerateDerivedTypesProperties = this.GenerateDerivedTypesProperties, - CustomXMLAttributesMapping = this.CustomXMLAttributesMapping, - CustomHttpMethodLinkRelMapping = this.CustomHttpMethodLinkRelMapping, - AppendBoundOperationsOnDerivedTypeCastSegments = this.AppendBoundOperationsOnDerivedTypeCastSegments, - UseSuccessStatusCodeRange = this.UseSuccessStatusCodeRange, - EnableCount = this.EnableCount, - IncludeAssemblyInfo = this.IncludeAssemblyInfo, - EnableODataAnnotationReferencesForResponses = this.EnableODataAnnotationReferencesForResponses, - EnableTypeDisambiguationForDefaultValueOfOdataTypeProperty = this.EnableTypeDisambiguationForDefaultValueOfOdataTypeProperty, - AddAlternateKeyPaths = this.AddAlternateKeyPaths, - NamespacePrefixToStripForInMethodPaths = this.NamespacePrefixToStripForInMethodPaths, - EnableAliasForTypeCastSegments = this.EnableAliasForTypeCastSegments, - SemVerVersion = this.SemVerVersion, - EnableAliasForOperationSegments = this.EnableAliasForOperationSegments, - UseStringArrayForQueryOptionsSchema = this.UseStringArrayForQueryOptionsSchema, - ComposableFunctionsExpansionDepth = this.ComposableFunctionsExpansionDepth - }; + ServiceRoot = this.ServiceRoot, + EnableKeyAsSegment = this.EnableKeyAsSegment, + EnableUnqualifiedCall = this.EnableUnqualifiedCall, + EnableOperationPath = this.EnableOperationPath, + EnableOperationImportPath = this.EnableOperationImportPath, + EnableNavigationPropertyPath = this.EnableNavigationPropertyPath, + TagDepth = this.TagDepth, + PrefixEntityTypeNameBeforeKey = this.PrefixEntityTypeNameBeforeKey, + OpenApiSpecVersion = this.OpenApiSpecVersion, + EnableOperationId = this.EnableOperationId, + VerifyEdmModel = this.VerifyEdmModel, + IEEE754Compatible = this.IEEE754Compatible, + TopExample = this.TopExample, + EnableUriEscapeFunctionCall = this.EnableUriEscapeFunctionCall, + EnablePagination = this.EnablePagination, + PageableOperationName = this.PageableOperationName, + EnableDiscriminatorValue = this.EnableDiscriminatorValue, + EnableDerivedTypesReferencesForResponses = this.EnableDerivedTypesReferencesForResponses, + EnableDerivedTypesReferencesForRequestBody = this.EnableDerivedTypesReferencesForRequestBody, + RoutePathPrefixProvider = this.RoutePathPrefixProvider, + ShowLinks = this.ShowLinks, + RequireDerivedTypesConstraintForBoundOperations = this.RequireDerivedTypesConstraintForBoundOperations, + ShowSchemaExamples = this.ShowSchemaExamples, + ShowRootPath = this.ShowRootPath, + ShowExternalDocs = this.ShowExternalDocs, + PathProvider = this.PathProvider, + EnableDollarCountPath = this.EnableDollarCountPath, + AddSingleQuotesForStringParameters = this.AddSingleQuotesForStringParameters, + EnableODataTypeCast = this.EnableODataTypeCast, + RequireDerivedTypesConstraintForODataTypeCastSegments = this.RequireDerivedTypesConstraintForODataTypeCastSegments, + EnableDeprecationInformation = this.EnableDeprecationInformation, + AddEnumDescriptionExtension = this.AddEnumDescriptionExtension, + AddEnumFlagsExtension = this.AddEnumFlagsExtension, + ErrorResponsesAsDefault = this.ErrorResponsesAsDefault, + InnerErrorComplexTypeName = this.InnerErrorComplexTypeName, + RequireRestrictionAnnotationsToGenerateComplexPropertyPaths = this.RequireRestrictionAnnotationsToGenerateComplexPropertyPaths, + GenerateDerivedTypesProperties = this.GenerateDerivedTypesProperties, + CustomXMLAttributesMapping = this.CustomXMLAttributesMapping, + CustomHttpMethodLinkRelMapping = this.CustomHttpMethodLinkRelMapping, + AppendBoundOperationsOnDerivedTypeCastSegments = this.AppendBoundOperationsOnDerivedTypeCastSegments, + UseSuccessStatusCodeRange = this.UseSuccessStatusCodeRange, + EnableCount = this.EnableCount, + IncludeAssemblyInfo = this.IncludeAssemblyInfo, + EnableODataAnnotationReferencesForResponses = this.EnableODataAnnotationReferencesForResponses, + EnableTypeDisambiguationForDefaultValueOfOdataTypeProperty = this.EnableTypeDisambiguationForDefaultValueOfOdataTypeProperty, + AddAlternateKeyPaths = this.AddAlternateKeyPaths, + NamespacePrefixToStripForInMethodPaths = this.NamespacePrefixToStripForInMethodPaths, + EnableAliasForTypeCastSegments = this.EnableAliasForTypeCastSegments, + SemVerVersion = this.SemVerVersion, + EnableAliasForOperationSegments = this.EnableAliasForOperationSegments, + UseStringArrayForQueryOptionsSchema = this.UseStringArrayForQueryOptionsSchema, + ComposableFunctionsExpansionDepth = this.ComposableFunctionsExpansionDepth + }; - return newSettings; - } + return newSettings; } }