Skip to content

Invalid class name generated #224

@Remo

Description

@Remo

Describe the bug

When generating the C# classes, I get a few invalid names like MxnConfValCopyValues$ . The $ isn't a valid character for a class name.

Version of the Project affected

ODataConnectedService v0.12.1
VisualStudio Version v16.8.4
Microsoft.Odata.Client v7.9.0

To Reproduce

Create an odata service with a $ in the name of a type

<ComplexType Name="MxnConfValCopyValues$">
   <Property Name="ModifiedSource" Type="IfsApp.MxnCar.MxnConfVal"/>
</ComplexType>

and then a function like this:

<Function Name="MxnConfVal.DefaultCopy" IsBound="true">
   <Parameter Name="MxnConfVal" Type="IfsApp.MxnCar.MxnConfVal" Nullable="false"/>
   <Parameter Name="CopyValues" Type="IfsApp.MxnCar.MxnConfValCopyValues$"/>
   <ReturnType Type="IfsApp.MxnCar.MxnConfVal"/>
</Function>

Expected behavior

A working class

Actual behavior

An invalid class and code that doesn't compile.

Screenshots

image

Additional context

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions