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

Something went wrong. #14

Closed
RohitM-IN opened this issue Jun 7, 2021 · 1 comment
Closed

Something went wrong. #14

RohitM-IN opened this issue Jun 7, 2021 · 1 comment

Comments

@RohitM-IN
Copy link

hi,
i am using https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js and i tried using the one given in readme but its giving me the error

utils.js:50 Fetch finished loading: GET "https://crada.dev/doc/crada-doc.yaml".
(anonymous) @ utils.js:50
(anonymous) @ utils.js:8
r @ utils.js:4
t.readFileFromUrl @ utils.js:42
(anonymous) @ resolve.js:94
(anonymous) @ resolve.js:8
r @ resolve.js:4
loadExternalRef @ resolve.js:91
(anonymous) @ resolve.js:132
(anonymous) @ resolve.js:8
r @ resolve.js:4
resolveDocument @ resolve.js:126
(anonymous) @ bundle.js:31
(anonymous) @ bundle.js:8
r @ bundle.js:4
t.bundle @ bundle.js:26
(anonymous) @ loadAndBundleSpec.ts:33
(anonymous) @ tslib.es6.js:102
(anonymous) @ tslib.es6.js:83
(anonymous) @ tslib.es6.js:76
u @ tslib.es6.js:72
l @ redoc.standalone.js:37
(anonymous) @ StoreBuilder.ts:86
(anonymous) @ tslib.es6.js:102
(anonymous) @ tslib.es6.js:83
(anonymous) @ tslib.es6.js:76
u @ tslib.es6.js:72
t.load @ redoc.standalone.js:100
t.componentDidMount @ StoreBuilder.ts:67
is @ react-dom.production.min.js:212
dl @ react-dom.production.min.js:255
t.unstable_runWithPriority @ scheduler.production.min.js:19
qo @ react-dom.production.min.js:122
fl @ react-dom.production.min.js:248
Zs @ react-dom.production.min.js:239
Qs @ react-dom.production.min.js:230
Dl @ react-dom.production.min.js:281
(anonymous) @ react-dom.production.min.js:284
tl @ react-dom.production.min.js:240
Bl @ react-dom.production.min.js:284
t.render @ react-dom.production.min.js:290
xf @ standalone.tsx:53
(anonymous) @ standalone.tsx:86
(anonymous) @ standalone.tsx:90
n @ bootstrap:19
(anonymous) @ redoc.standalone.js:56
n @ bootstrap:19
(anonymous) @ bootstrap:83
(anonymous) @ redoc.standalone.js:7
(anonymous) @ universalModuleDefinition:9
(anonymous) @ universalModuleDefinition:1
Show 21 more frames
try.js:formatted:153 Something went wrong.
(anonymous) @ try.js:formatted:153
Promise.catch (async)
initTry @ try.js:formatted:152
(anonymous) @ api:27
DevTools failed to load source map: Could not load content for https://crada.dev/6d3017e92bb2b2c03e6b.worker.js.map: Fetch through target failed: Target not supported; Fallback: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

image

<body>
<redoc spec-url='{{ asset('doc/crada-doc.yaml') }}'></redoc>
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
<script src="{{ asset('js/try.js') }}"></script>
<script>
    initTry("{{ asset('doc/crada-doc.yaml') }}")
  </script>
</body>
@wll8
Copy link
Owner

wll8 commented Jun 8, 2021

redoc-try will use the element with id of redoc-container` by default, it looks like you missed it.

If adding <div id="redoc-container"></div> still does not work, you can try to replace openApi in the following code with https://crada.dev/doc/crada-doc.yaml .

<body>
  <div id="redoc-container"></div>
  <script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
  <script src="https://cdn.jsdelivr.net/gh/wll8/redoc-try@1.3.4/dist/try.js"></script>
  <script>
    // initTry(`https://crada.dev/doc/crada-doc.yaml`)
    initTry(`https://petstore.swagger.io/v2/swagger.json`)
  </script>
</body>

@wll8 wll8 closed this as completed Jun 19, 2021
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

2 participants