OData / OData/AspNetCoreOData

Visual Studio Connected Services don't work with OpenAPI generated with ASP.NET Core OData

Open
#584 4 comments 0 reactions 1 assignee View on GitHub

@xuzhg is already working on this.

Since May 3, 2022.

investigating
Dominant language
C#
Stars
505
Forks
186
PR merge metrics
No merged PRs in 30d

Description

Assemblies affected
ASP.NET Core OData 8.x

Describe the bug
The client code generated with the Visual Studio Connected Services cannot be build due to errors with /$count segment

Reproduce steps
You can reproduce it on your ODataRoutingSample:

  1. Launch it.
  2. Create Console application in the other instance of Visual Studio.
  3. On the created project: Add -> Connected Service -> Add a service reference -> Open API
  4. Specify http://localhost:64771/swagger/v1/swagger.json as an URL
  5. Click Finish
  6. Try to build the application

You will get a lot of build errors. The problem is in the $count sergment which produces $ in the function names (e.g. V1_Companies_$countAsync())

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.