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

Route regular expression is still in the old format #8140

Open
2 tasks done
imurata opened this issue Nov 15, 2024 · 1 comment
Open
2 tasks done

Route regular expression is still in the old format #8140

imurata opened this issue Nov 15, 2024 · 1 comment

Comments

@imurata
Copy link
Contributor

imurata commented Nov 15, 2024

Where is the problem?

https://docs.konghq.com/hub/kong-inc/oas-validation/#tutorial

What happened?

The path for Route is /. *.

 curl -X POST http://localhost:8001/services/Petstore-Service/routes \
     --data name='Petstore-Route' \
     --data paths='/.*'

But now, in order to write a regular expression, the ~ is required at the beginning.
Therefore, it does not work well when we run this plugin according to this tutorial.

What did you expect to happen?

 curl -X POST http://localhost:8001/services/Petstore-Service/routes \
     --data name='Petstore-Route' \
     --data paths='~/.*'

Code of Conduct and Community Expectations

  • I agree to follow this project's Code of Conduct
  • I agree to abide by the Community Expectations
@imurata
Copy link
Contributor Author

imurata commented Nov 15, 2024

In addition to the above, since this tutorial specifies strip_path in Route, all paths are removed in the regular expression and passed to the API Endpoint, so a 404 is always returned even if the request is in the correct format.

$ curl -X GET "http://localhost:8000/pet/findByStatus?status=available"   -H "accept: application/json"
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant