Skip to content

Pathfinder does not work when there are variables in the server url #240

@mjphaynes

Description

@mjphaynes

I came across this when using the eBay OpenAPI spec, see: https://developer.ebay.com/api-docs/sell/inventory/resources/methods

The server url has the following format:

{
  "servers": [
    {
      "url": "https://api.ebay.com{basePath}",
      "description": "Production",
      "variables": {
        "basePath": {
          "default": "/sell/inventory/v1"
        }
      }
    }
  ],
}

But the code to get the server url does not replace the variables:

rtrim((string) parse_url($server->url, PHP_URL_PATH), '/'),

So end up with the error: OpenAPI spec contains no such operation [/sell/inventory/v1/inventory_item/sku]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions