OpenAPI - support for relative documents with embedded schema #858
-
Hello, the OpenAPI integration is a really useful feature. We would like to use it. However, due to the size of our spec, we split it in several files using relative document refs, like so: paths:
/profile:
$ref: "./paths/profile.yml#/components/pathItems/profile" This is described as valid in the OpenAPI spec, under the "Reference Object -> Relative Documents with Embedded Schema Example". Is it supported by Gitbook? If yes, how do you make it work? I can only select one file per OpenAPI block. When they use a relative document ref, the block appears either empty or with ref errors. If it's not supported, are there any plans? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey @System-Glitch, we do support At this stage, my suggestion will be to either:
For our API documentation, this is something we do as part of our deployment: https://api.gitbook.com/openapi.yaml Where are you currently storing your OpenAPI files? On GitHub, next to the docs markdown files? We are working on some improvements to our OpenAPI support, so let us know any feedback you have :) |
Beta Was this translation helpful? Give feedback.
Hey @System-Glitch, we do support
$ref
to external documents when using a URL instead of uploading an OpenAPI file. We don't currently support it when uploading files; we might look into supporting it, but it has not been a common request/case so far.At this stage, my suggestion will be to either:
redocly bundle
command.For our API documentation, this is something we do as part of our deployment: htt…