Closed andreassiegel closed 3 months ago
After importing, is the full request path added to the endpoint (open a Kreya operation, click the Settings tab, check the Endpoint field)?
If so, Kreya may not recognize the "format" (e.g. due to templating) and is not able to separate the host from the rest of the request path
Could you add an example of your path format?
After importing, is the full request path added to the endpoint (open a Kreya operation, click the Settings tab, check the Endpoint field)?
No, it is completely empty:
If so, Kreya may not recognize the "format" (e.g. due to templating) and is not able to separate the host from the rest of the request path
Could you add an example of your path format?
This is a good hint! Thank you!
I found one directory where at least the paths of the operations were set (but also no host in the endpoint settings).
In this case, the URL in the collection was something like https://example.com/foo/bar/:param
.
All other URLs look like this: {{base-url}}/foo/bar/:param
, using an environment variable for the schema and host.
Can you also show the Settings of the operation itself? I think an endpoint is set, as the "Send" button is enabled:
For example:
Aha! You're right, there it is:
Is this the expected behavior or could the import be changed to only use the variable as the endpoint?
Also, the variable reference is not "detected" as an environment variable. Would it be possible or make sense to import {{my_var}}
as {{env.my_var}}
?
Kreya currently recognizes templates paths such as {{scheme}}://{{host}}/path
. It probably makes sense to also support {{base-url}}/path
like in your example.
I'll see whether automatic conversion from {{base-url}}
to {{ env.base_url }}
should also be implemented, as hyphens are never valid in templates in Kreya.
This sounds good! Thank you!
This has been fixed in the latest beta version and will be released in the next stable version
Kreya 1.15 has just been released.
Describe the bug
Whenever I import a project from an existing Postman collection or Insomnia collection, the general structure or hierarchy of requests and folders is imported as expected.
However, the request path is empty for all operations which results in a pointless import.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The request path should be taken over from the imported collection.
Ideally, the host should be imported as endpoint in the settings, and the rest of the URL should be the request path.
Screenshots
None.
Environment:
Additional context
The issue occurs regardless of whether I try to import Insomnia or Postman collections of the same original project.
I can only get the desired result if I basically start from scratch and configure OpenAPI importers.