question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

using this param causes render error

See original GitHub issue

v3.0.8

"parameters": [ { "name": "parts", "in": "query", "required": true, "description": "Parts to retrieve", "type": "array", "items": { "type": "string" }, "enum": [ "A", "B", "C", "D", "E", "F" ], "collectionFormat": "multi" } ] Is this just invalid syntax? when you click “Try It Now”

it renders that field as: ‘Could not render this component, see the console.’ Console has: TypeError: p.count is not a function at t.value (swagger-ui-bundle.js:95945) at t.n.render (swagger-ui-bundle.js:38091) at p._renderValidatedComponentWithoutOwnerOrContext (swagger-ui-bundle.js:50643) at p._renderValidatedComponent (swagger-ui-bundle.js:50643) at performInitialMount (swagger-ui-bundle.js:50643) at p.mountComponent (swagger-ui-bundle.js:50643) at Object.mountComponent (swagger-ui-bundle.js:44096) at performInitialMount (swagger-ui-bundle.js:50643) at p.mountComponent (swagger-ui-bundle.js:50643) at Object.mountComponent (swagger-ui-bundle.js:44096)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:19 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
hkosovacommented, May 5, 2017

The enum should be on the items level, not on the array level.

  "parameters": [
    {
      "name": "parts",
      "in": "query",
      "required": true,
      "description": "Parts to retrieve",
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "A",
          "B",
          "C",
          "D",
          "E",
          "F"
        ]
      },
      "collectionFormat": "multi"
    }
  ]

That said, the UI should probably handle this more gracefully.

0reactions
ksac1commented, Mar 25, 2019

The solution to the problem : “😱 Could not render this component, see the console.” in Swagger Open API 3 can be resolved by following the link: https://swagger.io/docs/specification/describing-parameters/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting error Too many re-renders when using useState to ...
I am getting error Too many re-renders. And I can't use id directly for the sake of reusability of the component, I need...
Read more >
ASP.NET Core Razor component lifecycle | Microsoft Learn
Objects might be null or incompletely populated with data while the lifecycle method is executing. Provide rendering logic to confirm that ...
Read more >
Triggering a render life cycle on a component - bUnit
Invoking methods on a component under test, which causes a render, e.g. by calling StateHasChanged , can result in the following error, if...
Read more >
React.Component
These methods are called when there is an error during rendering, ... Use this pattern with caution because it often causes performance issues....
Read more >
RenderFragment Parameter Causes Exception - Documentation
When I use a RenderFragment that comes as a parameter (for example, because I am wrapping ... Simple usage of the problematic component...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found