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

TypeError: "O is undefined" with url parameters #210

Open
GriMel opened this issue Nov 21, 2020 · 1 comment
Open

TypeError: "O is undefined" with url parameters #210

GriMel opened this issue Nov 21, 2020 · 1 comment

Comments

@GriMel
Copy link

GriMel commented Nov 21, 2020

I'm using flask-apispec with flask-restful
Example of view

from flask_restful import Resource, Api
from apispec import APISpec
from apispec.ext.marshmallow import MarshmallowPlugin
from flask_apispec.extension import FlaskApiSpec

api = Api(app)

app.config.update({
    'APISPEC_SPEC': APISpec(
        authorizations=authorizations,
        title='pets',
        version='v1',
        plugins=[MarshmallowPlugin()],
        openapi_version="3.0.3",
    ),
    'APISPEC_SWAGGER_URL': '/swagger/',
})

class ListView(MethodResource):
    def get(self, type_id, list_id):
        #some code

api.add_resource(ListView, '/api/types/<int:type_id>/lists/<int:list_id>/')
docs = FlaskApiSpec(app)
docs.register(ListView)

and when I open Swagger UI i get
image
image

@tabebqena
Copy link

tabebqena commented Jul 21, 2021

copy the json data and paste it here oas editor, It will show the error.
I faced the same issue with OAS version 3.

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