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

Mock implementation treats path parameter resources as wildcards when both resources are present in an API #3490

Open
nimsara66 opened this issue Jan 3, 2025 · 0 comments

Comments

@nimsara66
Copy link

Description

When a Mock implementation type REST API contains both path parameter and wildcard resources, invoking the path parameter resource results in a wildcard backend response.

Steps to Reproduce

  1. Create a Mock implementation type REST API [1]
  2. Create a path parameter resource and a wildcard resource
  • GET /resource-only
  • GET /resource-only/{path-parameter}
  • GET /*
  1. Give each resource different mock responses
mc.setProperty('CONTENT_TYPE', 'application/json');
mc.setPayloadJSON('{ "data" : "<your-message>"}');
  1. Invoke each resource and observe

[1] https://apim.docs.wso2.com/en/latest/design/prototype-api/create-mocked-js-api/

Version

4.2.0

Environment Details (with versions)

No response

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

No branches or pull requests

2 participants