Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using oneOf breaks schema/responces view #606

Closed
beatcracker opened this issue Nov 14, 2021 · 0 comments
Closed

Using oneOf breaks schema/responces view #606

beatcracker opened this issue Nov 14, 2021 · 0 comments

Comments

@beatcracker
Copy link
Contributor

beatcracker commented Nov 14, 2021

Setup

I'm using basic example

<!doctype html> <!-- Important: must specify -->
<html>
<head>
  <meta charset="utf-8"> <!-- Important: rapi-doc uses utf8 characters -->
  <script type="module" src="https://unpkg.com/rapidoc/dist/rapidoc-min.js"></script>
</head>
<body>
  <rapi-doc
    spec-url="openapi.yaml"
    theme = "dark"
    allow-authentication ='false'
  > </rapi-doc>
</body>
</html>

Shema

Swagger UI for this schema: https://toptout.me/swagger/#/telemetry/getTelemetryById
Upd: switched to RapiDoc 😎

Screenshot

image

Console log

rapidoc-min.js:2 Uncaught (in promise) TypeError: Cannot convert undefined or null to object
    at Function.assign (<anonymous>)
    at Ib (unpkg.com/rapidoc@9.1.3/dist/rapidoc-min.js:2)
    at Ib (unpkg.com/rapidoc@9.1.3/dist/rapidoc-min.js:2)
    at Ib (unpkg.com/rapidoc@9.1.3/dist/rapidoc-min.js:2)
    at Ib (unpkg.com/rapidoc@9.1.3/dist/rapidoc-min.js:2)
    at Ib (unpkg.com/rapidoc@9.1.3/dist/rapidoc-min.js:2)
    at Ib (unpkg.com/rapidoc@9.1.3/dist/rapidoc-min.js:2)
    at Ib (unpkg.com/rapidoc@9.1.3/dist/rapidoc-min.js:2)
    at Ib (unpkg.com/rapidoc@9.1.3/dist/rapidoc-min.js:2)
    at Ib (unpkg.com/rapidoc@9.1.3/dist/rapidoc-min.js:2)
if (e.oneOf.length > 0) {
  let o = 0;
  for (const i in e.oneOf) {
    const a = Ib(e.oneOf[i], t);
    for (const t in a) {
      const s = Object.assign(a[t], n); // <-- Breaks here
      r[`example-${o}`] = s,
        jb(e.oneOf[i], r[`example-${o}`]),
        o++
    }
  }
}
@mrin9 mrin9 closed this as completed in 3e2a11d Nov 17, 2021
trebler added a commit to eDrillingSolutions/RapiDoc that referenced this issue Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant