question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot generate client consuming entity named "Service"

See original GitHub issue

Describe the bug I am currently trying to upgrade from using the SAP Cloud SDK version 1.54.2 for javascript to version 2.10.0 and I am running into an issue. I’m looking to generate an oData client, and everything works as intended in the v1 SDK. However, in v2 there is a file called “service.ts” generated automatically when creating the client which is not there in v1. This causes an issue for me since one of the entities in the service I am consuming is named “Service” (capital S). Thus there is both a “service.ts” and a “Service.ts” generated in the client folder, which causes the generator to crash.

To Reproduce Steps to reproduce the behavior:

  1. Setup an odata v2 service with an exposed entity named “Service”.
  2. Fetch the edmx of the service.
  3. Use the fetched edmx to generate an odata client using the generate-odata-client command.

Expected behavior An odata client is generated in the specified output folder.

Used Versions:

  • node version: 16.17.1
  • npm version: 8:15.0
  • SAP Cloud SDK version: 2.10.0

Log file The error message when the generator crashes:

error TS1149: File name '.../service.ts' differs from already included file name '.../Service.ts' only in casing.

Impact / Priority Upgrading to version 2 is quite important since v1 is no longer being supported.

Affected development phase: Development

Impact: Impaired

Timeline: Ideally end of week, latest next week.

Additional context I posted a question on the sap answers.com forums here.

Image of the files being generated in the client folder: image

Any help would be much appreciated!

Best regards, Jibbril

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Jibbrilcommented, Nov 24, 2022

Hello @jjtang1985,

I checked out the canary version and it seems to be working now. Looking forward to the stable version, thanks a lot!

Best Regards, Jibbril

0reactions
Jibbrilcommented, Nov 24, 2022

Hello @jjtang1985,

I checked out the canary version and it seems to be working now. Looking forward to the stable version, thanks a lot!

Best Regards, Jibbril

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot generate client consuming entity named "Service"
This causes an issue for me since one of the entities in the service I am consuming is named "Service" (capital S).
Read more >
Generating HTTP API clients using Visual Studio ...
Visual Studio Connected Services can generate .NET client code directly from an OpenAPI spec. Learn how to build great HTTP clients quickly!
Read more >
No Entity Framework provider found for the ADO.NET ...
I just got into the same problem and it looks like EntityFramework although installed from NuGet Package Manager was not correctly installed in...
Read more >
Using the REST Client
quarkus create app org.acme:rest-client-quickstart ... be demonstrating how to consume part of the REST API supplied by the stage.code.quarkus.io service.
Read more >
GraphQL Code Libraries, Tools and Services
A powerful JavaScript GraphQL client, designed to work well with React, ... Preact, Svelte, and Vue, and is supported by GraphQL Code Generator....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found