OpenAPI schema at different URL than actual API

I have an OpenAPI schema that loads a resources. However, since the OpenAPI file lives on a DIFFERENT URL than the underlying API

Is there a way to specify the "baseURI" that not same domains to the "real" URL, not the URL of the OpenAPI schema file loaded?

Currently request seem to assume the domain is the same as the openapi schema. Basically I want to set the same base URL that a the "REST API" resource has... but see the paths offered from the OpenAPI schema.

Connect to OpenAPI

1 Like

To be clearer, the OpenAPI schema has "server variables" that's I'd like to substitute in the Retool resource definition. The URL parameters does not seem to work for the "servers:" top-level in OpenAPI schema.

servers:
- url: https://{username}.example.com:{port}/{basePath}
  description: example API server
  variables:
    username:
      default: demo
    port:
      default: '8443'
    basePath:
      default: v2

Hello @tonythetiger!

So to clarify, the current openAPI resource has a "Specification URL" input.

But you need to add an additional and different URL to the resource to send requests to OpenAPI? I am a little confused.

You mentioned you would like to set a base URL similar to a "REST API" resource, with the functionality of adding in wildcard variables to add more route specificity.

Does that mean you just need a single URL input for the resource? Which would match the URL from your code snippet example of https://{username}.example.com:{port}/{basePath}?