OData / ODataConnectedService

A Visual Studio extension for generating client code for OData Services
Other
79 stars 41 forks source link

Passing ServiceName as command line argument #384

Closed ellizio closed 3 months ago

ellizio commented 5 months ago

Is your feature request related to a problem? Please describe.

Metadata file from odata.cli tool is always named OData ServiceCsdl.xml. If you generate two references, the assembly will contain two resources with the same name ending, which will throw an exception in GeneratedEdmModel.CreateXmlReader()

Describe the solution you'd like

Add optional --service-name (-sn) argument to the generate command to override the DefaultServiceName constant

Describe alternatives you've considered

I need to manually change resource name in Reference.cs and OData ServiceCsdl.xml filename

Additional context

gathogojr commented 5 months ago

Hi @ellizio. Thank you for reporting this issue. If you're able to contribute a pull request we'd be happy to review.

ellizio commented 4 months ago

@gathogojr I have opened pull request https://github.com/OData/ODataConnectedService/pull/389