Skip to content

React warning on standard out when generating HTML documentation #2536

Closed

Description

Given the following files:

apis.yaml

openapi: "3.0.0"
info:
  version: 1.0.0
  title: Swagger Petstore
  license:
    name: MIT
servers:
  - url: http://petstore.swagger.io/v1
paths:
  /pets:
    get:
      summary: List all pets
      responses:
        '200':
          description: A paged array of pets
          headers:
            x-next:
              description: A link to the next page of responses
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Pets"
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
components:
  schemas:
    Pet:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
        tag:
          type: string
    Pets:
      type: array
      maxItems: 100
      items:
        $ref: "#/components/schemas/Pet"
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string

redocly.yaml

extends:
  - recommended

apis:
  public:
    root: ./apis.yaml
    decorators:
      remove-x-internal: on

theme:  
  openapi:
    expandDefaultServerVariables: true
    pathInMiddlePanel: true
    theme:
      typography:
        headings:
          fontWeight: bold
  1. Run the following command:

    npx @redocly/cli@1.12.0 build-docs apis.yaml --config ./redocly.yml --output ./index.html

    Produces the following output:

    Found ./redocly.yml and using theme.openapi options
    Prerendering docs
    Warning: Tabs: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
        at Tabs (/home/user/.npm/_npx/5f30b3299d387346/node_modules/react-tabs/lib/components/Tabs.js:72:24)
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at div
        at lu (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1672:877)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at observerComponent (/home/user/.npm/_npx/5f30b3299d387346/node_modules/mobx-react-lite/dist/mobxreactlite.cjs.development.js:263:12)
        at Cu (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1674:2933)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at $u (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1674:1856)
        at ju (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1674:1688)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at exports.ThemeProvider (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:27633)
        at dd (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1825:2282)
        at Be (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:16490)
    Warning: UncontrolledTabs: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
        at UncontrolledTabs (/home/user/.npm/_npx/5f30b3299d387346/node_modules/react-tabs/lib/components/UncontrolledTabs.js:86:36)
        at Tabs (/home/user/.npm/_npx/5f30b3299d387346/node_modules/react-tabs/lib/components/Tabs.js:72:24)
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at div
        at lu (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1672:877)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at observerComponent (/home/user/.npm/_npx/5f30b3299d387346/node_modules/mobx-react-lite/dist/mobxreactlite.cjs.development.js:263:12)
        at Cu (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1674:2933)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at $u (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1674:1856)
        at ju (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1674:1688)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at exports.ThemeProvider (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:27633)
        at dd (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1825:2282)
        at Be (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:16490)
    Warning: TabList: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
        at TabList (/home/user/.npm/_npx/5f30b3299d387346/node_modules/react-tabs/lib/components/TabList.js:29:24)
        at div
        at UncontrolledTabs (/home/user/.npm/_npx/5f30b3299d387346/node_modules/react-tabs/lib/components/UncontrolledTabs.js:86:36)
        at Tabs (/home/user/.npm/_npx/5f30b3299d387346/node_modules/react-tabs/lib/components/Tabs.js:72:24)
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at div
        at lu (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1672:877)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at observerComponent (/home/user/.npm/_npx/5f30b3299d387346/node_modules/mobx-react-lite/dist/mobxreactlite.cjs.development.js:263:12)
        at Cu (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1674:2933)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at $u (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1674:1856)
        at ju (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1674:1688)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at exports.ThemeProvider (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:27633)
        at dd (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1825:2282)
        at Be (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:16490)
    Warning: Tab: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
        at Tab (/home/user/.npm/_npx/5f30b3299d387346/node_modules/react-tabs/lib/components/Tab.js:56:35)
        at ul
        at TabList (/home/user/.npm/_npx/5f30b3299d387346/node_modules/react-tabs/lib/components/TabList.js:29:24)
        at div
        at UncontrolledTabs (/home/user/.npm/_npx/5f30b3299d387346/node_modules/react-tabs/lib/components/UncontrolledTabs.js:86:36)
        at Tabs (/home/user/.npm/_npx/5f30b3299d387346/node_modules/react-tabs/lib/components/Tabs.js:72:24)
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at div
        at lu (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1672:877)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at observerComponent (/home/user/.npm/_npx/5f30b3299d387346/node_modules/mobx-react-lite/dist/mobxreactlite.cjs.development.js:263:12)
        at Cu (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1674:2933)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at $u (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1674:1856)
        at ju (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1674:1688)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at exports.ThemeProvider (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:27633)
        at dd (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1825:2282)
        at Be (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:16490)
    Warning: TabPanel: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
        at TabPanel (/home/user/.npm/_npx/5f30b3299d387346/node_modules/react-tabs/lib/components/TabPanel.js:42:24)
        at div
        at UncontrolledTabs (/home/user/.npm/_npx/5f30b3299d387346/node_modules/react-tabs/lib/components/UncontrolledTabs.js:86:36)
        at Tabs (/home/user/.npm/_npx/5f30b3299d387346/node_modules/react-tabs/lib/components/Tabs.js:72:24)
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at div
        at lu (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1672:877)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at observerComponent (/home/user/.npm/_npx/5f30b3299d387346/node_modules/mobx-react-lite/dist/mobxreactlite.cjs.development.js:263:12)
        at Cu (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1674:2933)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at $u (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1674:1856)
        at ju (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1674:1688)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at div
        at I (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:22689)
        at exports.ThemeProvider (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:27633)
        at dd (/home/user/.npm/_npx/5f30b3299d387346/node_modules/redoc/bundles/redoc.lib.js:1825:2282)
        at Be (/home/user/.npm/_npx/5f30b3299d387346/node_modules/styled-components/dist/styled-components.cjs.js:1:16490)

Expected behavior

HTML should be generated without console warnings

Logs

OpenAPI description

Redocly Version(s)

1.12.0

Node.js Version(s)

v18.19.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions