rohit-gohri / redocusaurus

OpenAPI for Docusaurus with Redoc
https://redocusaurus.vercel.app/
MIT License
629 stars 114 forks source link

Rendering Definitions in Redoc using swagger docs #292

Closed kevjumba closed 1 year ago

kevjumba commented 1 year ago

Hello, We have been using redocusaurus to render our docs but only the "paths" json key value pair is being rendered. We also have a bunch of response definitions under the "definitions" key that is not being rendered. Is there any ways to fix this. Here's our docusaurus config.

[
      "redocusaurus",
      {
        // Plugin Options for loading OpenAPI files
        specs: [
          {
            spec: "<api_swagger_json_file>",
            route: "/http-api/",
          },
        ],
        // Theme Options for modifying how redoc renders them
        theme: {
          // Change with your site colors
          primaryColor: "#1890ff",
          // https://github.com/Redocly/redoc#redoc-options-object
          options: {
            disableSearch: true,
            hideDownloadButton: true,
          },
        },
      },
    ],
  ],
rohit-gohri commented 1 year ago

Hello, I can't help fix the api spec. This package is only for integration with docusaurus docs. The API is rendered the same as by https://github.com/Redocly/redoc/ , you'll have to read their docs to figure out how to show definitions.

AFAIK you can use the x-tagGroups feature to show model definitions.