Fix TypeError: Cannot read property 'anyOf' of undefined

Created on 1 December 2020, over 4 years ago
Updated 4 October 2023, over 1 year ago

In conjunction with drupal/openapi_ui_swagger , when calling the "/get" path we get the following console error.

TypeError: Cannot read property 'anyOf' or undefined
at e (fn.js: 279)
at k (fn.js: 339)
at configure-map.js: 61
at $ e (utils.js: 570)
at Ke (utils.js: 594)
at n.setDefaultValue (parameter-row.jsx: 107)
at new n (parameter-row.jsx: 30)
at u._constructComponentWithoutOwner (ReactCompositeComponent.js: 295)
at u._constructComponent (ReactCompositeComponent.js: 282)
at u.mountComponent (ReactCompositeComponent.js: 185)

After searching to the problem i found that the items prop is required when using type array.
https://swagger.io/docs/specification/data-models/data-types/#array

🐛 Bug report
Status

Needs work

Version

3.0

Component

Code

Created by

🇧🇪Belgium p-neyens

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024