Skip to content

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

@psacawa

Description

@psacawa

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions