Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODATA Action route is not supported #1633

Open
SViradiya-MarutiTech opened this issue Feb 2, 2023 · 4 comments
Open

ODATA Action route is not supported #1633

SViradiya-MarutiTech opened this issue Feb 2, 2023 · 4 comments
Assignees
Labels
bug Identified as a potential bug needs feedback Issue is waiting on feedback before acceptance needs validation Issue has not been replicated or verified yet question Initially seen a question could become a new feature or bug or closed ;) waiting Waiting for answer to question or feedback from issue raiser

Comments

@SViradiya-MarutiTech
Copy link

SViradiya-MarutiTech commented Feb 2, 2023

The specified placeholder variable value should be replaced within the Downstream URI provided in the UpstreamPathTemplate and DownStreamPathTemplate.

For instance,

Route Configurations:

{
  "DownstreamPathTemplate": "/api/subscriptions({subscriptionId})/updates",
  "UpstreamPathTemplate": "/v1/subscriptions({subscriptionId})/updates",
  "UpstreamHttpMethod": [ "Get" ],
  "DownstreamScheme": "http",
  "DownstreamHostAndPorts": [
    {
      "Host": "localhost",
      "Port": 50110
    }
  ]
}

When the request URI is http://localhost:5001/v1/subscriptions(123)/updates
Then the downstream request URI should be http://localhost:50110/api/subscriptions(123)/updates

Actual Behavior

It's adding extra round braces ) in the Downstream request. It's a clear issue of replacing placeholder variables.

When the request URI is http://localhost:5001/v1/subscriptions(123)/updates
Then the downstream request URI is http://localhost:50110/api/subscriptions(123))/updates

Steps to Reproduce the Problem

Add a route with the placeholder within the round braces
Get parameter value in the downstream. Observed the value received at the downstream application.

NOTE: An issue is not with specific round braces. It reproduces with any other routes where the placeholder does not exactly (eg. /{id}/ ) provide between slashes.

Specifications

Version: 17.0.0
Platform: .NET 5
@raman-m
Copy link
Member

raman-m commented Jun 26, 2023

Hi Sagar!
Thank you for the issue reporting!

What about .NET 7 and Ocelot 19.0.2 ? 😉

Did you fix this issue somehow?
I see that you haven't forked the repo...

I guess we need to write some acceptance test(s) to reproduce the issue...

@raman-m raman-m added bug Identified as a potential bug question Initially seen a question could become a new feature or bug or closed ;) needs validation Issue has not been replicated or verified yet needs feedback Issue is waiting on feedback before acceptance waiting Waiting for answer to question or feedback from issue raiser labels Jun 26, 2023
@SViradiya-MarutiTech
Copy link
Author

@raman-m Do you mean to say this issueis resolved with Ocelot 19.0.2?

@raman-m
Copy link
Member

raman-m commented Jun 28, 2023

No, sure! 😄 It is not fixed in v19 as well as in v15, I believe...
I need to reproduce it first using v.19, or it should be reproduced by someone from the team. But team doesn't care...

Do you have the fix? Did you fix it at all in the past?

If Yes,
Could you prepare and create PR please?
And I'll review it with pleasure. 😉

Can we have some pair programming to create acceptance test first?

@raman-m
Copy link
Member

raman-m commented Jun 28, 2023

I've updated the description! It looks much better now!
Don't thank me! 😎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Identified as a potential bug needs feedback Issue is waiting on feedback before acceptance needs validation Issue has not been replicated or verified yet question Initially seen a question could become a new feature or bug or closed ;) waiting Waiting for answer to question or feedback from issue raiser
Projects
None yet
Development

No branches or pull requests

2 participants