Open aaqilniz opened 1 year ago
Hi @samarpanB. Sorry for tagging you here too. But can you provide you suggestions on the issue?
I think I am misunderstanding the situation. This issue is being generated from node-fetch. That too I think is not an issue. It requires to have absolute URLs.
Describe the bug
While accessing the routes created with lb4 openapi, the app throws the following error:
Request GET /v3.1/all?fields=name failed with status code 500. TypeError: Only absolute URLs are supported
.This happens because the specs don't have a servers field or don't contain absolute URLs.
The docs suggest to download the specification locally and then generating the routes with lb4 openapi.
The loopback should work without needing to download the specs and shouldn't need a user to download the specification.
Is it possible to make the loopback app work even if the servers field is not provided or is not an absolute path? Can we achieve this by adding a servers field in the framework before processing the request?
Logs
Additional information
No response
Reproduction
https://github.com/aaqilniz/testing-cache-package/tree/issue-absoulte-url