mzaglia/flask-redoc

Invalid reference token

Opened this issue · 1 comments

First off - this is just what I was looking for. So thank you for working on it.

I'm trying to test this out and am getting an error when I go to /docs:

Something went wrong...
Invalid reference token: schemas
Stack trace
Error: Invalid reference token: schemas
    at Function.o.get (https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js:2:286467)
    at ml (https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js:2:800613)
    at kl (https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js:2:805158)
    at e.value (https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js:2:807957)
    at new e (https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js:2:807285)
    at https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js:2:808407
    at Array.map (<anonymous>)
    at new e (https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js:2:808355)
    at new e (https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js:2:809765)
    at https://cdn.jsdelivr.net/npm/redoc/bundles/redoc.standalone.js:2:813845

ReDoc Version: 2.0.0-rc.57
Commit: e4f34f5

Any idea what I am doing wrong? I copied the example pets.yml and referred to it in my app setup like so:

from flask import Flask
from flask_redoc import Redoc

def create_app(config_object="settings"):
    app = Flask(__name__)
    redoc = Redoc(app, 'api_spec.yml')
    app.config.from_object(config_object)
    register_blueprints(app)
    return app

It looks like you have an issue with the content of api_spec.yml, which needs to be corrected.