1

I created an OpenAPI JSON document for a RESTful service and am using ReDoc to display it.

Is there a way to pass the OpenAPI spec as a JSON object directly to ReDoc without using a JSON file or URL?

<!DOCTYPE html>
<html>
  <head>
    <title>ReDoc</title>
    ...
  </head>
  <body>

    <redoc spec = {{object}} ></redoc>  <----------- Is this possible?

    <script src="/doc/bundles/redoc.standalone.js"> </script>
  </body>
</html>
Helen
  • 87,344
  • 17
  • 243
  • 314

1 Answers1

-2

Yes. You could pass json object or a URL.

malras
  • 1
  • 1
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 22 '21 at 02:49