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

Import postman example not work #103

Closed
light-developer opened this issue Aug 16, 2024 · 1 comment
Closed

Import postman example not work #103

light-developer opened this issue Aug 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@light-developer
Copy link

light-developer commented Aug 16, 2024

Environment information:
OS: Windows
IDE version: PhpStorm 2023.2
plugin version: 2024.3.6

Problem:
Jet Client: must be have example url = request, and cannot change example url
In Posman, we don't need that, because: url can be have ID or dynamic url part

Example: users/123, users/456, file_paths/user/1, file_paths/customer/1

@light-developer light-developer added the bug Something isn't working label Aug 16, 2024
@AntonShuvaev
Copy link
Collaborator

The current behavior is intentional. Examples must maintain the same HTTP method and URL (except for the query part) as the parent request. However, you can modify the query parameters and path variable values as needed.
In your examples, you should utilize path variables instead of hardcoded values. For instance, use users/{id} and file_paths/{filePath} instead of users/123 and file_paths/user/1, and specify the actual value as a path variable value.
While this approach differs from how Postman handles it, I believe this restriction is advantageous. It ensures consistency between the parent request and examples. If you require a completely different URL, it's best to create a separate request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants