http-prompt icon indicating copy to clipboard operation
http-prompt copied to clipboard

Bug: OpenAPI schemas give wrong completion when the root of the API is a path relative to the domain

Open psacawa opened this issue 4 years ago • 0 comments

I have an example API, hosts at https://statsapi.web.nhl.com/api/v1, which has its root at the path/api/v1 relative to the domain. I also have the corresponding (schema)[https://github.com/erunion/sport-api-specifications/blob/master/nhl/nhl.yaml]. However, when I try:

http-prompt https://statsapi.web.nhl.com/api/v1 --spec nhl.yaml

I find that the program displays completions as if there were no path given in the API root URL. So for instance, typing cd / givens the completion options from the schemas paths (divisions, etc..) rather than the actual root relative to the domain /api, as it should.

http-prompt 2.1.0 python 3.9

psacawa avatar Jun 14 '21 06:06 psacawa