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

Not working when I try to import a list of paramdict defined in different file. #111

Open
shanushaan opened this issue Jun 22, 2017 · 0 comments

Comments

@shanushaan
Copy link

I am using the project to generate the swagger UI with the params in my url, but all the params are not visible in Swagger UI. only the param variables defined in url are visible.
In docs.py I am making a list of dict of parameters as lot of params are repeated.
Below is the skelton code.

docs.py
param1Dict = {"name":"param1","description":"abc", "dataType":"string", "paramtype":"query","required":True,"allowMultiple":"false" }
param2Dict = {"name":"param2","description":"abc", "dataType":"string", "paramtype":"query","required":False,"allowMultiple":"false" }
param3Dict = {"name":"param3","description":"abc", "dataType":"integer", "paramtype":"query","required":True,"allowMultiple":"false" }

url1List =[param1Dict, param2Dict]
url2List = [param3Dict]
url3List= [param2Dict, .... , paramNDict]

in App,py.

from doc import url1List, url2List, url3List

class A(Resource):
@swagger.operation(notes="blah", parameters=url1List)
def get(param1):
# " Do the task here"
return response

what am I doing wrong here ?

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