open-webui icon indicating copy to clipboard operation
open-webui copied to clipboard

feat: Custom path to OpenAPI.json

Open spammenotinoz opened this issue 7 months ago • 1 comments
trafficstars

Check Existing Issues

  • [x] I have searched the existing issues and discussions.

Problem Description

Hi, there are some great OpenAPI compatible projects out there like Obsidian, but their OpenAPI.json is often published elsewhere not via the endpoint. The OpenAPI standard does not require the OpenAPI.json or OpenAPI.yaml to be available via the endpoint.

Eg: for the Obsidian Rest API the OpenAPI.yaml is located on github.io and not via the endpoint. https://coddingtonbear.github.io/obsidian-local-rest-api/openapi.yaml

Desired Solution you'd like

Wondering if it would be possible to allow custom paths to the OpenAPI.json for tool servers to better cope with these naughty projects.

This approach may also allow some customisation \ tuning as to what commands are exposed.

Alternatives Considered

Currently overcoming via a reverse proxy and intercepting the /openapi.json

Additional Context

No response

spammenotinoz avatar Apr 23 '25 05:04 spammenotinoz

Agreed this must be supported, PR welcome here but eventually I'll be taking a look.

tjbck avatar Apr 23 '25 05:04 tjbck

Might as well also support uploading the openapi.json as a file. For example todoist don't even expose their openapi.json endpoint, but require you to download it https://developer.todoist.com/api/v1 (top)

Image

Lutherwaves avatar May 22 '25 20:05 Lutherwaves

Added with 2c7ccc69fe614b65bb584b53b89c3eee2eac894b

tjbck avatar May 26 '25 20:05 tjbck

Might as well also support uploading the openapi.json as a file. For example todoist don't even expose their openapi.json endpoint, but require you to download it https://developer.todoist.com/api/v1 (top)

Image

@tjbck should I open a sepratae issue for supporting uploading the openapi spec?

Lutherwaves avatar May 26 '25 21:05 Lutherwaves

Sounds good!

tjbck avatar May 26 '25 23:05 tjbck

Sounds good!

https://github.com/open-webui/open-webui/issues/14446

Lutherwaves avatar May 28 '25 13:05 Lutherwaves