OData / OData/AspNetCoreOData

Swagger not encoding multiple key string values

Open
#679 1 comment 2 reactions 2 assignees View on GitHub

@gathogojr is already working on this.

Since Aug 30, 2022.

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

Description

Assemblies affected
ASP.NET Core OData 8.0.11

Describe the bug
Swagger doesn't encode string values in quotes on entity query by key with multiple key properties.
Thus exception is raised :
Microsoft.OData.ODataException: 'The key value (XXX) from request is not valid. The key value should be format of type 'Edm.String'.'

Reproduce steps

  • Clone the repo, launch the ODataRoutingSample project from the solution.
  • Go to GET /People(FirstName={keyFirstName},LastName={keyLastName})
  • Fill in keyFirstName and keyLastName
  • Send the HTTP request

Expected behavior
Swagger request works.

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.