{"componentChunkName":"component---src-templates-simple-markdown-js","path":"/developer-portal/oas-definitions/","matchPath":"","result":{"data":{"markdownRemark":{"html":"<h1 style=\"position:relative;\"><a href=\"#openapi-spec-definitions\" aria-label=\"openapi spec 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=\"openapi-spec-definitions\"></div>OpenAPI spec definitions</h1>\n<p>The developer portal may contain multiple API definitions.</p>\n<p>Define that in the <code class=\"language-text\">siteConfig.yaml</code> file.</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"51451737919118680000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`oasDefinitions:\n  petstore: ./openapi/petstore.yaml`, `51451737919118680000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-51451737919118680000\">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\">petstore</span><span class=\"token punctuation\">:</span> ./openapi/petstore.yaml</code></pre></div>\n      </div>\n<p>Notice that the petstore is pointing to an API definition on the local filesystem.</p>\n<p>For a great docs-like-code experience, we recommend pointing to our API registry links.\nThat will cause any update to those API definitions to trigger an update to your developer portal.</p>\n<p>A private definition can be accessed locally by using the OpenAPI CLI <a href=\"https://redoc.ly/docs/cli/commands/#login\">login</a> command.</p>\n<p>This is outside of the scope of this training exercise.</p>\n<h2 style=\"position:relative;\"><a href=\"#add-more-openapi-definitions\" aria-label=\"add more openapi 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=\"add-more-openapi-definitions\"></div>Add more OpenAPI definitions</h2>\n<p>Follow the example here, but utilize your own API definitions and rename them accordingly.\nIf your API definitions are accessible by URL, you may use those.\nOr else, add it to the local file system.</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"3669945460592250000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`oasDefinitions:\n  petstore: ./openapi/petstore.yaml\n  ultra: ./openapi/ultra-api.yaml\n  max: https://example.com/max/openapi.yaml`, `3669945460592250000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-3669945460592250000\">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\">petstore</span><span class=\"token punctuation\">:</span> ./openapi/petstore.yaml\n  <span class=\"token key atrule\">ultra</span><span class=\"token punctuation\">:</span> ./openapi/ultra<span class=\"token punctuation\">-</span>api.yaml\n  <span class=\"token key atrule\">max</span><span class=\"token punctuation\">:</span> https<span class=\"token punctuation\">:</span>//example.com/max/openapi.yaml</code></pre></div>\n      </div>\n<h3 style=\"position:relative;\"><a href=\"#add-a-page-yaml-file\" aria-label=\"add a page yaml file 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=\"add-a-page-yaml-file\"></div>Add a page yaml file</h3>\n<p>This project includes a sample petstore API.\nThere is a file at <code class=\"language-text\">openapi/reference.page.yaml</code>.</p>\n<p>The contents utilize the key <code class=\"language-text\">petstore</code> defined in the <code class=\"language-text\">siteConfig.yaml</code>.</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"69858625159487890000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`type: reference-docs\ndefinitionId: petstore`, `69858625159487890000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-69858625159487890000\">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> petstore</code></pre></div>\n      </div>\n<p>That provides the additional metadata we need to render the API.</p>\n<p>Read the <a href=\"https://docs.redoc.ly/developer-portal/redoc-integration/\">docs</a> about the available properties, and how to utilize this page within the sidebar.</p>\n<p>Be sure to add reference to your page in the <code class=\"language-text\">sidebars.yaml</code>.</p>\n<p>Do you see your API reference docs?\nIf not, it may require a <a href=\"/developer-portal/setup/#clearing-cache\"><code class=\"language-text\">yarn clean</code> cache clearing action</a>.</p>","headings":[{"value":"OpenAPI spec definitions","depth":1},{"value":"Add more OpenAPI definitions","depth":2},{"value":"Add a page yaml file","depth":3}]},"contentItem":{"data":{"lastModified":"2025-12-17T21:55:39.000Z","enableToc":null,"disableLastModified":null,"tocMaxDepth":null,"requestLogin":false}},"siteConfig":{"enableToc":true,"disableLastModified":false,"tocMaxDepth":4}},"pageContext":{"matchPath":"","id":"728b395d-09a4-5fa7-812f-27968691785d__redocly content/developer-portal/oas-definitions/","seo":{"title":"OpenAPI spec definitions","description":null,"image":"","keywords":null,"jsonLd":null,"lang":null},"pageId":"developer-portal/oas-definitions.md","pageBaseUrl":"/developer-portal/oas-definitions","type":"markdown","toc":{"enable":true,"maxDepth":4,"headings":[{"depth":1,"value":"OpenAPI spec definitions","id":"openapi-spec-definitions"},{"depth":2,"value":"Add more OpenAPI definitions","id":"add-more-openapi-definitions"},{"depth":3,"value":"Add a page yaml file","id":"add-a-page-yaml-file"}]},"data":{"title":""},"catalogInfo":null,"link":"/developer-portal/oas-definitions/","sidebarName":"","isLanding":false,"showPrevButton":null,"showNextButton":null,"apiVersions":null,"apiVersionId":null,"isDefaultApiVersion":null}},"staticQueryHashes":["1123603147","1180902673","1302185487","1344209882","1398840060","1520077861","1975142765","2667623876","2950305614","3743992808","561138138"]}