<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: OpenAPI - Unable to render this definition in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/openapi-unable-to-render-this-definition/qaa-p/12427756#M4652954</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I guess the error in the UI comes from the fact that no OpenAPI definition could be created on the fly on your deployed app.  Which is expected, because the exporter, i.e. the `compile.to.api` API, is not available there (only locally when the app is started from @sap/cds-dk).  Reason for that is that we need to keep the runtime package @sap/cds small and efficient, and adding such designtime exporters would spoil this.&lt;/P&gt;&lt;P&gt;In an upcoming release we plan to further improve the &lt;EM&gt;designtime&lt;/EM&gt; flow by integrating the on the fly conversion into `cds watch`, but the situation for deployed applications will not change: no converter there.&lt;/P&gt;&lt;P&gt;I recommend to create the OpenAPI files locally and package them up during build, so that they are available for your application on BTP.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Christian&lt;/P&gt;</description>
    <pubDate>Thu, 17 Jun 2021 14:52:17 GMT</pubDate>
    <dc:creator>chgeo</dc:creator>
    <dc:date>2021-06-17T14:52:17Z</dc:date>
    <item>
      <title>OpenAPI - Unable to render this definition</title>
      <link>https://community.sap.com/t5/technology-q-a/openapi-unable-to-render-this-definition/qaq-p/12427755</link>
      <description>&lt;P&gt;Greetings.&lt;/P&gt;
  &lt;P&gt;I was following this documentation to create my API. &lt;A href="https://cap.cloud.sap/docs/advanced/openapi" target="test_blank"&gt;https://cap.cloud.sap/docs/advanced/openapi&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;It was working great in my localhost but when I deploy it on my BTP I get an error (both when I'm using a file or when it's generated on-the-fly.&lt;/P&gt;
  &lt;P&gt;My server configuration looks like this one &lt;A href="https://github.com/SAP-samples/cloud-cap-samples/blob/openapi/bookshop/server.js" target="test_blank"&gt;https://github.com/SAP-samples/cloud-cap-samples/blob/openapi/bookshop/server.js&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;This is how it looks on my localhost &lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1950451-local.png" /&gt;&lt;/P&gt;
  &lt;P&gt;This is the error I'm getting on the cloud&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1950454-error1.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1950455-error2.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Maybe it's some kind of bug and it's being hard to find a solution due that this is brand new.&lt;/P&gt;
  &lt;P&gt;Any help would be appreciate it.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 11:34:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/openapi-unable-to-render-this-definition/qaq-p/12427755</guid>
      <dc:creator>pamesty</dc:creator>
      <dc:date>2021-06-17T11:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: OpenAPI - Unable to render this definition</title>
      <link>https://community.sap.com/t5/technology-q-a/openapi-unable-to-render-this-definition/qaa-p/12427756#M4652954</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I guess the error in the UI comes from the fact that no OpenAPI definition could be created on the fly on your deployed app.  Which is expected, because the exporter, i.e. the `compile.to.api` API, is not available there (only locally when the app is started from @sap/cds-dk).  Reason for that is that we need to keep the runtime package @sap/cds small and efficient, and adding such designtime exporters would spoil this.&lt;/P&gt;&lt;P&gt;In an upcoming release we plan to further improve the &lt;EM&gt;designtime&lt;/EM&gt; flow by integrating the on the fly conversion into `cds watch`, but the situation for deployed applications will not change: no converter there.&lt;/P&gt;&lt;P&gt;I recommend to create the OpenAPI files locally and package them up during build, so that they are available for your application on BTP.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Christian&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 14:52:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/openapi-unable-to-render-this-definition/qaa-p/12427756#M4652954</guid>
      <dc:creator>chgeo</dc:creator>
      <dc:date>2021-06-17T14:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: OpenAPI - Unable to render this definition</title>
      <link>https://community.sap.com/t5/technology-q-a/openapi-unable-to-render-this-definition/qaa-p/12427757#M4652955</link>
      <description>&lt;P&gt;Thanks for answering. I've found a way to resolve the view via file, when I was using this way of redirecting the path (provided in the documentation): &lt;/P&gt;&lt;P&gt;const fileName = resolve(`srv/docs/${service.name}.openapi3.json`)&lt;/P&gt;&lt;P&gt;I was having the same problem, I tried using this way:&lt;/P&gt;&lt;P&gt;const fileName = resolve(__dirname, 'docs/openapi.json')&lt;/P&gt;&lt;P&gt;And it's solved the problem.&lt;/P&gt;&lt;P&gt;I hope this help anybody else and thanks for your help Mr. Christian.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 12:51:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/openapi-unable-to-render-this-definition/qaa-p/12427757#M4652955</guid>
      <dc:creator>pamesty</dc:creator>
      <dc:date>2021-06-18T12:51:55Z</dc:date>
    </item>
  </channel>
</rss>

