{"componentChunkName":"component---src-templates-simple-markdown-js","path":"/developer-portal/redoc-integration/","matchPath":"","result":{"data":{"markdownRemark":{"html":"<h1 style=\"position:relative;\"><a href=\"#integrating-api-reference-docs-into-your-developer-portal\" aria-label=\"integrating api reference docs into your developer portal permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"integrating-api-reference-docs-into-your-developer-portal\"></div>Integrating API reference docs into your developer portal</h1>\n<h2 style=\"position:relative;\"><a href=\"#step-1-declare-your-api-definitions\" aria-label=\"step 1 declare your api definitions permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"step-1-declare-your-api-definitions\"></div>Step 1: Declare your API definition(s)</h2>\n<p>Inside of <code class=\"language-text\">siteConfig.yaml</code>, declare of all of your API definitions.\nThe definition may be in a <a href=\"https://redoc.ly/docs/resources/multi-file-definitions/\">multi-file format</a> or already bundled. It may be in JSON or YAML format.</p>\n<p>You'll use the key name for further reference within the developer portal.</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"68615511646576130000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`oasDefinitions:\n  acme: ./openapi/acme.yaml`, `68615511646576130000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-68615511646576130000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token key atrule\">oasDefinitions</span><span class=\"token punctuation\">:</span>\n  <span class=\"token key atrule\">acme</span><span class=\"token punctuation\">:</span> ./openapi/acme.yaml</code></pre></div>\n      </div>\n<p>The value may also be a remote URL:</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"44790611373462960000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`oasDefinitions:\n  acme: https://example.com/acme.yaml`, `44790611373462960000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-44790611373462960000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token key atrule\">oasDefinitions</span><span class=\"token punctuation\">:</span>\n  <span class=\"token key atrule\">acme</span><span class=\"token punctuation\">:</span> https<span class=\"token punctuation\">:</span>//example.com/acme.yaml</code></pre></div>\n      </div>\n<p>And an API registry URL:</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"65240531882275406000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`oasDefinitions:\n  acme: https://api.redoc.ly/registry/testing_acme/adam-api/1.0/bundle/main/openapi.yaml`, `65240531882275406000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-65240531882275406000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token key atrule\">oasDefinitions</span><span class=\"token punctuation\">:</span>\n  <span class=\"token key atrule\">acme</span><span class=\"token punctuation\">:</span> https<span class=\"token punctuation\">:</span>//api.redoc.ly/registry/testing_acme/adam<span class=\"token punctuation\">-</span>api/1.0/bundle/main/openapi.yaml</code></pre></div>\n      </div>\n<p>The benefit of using the API registry (if you use your production \"latest\" snapshot URL) is that the developer portal will rebuild when that API is updated.\nYour docs won't be outdated.</p>\n<p>If you use a private registry URL, you will need to use the <a href=\"https://redoc.ly/docs/cli/commands/login/\">openapi login command</a> to log in for local development.</p>\n<h3 style=\"position:relative;\"><a href=\"#declare-multiple-apis\" aria-label=\"declare multiple apis permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"declare-multiple-apis\"></div>Declare multiple APIs</h3>\n<p>You can also declare multiple API definitions:</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"33721035904989495000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`oasDefinitions:\n  acme: https://api.redoc.ly/registry/testing_acme/adam-api/1.0/bundle/main/openapi.yaml\n  acme-v2: https://api.redoc.ly/registry/testing_acme/adam-api/2.0/bundle/main/openapi.yaml\n  my-api: https://api.redoc.ly/registry/testing_acme/my-api/1.0.0/bundle/main-branch/openapi.yaml`, `33721035904989495000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-33721035904989495000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token key atrule\">oasDefinitions</span><span class=\"token punctuation\">:</span>\n  <span class=\"token key atrule\">acme</span><span class=\"token punctuation\">:</span> https<span class=\"token punctuation\">:</span>//api.redoc.ly/registry/testing_acme/adam<span class=\"token punctuation\">-</span>api/1.0/bundle/main/openapi.yaml\n  <span class=\"token key atrule\">acme-v2</span><span class=\"token punctuation\">:</span> https<span class=\"token punctuation\">:</span>//api.redoc.ly/registry/testing_acme/adam<span class=\"token punctuation\">-</span>api/2.0/bundle/main/openapi.yaml\n  <span class=\"token key atrule\">my-api</span><span class=\"token punctuation\">:</span> https<span class=\"token punctuation\">:</span>//api.redoc.ly/registry/testing_acme/my<span class=\"token punctuation\">-</span>api/1.0.0/bundle/main<span class=\"token punctuation\">-</span>branch/openapi.yaml</code></pre></div>\n      </div>\n<h2 style=\"position:relative;\"><a href=\"#step-2-add-pages-that-reference-the-definitions\" aria-label=\"step 2 add pages that reference the definitions permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"step-2-add-pages-that-reference-the-definitions\"></div>Step 2: Add pages that reference the definitions</h2>\n<p>Manually create a file <code class=\"language-text\">reference.page.yaml</code> (you may name it differently, but it <strong>must</strong> have the <code class=\"language-text\">.page.yaml</code> file extension) with the following example contents:</p>\n\n      <div class=\"code-snippets-tabs\" >\n    <div class=\"snippets-tabs-headers\">\n      <span class=\"tab-header active\" data-lang=\"yaml\" data-snippet-id=\"Single-API\">Single API</span><span class=\"tab-header \" data-lang=\"yaml\" data-snippet-id=\"Multi-versions-API\">Multi-versions API</span>\n    </div>\n    <div class=\"snippets-tabs-contents\">\n      <div class=\"tab-content active\" data-lang=\"yaml\" data-snippet-id=\"Single-API\"><div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"64439145737888645000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`type: reference-docs\ndefinitionId: acme\nsettings:\n  jsonSampleExpandLevel: all`, `64439145737888645000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-64439145737888645000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token key atrule\">type</span><span class=\"token punctuation\">:</span> reference<span class=\"token punctuation\">-</span>docs\n<span class=\"token key atrule\">definitionId</span><span class=\"token punctuation\">:</span> acme\n<span class=\"token key atrule\">settings</span><span class=\"token punctuation\">:</span>\n  <span class=\"token key atrule\">jsonSampleExpandLevel</span><span class=\"token punctuation\">:</span> all</code></pre></div>\n      </div></div><div class=\"tab-content \" data-lang=\"yaml\" data-snippet-id=\"Multi-versions-API\"><div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"64714185477136590000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`type: reference-docs\nversions:\n  - definitionId: acme\n    id: v1\n    title: Acme V1\n    isDefault: false\n  - definitionId: acme-v2\n    id: v2\n    title: Acme V2\n    isDefault: true\n\nsettings:\n  jsonSampleExpandLevel: all`, `64714185477136590000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-64714185477136590000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token key atrule\">type</span><span class=\"token punctuation\">:</span> reference<span class=\"token punctuation\">-</span>docs\n<span class=\"token key atrule\">versions</span><span class=\"token punctuation\">:</span>\n  <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">definitionId</span><span class=\"token punctuation\">:</span> acme\n    <span class=\"token key atrule\">id</span><span class=\"token punctuation\">:</span> v1\n    <span class=\"token key atrule\">title</span><span class=\"token punctuation\">:</span> Acme V1\n    <span class=\"token key atrule\">isDefault</span><span class=\"token punctuation\">:</span> <span class=\"token boolean important\">false</span>\n  <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">definitionId</span><span class=\"token punctuation\">:</span> acme<span class=\"token punctuation\">-</span>v2\n    <span class=\"token key atrule\">id</span><span class=\"token punctuation\">:</span> v2\n    <span class=\"token key atrule\">title</span><span class=\"token punctuation\">:</span> Acme V2\n    <span class=\"token key atrule\">isDefault</span><span class=\"token punctuation\">:</span> <span class=\"token boolean important\">true</span>\n\n<span class=\"token key atrule\">settings</span><span class=\"token punctuation\">:</span>\n  <span class=\"token key atrule\">jsonSampleExpandLevel</span><span class=\"token punctuation\">:</span> all</code></pre></div>\n      </div></div>\n    </div></div>\n    \n<p><strong>Supported fields in <code class=\"language-text\">.page.yaml</code> files</strong></p>\n<table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code class=\"language-text\">type</code></td>\n<td>Must be set to <code class=\"language-text\">reference-docs</code>. This field is required.</td>\n</tr>\n<tr>\n<td><code class=\"language-text\">definitionId</code></td>\n<td>References the key(s) declared in the <code class=\"language-text\">siteConfig.yaml</code>. In this example, <code class=\"language-text\">acme</code> is declared as the key. Do not declare the <code class=\"language-text\">definitionId</code> if you declare <code class=\"language-text\">versions</code>.</td>\n</tr>\n<tr>\n<td><code class=\"language-text\">versions</code></td>\n<td>If the API has multiple versions and you want a version selector to appear then define <code class=\"language-text\">versions</code> instead of <code class=\"language-text\">definitionId</code>. The <code class=\"language-text\">versions</code> is an array with one node per version. Each node must contain a <code class=\"language-text\">definitionId</code>. It may also contain an <code class=\"language-text\">id</code>, <code class=\"language-text\">title</code>, and <code class=\"language-text\">isDefault</code> value.<br><br>The <code class=\"language-text\">id</code> is used in the URL path segment (if not defined it will default to the <code class=\"language-text\">definitionId</code> value.<br><br>The <code class=\"language-text\">title</code> is used in the select menu to display to the user (if not defined it will default to the <code class=\"language-text\">definitionId</code>.<br><br>The <code class=\"language-text\">isDefault</code> will be the version that is pre-selected (if not defined it will default to the first defined version).<br><br>The select menu will be ordered in the same way as the versions array.</td>\n</tr>\n<tr>\n<td><code class=\"language-text\">label</code></td>\n<td>(optional) Define a custom label to use as the title for the API Overview page in the portal sidebar. If not defined, the value of <code class=\"language-text\">info.title</code> from the API definition is used by default.</td>\n</tr>\n<tr>\n<td><code class=\"language-text\">settings</code></td>\n<td>(optional) Add any of <a href=\"https://redoc.ly/docs/api-reference-docs/configuration/\">Redocly's settings</a> to this object.</td>\n</tr>\n</tbody>\n</table>\n<p>The location of the page.yaml file determines the URL path segment(s) for the API reference.\nA file such as <code class=\"language-text\">/openapi/foo.page.yaml</code> will be displayed at <code class=\"language-text\">/openapi/foo/</code>.</p>\n<h3 style=\"position:relative;\"><a href=\"#set-up-pagination-for-integrated-reference-docs\" aria-label=\"set up pagination for integrated reference docs permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"set-up-pagination-for-integrated-reference-docs\"></div>Set up pagination for integrated Reference docs</h3>\n<p>Your integrated Reference docs can optionally use pagination. The configuration settings and the behavior of this functionality are compatible with standalone Reference docs, ensuring a consistent user experience.</p>\n<p>The following pagination modes are supported:</p>\n<ul>\n<li>\n<code class=\"language-text\">none</code>\n - no pagination. All content is displayed as one continuously scrolling page.\n</li>\n<li>\n<code class=\"language-text\">section</code>\n - each section is displayed as its own page. Tags and tag groups are treated as sections, so all operations grouped under one tag would be displayed on one page. In this mode, tag description text is displayed on the section page together with the operations. Every page automatically gets a \n<strong>Next to...</strong>\n navigation button at the bottom.\n</li>\n<li>\n<code class=\"language-text\">item</code>\n - each operation is displayed as its own page, regardless of tags and grouping. In this mode, tag description text is displayed on its own separate page. If a tag doesn't have a description, selecting the tag in the sidebar expands the group to show operations under it. Every page automatically gets a \n<strong>Next to...</strong>\n navigation button at the bottom.\n</li>\n</ul>\n<p>To enable pagination, add any of the modes to the <code class=\"language-text\">settings</code> section of the <code class=\"language-text\">.page.yaml</code> file:</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"74863991093864940000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`type: reference-docs\ndefinitionId: acme\nsettings:\n  pagination: section\n  showConsole: true`, `74863991093864940000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-74863991093864940000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token key atrule\">type</span><span class=\"token punctuation\">:</span> reference<span class=\"token punctuation\">-</span>docs\n<span class=\"token key atrule\">definitionId</span><span class=\"token punctuation\">:</span> acme\n<span class=\"token key atrule\">settings</span><span class=\"token punctuation\">:</span>\n  <span class=\"token key atrule\">pagination</span><span class=\"token punctuation\">:</span> section\n  <span class=\"token key atrule\">showConsole</span><span class=\"token punctuation\">:</span> <span class=\"token boolean important\">true</span></code></pre></div>\n      </div>\n<p>When enabled, pagination settings apply to all versions defined in the <code class=\"language-text\">.page.yaml</code> file.</p>\n<p>Keep in mind that:</p>\n<ul>\n<li>\ndata models always render as separate pages (in both \n<code class=\"language-text\">section</code>\n and \n<code class=\"language-text\">item</code>\n modes).\n</li>\n<li>\nMarkdown text from the \n<code class=\"language-text\">info.description</code>\n field of the API definition always behaves like a section. In \n<code class=\"language-text\">item</code>\n mode, it is displayed all on one page, instead of split into separate pages.\n</li>\n</ul>\n<div class=\"admonition admonition-warning\"><div class=\"admonition-heading\"><h5><span class=\"admonition-icon\"><i></i></span><strong>Important</strong></h5></div><div class=\"admonition-content\"><p>We strongly recommend you rebuild the portal after modifying pagination settings to avoid potential caching issues.</p></div></div>\n<h3 style=\"position:relative;\"><a href=\"#show-or-hide-content-in-integrated-reference-docs\" aria-label=\"show or hide content in integrated reference docs permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"show-or-hide-content-in-integrated-reference-docs\"></div>Show or hide content in integrated Reference docs</h3>\n<p><strong>API overview page</strong></p>\n<p>By default, your integrated Reference docs will have an API overview page. This page contains basic information about the API generated from the <code class=\"language-text\">info</code> object in your API definition (the same as in standalone Reference docs).</p>\n<p>To hide the entire API overview page, set <code class=\"language-text\">hideInfoSection</code> to <code class=\"language-text\">true</code>:</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"18615605945918333000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`type: reference-docs\ndefinitionId: acme\nsettings:\n  hideInfoSection: true`, `18615605945918333000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-18615605945918333000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token key atrule\">type</span><span class=\"token punctuation\">:</span> reference<span class=\"token punctuation\">-</span>docs\n<span class=\"token key atrule\">definitionId</span><span class=\"token punctuation\">:</span> acme\n<span class=\"token key atrule\">settings</span><span class=\"token punctuation\">:</span>\n  <span class=\"token key atrule\">hideInfoSection</span><span class=\"token punctuation\">:</span> <span class=\"token boolean important\">true</span></code></pre></div>\n      </div>\n<p>To hide only the download button on the API overview page, set <code class=\"language-text\">hideDownloadButton</code> to <code class=\"language-text\">true</code>:</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"81993416040186840000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`type: reference-docs\ndefinitionId: acme\nsettings:\n  hideDownloadButton: true`, `81993416040186840000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-81993416040186840000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token key atrule\">type</span><span class=\"token punctuation\">:</span> reference<span class=\"token punctuation\">-</span>docs\n<span class=\"token key atrule\">definitionId</span><span class=\"token punctuation\">:</span> acme\n<span class=\"token key atrule\">settings</span><span class=\"token punctuation\">:</span>\n  <span class=\"token key atrule\">hideDownloadButton</span><span class=\"token punctuation\">:</span> <span class=\"token boolean important\">true</span></code></pre></div>\n      </div>\n<p>When you add Reference docs to the portal sidebar, the API overview page is automatically included as its own sidebar item. It uses the <code class=\"language-text\">info.title</code> value from the API definition as the item name. You can override this by defining a custom <code class=\"language-text\">label</code> in the <code class=\"language-text\">.page.yaml</code> file:</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"35055311396262347000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`type: reference-docs\ndefinitionId: acme\nlabel: ACME Docs Overview\nsettings:\n  pagination: section\n  showConsole: true`, `35055311396262347000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-35055311396262347000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token key atrule\">type</span><span class=\"token punctuation\">:</span> reference<span class=\"token punctuation\">-</span>docs\n<span class=\"token key atrule\">definitionId</span><span class=\"token punctuation\">:</span> acme\n<span class=\"token key atrule\">label</span><span class=\"token punctuation\">:</span> ACME Docs Overview\n<span class=\"token key atrule\">settings</span><span class=\"token punctuation\">:</span>\n  <span class=\"token key atrule\">pagination</span><span class=\"token punctuation\">:</span> section\n  <span class=\"token key atrule\">showConsole</span><span class=\"token punctuation\">:</span> <span class=\"token boolean important\">true</span></code></pre></div>\n      </div>\n<p><strong>Markdown descriptions</strong></p>\n<p>By default, all Markdown text from the <code class=\"language-text\">info.description</code> field of your API definition is visible in the integrated Reference docs. To hide it, set <code class=\"language-text\">hideInfoDescription</code> to <code class=\"language-text\">true</code>:</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"56310058780574750000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`type: reference-docs\ndefinitionId: acme\nsettings:\n  hideInfoDescription: true`, `56310058780574750000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-56310058780574750000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token key atrule\">type</span><span class=\"token punctuation\">:</span> reference<span class=\"token punctuation\">-</span>docs\n<span class=\"token key atrule\">definitionId</span><span class=\"token punctuation\">:</span> acme\n<span class=\"token key atrule\">settings</span><span class=\"token punctuation\">:</span>\n  <span class=\"token key atrule\">hideInfoDescription</span><span class=\"token punctuation\">:</span> <span class=\"token boolean important\">true</span></code></pre></div>\n      </div>\n<p>This will keep other information from the <code class=\"language-text\">info</code> section in your Reference docs (such as <code class=\"language-text\">externalDocs</code>, <code class=\"language-text\">version</code> and the download button) while hiding all Markdown from <code class=\"language-text\">info.description</code>.</p>\n<p><strong>Authentication</strong></p>\n<p>By default, an authentication section is added to your <code class=\"language-text\">info.description</code> and displayed in integrated Reference docs. To hide it, set <code class=\"language-text\">noAutoAuth</code> to <code class=\"language-text\">true</code>:</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"70689612507298280000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`type: reference-docs\ndefinitionId: acme\nsettings:\n  noAutoAuth: true`, `70689612507298280000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-70689612507298280000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token key atrule\">type</span><span class=\"token punctuation\">:</span> reference<span class=\"token punctuation\">-</span>docs\n<span class=\"token key atrule\">definitionId</span><span class=\"token punctuation\">:</span> acme\n<span class=\"token key atrule\">settings</span><span class=\"token punctuation\">:</span>\n  <span class=\"token key atrule\">noAutoAuth</span><span class=\"token punctuation\">:</span> <span class=\"token boolean important\">true</span></code></pre></div>\n      </div>\n<p>If you hide the <code class=\"language-text\">info</code> section by setting <code class=\"language-text\">hideInfoSection: true</code>, links to the authentication section from other parts of the documentation are automatically disabled, since there is no target content for them to link to.</p>\n<h2 style=\"position:relative;\"><a href=\"#step-3-include-the-pages-in-the-sidebar-or-other-places\" aria-label=\"step 3 include the pages in the sidebar or other places permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"step-3-include-the-pages-in-the-sidebar-or-other-places\"></div>Step 3: Include the pages in the sidebar (or other places)</h2>\n<p>Here is an example snippet within the <code class=\"language-text\">sidebars.yaml</code>:</p>\n\n      <div class=\"code-snippets-tabs\" >\n    <div class=\"snippets-tabs-headers\">\n      <span class=\"tab-header active\" data-lang=\"yaml\" data-snippet-id=\"All-operations-(grouped)\">All operations (grouped)</span><span class=\"tab-header \" data-lang=\"yaml\" data-snippet-id=\"All-operations-(wildcard-without-the-group)\">All operations (wildcard without the group)</span><span class=\"tab-header \" data-lang=\"yaml\" data-snippet-id=\"Single-operation\">Single operation</span>\n    </div>\n    <div class=\"snippets-tabs-contents\">\n      <div class=\"tab-content active\" data-lang=\"yaml\" data-snippet-id=\"All-operations-(grouped)\"><div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"61081871043819530000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`pages:\n  - page: reference.page.yaml`, `61081871043819530000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-61081871043819530000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token key atrule\">pages</span><span class=\"token punctuation\">:</span>\n  <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">page</span><span class=\"token punctuation\">:</span> reference.page.yaml</code></pre></div>\n      </div></div><div class=\"tab-content \" data-lang=\"yaml\" data-snippet-id=\"All-operations-(wildcard-without-the-group)\"><div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"28942029305994210000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`pages:\n  - page: reference.page.yaml/*`, `28942029305994210000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-28942029305994210000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token key atrule\">pages</span><span class=\"token punctuation\">:</span>\n  <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">page</span><span class=\"token punctuation\">:</span> reference.page.yaml/*</code></pre></div>\n      </div></div><div class=\"tab-content \" data-lang=\"yaml\" data-snippet-id=\"Single-operation\"><div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"61846748371753840000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`pages:\n  - page: reference.page.yaml#operation/createUsersWithArrayInput`, `61846748371753840000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-61846748371753840000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token key atrule\">pages</span><span class=\"token punctuation\">:</span>\n  <span class=\"token punctuation\">-</span> <span class=\"token key atrule\">page</span><span class=\"token punctuation\">:</span> reference.page.yaml<span class=\"token comment\">#operation/createUsersWithArrayInput</span></code></pre></div>\n      </div></div>\n    </div></div>\n    \n<p>The first example \"All operations (grouped)\" puts the API in the sidebar inside of a group labeled with the name of the API.</p>\n<p>The second example \"All operations (wildcard without the group)\" puts the API in the sidebar without any explicit group. You may define a group if you wish in the sidebars.yaml.</p>\n<p>The third example \"Single operation\" puts a single operation into the sidebar.</p>\n<p>Keep in mind, any given operation can only be referenced once within the sidebars. A sidebar with both <code class=\"language-text\">reference.page.yaml</code> and <code class=\"language-text\">reference.page.yaml#operation/createUsersWithArrayInput</code> would have a conflict because the <code class=\"language-text\">createUsersWithArrayInput</code> operation is already included in the <code class=\"language-text\">reference.page.yaml</code>.</p>\n<h2 style=\"position:relative;\"><a href=\"#step-4-render-api-reference-docs-in-mdx-pages\" aria-label=\"step 4 render api reference docs in mdx pages permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"step-4-render-api-reference-docs-in-mdx-pages\"></div>Step 4: Render API reference docs in MDX pages</h2>\n<p>When you have declared your API definitions, you can use their <code class=\"language-text\">definitionId</code> with React components to display API reference docs in MDX pages. Pointers allow you to target and display specific parts of the API documentation.</p>\n<p>The following components work with API reference docs:</p>\n<ul>\n<li>\n<a href=\"https://redoc.ly/docs/developer-portal/components/json-schema/\">JsonSchema</a>\n</li>\n<li>\n<a href=\"https://redoc.ly/docs/developer-portal/components/openapi-code-sample/\">OpenApiCodeSample</a>\n</li>\n<li>\n<a href=\"https://redoc.ly/docs/developer-portal/components/openapi-example/\">OpenApiExample</a>\n</li>\n<li>\n<a href=\"https://redoc.ly/docs/developer-portal/components/openapi-request-body/\">OpenApiRequestBody</a>\n</li>\n<li>\n<a href=\"https://redoc.ly/docs/developer-portal/components/openapi-response/\">OpenApiResponse</a>\n</li>\n<li>\n<a href=\"https://redoc.ly/docs/developer-portal/components/openapi-tryit/\">OpenApiTryIt</a>\n</li>\n</ul>\n<p>They are supported by default in the portal. You can also develop your own components.</p>\n<p>To display API reference docs in an <code class=\"language-text\">.mdx</code> file, first import the React component, such as <code class=\"language-text\">OpenApiResponse</code>:</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"33873623746979800000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`import { OpenApiResponse } from &quot;@redocly/developer-portal/ui&quot;;`, `33873623746979800000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-33873623746979800000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"jsx\"><pre class=\"language-jsx\"><code class=\"language-jsx\"><span class=\"token keyword\">import</span> <span class=\"token punctuation\">{</span> OpenApiResponse <span class=\"token punctuation\">}</span> <span class=\"token keyword\">from</span> <span class=\"token string\">\"@redocly/developer-portal/ui\"</span><span class=\"token punctuation\">;</span></code></pre></div>\n      </div>\n<p>Then you can use it as follows:</p>\n<p><strong>With code samples panel</strong></p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"38691779035780360000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`<OpenApiResponse\n  definitionId=&quot;acme&quot;\n  pointer=&quot;#/components/responses/CoyoteResponse&quot;\n/>`, `38691779035780360000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-38691779035780360000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"html\"><pre class=\"language-html\"><code class=\"language-html\"><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>OpenApiResponse</span>\n  <span class=\"token attr-name\">definitionId</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>acme<span class=\"token punctuation\">\"</span></span>\n  <span class=\"token attr-name\">pointer</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>#/components/responses/CoyoteResponse<span class=\"token punctuation\">\"</span></span>\n<span class=\"token punctuation\">/></span></span></code></pre></div>\n      </div>\n<p><strong>Without code samples panel</strong></p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"78980314710306780000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`<OpenApiResponse\n  definitionId=&quot;acme&quot;\n  pointer=&quot;#/components/responses/CoyoteResponse&quot;\n  hideSamples=&quot;{true}&quot;\n/>`, `78980314710306780000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-78980314710306780000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"html\"><pre class=\"language-html\"><code class=\"language-html\"><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>OpenApiResponse</span>\n  <span class=\"token attr-name\">definitionId</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>acme<span class=\"token punctuation\">\"</span></span>\n  <span class=\"token attr-name\">pointer</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>#/components/responses/CoyoteResponse<span class=\"token punctuation\">\"</span></span>\n  <span class=\"token attr-name\">hideSamples</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>{true}<span class=\"token punctuation\">\"</span></span>\n<span class=\"token punctuation\">/></span></span></code></pre></div>\n      </div>","headings":[{"value":"Integrating API reference docs into your developer portal","depth":1},{"value":"Step 1: Declare your API definition(s)","depth":2},{"value":"Declare multiple APIs","depth":3},{"value":"Step 2: Add pages that reference the definitions","depth":2},{"value":"Set up pagination for integrated Reference docs","depth":3},{"value":"Show or hide content in integrated Reference docs","depth":3},{"value":"Step 3: Include the pages in the sidebar (or other places)","depth":2},{"value":"Step 4: Render API reference docs in MDX pages","depth":2}]},"contentItem":{"data":{"lastModified":"2023-03-21T02:46:22.000Z","enableToc":null,"disableLastModified":null,"tocMaxDepth":null,"requestLogin":false}},"siteConfig":{"enableToc":false,"disableLastModified":false,"tocMaxDepth":4}},"pageContext":{"matchPath":"","id":"8c9b0875-c060-599b-90dd-156faf5a00f9__redocly content/developer-portal/redoc-integration/","seo":{"title":"Integrating API reference docs","description":null,"image":"","keywords":null,"jsonLd":null,"lang":null,"siteUrl":null},"pageId":"developer-portal/redoc-integration.md","pageBaseUrl":"/developer-portal/redoc-integration","type":"markdown","toc":{"enable":true,"maxDepth":4,"headings":[{"depth":1,"value":"Integrating API reference docs into your developer portal","id":"integrating-api-reference-docs-into-your-developer-portal"},{"depth":2,"value":"Step 1: Declare your API definition(s)","id":"step-1-declare-your-api-definitions"},{"depth":3,"value":"Declare multiple APIs","id":"declare-multiple-apis"},{"depth":2,"value":"Step 2: Add pages that reference the definitions","id":"step-2-add-pages-that-reference-the-definitions"},{"depth":3,"value":"Set up pagination for integrated Reference docs","id":"set-up-pagination-for-integrated-reference-docs"},{"depth":3,"value":"Show or hide content in integrated Reference docs","id":"show-or-hide-content-in-integrated-reference-docs"},{"depth":2,"value":"Step 3: Include the pages in the sidebar (or other places)","id":"step-3-include-the-pages-in-the-sidebar-or-other-places"},{"depth":2,"value":"Step 4: Render API reference docs in MDX pages","id":"step-4-render-api-reference-docs-in-mdx-pages"}]},"data":{"title":"Integrating API reference docs"},"catalogInfo":null,"link":"/developer-portal/redoc-integration/","sidebarName":"","isLanding":false,"showPrevButton":null,"showNextButton":null,"apiVersions":null,"apiVersionId":null,"isDefaultApiVersion":null}},"staticQueryHashes":["1123603147","1302185487","1344209882","1398840060","1520077861","1975142765","2667623876","2950305614","3240152602","3743992808","561138138"]}