Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/Microsoft.OData.Cli/GenerateCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.CommandLine;
using System.CommandLine.NamingConventionBinder;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Build.Evaluation;
using Microsoft.OData.CodeGen.CodeGeneration;
Expand Down Expand Up @@ -233,9 +234,9 @@ private async Task GenerateCodeForV4Clients(GenerateOptions generateOptions, ICo
serviceConfigurationV4.NamespacePrefix = generateOptions.NamespacePrefix;
serviceConfigurationV4.MakeTypesInternal = generateOptions.EnableInternal;
serviceConfigurationV4.GenerateMultipleFiles = generateOptions.MultipleFiles;
serviceConfigurationV4.ExcludedSchemaTypes = generateOptions.ExcludedSchemaTypes;
serviceConfigurationV4.ExcludedBoundOperations = generateOptions.ExcludedBoundOperations;
serviceConfigurationV4.ExcludedOperationImports = generateOptions.ExcludedOperationImports;
serviceConfigurationV4.ExcludedSchemaTypes = generateOptions.ExcludedSchemaTypes?.Split(",").Select(type => type.Trim()).ToList();
serviceConfigurationV4.ExcludedBoundOperations = generateOptions.ExcludedBoundOperations?.Split(",").Select(type => type.Trim()).ToList();
serviceConfigurationV4.ExcludedOperationImports = generateOptions.ExcludedOperationImports?.Split(",").Select(type => type.Trim()).ToList();
serviceConfigurationV4.IgnoreUnexpectedElementsAndAttributes = generateOptions.IgnoreUnexpectedElements;
serviceConfigurationV4.EnableNamingAlias = generateOptions.UpperCamelCase;
serviceConfigurationV4.UseDataServiceCollection = generateOptions.EnableTracking;
Expand Down
8 changes: 3 additions & 5 deletions src/Microsoft.OData.Cli/GenerateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
// </copyright>
//----------------------------------------------------------------------------

using System.Collections.Generic;

namespace Microsoft.OData.Cli
{
/// <summary>
Expand Down Expand Up @@ -63,17 +61,17 @@ public class GenerateOptions
/// <summary>
/// Comma-separated list of the names of operation imports to exclude from the generated code. Example: ExcludedOperationImport1,ExcludedOperationImport2.
/// </summary>
public List<string> ExcludedOperationImports { get; set; }
public string ExcludedOperationImports { get; set; }

/// <summary>
/// Comma-separated list of the names of bound operations to exclude from the generated code.Example: BoundOperation1,BoundOperation2.
/// </summary>
public List<string> ExcludedBoundOperations { get; set; }
public string ExcludedBoundOperations { get; set; }

/// <summary>
/// Comma-separated list of the names of entity types to exclude from the generated code.Example: EntityType1,EntityType2,EntityType3.
/// </summary>
public List<string> ExcludedSchemaTypes { get; set; }
public string ExcludedSchemaTypes { get; set; }

/// <summary>
/// This flag indicates whether to ignore unexpected elements and attributes in the metadata document and generate the client code if any.
Expand Down